Probability of a Match

Teams India and Australia play a series of 7 matches. Each team has an equal probability of winning a match, and no match ends in a draw. If the probability that Team India wins at least three consecutive matches can be expressed as p q \dfrac pq , where p p and q q are coprime positive integers, find p + q p+q .


The answer is 175.

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.

3 solutions

Yong Zheng Xin
Feb 19, 2016

Since one team win, another team will lose, so we just have to look at one team (in this solution, team India).

Total number of all different situation: q q = 7 P P 0 + 7 P P 1 + 7 P P 2 + 7 P P 3 + 7 P P 4 + 7 P P 5 + 7 P P 6 + 7 P P 7 (7 P P 0 means team India has 0 losses, 7 wins, and 7 P P 1 means 1 losses and 6 wins, and so on.)

If team India wins 0, 1, 2 games: p p = 0

If team India wins 3 games: p p = 5 P P 1 = 5 ( Treat three consecutive winnings as a group and perform permutation)

If team India wins 4 games: p p = 5 P P 2 × \times 2 - 4 = 16 ( There are two ways of grouping three consecutive winnings and there can only be once 4 consecutive winnings )

If team India wins 5 games: when team India lost in 2nd and 4th games, or in 3rd and 5th games, or in 3rd and 6th games, the 3 consecutive winnings are broken. So p p = 7 P P 2 - 3 = 18

If team India wins 6 games: p p = 7 since no matter which game team India loses, the consecutive winning will be at least 3.

If team India wins 7 games: p p = 1

Adding all p p will give you 47

Then p p + q q = 47 + 128 = 175

A Steven Kusuman
Feb 16, 2016

I use dynamic programming to solve this kind of problem, the state is memo[pos][udh] , pos is the position where you are now , and udh is the number of match already won by india consecutively

..

We know that the number of possibility of the game is 2^7=128. We want to find the number of game where india won at most 2 consecutive game , and then subtract it from 128.

..

the recursive structure is

IF(udh==2) memo[pos][udh]=f(pos+1,0)

else memo[pos][udh]=f(pos+1,udh+1)+f(pos+1,0);

base case is when pos==7 return 1;

..

We build the DP table with bottom up manner

..

memo[7][0]=1;

memo[7][1]=1;

memo[7][2]=1;

memo[6][0]=memo[7][0]+memo[7][1]=2;

memo[6][1]=memo[7][0]+memo[7][2]=2;

memo[6][2]=memo[7][0]=1;

memo[5][0]=memo[6][0]+memo[6][1]=4;

memo[5][1]=memo[6][0]+memo[6][2]=3;

memo[5][2]=memo[6][0]=2;

memo[4][0]=memo[5][0]+memo[5][1]=7;

memo[4][1]=memo[5][0]+memo[5][2]=6;

memo[4][2]=memo[5][0]=4;

memo[3][0]=memo[4][0]+memo[4][1]=13;

memo[3][1]=memo[4][0]+memo[4][2]=11;

memo[3][2]=memo[4][0]=7;

memo[2][0]=memo[3][0]+memo[3][1]=24;

memo[2][1]=memo[3][0]+memo[3][2]=20;

memo[2][2]=memo[3][0]=13;

memo[1][0]=memo[2][0]+memo[2][1]=44;

memo[1][1]=memo[2][0]+memo[2][2]=37;

memo[1][2]=memo[2][0]=24;

result=memo[1][0]+memo[1][1]=81;

..

128-81=47 47/128 , p+q=175.

..

sorry if the solution is messy ^_^

Great, this idea can be formalized by creating the recurrence relations:

A ( n ) A(n) is the number of series of n n matches where India wins at least 3 consecutive matches
B ( n ) B(n) is the number of series of n n matches where India does not win at least 3 consecutive matches and lost the last match
C ( n ) C(n) is the number of series of n n matches where India does not win at least 3 consecutive matches, lost the second last match and won the last match
D ( n ) D(n) is the number of series of n n matches where India does not win at least 3 consecutive matches, lost the third last math and won both of the last 2 matches

What is the recurrence relation that your recursive structure states?

Calvin Lin Staff - 5 years, 3 months ago

Its a bit but anyways nyc one.

Harish Nandan - 5 years, 3 months ago

There are 2 7 2^7 = 128 total arrangements since every match is either a win or a loss for each side

Assigning i for team India & a for team Australia, 3 consecutive winning for team India is form of:

  • iiixxxx with 1 2 3 × 128 \frac {1}{2} ^ 3 \times 128 = 16 arrangements
  • aiiixxx with 1 2 4 × 128 \frac {1}{2} ^ 4 \times 128 = 8 arrangements
  • xaiiixx with 1 2 4 × 128 \frac {1}{2} ^ 4 \times 128 = 8 arrangements
  • xxaiiix with 1 2 4 × 128 \frac {1}{2} ^ 4 \times 128 = 8 arrangements
  • xxxaiii with 1 2 4 × 128 \frac {1}{2} ^ 4 \times 128 = 8 m i n u s {minus} 1 case of iiiaiii (already counted) mean 7

Total number of arrangement is 47, with probability 47 128 \frac {47}{128} \Rightarrow p + q = 47 + 128 = 175 \boxed{p + q = 47 + 128 = 175}

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...