# Christmass Puzzle

Discussion in 'Physics & Math' started by ProCop, Dec 25, 2003.

1. ### ProCopValued Senior Member

Messages:
1,258
I have to make my christmass tree: I have a bag with colored glass balls (red and blue). But I do not know how many blue and how many red balls. What I well know is the chances:

If I pick up two balls from the bag then

the chance to get 2 red balls is 5x bigger then to get 2 blue ones
the chance that the balls will be of the same color 6x bigger than the chance that they will be blue

How many balls do I have and what's their color?

3. ### one_ravenGod is a Chinese WhisperValued Senior Member

Messages:
13,433
12 balls, 2 blue and 10 red? :bugeye:

5. ### ProCopValued Senior Member

Messages:
1,258
No.

I will post the answer in a couple of days. Sunday...

7. ### NanoTecRegistered Senior Member

Messages:
30
Is there a solution with an even number of blue?

257115 Blue, 574926 Red. with eight other possibilities below this; the 6x bigger line is unnecessary. Is there a solution with an even number of blue?

8. ### ProCopValued Senior Member

Messages:
1,258
No, not in the sollution I have.

9. ### DinosaurRational SkepticValued Senior Member

Messages:
4,885
With a little bit of algebraic manipulation, I found a quadratic in the variable Red which was a function of Blue.

Any integer value of blue which resulted in a positive integer root provides a solution to the problem.

I could not do more analytically, but trial and error using MathCad provided the following three solutions for (Red, Blue).
• (6, 3)
• (15, 7)
• (100, 45)

10. ### DinosaurRational SkepticValued Senior Member

Messages:
4,885
NanoTec: MathCad agrees with your solution. I also noticed that the two probability restraints are equivalent, making one of them redundant.

For valid integer solutions, the number of Blue Balls must be odd. There are infinitely many pseudosolutions with either Red, Blue or both not integers.

11. ### XeliosWe're setting you adrift idiotRegistered Senior Member

Messages:
2,447
No, I swore to myself I'd never touch another probability problem if I could help it, and I'm not gonna. =P

12. ### metacristiRegistered Senior Member

Messages:
92
Indeed the second piece of data is redundant and there are an infinite number of integer solutions.

If n=the number of RED balls,m=the number of BLUE balls --->

P[2 RED]=[n/(n+m)]*[(n-1)/(m+n-1)] (1)

P[2 BLUE]=[m/(n+m)]*[(m-1)/(m+n-1)] (2)

From (1),(2) & the first premise --->

n*(n-1)=5m*(m-1) (3)

where (m+n) and (m+n-1) are different from 0

From the second premise --->

[n/(n+m)]*[(n-1)/(m+n-1)]+[m/(n+m)]*[(m-1)/(m+n-1)]=6*
[m/(n+m)]*[(m-1)/(m+n-1)]

where again (m+n) and (m+n-1) are different from 0

n*(n-1)+m*(m-1)=6m*(m-1) (4) that is it is reducing to (3)

m,n=different from 1

Let now A=5*m*(m-1) (5)

Introducing this in (3) --->

n<sup>2</sup>-n-A=0

delta=sqrt(1+4*A)=k

where k=integer;k>=3;k=3,5,7,9,11,13,15.....

and A=2,6,12,20,30,42,56,72..... respectively.

Also from n=(1+k)/2 (with k >=3),n must be an integer---> k=must be odd=3,5,7,9,11,13,15....

But A=(k<sup>2</sup>-1)/4 and m*(m-1)=A/5 therefore A must be an integer divisible by 5---> the criterion to choose m.

The smallest m which satisfy all these is for k=11 ---> A=30 --->

m*(m-1)=A/5=30/5=6 ---> m=3

n=(1+k)/2=(1+11)/2=12/2=6

P[2 BLUE]=(3/9)*(2/8)=6/72

P[2 RED]=(6/9)*(5/8)=30/72

Looks OK.

Therefore the set [n=6=the number of RED balls,m=3=the number of BLUE] is the smallest set that satisfy the required relations.

Last edited: Dec 26, 2003
13. ### everneoRe-searcherRegistered Senior Member

Messages:
2,621
What is wrong with one_raven's answer.?

The ratio of red and blue balls should be 5:1 (ofcourse it can be any number with this ratio)

P(b,b) = x

P(r,r) = 5x

P(r,b) or P(b,r) = 6x (i assume that you made a typo mistake - 'same color' should be 'different color' ; otherwise its redundant )

Probability of any 2 balls = 1

P(b,b) + P(b,r or r,b) + P(r,r) = 1 (all 3 combinations are mutually exclusive)

