Balls and Boxes Complicated Problem

  • Thread starter DavidSmith
  • Start date
  • Tags
    Balls
In summary, the conversation discusses the problem of finding the probability that in any one of 30 boxes containing a certain number of black and white balls, the ratio of black balls to white balls exceeds a certain value, while also taking into account a minimum number of black balls in that box. A method for calculating this probability is suggested using combinations and permutations. A function in Haskell is also provided as an example.
  • #1
DavidSmith
23
0
Consider a set box boxes. Say we have 30 boxes.

And then we have x number of black balls and y number of white balls

And these balls are stacked in the boxes. The total nuber of ways of stacking them is easy to find, but a much harder problem is to find the probability that for anyone of the 30 boxes the ratio of black balls to white balls exceeds a certain value donoted as say 'p' where the number of black balls must exceed another variable denoted 'q' for this ratio to be valid.

For example if you have 10 black balls 5 white balls and 30 boxes find the probability that in anyone of those boxes there will be twice as many black balls than white balls assuming that there must be greater than 2 blacks balls in tat particular box. The balls are randomly placed in the boxes and the placement of one ball has no affect on the placement of another.
 
Physics news on Phys.org
  • #2
Order of stacking within the boxes does not matter. You know that for a given number of white balls and black balls in a given box (say 4 and 2), the number of ways that you could have those appear in that box is the same as the number of ways that you could arrange 6 black balls and 3 white balls in the remaining boxes. Add up the total ways for each number of white or black balls that satisfies the ratio and the minimum number of black balls, and divide by the total number of ways. I couldn't tell you if this is the quickest way to approach the problem, but it should work eventually.


Edit: Since I'm learning Haskell, I tried this as an exercise
Code:
prob w b s min r = satisfy w b s min r / total w b s min

satisfy w b s min r = sum [countall (w - y) (b - x) (s - 1) | x <- [min..b], y <- [0..w], (y == 0 && x > 0) || x / y > r]

total w b s min = countall w (b - min) s

fac 0 = 1
fac n = n * fac (n - 1)

a `choose` b = fac a / (fac (a - b) * fac b)

countall w b s = ((w + s - 1) `choose` w) * ((b + s - 1) `choose` b)
This seems to work, but I haven't tested it much. For your example, r = 2, min = 3 (i.e. greater than 2), s = 30, w = 5, b = 10, prob gives a probability of about 0.98, which sounds about right.
 
Last edited:
  • #3


This is indeed a complicated problem, as it involves both combinatorics and probability. In order to find the probability that for any one of the 30 boxes, the ratio of black balls to white balls exceeds a certain value, we need to first determine the total number of ways in which the balls can be stacked in the boxes. This can be done using combinatorics, specifically the combination formula.

Once we have the total number of ways, we then need to consider the condition that there must be a minimum number of black balls (q) in the box for the ratio to be valid. This means we need to subtract all the combinations where there are less than q black balls in the box.

Next, we need to consider the condition that the number of black balls must exceed the number of white balls by a certain value (p). This requires us to further subtract all the combinations where the difference between the number of black balls and white balls is less than p.

After doing all these calculations, we will have the total number of valid combinations for the given conditions. We can then divide this number by the total number of ways to get the probability of the desired event.

In the example given, there are 10 black balls, 5 white balls, and 30 boxes. Using the combination formula, we can determine that there are a total of 2,716,635 ways to stack the balls in the boxes. However, not all of these combinations will meet the given conditions. We need to subtract all the combinations where there are less than 2 black balls in any one box, as well as all the combinations where the difference between the number of black balls and white balls is less than 10.

After doing the necessary calculations, we find that there are only 2,349,085 valid combinations. Dividing this by the total number of ways gives us a probability of approximately 0.8649. This means that there is an 86.49% chance that in any one of the 30 boxes, there will be at least twice as many black balls as white balls, given the conditions stated.

In conclusion, this is a complex problem that requires both combinatorics and probability to solve. It is important to carefully consider all the given conditions and use the appropriate formulas to find the desired probability.
 

1. What is the "Balls and Boxes Complicated Problem"?

The "Balls and Boxes Complicated Problem" is a mathematical problem that involves placing a certain number of balls into a specific number of boxes, with specific conditions and restrictions. It is often used as a puzzle or riddle to test problem-solving skills.

2. What are the rules and conditions of the "Balls and Boxes Complicated Problem"?

The rules and conditions of the problem can vary, but typically involve placing a certain number of balls into a specific number of boxes, with the following restrictions: each box must contain at least one ball, no box can contain more than a certain number of balls, and the total number of balls in all boxes must equal the given number of balls.

3. What is the purpose of the "Balls and Boxes Complicated Problem"?

The purpose of the problem is to challenge individuals to think critically and logically, and to come up with a solution that satisfies all of the given conditions and restrictions. It is often used as an exercise for problem-solving skills and critical thinking abilities.

4. Can the "Balls and Boxes Complicated Problem" have multiple solutions?

Yes, it is possible for the problem to have multiple solutions, depending on the specific rules and conditions given. However, some variations of the problem may have only one unique solution.

5. What are some strategies for solving the "Balls and Boxes Complicated Problem"?

Some strategies for solving the problem include making a list of all the possible combinations, using trial and error, and breaking the problem down into smaller, more manageable parts. It may also be helpful to use visual aids or diagrams to organize the information and find patterns. Ultimately, the key is to think logically and systematically to come up with a solution that meets all of the given conditions.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
1K
  • Precalculus Mathematics Homework Help
Replies
10
Views
952
  • Set Theory, Logic, Probability, Statistics
Replies
10
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
22
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
2K
Replies
2
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
9
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
Back
Top