Probabilities, 7 items, 4 containers

  • Thread starter Thread starter rcgldr
  • Start date Start date
  • Tags Tags
    Probabilities
AI Thread Summary
The discussion centers on calculating the probabilities of distributing 7 items into 4 containers using a tetrahedral die. A total of 120 outcomes are identified, with 20 outcomes having no empty containers. The proposed method involves treating the outcomes as a base-4 number system, generating a histogram from all possible combinations of throws. Concerns are raised about the validity of this approach, particularly regarding the likelihood of different distributions, as not all configurations are equally probable. The conversation concludes with a focus on ensuring accurate counting of occurrences and the potential computational challenges when scaling the problem.
rcgldr
Homework Helper
Messages
8,923
Reaction score
675
Starting a new thread to avoid hi-jacking my previous thread:

https://www.physicsforums.com/forumdisplay.php?f=73

There are 7 items, and 4 containers. A 4 sided die (tetrahedron) is used as a random number generator and is thrown 7 times. After each toss, an item is dropped into a container corrersponding to the bottom side of the die.

There are (n+r-1)c(r) = 10c7 = 120 possible outcomes. Here is a table showing the possible outcomes. Each digit of each 4 digit number represents the number of items in a container:

0007 0016 0025 0034 0043 0052 0061 0070 0106 0115
0124 0133 0142 0151 0160 0205 0214 0223 0232 0241
0250 0304 0313 0322 0331 0340 0403 0412 0421 0430
0502 0511 0520 0601 0610 0700 1006 1015 1024 1033
1042 1051 1060 1105 1114 1123 1132 1141 1150 1204
1213 1222 1231 1240 1303 1312 1321 1330 1402 1411
1420 1501 1510 1600 2005 2014 2023 2032 2041 2050
2104 2113 2122 2131 2140 2203 2212 2221 2230 2302
2311 2320 2401 2410 2500 3004 3013 3022 3031 3040
3103 3112 3121 3130 3202 3211 3220 3301 3310 3400
4003 4012 4021 4030 4102 4111 4120 4201 4210 4300
5002 5011 5020 5101 5110 5200 6001 6010 6100 7000

Out of these 120 outcomes, (7-1)c(4-1) = 6c3 = 20 of them have no empty containers.

1114 1123 1132 1141 1213 1222 1231 1312 1321 1411
2113 2122 2131 2212 2221 2311 3112 3121 3211 4111

The goal here is to determine the probability of occurrence for each of the 120 possible outcomes.

One method that could be used to calculate the probablities would be to consider the total number of possible outcomes of the 7 throws of the 4 sided die as a 7 digit number in base 4, going from {0,0,0,0,0,0,0} (all items in first container), to {3,3,3,3,3,3,3} (all items in last container), so total number of cases = 47 = 16384.

A program could cycle through all 16384 cases, creating a histogram for the 120 possible outcomes. For examples of the output of using such a program, each of the 4 permutations for {0,0,0,7} occurs in 1 of the 16384 cases, each of the 4 permutations of {1,1,1,4} occurs in 210 of the 16384 cases, each of the 12 permutations of {1,1,2,3} occurs in 420 of the 16384 cases, and each of the 4 permutations of {1,2,2,2} occurs in 630 of the 16384 cases.

I'm wondering if this is a valid approach for determining the probabilities of the outcomes.
 
Last edited:
Mathematics news on Phys.org
Beware: not all distributions are equally likely. For example, (1,1,1,4,0,0,0...) is less likely than (1,1,2,3,0,0,0,...).

You can find this type of problem all worked out in Feller, "An Introduction to Probability Theory", Volume 1, 3rd edition, section II.5. He has an example which is very similar to your problem.
 
awkward said:
Beware: not all distributions are equally likely. For example, (1,1,1,4,0,0,0...) is less likely than (1,1,2,3,0,0,0,...).
I have {1,1,1,4} => 210/16384, {1,1,2,3} => 420/16384, so it's 1/2 as likely using my method.

awkward said:
You can find this type of problem all worked out in Feller, "An Introduction to Probability Theory", Volume 1, 3rd edition, section II.5.
I see if I can find this book in a library.

The main concern is if my approach was OK.
 
rcgldr said:
I have {1,1,1,4} => 210/16384, {1,1,2,3} => 420/16384, so it's 1/2 as likely using my method.

I see if I can find this book in a library.

The main concern is if my approach was OK.
Your approach will work, at least if you count the number of occurrences correctly, but you are in for some very long run times if you increase the number of items or containers by much.
 
awkward said:
Your approach will work, at least if you count the number of occurrences correctly, but you are in for some very long run times if you increase the number of items or containers by much.
I realize this, there's an expansion series that can be used to count the number of ways to get

7 items into 4 (non-empty) containers:
(4c4) ( (4c4)(47)) - (4c3)(37) + (4c2)(27) - (4c1)(17) ) = 8400.

7 items into 3 containers:
(4c3) ( (3c3)(37) - (3c2)(27) + (3c1)(17) ) = 7224.

7 items into 2 containers:
(4c2) ( (2c2)(27) - (2c1)(17) ) = 756

7 items into 1 container:
(4c1) ( (1c1)(17) ) = 4

You can also use a variation on probability to calculate the number of ways to produce vidual patterns, for each of the the 4 permuations of {1 2 2 2}, number of ways = (7!) / (1! 2! 2! 2!) = 630, for each of the 4 permutations of {1 1 1 4}, number of ways = (7!) / (1! 1! 1! 4!) = 210, ...

Keeping the size of the problem small enough to generate historgrams with a program allowed me to verify that the formulas I use corresponded to the program's results. The numbers match, but the main concern is using permutations instead of combinations to determine probability of patterns (or number of ways for a specific pattern versus number of ways for all patterns).
 
Last edited:
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Fermat's Last Theorem has long been one of the most famous mathematical problems, and is now one of the most famous theorems. It simply states that the equation $$ a^n+b^n=c^n $$ has no solutions with positive integers if ##n>2.## It was named after Pierre de Fermat (1607-1665). The problem itself stems from the book Arithmetica by Diophantus of Alexandria. It gained popularity because Fermat noted in his copy "Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos, et...
Thread 'Imaginary Pythagorus'
I posted this in the Lame Math thread, but it's got me thinking. Is there any validity to this? Or is it really just a mathematical trick? Naively, I see that i2 + plus 12 does equal zero2. But does this have a meaning? I know one can treat the imaginary number line as just another axis like the reals, but does that mean this does represent a triangle in the complex plane with a hypotenuse of length zero? Ibix offered a rendering of the diagram using what I assume is matrix* notation...
Back
Top