x + 6x + 5x = 1
x = 1/12

P(b,b) = 1/12

P(b,r or r,b) = 1/2 = P(b,b)+P(r,r)

P(r,r) = 5/12 ; P(b,b) = 1/12

r:b = 5:1

but simplicity need not be correct always, ofcourse

Last edited: Dec 26, 2003
14. ### ProCopValued Senior Member

Messages:
1,258
Now, i really made that mistake - it soud be indeed "different color"...my appology for that.

if you have only one blue ball than there is no chance that you will pull out two of them.

15. ### everneoRe-searcherRegistered Senior Member

Messages:
2,621
that is implied isn't it.? how about ratio 5n : 1n where n is +ve integer & n >1 ? still the ratio would be 5:1

16. ### DinosaurRational SkepticValued Senior Member

Messages:
4,885
MetaChristi: You are hateful like one of my Mathematics professors. m for Red and n for blue is not very helpful. Why not B for Blue and R for Red? Actually, in my MathCad analysis I used variables Red and Blue, making it even easier to keep track of what I was doing.

Figure probabilities with 2 Blue and 10 Red.
• P( Pick 2 Red) = (10 / 12)*(9 / 11), or 45 / 66
• P(Pick 2 Blue) = (2 / 12)*(1 / 11), or 1 / 66
• P(Pick 1 of each) = (10 / 12)*(2 / 11) + (2 / 12)*(10 / 11), or 20 / 66
The above add up to one as required, at least suggesting that the analysis is correct. Note ratio of Both Red to Both blue.

BTW: I do not see any reason to suspect a typo. There is a probability that both balls picked are the same color.
• P(Same color) = [ R / (R + B) ]*[ (R - 1) / (R + B -1) ] + [ B / (R + B) ]*[ (B - 1) / (R + B -1) ]

P(Same color) = [ R*(R -1) + B*(B - 1) ] / [ (R + B)*(R + B -1) ]
If you change the wording of the problem, the analysis is different, and I expect the solutions to be different. For the original working, I stand by my own post and agree with the single solution posted y NanoTec.

I hope there are no typo's above. Formatting mathematics at this forum is a bit messy.

17. ### ProCopValued Senior Member

Messages:
1,258

The solution is (as was already shown above)

These are (r+b)(r+b-1) the same all the way therefore can be left out)

2*red= 5(2*blue)=> r(r-1)= 5(b(b-1))

