"Not a run of the mill 20 balls in a bag problem!"

The credit for this problem goes not to me, but I found it very interesting (link to problem included in solutions). I can't see any way to do this without a computer program - so you are allowed to use one to solve it. However, I would be very interested to hear about a solution which does not require the use of a computer program.

The problem

There are a bag of 20 coloured balls: 3 Blue, 4 Pink, 5 Yellow and 8 Green. Pick balls out of the bag without replacement until you have 3 balls of the same colour.

Calculate the probability of those 3 balls being: a) Blue b) Pink c) Yellow d) Green

Let the 4 probabilities you get be B, P, Y, G respectively.

Type into the answer box: 1000 B + ( 200 P ) 2 + ( 100 Y ) 3 + 100 G 1000B + (200P)^2 + (100Y)^3 + \frac{100}{G}


The answer is 9854.28031144486.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Yuriy Kazakov
Mar 21, 2021

Only combinatorics.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
a=3
b=4
c=5
d=8
N=20
def n3(a,b,c,d):
  return(a*(a-1)*(a-2)/(20*19*18))
def n4(a,b,c,d):
  return(3*a*(a-1)*(a-2)*(b+c+d)/(20*19*18*17))
def n5(a,b,c,d):
  return((6*a*(a-1)*(a-2)
  *(b*(b-1)+c*(c-1)+d*(d-1)+2*b*c+2*b*d+2*d*c))/(20*19*18*17*16))
def n6(a,b,c,d):
  return(30*(a*(a-1)*(a-2)*(b*(b-1)*(c+d)+c*(c-1)*(b+d)+d*(d-1)*(b+c)))/(20*19*18*17*16*15)+60*(a*(a-1)*(a-2)*b*c*d/(20*19*18*17*16*15)))
def n7(a,b,c,d):
  return(90*(a*(a-1)*(a-2)*(b*(b-1)*(c*(c-1)+d*(d-1))+d*(d-1)*c*(c-1)))/(20*19*18*17*16*15*14)+180*(a-1)*a*(a-2)*(b*(b-1)*c*d+c*(c-1)*b*d+d*(d-1)*b*c)/(20*19*18*17*16*15*14))
def n8(a,b,c,d):
  return(15*42*a*(a-2)*(a-1)*(b*(b-1)*c*(c-1)*d+b*(b-1)*d*(d-1)*c+c*(c-1)*b*d*(d-1))/(20*19*18*17*16*15*14*13))
def n9(a,b,c,d):
  return(60*42*a*(a-1)*(a-2)*b*(b-1)*c*(c-1)*d*(d-1)/(20*19*18*17*16*15*14*13*12))
pa=n3(a,b,c,d)+n4(a,b,c,d)+n5(a,b,c,d)+n6(a,b,c,d)+n7(a,b,c,d)+n8(a,b,c,d)+n9(a,b,c,d)
pb=n3(b,a,c,d)+n4(b,a,c,d)+n5(b,a,c,d)+n6(b,a,c,d)+n7(b,a,c,d)+n8(b,a,c,d)+n9(b,c,d,a)
pc=n3(c,b,a,d)+n4(c,b,a,d)+n5(c,b,a,d)+n6(c,b,a,d)+n7(c,b,a,d)+n8(c,a,b,d)+n9(c,d,a,b)
pd=n3(d,b,c,a)+n4(d,b,c,a)+n5(d,b,c,a)+n6(d,b,c,a)+n7(d,b,c,a)+n8(d,a,b,c)+n9(d,a,b,c)
print('      ')
print('      ')
print(pa,pb,pc,pd)
print(pa+pb+pc+pd)
print(1000*pa+(200*pb)**2+(100*pc)**3+100/pd)

0.03623907052699622 0.10792195420678394 0.20951842275371688 0.646320552512503
1.0
9854.280311444867

Jeremy Ho
Feb 25, 2016

Recently, I answered this problem on Mathematics Stack Exchange . Although I managed to answer the question, I could not find a method to solve it without the use of a program - so I would be interested to hear about one. Click on the link to see my solution.

My computer program still uses the concept of states to find the solution.

The set of probabilities

Blue: 0.036239070527

Pink: 0.107921954207

Yellow: 0.209518422754

Green: 0.646320552513

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...