You are on page 1of 3

CS 492

Solutions to Homework Assignment 2


September 24, 2008

1. Between Ahmedabad, Bombay, and Calcutta, there are the following highways: Ahmedabad
– Bombay, Ahmedabad – Calcutta, and Bombay – Calcutta. During monsoon, when there
is heavy rain, each of the road gets blocked independently with probability p. What is then
the probability that Calcutta will be accessible from Ahmedabad?

Solution. Let’s denote cities Ahmedabad, Bombay, and Calcutta as A, B, and C respectively.
Let X be the event that C is accessible from A.

Pr[X] = Pr[all three roads are blocked] + Pr[roads A-C and A-B are blocked] +
Pr[roads A-C and B-C are blocked]
= p3 + p2 (1 − p) + p2 (1 − p)
= p3 + p2 − p3 + p2 − p3
= 2p2 − p3
Pr[X] = 1 − 2p2 + p3

2. MU:Chapter 1, Problem 1.4.

Solution. Observe that for the loser to win exactly k games and the winner to win exactly
n games, the match must last for n + k games. Of these n + k games, the winner must win
the last game. Thus the required probability is
 
n−1+k
2 (1/2)n+k
k

The first 2 is because there are two possible winners in the match. The second term accounts
for the number of ways in which the loser can win k games from the first n − 1 + k games.
The last term is the probability of each of the possible outcomes in which the winner wins
exactly n games and the loser wins exactly k games.

3. Suppose that we roll 100 ten-sided unbiased dice. What is the probability that their
sum will be divisible by 5, assuming that the rolls are independent?
2 Solutions to Homework Assignment 2 September 24, 2008

Solution. Suppose that the results of the first 99 dice have been obtained and the 100th
die is yet to be rolled. Let Xi , 1 ≤ i ≤ 100, denote the result of the roll of the ith die. Let
Ek denote the event that X1 + X2 + . . . + X99 ≡ k(mod5), k = 0, 1, 2, 3, 4. Let E denote
the event that 5 | X1 + X2 . . . , X100 .

4
X
Pr[E] = Pr[E ∩ Ek ]
k=0
4
X
= Pr[Ek ] Pr[E|Ek ]
k=0
X4
= Pr[Ek ] Pr[X100 = 5 − k or X100 = 10 − k]
k=0
4
X 2
= Pr[Ek ]
10
k=0
1
=
5

4. Consider an urn containing one fair coin and one two-headed coin. Suppose that Alice
randomly draws a coin from the urn and flips it twice.
a. What is the sample space for this experiment?
b. Given that both flips produce heads, what is the probability that Alice drew
the two-headed coin from the urn?

Solution. The sample space is given by

Ω = {(Fair, H, H), (Fair, H, T ), (Fair, T, H), (Fair, T, T ), (Two-Headed, H, H)}.

We consider the following events.


F : event that Alice drew the fair coin.
B: event that Alice drew the two-headed coin.
C: event that both flips produce heads.

Pr[B ∩ C]
Pr[B|C] =
Pr[C]
Pr[B] Pr[C|B]
=
Pr[C ∩ F ] + Pr[C ∩ B]
(1/2)(1)
=
Pr[F ] Pr[C|F ] + Pr[B] Pr[C|B]
1/2
=
(1/2)(1/4) + (1/2)(1)
4
=
5
September 24, 2008 Solutions to Homework Assignment 2 3

5. Suppose we roll an unbiased die n times. Let Eij denote the event that the ith and
the jth rolls produce the same number. Show that the events {Eij | 1 ≤ i < j ≤ n} are
pairwise independent but not mutually independent.

Solution. Consider events Eij and Ekl , for i < k. Since these events involve different
rolls they are independent. However, if j = k, we have
Pr[Eij ∩ Ejl ] = Pr[rolls i, j, k produce the same number]
6 1
= 3
=
6 36
This proves that the events {Eij | 1 ≤ i < j ≤ n} are pairwise independent.

Now consider the events Eij , Ejk , and Eik , i < j < k.
6
Pr[Eij ∩ Ejk ∩ Eik ] =
63
1
=
36
1
6= Pr[Eij ] Pr[Ejk ] Pr[Eik ] =
63
This proves that the events {Eij | 1 ≤ i < j ≤ n} are not mutually independent.

6. A fair coin is tossed 2n times. What is the probability that we observe a consecutive
sequence of at least n heads?

Solution. We consider the following events.


E: event that we observe a consecutive sequence of at least n heads.
Ei : event that the first consecutive sequence of n heads begins with the ith toss,
1 ≤ i ≤ n + 1.
n
Clearly, Pr[E1 ] = 12 . Observe that for i ≥ 2, when Ei occurs, the (i − 1)th toss results
in tails. The results of the other tosses do not matter.
   n
1 1
Pr[Ei ] =
2 2
 n+1
1
=
2
n+1
X
Pr[E] = Pr[Ei ] since all Ei are mutually exclusive
i=1
 n n+1
1 X
= + Pr[Ei ]
2
i=2
 n  n+1
1 1
= +n
2 2
1 + n/2
=
2n

You might also like