CombinatorialCase002: Difference between revisions

From NARS2000
Jump to navigationJump to search
(Created page with "This case produces the Partitions of the number L into exactly R parts. * <apll>L</apll> unlabeled balls (0), <apll>R</apll> unlabeled boxes (0), at least one ball per box (2...")
 
Line 92: Line 92:
==Identities==
==Identities==


Because partitions of <apll>L</apll> into <apll>R</apll> non-negative parts (<apll>001</apll>) is the same as partitions of <apll>L+R</apll> into <apll>R</apll> positive parts (<apll>002</apll>), these cases are related by the following identity (after sorting the rows):
Because partitions of <apll>L</apll> into <apll>R</apll> non-negative parts ([[CombinatorialCase001|<apll>001</apll>]]) is the same as partitions of <apll>L+R</apll> into <apll>R</apll> positive parts ([[CombinatorialCase002|<apll>002</apll>]]), these cases are related by the following identity (after sorting the rows):


<apll>002 1‼L R ↔ ⊃1+R↑¨001 1‼(0⌈L-R) R</apll>
<apll>002 1‼L R ↔ ⊃1+R↑¨001 1‼(0⌈L-R) R</apll>

Revision as of 20:56, 29 April 2017

This case produces the Partitions of the number L into exactly R parts.

  • L unlabeled balls (0), R unlabeled boxes (0), at least one ball per box (2)
  • Not ⎕IO-sensitive
  • Counted result is an integer scalar
  • Generated result is an integer matrix.

The count for this function is L PN R where L PN R calculates the number of Partitions of the number L into exactly R parts.

For example:

If we have 8 unlabeled balls (●●●●●●●●) and 3 unlabeled boxes with at least one ball per box, there are 5 (↔ 8 PN 3) ways to meet these criteria:






 
 
 
 
 
 
 
 
 
 
     
 




 
 
 
 

 
 
 
 
 
     
 
 



 
 
 


 
 
 
 
 
     
 
 



 
 
 
 

 
 
 
 

     
 
 
 


 
 
 


 
 
 
 

     

The diagram above corresponds to

      002 1‼8 3
6 1 1
5 2 1
4 3 1
4 2 2
3 3 2

      ⍝ Partitions of L into R parts
      ⍝ Unlabeled balls & boxes, ≥1 #bpb
      002 1‼5 5
1 1 1 1 1
      002 1‼5 4
2 1 1 1
      002 1‼5 3
3 1 1
2 2 1
      002 1‼5 2
4 1
3 2
      002 1‼5 1
5

Identities

Because partitions of L into R non-negative parts (001) is the same as partitions of L+R into R positive parts (002), these cases are related by the following identity (after sorting the rows):

002 1‼L R ↔ ⊃1+R↑¨001 1‼(0⌈L-R) R