red and blue = 6(2*blue)=> 2rb=6(b(b-1)
=> 2rb = 6b**2 -6b => r = 3b-3

sub 1 in 2 : (3b-3)(3b-4)=5b(b-1)
Thus b is or 1 or 3.
B=1 cannot be because the chance 2*b would be 0 therefore b=3 and r=6
total 9 ball. This is what I can read, further sollutions are possible as Dinosaurus, metacristi, NanoTec show but I cannot contribute to further discussion anything more then i do here...kind of beyond my reach....

18. ### DinosaurRational SkepticValued Senior Member

Messages:
4,885
MetaChristi: Your analysis is essentially the same as mine. I did not see any analytical method for finding solutions: I just tried various integers for Blue and found some that resulted in integers values for Red.

Blue is an odd integer for all four solutions posted. It seems difficult to believe that this is a coincidence, but I do not see any obvious reason why it should be so.

I suspect that there are infinitely many solutions, but see no way to prove this.

The following must have an odd integer square root.
• 20Blue<sup>2</sup> - 20Blue + 1

If N is an integer square root of the above, Red = (1 + N) / 2
For Blue odd or even, N<sup>2</sup> will be an odd integer and N will also be and odd integer, making Red an integer. I see no reason why Blue must be odd for the above to have an integer

I see no reason to believe that Red must be even, although it is for the four solutions posted.

Perhaps some Number Theory expert can help here.

I see no reason to assume that there are infinitely many integer values of Blue for which N is an integer square root, nor do I have any reason to suppose that there are only a finite number of solutions.

BTW: There are infinitely many pseudo solutions with non integer values for Blue, Red or both.

19. ### contrarianRegistered Senior Member

Messages:
110
I got just the one solution R=6 b=3, but I assumed that the second statement meant for different(mixed) colours. I think it was a typo.(Oh I just noticed ProCop corrected himself later)

exp 1 P(RR)=5P(BB)

exp 2 P(mixed)=6P(BB)

also, P(mixed)=1- P(RR) - P(BB)

thus, 6P(BB)= 1 - P(RR) - P(BB)

sub in P(RR) =5P(BB)

6P(BB)=1 - 6P(BB)

thus, P(BB)=1/12, P(rr)=5/12, P(mixed)=6/12

P(mixed) = (m*n + n*m)/(m+n)(m+n-1)=6/12

thus .5=2mn/(m+n)(m+n-1)

thus, 4mn=(m+n)(m+n-1)

P(RR)=n(n-1)/(m+n)(m+n-1)=5/12

thus, n(n-1)/4mn=5/12

n-1=5/3m

n=5/3m + 1

P(BB)=1/12=m(m-1)/(m+5/3 m+1)(m+5/3m)

thus, 12m(m-1) = 8/3m(8/3 m +1)

reduces to m^2 = 3m, m can't equal 0 from the original problem

thus m=3

n=5/3(3) +1

n=6

I don't believe there are any other solutions.

Cheers!

20. ### metacristiRegistered Senior Member

Messages:
92
If the initial data were that 'the chance that the balls will be of the different colors is 6x bigger than the chance that they will be blue' then the solution (6 red,3 blue) is unique as ProCop has already proved (in my above notations the probability to obtain two balls of different colors is 2mn/[(m+n)*(m+n-1)],it's easy to verify ProCop's solution from here).

Returning at the initial problem if I let n*(n-1)=A (sorry Dinosaur but it is too late to change the notation of the variables,by the way you are right that there is no constraint for n=the number of BLUE balls to be odd) --->

5*[m^2-m-(1/5)*A]=0

sqrt(delta)=z=integer=[1+(4/5)*A]

Therefore A must belong to the sequence:10,30,60,100,150,210,280.... whilst z belongs to the series 3,5,7,9,11,13,15....respectively.

The valid solutions for m and n can be found for the common values of A (previously I have shown that in order for n to be an integer A must belong to the sequence 2,6,12,20,30,42,56,72.... for k=3,5,7,9,11,13,15...........

m=(1+z)/2=integer

and

n=(1+k)/2=integer

In the same time A=[(k^2-1)/4]=5*[(z^2-1)/4]

(k^2-1)=5*(z^2-1)

5*z^2=(k^2+4)

I have to 'dig' further to see the link between the two sequences of A presented above,I presume it will give some extra constraints which to show clearly that n and m are even and odd respectively.

Last edited: Dec 26, 2003

Messages:
92
Overlook it.

22. ### DinosaurRational SkepticValued Senior Member

Messages:
4,885
Some algebraic manipulation of the new description of the problem leads to two equations.
• Red<sup>2</sup> - Red - 5Blue(Blue - 1) = 0
Which results from the first condition: P(2 Red) = 5P(2 Blue). The redundant second condition to the first problem leads to the same quadratic.
• Red = 3(Blue - 1)
Which results from the second condition.
The two equations can only be satisfied by Red = 6 and Blue = 3, thus the second problem has a unique solution.

MetaChrisie, ProCop, & NanoTec did correct analyses, so the above is a summary of previous posts by them and me. For the benefit of others, the following summarizes various probabilities and can be used to verify the above.
• P(2 Red) = [ Red(Red - 1) ] / [ (Red + Blue) * (Red + Blue -1) ]
• P(2 Blue) = [ Blue(Blue - 1) ] / [ (Red + Blue) * (Red + Blue -1) ]
• P(Different) = 2RedBlue / [ (Red + Blue) * (Red + Blue -1) ]
• P(Same) = P(2 Red) + P(2 Blue)
One condition is that P(2 Red) = 5P(2 Blue), The other is P(Different) = 6P(2 Blue)

The first problem (the result of a typo) seems more interesting. The above quadratic is the only constraint on Red & Blue. The quadratic formula leads to the following.
• N<sup>2</sup> = 20Blue<sup>2</sup> - 20Blue + 1
• Red = (N + 1) / 2
• Four values of (Red, Blue) have been posted. NanoTec claims to know several more, but has not yet posted them.
• It is claimed that there are infinitely many integer solutions, but I see no way to prove this although I suspect that it is true.
If you focus on the above, it is obvious that any integer value of N must be odd, which guarantees that Red will be an integer.

For the four known solutions, Blue is odd and Red is even. I see no way to prove that this must be the case.

23. ### NanoTecRegistered Senior Member

Messages:
30
As requested: [Blue, Red]: (3,6) (7,15) (45,100) (117,261) (799,1786) (2091,4675) (14329,32040) (37513,83881)

A wonderful summary Dinosaur. (and HTML tags)

If even, Blue=2c: N<sup>2</sup>=1+40*(2c<sup>2</sup>-c)
I finally found what to look for:Detecting Perfect Squares, unfortunately every single value for c passes the first test.