Anda di halaman 1dari 7

The Trinidad and Tobago Mathematics Olympiad

Combinatorics 101
Shavak Sinanan
@shavaksinanan shavak.sinanan@linacre.oxon.org

July 2013

The Pigeonhole Principle

The Pigeonhole Principle is a simple yet powerful tool in combinatorial mathematics. Three versions are presented here. The Pigeonhole Principle (Simple). Given m ` 1 objects which are to be placed in m boxes, there must be some box containing at least 2 objects. Proof. This is obvious. Try contradiction for a rigourous proof. The Pigeonhole Principle (Generalised). Given Q nn U objects which are to be placed in m boxes, there must be some box containing at least objects. m Proof. Youve seen this before. Contradiction again. The Pigeonhole Principle (Innite Sets). Given an innite number of objects which are to be placed in nitely many boxes, there must be some box containing innitely many objects. Proof. Lets not get into a discussion of cardinality. . . Example 1.1. Prove that in a group of 13 people, at least 2 have their birthday in the same month. This is as simple as it gets. The people are the objects (pigeons) and the months are the boxes (pigeonholes). There are 13 objects and 12 boxes, so, by the Pigeonhole Principle, one box must contain 2 objects. That is, 2 persons must have their birthdays in the same month. Example 1.2. Prove that in a group of 6 people at a party there are at 3 people who are mutual acquaintances, or there are 3 mutual strangers. Assume that acquaintance is a symmetric relation. Identify person A. Divide the 5 remaining people into 2 categories: those that are acquainted with A, and those that are not. By the Pigeonhole Principle, one category must contain 3 people. Assume without loss of generality that the rst category contains 3 people, say B , C , and D. (Why can one do this?) If two people in the set tB, C, Du are acquainted, say B and C , then A, B , and C are mutual acquaintances. Otherwise, B , C , and D are mutual strangers. 1

Example 1.3. Show that given any 52 integers, there exist two of them whose sum, or else whose dierence, is divisible by 100. According to the last two digits in their decimal representation, place each of the 52 integers into one of the following 51 sets: t00u, t50u, t01, 99u, t02, 98u, . . . , t49, 51u. By the Pigeonhole Principle, one set must contain 2 integers. If this set is one of the rst two, then the result follows easily. If the 2 integers that lie in the same set dier in their last two digits in decimal representation then, by construction, their sum is divisible by 100. Otherwise, the 2 integers that lie in the same set have the same last two digits in decimal representation, whence their dierence is divisible by 100. Example 1.4. Prove that for any 5 points chosen ? in the interior a square of side length 2, there are 2 whose distance apart is less than 2. Divide the square into 4 squares each of side length ?1 (there is only one way to do this). 2 of The length of the diagonal of each of these squares is 2. By the Pigeonhole Principle, ? the points must lie in the same square, and so the distance between them is less than 2. Example 1.5. A chessmaster who has 11 weeks to prepare for a tournament, decides to play at least 1 game every day, but in order not to tire himself he decides not to play more than 12 games in any 7 day period. Show that there exists a succession of days during which he plays exactly 21 games. First note that the chessmaster can play a maximum of 11 12 132 games during his preparation period. Denote by an the number of games played up to and including day n. One has 1 a1 a2 a77 132. Consider the following list of integers: a1 , a2 , . . . , a77 , a1 ` 21, a2 ` 21, . . . , a77 ` 21. There are 77 2 154 positive integers in this list, each less than or equal to 153. By the Pigeonhole Principle, some pair of them must be equal. Since ai aj for i j , one must have aj ai ` 21 for some j i, and the result follows.

The Rules of Sum and Product

All of combinatorics rests upon the following two rules which are regarded here as self evident. The Rule of Product. If one event can occur in m ways and another event can occur in n ways, there are m n ways in which these two events can occur. The Rule of Sum. If one event can occur in m ways and another event can occur in n ways, there are m ` n ways in which one of these two events can occur. Clearly, the occurrence of an event can mean either the selection or the arrangement of a certain number of objects. Consider the following illustrative examples. Example 2.1. How many ways are there to choose 2 books of dierent languages among 5 books in Latin, 7 books in Greek, and 10 books in French? There are 5 7 ` 5 10 ` 7 10 155 ways, since there are 5 7 ways to choose a book in Latin and a book in Greek, 5 10 ways to choose a book in Latin and a book in French, and 7 10 ways to choose a book in Greek and a book in French. 2

