# Probability Question

Discussion in 'Probability' started by mukesh tiwari, Aug 11, 2010.

1. ### mukesh tiwariGuest

Hello all ,
I am just trying to solve a problem and stuck on
http://projecteuler.net/index.php?section=problems&id=121. To solve
this problem, i am generating the whole tree but it grows quite fast
[factorial ] with level and till level 15 its almost impossible
enumerate. Here is sketch of solution which i figured out. First turn
there are two balls [B,R] , second level [B,R,R] and number of
branches are 6, for third level [B,R,R,R] and branches are 24 and for
fourth level [B,R,R,R,R] and branch are 120. Now to win in four turn ,
the number of blue ball chose must be more than red so winning
condition is in all four turn i chose all the 4 blue or 3 blue and
1 red. I counted and got there are 11 turn in which number of blue
balls are more than red but this method is not applicable to 15 level
since 15! is too large to bruteforce. Kindly give me some hint in
right direction as i am trying to learn probability.
Thank you

mukesh tiwari, Aug 11, 2010

2. ### Pavel314Guest

Use the binomial distribution.

Pavel314, Aug 17, 2010

3. ### HenryGuest

"A bag contains one red disc and one blue disc. In a game of chance a
player takes a disc at random and its colour is noted. After each turn
the disc is returned to the bag, an extra red disc is added, and
another disc is taken at random. The player ... wins if they have
taken more blue discs than red discs at the end of the game. If the
game is played for four turns, the probability of a player winning is
exactly 11/120, ... a single game in which fifteen turns are played."

The total number of ordered cases of 15 red or blue discs is not 15! =
1,307,674,368,000 but 2^15 = 32,768 which is certainly possible, for
example on a spreadsheet. But even that is more than you need and not
the best approach, and you should be able to get the number down to
120 or less.

For example, the probability of reaching 3 blue and 1 red in any order
is 4/5 of the probability of reaching 3 blue and 0 red plus 1/5 of the
probability of reaching 2 blue and 1 red, i.e.
(4/5)*(1/24)+(1/5)*(1/4) = 1/12.

Henry, Sep 13, 2010