More than a Match! - Applied Probability Trust

advertisement

Published by the Applied Probability Trust c Applied Probability Trust 2000

6

More than a Match!

DAVID YATES

How good are you at guessing?

One year, my usual family Christmas quiz took this form: match 10 painters with their paintings.

At least a few correct answers would be expected just by chance, so I worked out the odds, finding the general solution for the probability

P( n, a ) of at least n painters and paintings correctly matching where there are a painters and paintings.

I thought that, for example, P(4 , 10) , P(4 , 100) , P(4 , 1000) would be appreciably different probabilities, but, as you will see, I got a surprise!

I was able to find a recursion to generate the sequence of the number of ways in which there are no correct matches (i.e.

the derangements) for successive numbers of painters and paintings, reasoning as follows. Let the number of ways that there are no correct matches for n − 1 painters and paintings be

D n − 1

(the n

.

Add another painter correctly assigned to a painting th of each) to one of the

D n − 1 derangements of the n − 1 painters and paintings. Now we have n painters and paintings, with exactly one correctly matched. If the correctly assigned painter is exchanged with any of the incorrectly assigned painters, then we would have a derangement of the n painters and paintings. This can be done n − 1 ways.

But there are D n − 1 possible original derangements of the n − 1 painters and paintings. Thus, there are ( n − 1) D n − 1 ways to produce derangements among the n paintings and painters this way. But, if just one of the original n − 1 painters had been correctly assigned, and the other n − 2 deranged

(which could be in any of

D n − 2 ways), there would be the possibility of exchanging the new ( n th) correctly assigned painter with that one, producing some derangements. The number of derangements it would be possible to produce this way would be

( n − 1) D n − 2

.

There are evidently no other ways to produce derangements among the n paintings and painters besides these two methods. The total possible number of derangements among the n painters and paintings is thus given by the recursion

D n

= ( n − 1)( D n − 1

+ D n − 2

) .

(1)

Then, the numbers of ways in which there are no correct matches with increasing numbers of painters and paintings form the sequence (given that D

1 and D

2 are obviously 0, 1)

0 , 1 , 2 , 9 , 44 , 265 , 1854 , . . . .

(2)

From (1) we have

D n

− nD n − 1

= − D n − 1

= D n − 2

− ( n − 1) D

− ( n − 2) D n − 3 n − 2 i.e.

= − ( D n − 3

= · · ·

= ( − 1) n ( D

2

(

− n

2

D

1

3)

) ,

D n − 4

)

D n

= nD n − 1

+ ( − 1) n .

(3)

Now

D n

= n [( n − 1) D n − 2

+ ( − 1) n − 1 ] + ( − 1)

= n ( n − 1)[( n − 2) D n − 3

+ n ( − 1) n − 1 + ( −

+ (

1) n

− 1) n − 2 ] n

= · · ·

= n ( n − 1) . . .

3 D

2

+ · · · + ( − 1) n

+ n ( n − 1) . . .

4( − 1) 3

=

= n n !

!

1

2!

1

0!

1

3!

1

1!

+

+

1

4!

1

2!

− · · · +

1

3!

+

( − 1) n n !

1

4!

− · · · +

( − 1) n n !

.

Then, since there are a !

/ ( a − n )!

n !

ways of picking out n things from a things, the number of ways for exactly n painters and paintings to be incorrectly matched where there are a painters and paintings is given by a !

( a − n )!

n !

= n !

a !

( a − n )!

1

0!

1

0!

1

1!

+

1

1!

1

2!

+

1

2!

1

3!

+

· · ·

1

3!

+

+

( − 1) n n !

· · · +

( − 1) n n !

.

Since the total number of possible matchings is a !

, the probability of exactly n painters and paintings being incorrectly matched where there are a painters and paintings is given by the expression

1

( a − n )!

1

0!

1

1!

+

1

2!

1

3!

+ · · · +

( − 1) n n !

.

(4)

Then, the probability that at least n are correctly matched is

1 minus the sums of the probabilities that exactly a − n + 1

, a − n + 2 , . . . , a are incorrectly matched, i.e.

P( n, a ) =1 −

(

+

+ n

1

− 1)!

1

( n − 2)!

· · · +

1

0!

1

0!

1

0!

1

0!

1

1!

+ · · · +

( − 1) a − n +1

( a − n + 1)!

1

1!

1

1!

+ · · · +

+ · · · +

( − 1) a − n +2

( a − n + 2)!

( − 1) a a !

7 which can be rearranged to give

P( n, a ) = 1 −

1

0!

×

( n

1

1!

1

+

1)!

· · ·

+

+

( n

( − 1) a − n +1

( a − n + 1)!

1

− 2)!

+ · · · +

( − 1) a − n +2

+

+

( a − n + 2)!

· · · +

( − 1) a !

a

(

1

0!

n

1

.

2)!

+ · · · +

1

0!

1

0!

(5)

But 1 / 0!

− 1 / 1! + · · · + ( − 1) a − n +1 first few terms in the expansion of e

/ ( a − n + 1)!

are the

− 1 , so as a gets bigger this converges to

1 − e − 1

1

( n − 1)!

+

1

( n − 2)!

+ · · · +

1

0!

.

(6)

After working this out, I was surprised to find that the convergence can be very fast. For example, using (5), the probability of correctly matching at least four painters and paintings by chance can be seen to lie between

1

52 and from only eight painters and paintings upwards, converging to

1 − 8

3 e − 1 by (6) with n = 4 .

1

53

Having solved the problem, I wondered how others had tackled matching problems.

I found plenty of material on the Internet; see for example Torsten Sillke’s extensive annotated references (reference 1), one of which, L. Tak´acs

(reference 2), gives a history of the problem and various methods important for the development of statistical theory invented to tackle it. Recursion was the first method used in problems of this sort, beginning with Pierre de Montmort in

1708, who corresponded with Johann and Nikolaus Bernoulli on what was called the ‘probl`eme des rencontres’ . They were trying to determine the probabilities of winning a game of chance ( Jeu du Treize ), the analysis of games of chance figuring greatly in the early development of probability theory. Euler, in 1779 (see reference 2), was the first to present the derangements form of recursions derived here.

Tak´acs, in 1946 (see reference 2), proved Euler’s recursions using determinants, and Remmel, in 1983 (reference 3), gave proofs of them from combinatorics.

But there are many more approaches to the problem than recursion.

From Nikolaus Bernoulli’s methods (see reference 2) can be derived the principle of ‘inclusion and exclusion’ (an account of inclusion–exclusion is given in reference 4, for example). The probability that at least one of two events (A and B) happens is the probability of A, i.e. P(A), plus the probability of B, i.e. P(B), minus the probability of both, since P(A) includes both the probability of A alone and the probability of A with B, and similarly for B. Hence, adding P(A) and P(B) includes the probability of ‘both A and B’ twice, so then subtracting one of them leaves just the probability of ‘A alone or B alone or both’. Thus

P(A ∪ B) = P(A) + P(B) − P(A ∪ B) .

This extends further. Thus, for three events,

P(A ∪ B ∪ C) = P(A) + P(B) + P(C) − P(A ∩ B)

− P(A ∩ C) − P(B ∩ C) + P(A ∩ B ∩ C) .

Generally, the probability of at least one of a number of events happening is the probability of each one, minus the probability of each pair plus the probability of each treble

(since in subtracting the pairs, the trebles upwards would also be subtracted and they need adding back in), and so on.

Now the number of ways for n items of a to match a given ordering of the a items correctly, ignoring for now whether more than n match, is the number of ways of choosing n of the a multiplied by the number of ways for the rest to be distributed, namely a !

n !( a − n )!

( a − n )! = a !

n !

and the probability of this is 1 /n !

.

Then the probability of at least one of a correctly matching the ordering, by inclusion–exclusion, is

1

1!

1

2!

+

1

3!

1

4!

+ · · · +

( − 1) a a !

, from which we can obtain that the probability there are no matches of the ordering is

1 −

1

1!

1

2!

+

1

3!

1

4!

+ · · · +

( − 1) a a !

, which is simply (4) with n = a.

I was very gratified to learn that my matching problem, in Tak´acs’ words, ‘had great influence on the development of probability theory’!

References

1. Torsten Sillke, Average Number of Matches (last update 20.4.98), http://www.mathematik.uni-bielefeld.de/

∼ sillke/

PUZZLES/fixpoint-expected.

2. L. Tak´acs, The Problem of Coincidences, Arch. Hist. Exact Sci.

21 (3) (1980), pp. 229–244.

3. J. B. Remmel, A Note on a Recursion for the Number of

Derangements, Europ. J. Combin.

4 (1983), pp. 371–374.

4. W. Feller, An Introduction to Probability Theory and Its Applications , Vol. 1, 3rd edn (John Wiley, New York, 1968).

David Yates has a Ph.D. in psychology and does independent research in philosophical psychology. He obtained an A level in mathematics over 30 years ago and likes to dabble in mathematics for fun!

Download