Example 2.2 (The Number of Divisors). How many divisors does the positive integer n, k 1 2 whose prime factorisation is p 1 p2 pk , have? The answer is p1 ` 1qp2 ` 1q pk ` 1q. To see this, observe that any divisor of n must k 1 2 have the form p 1 p2 pk where 0 i i for each i. There are i ` 1 ways to choose i , and the expression follows from the Rule of Product. The number of divisors of a positive integer n is usually denoted by dpnq.

Permutations

The number of ways of arranging r of n distinct objects is denoted by P pn, rq or n P r . One may use the Rule of Product to derive an expression for P pn, rq. Observe that arranging r of n objects into some order is the same as placing r of the n objects into r distinct (marked) positions. There are n ways to ll the rst position, n 1 ways to ll the second position, and, in general, n k ` 1 ways to ll the k th position (k r). One therefore has n! P pn, rq npn 1q pn r ` 1q , pn rq! where 0! 1, and k ! k pk 1q pk 2q 2 1 for k a positive integer. Example 3.1. In how many ways can n people stand to form a ring? Observe that there is a dierence between a linear arrangement and a circular arrangement of objects. In the case of circular arrangement, the n people are not assigned to absolute positions, but are only arranged relative to one another. There are two ways of looking at this problem. 1. If the n people are arranged linearly and then the two ends of the line are closed to form a circular arrangement, we have a total of P pn, nq n! such arrangements. However, since only the relative positions of the n people are important, two of the circular arrangements obtained in this manner are actually the same if one arrangement can be changed into a second arrangement by rotating the rst arrangement by 1 position, or 2 positions, or, in general, k positions (k n). Consequently, the number of circular arrangements is equal to P pn, nq pn 1q! n 2. If a particular person is chosen to occupy a xed position, the remaining n 1 people can be arranged in P pn 1, n 1q pn 1q! ways using this xed position as a reference. Let there be n objects that are not all distinct. Specically, let there be q1 objects of the rst kind, q2 objects of the second kind, and, in general, qt objects of the tth kind. Then the number of permutations of these n objects is given by the formula n! . q 1 !q 2 ! q t !

To derive this formula, imagine that the n objects are marked so that objects of the same kind become distinguishable from one another. There are, of course, n! ways to permute these distinct objects. However, two permutations will be the same when the marks are erased if and only if they dier in the arrangement of marked objects that are of the same kind. Therefore, each permutation of the unmarked objects will correspond to q1 !q2 ! qt ! permutations of the marked objects. The result follows. Example 3.2. In how many ways can 5 dashes and 8 dots be arranged? What if only 7 of the 13 available symbols are used? If all 13 symbols are used, then the number of permutations is 13! 1287. 5!8! If just 7 symbols are used, then the number of permutations is 7! 7! 7! 7! 7! 7! ` ` ` ` ` 120. 5!2! 4!3! 3!4! 2!5! 1!6! 7! Example 3.3. Prove that pk !q! is divisible by k !pk1q! . Consider a collection of k ! objects of pk 1q! kinds, k of each kind. The number pk !q! k !pk1q! is the number of ways to permute these objects, and so must be an integer. The number of ways to arrange r objects when they are selected out of n distinct objects with unlimited repetitions is nr . This follows immediately from an application of the Rule of Product, since there are n ways to ll each of the r positions. Example 3.4. Assume decimal representation. Among the 10 billion numbers between 1 and 10000000000, how many of them contain the digit 1? How many of them do not? Among the 10 billion numbers between 0 and 9999999999, there are 910 numbers that do not contain the digit 1. Therefore, among the 10 billion numbers between 1 and 10000000000, there are 910 1 numbers that do not contain the digit 1, and 1010 p910 1q numbers that do. Example 3.5. What is the number of n-digit binary sequences that contain an even number of 0s? This problem is immediately solved if one observes that, by symmetry, half of the 2n n-digit binary sequences contain an even number of 0s, and the other half of the sequences contain an odd number of 0s. (Explain!) Another way to look at the problem is to consider the 2pn1q pn 1q-digit binary sequences. If an pn 1q-digit binary sequence contains an even number of 0s, one may append to it a 1 as the nth digit to yield an n-digit binary sequence that contains an even number of 0s. If an pn 1q-digit binary sequence contains an odd number of 0s, one may append to it a 0 as the nth digit to yield an n-digit binary sequence that contains an even number of 0s. Therefore, there are 2n1 n-digit binary sequences which contain an even number of 0s. 4

Combinations

n The number `nof ways of selecting r of n distinct objects is denoted by C pn, rq, or C r , or most often r . By the Rule of Product, n P pn, rq P pr, rq, r

because one can make an ordered arrangement of r of n objects by rst selecting r objects from the n objects and then aranging these r objects. One therefore arrives that the formula n n! . r pn rq!r! It is immediately obvious from this formula that n n . r nr (Explain this combinatorially.) One has Pascals Identity : n1 n1 n . ` r r1 r To prove this identity, argue as follows. Mark one of the objects as special. The number `n1 of ways to select r objects from these n objects including this special object is r1 . The ` 1 number of ways to select r objects from these n objects excluding this special object is n . r The result follows by the Rule of Sum. Exercise 4.1. Prove Pascals Identity algebraically. Not as illuminating as the combinatorial proof is it? Example 4.2. If no 3 diagonals of a convex decagon meet at the same point inside the decagon, into how many line segments are the diagonals divided by their intersections? First of all, the number of diagonals is equal to 10 10 35. 2 Since for every four vertices one can count exactly one intersection between the diagonals (the decagon is convex), there is a total of 10 210 4 intersections between the diagonals. Since a diagonal is divided into k ` 1 straight-line segments when there are k intersecting points lying along it and since each intersecting point lies along 2 diagonals, the total number of straight-line segments into which the diagonals are divided is 35 ` 2 210 455. 5

Example 4.3. In how many ways can 3 numbers be selected from the set t1, 2, . . . , 300u such that their sum is divisible by 3? Group the numbers in the set by their remainder when divided by 3. Clearly there are 100 numbers in each group. A simple check shows that the sum of 3 numbers chosen from the set will be divisible by 3 if and only if all 3 numbers are chosen from the same group, or if they each come from a dierent group. The number of ways to select the desired 3 numbers is thus 100 100 100 ` ` ` 1003 1485100. 3 3 3 It shall now be shown that when repetitions in the selection of the objects are allowed, the number of ways of selecting r objects from n distinct objects is n`r1 r Let the n objects be identied by the integers 1, 2, . . . , n, and let a specic selection of r objects be identied by a list of the corresponding integers arranged in increasing order. Modify the r integers as follows. Add 0 to the rst, 1 to the second, and, in general, k 1 to the k th . This corresponds the initial set of r integers to a selection of r integers from the set t1, 2, . . . , n ` r 1u where no repetition is allowed. The formula follows. Example 4.4. When 3 distinct dice are rolled, the number of outcomes is 63 216. If the 3 dice are indistinguishable, the number of outcomes is 6`31 56. 3 Example 4.5. For n given weights, what is the greatest number of dierent amounts that can be made up by the combinations of these weights? Since a weight can either be selected or not be selected in a combination, there are 2n combinations (including the 0 weight), and so a maximum possibility of 2n dierent amounts. Can this actually be achieved?

Distributions of Distinct Objects

Consider the distribution of r distinct objects into n distinct cells, where each cell can hold at most one object. Two cases must be considered. First, for n r, there are P pn, rq ways to place r distinct objects into n distinct cells. For r n, there are P pr, nq ways to place n of r distinct objects into n distinct cells. The distribution of r distinct objects into n distinct cells where each cell can hold any number of objects is equivalent to the arrangement of r of the n cells when repetitions are allowed, and there are nr ways to do this. Notice that in the above case, when more than one object is placed in the same cell, the objects are not ordered inside the cell. When the order of objects in a cell is also considered, the number of ways of distribution is pn ` r 1q! . pn 1q! 6

To prove this result, imagine such a distribution as an ordered arrangement of the r distinct objects and n 1 non-distinct intercell partitions. Using the previously derived formula for the permutation of r ` n 1 objects where n 1 of them are of the same kind yields the result. Example 5.1. What is the number of ways of arranging 7 ags on 5 masts when all the ags must be displayed but not all masts have to be used? The ags and the masts are assumed to be distinct, and order is important. The answer is therefore 11! p5 ` 7 1q! . p5 1q! 4!

Distributions of Non-distinct Objects


x1 ` x2 ` ` x10 191?

Exercise 6.1. How many non-negative integral solutions are there to the equation

What about positive integral solutions? Generalise.

Anda mungkin juga menyukai