- #1

rcgldr

Homework Helper

- 8,710

- 538

I already have the answer for this, but wondering if there's some efficient way to calculate this. There are 7 identical items, each with a equally random chance of being placed in 1 of 32 containers. What are the possible permutations?

00000000032 = 7 identical items into 1 of 32 distinct containers

00000062496 = 7 identical items into 2 of 32 distinct containers

00008957760 = 7 identical items into 3 of 32 distinct containers

00302064000 = 7 identical items into 4 of 32 distinct containers

03383116800 = 7 identical items into 5 of 32 distinct containers

13701623040 = 7 identical items into 6 of 32 distinct containers

16963914240 = 7 identical items into 7 of 32 distinct containers

-------------

34359738368 = total number of cases = 32

This was originally done for ecc (error correction code) analysis. A bit suprising was the fact that the probability of 7 identical items into 7 of 32 distinct containers is less than 1/2, 16963914240 / 34359738368 ~= 0.4937

As an example of grinding this out, the worst case is 7 identical items into 4 of 32 distinct containers. There are 6C3 = 20 possible scenarios, scenario 1 - 1st item goes into any of 32 containers, 2nd, 3rd, and 4th item go into same container as first item, 5th item goes into any of the remaining 31 containers, 6th into the remaining 30 containers, 7th into the remaining 29 containers. The number of ways to do this would be 32x1x1x1x31x30x29. scenario 2 - similar to scenario 1, but 4th item goes into any of the remaining 31 containers, 5th item into either of the 2 occupied containers, 6th into remaining 30, ... . The list looks like this:

(32x1x1x1x31x30x29) +

(32x1x1x31x2x30x29) +

(32x1x1x31x30x3x29) +

(32x1x1x31x30x29x4) +

...

(32x31x30x3x29x4x4)+

(32x31x30x29x4x4x4)

At the time, I used a summation series like this:

[tex]\binom{32}{4} \sum_{i=1}^4 (-1)^{4+i} \binom{4}{i} i^7[/tex]

The summation part can be explained as the number of ways (7 items into 1->4 of 4 containers) - (7 items into 1->3 of 4 containers) - - (7 items into 1->2 of 4 containers) - - - (7 items into 1->1 of 4 containers) to result in (7 items into 4 of 4 containers).

00000000032 = 7 identical items into 1 of 32 distinct containers

00000062496 = 7 identical items into 2 of 32 distinct containers

00008957760 = 7 identical items into 3 of 32 distinct containers

00302064000 = 7 identical items into 4 of 32 distinct containers

03383116800 = 7 identical items into 5 of 32 distinct containers

13701623040 = 7 identical items into 6 of 32 distinct containers

16963914240 = 7 identical items into 7 of 32 distinct containers

-------------

34359738368 = total number of cases = 32

^{7}This was originally done for ecc (error correction code) analysis. A bit suprising was the fact that the probability of 7 identical items into 7 of 32 distinct containers is less than 1/2, 16963914240 / 34359738368 ~= 0.4937

As an example of grinding this out, the worst case is 7 identical items into 4 of 32 distinct containers. There are 6C3 = 20 possible scenarios, scenario 1 - 1st item goes into any of 32 containers, 2nd, 3rd, and 4th item go into same container as first item, 5th item goes into any of the remaining 31 containers, 6th into the remaining 30 containers, 7th into the remaining 29 containers. The number of ways to do this would be 32x1x1x1x31x30x29. scenario 2 - similar to scenario 1, but 4th item goes into any of the remaining 31 containers, 5th item into either of the 2 occupied containers, 6th into remaining 30, ... . The list looks like this:

(32x1x1x1x31x30x29) +

(32x1x1x31x2x30x29) +

(32x1x1x31x30x3x29) +

(32x1x1x31x30x29x4) +

...

(32x31x30x3x29x4x4)+

(32x31x30x29x4x4x4)

At the time, I used a summation series like this:

[tex]\binom{32}{4} \sum_{i=1}^4 (-1)^{4+i} \binom{4}{i} i^7[/tex]

The summation part can be explained as the number of ways (7 items into 1->4 of 4 containers) - (7 items into 1->3 of 4 containers) - - (7 items into 1->2 of 4 containers) - - - (7 items into 1->1 of 4 containers) to result in (7 items into 4 of 4 containers).

Last edited: