Conditional Probability and Independence
3.17 Example: Colouring
Let K (b, c) be the number of different ways in which b indistinguishable balls may be coloured with c different colours. Showthat K (b, c) = K (b − 1, c) + K (b, c − 1) and deduce that
∞ b=0
xbK (b, c) = (1 − x)−c.
Use this to show K (b, c) = (b+c−1c−1 ).
Solution Pick any colour and call it grurple. The number of colourings is the number of ways of colouring the balls which do not colour any grurple, plus the number of ways of colouring which do use grurple. Hence,
K (b, c) = K (b − 1, c) + K (b, c − 1).
(1)
Also, K (1, c) = c, and K (0, c) = 1 because there are c colours for one ball and only one way of colouring no balls. Now let
gc(x)=∞
b=0
xbK (b, c).
Multiply (1) by xb and sum from b= 0 to get
gc(x)= xgc(x)+ gc−1(x). (2)
Nowusing Theorem 3.5.1, we solve (2) to find gc(x)= (1 − x)−c. Furthermore, we may write
(1− x)−c = (1 + x + x2+ · · ·)(1 + x + x2+ · · ·) · · · (1 + x + x2+ · · ·) Where the right side is the product of c brackets. We get K (b, c) by picking a term from each bracket, and we can say that picking xkfrom the i th bracket is like picking k objects of type i . The coefficient K (b, c) of xb is thus obtained by choosing b objects from c different types of objects with repetition. By Theorem 3.3.4, we have
K (b, c) =
c+ b − 1 b
. (3)
(4) Exercise Let C(n, k) be the number of ways of choosing a set of k objects from n distinct objects. Showthatn
k=0C(n, k)xk = (1 + x)n.
(5) Exercise Howmany nonnegative integer valued solutions for x1, x2, and x3does x1+ x2+ x3= 20 have? [For example, x1= 0, x2= 4, x3= 16.]
(6) Exercise Howmany positive integer valued solutions does x1+ x2+ x3= 20 have for x1, x2, and x3? [For example, x1= 5, x2= 6, x3= 9.]
(7) Exercise Showthat K (b, c) = (b+c−1c−1 ) by a method different from that in the above solution.
Worked Examples and Exercises 107 3.18 Example: Matching (Rencontres)
Suppose n different letters are typed with their corresponding envelopes. If the letters are placed at random in the envelopes, showthat the probability that exactly r letters match their envelopes is
p(n, r) = 1 r !
n−r k=0
(−1)k k! . (1)
[This problem first surfaced in France during the eighteenth century as a question about coincidences when turning over cards from packs (a kind of French snap).]
Using (3.4.4) gives (1) easily; we display a different method for the sake of variety.
Solution We can suppose that the order of the envelopes is fixed. Let the number of permutations of the letters in which r out of the n letters match their envelopes be a(n, r).
Then,
p(n, r) = a(n, r) n! .
Suppose we have another letter sealed in its correct envelope. Consider the number A of arrangements that there are of this letter and n letters of which r match their envelopes.
We can get this number A in two ways. Either:
(i) We place the sealed letter in any one of n+ 1 positions among the n letters to get (n+ 1)a(n, r) arrangements:
or:
(ii) We permute n+ 1 unsealed letters of which r + 1 match and then choose one of the r+ 1 matching letters to seal, giving (r + 1)a(n + 1, r + 1) arrangements.
The two numbers must both be equal to A, so (r+ 1)a(n + 1, r + 1) = (n+ 1)a(n, r) and hence, dividing by (n + 1)! we obtain
(r + 1)p(n + 1, r + 1) = p(n, r) (2)
with p(n, n) = 1/n!.
This is a rather interesting recurrence relation, which is solved by standard methods.
First iterating (2), we have
p(n, r) = 1
r !p(n− r, 0).
(3)
Nowdefine the probability generating function gn(x)=
n r=0
xrp(n, r); n ≥ 1.
Multiplying (2) by xr and summing over r gives gn(x)= xn
n! +
n r=1
p(r, 0) xn−r (n− r)!.
The sum on the right is a convolution as in Theorem 3.6.6. so multiplying by yn and summing over n, by Theorem 3.6.6
∞ 1
yngn(x)= ex y− 1 + ex y∞
1
ynp(n, 0).
Setting x= 1 and using Theorem 3.6.10 gives y
(5) Exercise Find the probability that exactly r+ s matches occur given that at least r matches occur. Showthat for large n, it is approximately
1
(6) Exercise Showthat the probability that the first letter matches its envelope, given that there are exactly r such matches, isnr.
(7) Exercise If a cheque is written for each addressee and these are also placed at random in the envelopes, find:
(a) The probability that exactly r envelopes contain the correct letter and cheque.
(b) The probability that no envelope contains the correct letter and cheque.
(c) The probability that every letter contains the wrong letter and the wrong cheque.
(8) Exercise Find the limit of each probability in 7(a), 7(b), and 7(c) as n→ ∞.
(9) Exercise Use 3.4.4 to prove (1) directly.
P R O B L E M S
1 You have two pairs of red socks, three pairs of mauve socks, and four pairs with a rather attractive rainbowmotif. If you pick two socks at random, what is the probability that they match?
2 A keen student has a algebra books. b books on boundary layers, and c calculus books. If he places them on one shelf at random, what is the probability that:
(a) Books on the same subject are not separated?
(b) Books on the same subject are in the usual alphabetical order, but not necessarily adjacent?
(c) Books on the same subject are adjacent and in alphabetical order?
3 A pack of cards is well shuffled and one hand of 13 cards is dealt to each of four players. Find the probability that:
(a) Each player has an ace.
(b) At least one player has a complete suit.
(c) My hand is void in at least one suit.
(d) Some player has all the aces.
What is the most likely distribution among suits in the dealer’s hand?
Problems 109 4 Poker You are dealt five cards in your hand at poker. What is the probability that you hold:
(a) One pair? (b) Two pairs?
(c) A straight? (d) A flush?
(e) A full house?
5 Birthdays Assume people are independently equally likely to be born on any day of the year.
Given a randomly selected group of r people, of whom it is known that none were born on February 29th, showthat the probability that at least two of them have their birthdays either on consecutive days or on the same day is prwhere
pr= 1 − (365− r − 1)!
(365− 2r)! 365−r+1, (2r < 365).
Deduce that if r = 13, then the probability of at least two such contiguous birthdays is approximately
1
2, while if r= 23 then the probability of at least two such contiguous birthdays is approximately
9 10.
6 You pick an integer at random between zero and 105inclusive. What is the probability that its digits are all different?
7 One hundred light bulbs are numbered consecutively from 1 to 100, and are off. They are wired to 100 switches in such a way that the nth switch changes the state (off to on, or on to off) of all the bulbs numbered kn; k≥ 1. If the switches are all thrown successively, how many light bulbs are on? What is the answer if you start with M light bulbs and M switches?
8 (a) Showthat the product of any r consecutive integers is divisible by r !.
(b) Showthat (k!)! is divisible by (k!)(k−1)!.
9 Poker Dice Each die bears the symbols A, K, Q, J, 10, 9. If you roll five such dice, what is the probability that your set of five symbols includes:
(a) Four aces? (b) Four of a kind? (c) A, K, Q?
10 Eight rooks are placed randomly on a chess board (with at most one on each square). What is the probability that:
(a) They are all in a straight line?
(b) No two are in the same row or column?
11 An urn contains 4n balls, n of which are coloured black, n pink, n blue, and n brown. Now, r balls are drawn from the urn without replacement, r≥ 4. What is the probability that:
(a) At least one of the balls is black?
(b) Exactly two balls are black?
(c) There is at least one ball of each colour?
12 Find the number of distinguishable ways of colouring the faces of a solid regular tetrahedron with:
(a) At most three colours (red, blue, and green);
(b) Exactly four colours (red, blue, green, and yellow);
(c) At most four colours (red, blue, green, and yellow).
13 An orienteer runs on the rectangular grid through the grid points (m, n), m, n = 0, 1, 2, . . . of a Cartesian plane. On reaching (m, n), the orienteer must next proceed either to (m + 1, n) or (m, n + 1).
(a) Showthe number of different paths from (0, 0) to (n, n) equals the number from (1, 0) to (n+ 1, n) and that this equals (2nn), where (kr)=r !(k−r)!k! .
(b) Showthat the number of different paths from (1, 0) to (n + 1, n) passing through at least one of the grid points (r, r) with 1 ≤ r ≤ n is equal to the total number of different paths from (0, 1) to (n+ 1, n) and that this equals (n2n−1).
(c) Suppose that at each grid point the orienteer is equally likely to choose to go to either of the two possible next grid points. Let Ak be the event that the first of the grid points (r, r), r ≥ 1,
to be visited is (k, k). Showthat
14 A bag contains b black balls andw white balls. If balls are drawn from the bag without replacement, what is the probability Pkthat exactly k black balls are drawn before the first white ball?
By consideringb
k=0Pk, or otherwise, prove the identity
b for positive integers b, w.
15 (a) Showthat N ‘£’ symbols and m‘.’ symbols may be set out in a line with a‘.’ at the right-hand end in (Nm−1+m−1) ways, provided m≥ 1.
(b) A rich man decides to divide his fortune, which consists of N one-pound coins, among his m friends. Happily N > m ≥ 1.
(i) In howmany ways can the coins be so divided?
(ii) In howmany ways can the coins be so divided if every friend must receive at least one?
(c) Deduce, or prove otherwise, that whenever N > m ≥ 1,
m
16 Let N balls be placed independently at random in n boxes, where n≥ N > 1, each ball having an equal chance 1/n of going into each box. Obtain an expression for the probability P that no box will contain more than one ball. Prove that N (N− 1) < K n, where K = −2 log P, and hence that N < 12+√
(K n+14).
Nowsuppose that P≥ e−1. Showthat N− 1 < 4n/5 and hence that K n < N(N + 1).
Prove finally that N is the integer nearest to√
(K n+14) when P ≥ e−1.
(a) Howmany such sequences are there?
(b) Howmany sequences have all aidistinct?
(c) Howmany sequences have the property that a1≤ a2≤ . . . ≤ an?
18 Let an(n= 2, 3, . . .) denote the number of distinct ways the expression x1x2. . . xncan be bracketed so that only two quantities are multiplied together at any one time. [For example, when n= 2 there is only one way, (x1x2), and when n= 3 there are two ways, (x1(x2x3)) and ((x1x2)x3).]
19 Coupons Each packet of some harmful and offensive product contains one of a series of r different types of object. Every packet is equally likely to contain one of the r types. If you buy n≥ r packets, showthat the probability that you are then the owner of a set of all r types is
r
Problems 111 20 Tennis Suppose that 2n players enter for two consecutive tennis tournaments. If the draws for each tournament are random, what is the probability that no two players meet in the first round of both tournaments? If n is large, showthat this probability is about e−12.
21 Lotteries Again Suppose that n balls numbered from 1 to n are drawn randomly from an urn.
Showthat the probability that no two consecutive numbers are actually carried by consecutive balls drawn is
[Hint: showthat the number of arrangements of 1, 2, . . . , n such that at least j pairs of consecutive integers occur is (n− j)!.]
22 Runs A fair coin is tossed n times yielding a heads and n− a tails. Showthat the probability that there are k head runs and k tail runs (see Example 3.14 for definitions) is 2(ak−1−1)(n−a−1k−1 )a!(n−a)!n! .
23 Camelot For obvious reasons Arthur would rather not sit next to Mordred or Lancelot at the Round Table. (There are n seats, and n knights including these three.)
(a) If the n knights sit at random, what is the probability that Arthur sits next to neither? Does it make any difference whether Arthur sits at random or not?
(b) If the n knights sit at random on two occasions, what is the probability that no one has the same left-hand neighbour on the two occasions?
24 By considering (x+ x2+ · · · + xn)r, showthat n indistinguishable objects may be divided into r distinct groups with at least one object in each group in (n−1r−1) ways.
25 There are 2n balls in an urn; the balls are numbered 1, 2, . . . , 2n. They are withdrawn at random without replacement. What is the probability that
(a) For no integer j , the 2 j th ball drawn bears the number 2 j ?
(b) For no integer j , the ball bearing the number j+ 1 is removed next after the ball bearing the number j ?
Find the limit as n→ ∞ of the probabilities in (a) and (b).
26 A chandelier has seven light bulbs arranged around the circumference of a circle. By the end of a given year, each will have burnt out with probability 12. Assuming that they do so independently, what is the probability that four or more bulbs will have burnt out?
If three bulbs burn out, what is the probability that no two are adjacent?
I decide that I will replace all the dead bulbs at the end of the year only if at least two are adjacent.
Find the probability that this will happen. If it does, what is the probability that I will need more than two bulbs?
27 A biased coin is tossed 2n times. Showthat the probability that the number of heads is the same as the number of tails is (2nn)( pq)n. Find the limit of this as n→ ∞.
30 Showthat for j≤ n/2, n−nj and interpret this in Pascal’s triangle.
33 Showthatn
k=0(a−kb )= (ab+1+1)− (ab+1−n), and deduce thatn
k=0(k+a−1a−1 )= (n+aa ).
34 An urn contains b blue balls and a aquamarine balls. The balls are removed successively at random from the urn without replacement. If b> a, showthat the probability that at all stages until the urn is empty there are more blue than aquamarine balls in the urn is (b− a)/(a + b).
Why is this result called the ballot theorem?
(Hint: Use conditional probability and induction.)
35 The points A0, A1, . . . , An lie, in that order, on a circle. Let a1= 1, a2= 1 and for n > 2, let an
denote the number of dissections of the polygon A0A1. . . Aninto triangles by a set of noncrossing diagonals, AiAj.
36 Let A, B, C, D be the vertices of a tetrahedron. A beetle is initially at A; it chooses any of the edges leaving A and walks along it to the next vertex. It continues in this way; at any vertex, it is equally likely to choose to go to any other vertex next. What is the probability that it is at A when it has traversed n edges?
37 Suppose that n sets of triplets form a line at random. What is the probability that no three triplets from one set are adjacent?
38 Suppose a group of N objects may each have up to r distinct properties b1, . . . , br. With the notation of (3.4.2), showthat the number possessing exactly m of these properties is
Mm=r−m
39 The M´enages Problem Revisited Use the result of Problem 38 to showthat the probability that exactly m couples are seated in adjacent seats is
pm= 2
40 Suppose that N objects are placed in a row. The operation Skis defined as follows: “Pick one of the first k objects at random and swap it with the object in the kth place.” Nowperform SN, SN−1, . . . , S1. Showthat the final arrangement is equally likely to be any one of the N ! permutations of the objects.
41 Suppose that n contestants are to be placed in order of merit, and ties are possible. Let r (n) be the number of possible distinct such orderings of the n contestants. (Thus, r (0)= 0, r(1) = 1, r(2) = 3, r(3) = 13, and so on.) Showthat r(n) has exponential generating function
Er(x)=∞
n=0
xn
n!r (n)= 1 2− ex.
[Hint: Remember the multinomial theorem, and consider the coefficient of xnin (ex− 1)k.]
Problems 113 42 Derangements (3.4.4 Revisited) Write ¯x= x1+ x2+ · · · xn. Explain why the number of
de-rangements of the first n integers is the coefficient of x1x2x3. . . xnin
(x2+ x3+ · · · + xn)(x1+ x3+ · · · + xn)· · · (x1+ x2+ · · · + xn−1)
= (¯x − x1)( ¯x− x2). . . (¯x − xn)
= (¯x)n− (¯x)n−1
xi+ · · · + (−)nx1x2. . . xn, and hence deduce the expression for Pngiven in (3.4.4).
43 (a) Choose n points independently at random on the perimeter of a circle. Showthat the probability of there being a semicircular part of that perimeter which includes none of the n points is n21−n. (b) Choose n points independently at random on the surface of a sphere. Showthat the probability
of there being a hemisphere which includes none of the n points is (n2− n + 2)2−n.
44 A large number of students in a lecture room are asked to state on which day of the year they were born. The first student who shares a birthday with someone already questioned wins a prize. Show that, if you were in that audience, your best chance of winning is to be the twentieth person asked.
45 The n passengers for an n-seat plane have been told their seat numbers. The first to board chooses a seat at random. The rest, boarding successively, sit correctly unless their allocated seat is occupied, in which case they sit at random. Let pnbe the probability that the last to board finds her seat free.
Find pn, and showthat pn→ 12, as n→ ∞.