mth202

June 19, 2018 | Author: Bhuppi Latwal | Category: Prime Number, Empty Set, Number Theory, Discrete Mathematics, Mathematical Analysis


Comments



Description

Lecture Notes on Discrete MathematicsA. K. Lal September 26, 2012 2 Contents 1 Preliminaries 5 1.1 Basic Set Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.2 Properties of Integers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.3 Relations and Partitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 1.4 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 2 Counting and Permutations 2.1 2.2 2.3 27 Principles of Basic Counting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 2.1.1 Distinguishable Balls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 2.1.2 Indistinguishable Balls and Distinguishable Boxes . . . . . . . . . . . . . 36 2.1.3 Indistinguishable Balls and Indistinguishable Boxes . . . . . . . . . . . . . 39 2.1.4 Round Table Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Lattice Paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 2.2.1 Catalan Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Some Generalizations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 2.3.1 50 Miscellaneous Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Advanced Counting 53 3.1 Pigeonhole Principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 3.2 Principle of Inclusion and Exclusion . . . . . . . . . . . . . . . . . . . . . . . . . 58 4 Polya Theory 63 4.1 Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 4.2 Lagrange’s Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 4.3 Group Action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 4.4 The Cycle Index Polynomial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 4.4.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 Polya’s Inventory Polynomial . . . . . . . . . . . . . . . . . . . . . . . . . 86 4.4.2 Applications 3 . . . . 106 . . . . . . . . . . . . .3 Applications to Generating Functions . . . . . . . . . . . . . . . 100 5. . . . . . . . . . . . . . . . . . . . . . . . . . . 93 5. . . . . .4 CONTENTS 5 Generating Functions and Its Applications 93 5.1 Formal Power Series . . . . . .2 Applications to Recurrence Relation . . . . . . . . . . . . . . . Chapter 1 Preliminaries We will use the following notation throughout these notes. . .1. Z. . one can also look at the following sets. 0. 4. R and C at the beginning of this chapter. −1. 2. R := the set of Real numbers. For the sake of convenience. 0. . 5 . {. 2. . relations. Q. and 6. . 1. .}. we have assumed that the integer 0. . 10}. 3. 1. the set of odd natural numbers. 4. such as N. For example. . 6. N := {0. . 1. q 6= 0}. 2. 1. 5. is also a natural number. the set of even natural numbers. 4. functions and the principle of mathematical induction. . 2. . . . q ∈ Z. . 5. 1. This chapter will be devoted to understanding set theory. −2. . −2. .1 Basic Set Theory We have already seen examples of sets. .}. . the set of even integers. {0. 5. 3. . . . 3. . Example 1. is a set that has no element. . 5. . Z := {. −1.}. The empty set. 1. . 4. denoted ∅. the set of odd integers. 2. We start with basic set theory. . 1. 3.}.}. 6. 7. . the set of Rational numbers. Q := { pq : p. −5. {1. . 2. the set of Integers.1. . {. .}. {0. −3. C := the set of Complex numbers. −4. 2. −6. the set of Natural numbers. 1. 10}. Definition 1. is a set that exactly contains those elements of A that are also elements of B. 1. Then A ∩ B = ∅ and A ∪ B = Z. Let A = {{b. c} be subsets of a set Ω. {c}} }. 2.6 CHAPTER 1. Let A be a set. Definition 1. . To be more precise. the set of non-zero real numbers. A′ = {x ∈ Ω : x 6∈ A}.1.2 (Subset. Z. denoted A ∩ B. These sets are example of what are called “subsets of a set”. equals B and vice-versa. Q. 2. denoted A ∪ B. if the number of distinct elements in A is finite. denoted A = B. {1. Let A be a set. the set of positive rational numbers. Complement. 7. R∗ = {x ∈ R : x 6= 0}. 10.4 (Cardinality). As mentioned earlier. Let A and B be two subsets of a set Ω. Then A ⊆ A. denoted |A|. c. is a set that contains every element of Ω that is not an element of A. b. Q. is a set that exactly contains all the elements of A and all the elements of B. Then their (a) union. . We also define certain operations on sets. the set of positive real numbers. If B is a set such that each element of B is also an element of the set A. 3.1 have been obtained by picking certain elements from the sets N. PRELIMINARIES 6. 8. {b. Q∗ = {x ∈ Q : x 6= 0}. Then A ∩ B = ∅ and A ∪ B = {a. c}. 2. A ∩ B = {x ∈ Ω : x ∈ A and x ∈ B}. b. denoted A′ . {{b}. the set of non-zero rational numbers.1. 4. A ∪ B = {x ∈ Ω : x ∈ A or x ∈ B}. R+ = {x ∈ R : x > 0}. R or C. then B is said to be a subset of the set A. 6. A set A is said to have finite cardinality.1. 4.1. Q+ = {x ∈ Q : x > 0}. Z. To be more precise. Specifically. Observe that N ⊆ Z ⊆ Q ⊆ R ⊆ C. 9. We observe that the sets that appear in Example 1. 5. Two sets A and B are said to be equal if A ⊆ B and B ⊆ A. all examples that appear in Example 1. The empty set is a subset of every set. c}. which we define next. it also follows that the complement of A.1. else the set A is said to have infinite cardinality. Intersection). Then the complement of A in Ω. . (b) intersection. R and C. . Thus. Example 1. denoted B ⊆ A. {c}}} and B = {a. in Z. Let A be the set of odd integers and B be the set of even integers. Union. Let A be a subset of a set Ω. .3.1 are subsets of one or more sets from N. 3. {{b}. 5. {a. . 1. Also. . {b}. (c) a multiple of 2 and 3 and leaves a remainder of 3 when divided by 5. b. . .1. . Definition 1. b2 . Then S is the set of even integers and it’s cardinality is infinite. a1 }.5. Let A = {∅}. c}}. . Also. .1. a2 }. Example 1. 2. b}.6. Exercise 1. {b. {{b. . bn } be two finite subsets of a set Ω. 8}? 2. The cardinality of the empty set equals 0. 3. am . Then P(∅) = {∅. {a. Does there exist unique sets X and Y such that X − Y = {1. A} = {∅}. . 2. c}. b2 . . c}. That is.4 is a particular case of this result. Now choose an element a ∈ Ω such that a 6= ai . BASIC SET THEORY Example 1. assume that A ∩ B = ∅. {a2 }. Then. Let A = {a1 . If 20 students play both football and cricket. . {c}}}. b. 1. A} = {∅. . a2 . Let A be a subset of a set Ω. . 4. . Then P(A) = {∅. {a.5. {∅}}. . . by definition it follows that A ∪ B = {a1 . . bn } and hence |A ∪ B| = |A| + |B|. 7} and Y − X = {2. . 3. Then P(A) = {∅. {am }} be a subset of a set Ω. Observe that Example 1. {{b}. In a class of 60 students. Let A = {a. . . . am } and B = {b1 . 5. when A ∩ B = ∅. . . 1. bn } be two finite subsets of a set Ω. 2. 1 ≤ i ≤ n. a2 . {c}. am }}. b2 . {a}. . c}. Fix a positive integer n and consider the set A = {1. Let A = {{b. Let A = {{a1 }. . {c}}}. . a2 .1.1. . Then |A ∪ B| = |A| + |B| − |A ∩ B|.7 1.7 (Power Set). {{b}. .8. {{b. for any i. . . {c}}} }. {a. Then P(A) = {∅. . 3. Then a set that contains all subsets of A is called the power set of A and is denoted by P(A) or 2A . b1 . (d) is a factor of 90 and the number of students who play cricket is a factor of 70. Let A = ∅. 6. . 4. . am } and B = {b1 . {a. Let A = {a1 .1. observe that A ∩ B = ∅ and |B| = |A|. determine the number of players for each game if the number of students who play football is (a) 14 more than the number of students who play cricket. . . (b) exactly 5 times more than the number of students who play only cricket. Then verify that the set B = {S ∪ {a} : S ∈ A} equals {{a. {{{b}. |∅| = 0. all the students play either football or cricket. c}}. Let S = {2x ∈ Z : x ∈ Z}. c}. c}. . 4. with |A| = m and B| = n. .1. n}. Then |A| = n. say N . A proof by contradiction starts with the assumption that “the statement P holds true and the statement Q does not hold true” and tries to arrive at a contradiction to the validity of the statement P being true. Let Example 1. .2. P (k + 1) is true whenever one assumes that P (k) is true.1 to prove the weak form of the principle of mathematical induction.2. That is. consider the set S = {m ∈ N : P (m) is false }.2. Let P (n) be a statement about a positive integer n such that 1. suppose that we need to prove that “whenever the statement P holds true. assume that there exists n0 ∈ N such that P (n0 ) is not true. Therefore. This leads to a contradiction and hence our first assumption that there exists n0 ∈ N. Now. 1 + 2 + · · · + n + (n + 1) = n(n + 1) n+1 + (n + 1) = (n + 2) . P (1) is true. That is. The proof is based on contradiction.1 (Well-Ordering Principle). 1. So.8 CHAPTER 1. n(n + 1) . Thus. let the result be true for n. 2 Using Hypothesis 2. the assumption that N is the least element in S and S contains all those m ∈ N. N ≥ 2 and hence N − 1 ∈ N. the implication “P (N − 1) is true” and Hypothesis 2 imply that P (N ) is true. one needs to show that 1 + 2 + · · · + n + (n + 1) = (n + 1)(n + 2) . the statement Q holds true as well”. Every non-empty subset of natural numbers contains its least element. the result follows.2 Properties of Integers Axiom 1. 2 Solution: Verify that the result is true for n = 1. 2 2 Thus. one deduces that P (N − 1) holds true as N − 1 < N ≤ 2. Then P (n) is true for all positive integer n. S 6= ∅. N 6= 1 as P (1) is true. As n0 ∈ S. PRELIMINARIES 1.2 (Principle of Mathematical Induction: Weak Form). We will use Axiom 1. Hence.3. By assumption. by the principle of mathematical induction. such that P (n0 ) is not true is false. Proof. Thus. Theorem 1. S must have a least element. by Well-Ordering Principle. Prove that 1 + 2 + · · · + n = us now prove it for n + 1. for which P (m) is false.2. On the contrary. and 2. by the principle of mathematical induction. . 1 + 3 + · · · + (2n − 1) = n2 .2. 2. So. n Solution: The result is clearly true for n = 1. the result follows. (a1 − A)(A − an+1 ) ≥ 0. Let the result be true for n. for any collections of non-negative integers a1 ≥ a2 ≥ · · · ≥ an ≥ an+1 ≥ 0.2). we see that 1 + 3 + · · · + (2n − 1) + (2n + 1) = n2 + (2n + 1) = (n + 1)2 . we see that by the principle of mathematical induction. we assume the result holds for any collection of n non-negative real numbers. AM-GM Inequality: Let n ∈ N and suppose we are given real numbers a1 ≥ a2 ≥ · · · ≥ an ≥ 0. Prove that for any positive integer n. Thus. Then Arithmetic Mean (AM) := √ a1 + a2 + · · · + an ≥ n a1 · a2 · · · · · an =: (GM) Geometric Mean. Need to prove AM ≥ GM.1) and Equation (1. for the collection a2 . let us assume that A = . Or equivalently. (1. n one has An+1 ≥ (a2 · a3 · · · · · an · (a1 + an+1 − A)) · A ≥ (a2 · a3 · · · · · an ) a1 an+1 . That is. Thus.1) Now. Then. needs to show that 12 + 22 + · · · + n2 + (n + 1)2 = 6 Using Hypothesis 2. 6 Solution: The result is clearly true for n = 1. a1 + a2 + · · · + an + an+1 So. let us assume that the AM-GM inequality holds for any collection of n non-negative numbers. Thus. let the result be true for n and one (n + 1)(n + 2) (2(n + 1) + 1) . 6 6 Thus. . 1 + 3 + · · · + (2n − 1) = n2 . A(a1 + an+1 − A) ≥ a1 an+1 .9 1. the result follows. PROPERTIES OF INTEGERS n(n + 1)(2n + 1) . A − an+1 ≥ 0. by Equation (1. . Prove that 12 + 22 + · · · + n2 = n(n + 1)(2n + 1) + (n + 1)2 6 n+1 = (n(2n + 1) + 6(n + 1)) 6  (n + 1)(n + 2) (2n + 3) n+1 = 2n2 + 7n + 6 = . it can be easily verified that n+1 a1 ≥ A ≥ an+1 and hence a1 − A. . That is. 2. Solution: The result is clearly true for n = 1.2) n a2 + a3 + · · · + an + (a1 + an+1 − A) But = A. (1. . Hence. 4. the result follows. by the principle of mathematical induction. in particular. Now. a1 + an+1 − A. Therefore. an . p a2 + · · · + an + (a1 + an+1 − A) AM = ≥ n a2 · · · an · (a1 + an+1 − A) = GM. 12 + 22 + · · · + n2 + (n + 1)2 = 3. Hence. a3 . Thus. for all m. using the weak-form of mathematical induction. we see that |P(A)| = |P(B)| + |{S ∪ {an+1 } : S ∈ P(B)}| = |P(B)| + |P(B)| = 2n + 2n = 2n+1 . note that P(B) ∩ {S ∪ {an+1 } : S ∈ P(B)} = ∅. 1. the result holds for any set that consists of n + 1 distinct elements and hence by the principle of mathematical induction. We prove that R(n) holds. Then P (n) is true for all positive integer n ≥ n0 . an }. Therefore. 2.8.1. Let B = {a1 .2. . Solution: Using Example 1. and 2. . Proof. |P(B)| = 2n . .1. . the result holds for every positive integer n. PRELIMINARIES 5. for all positive integers n. an .2.1. . |B| = n and by induction hypothesis. We need to prove the result for a set A that contains n + 1 distinct elements. using Examples 1. a2 . Let R(n) be the statement that “the statement P (m) holds. P (n0 ) is true. an+1 . P(B) = {S ⊆ {a1 . . Then B ⊆ A. . for which |A| = n. Let P (n) be a statement about a positive integer n such that for some fixed positive integer n0 . it follows that the result is true for n = 1. it can be easily verified that P(A) = P(B) ∪ {S ∪ {an+1 } : S ∈ P(B)}. Let P (n) be a statement about a positive integer n such that 1. say a1 . Also. 1 ≤ m ≤ k. for all S ∈ P(B). Then prove that P(A) = 2n . We are now ready to prove the strong form of the principle of mathematical induction.4 (Principle of Mathematical Induction). Fix a positive integer n and let A be a set with |A| = n. P (k + 1) is true whenever one assume that P (m) is true. The readers are advised to prove it for the sake of clarity. . .5 (Principle of Mathematical Induction: Strong Form). Let the result be true for all subset A. This will give us the required result as the statement “R(n) holds true” clearly implies that “P (n) also holds true”. . .2. as an+1 ∈ S. Corollary 1. P (k + 1) is true whenever one assumes that P (n) is true.5.10 CHAPTER 1.5. an+1 } : an+1 6∈ S}. Hence. P (n) is true for all positive integer n. Also. . Theorem 1. for all positive integers m with 1 ≤ m ≤ n”.4 and 1. . a2 . Then. a2 .2 without proof. P (1) is true.6. We state a corollary of the Theorem 1. Find the error in the following arguments: 1. Solution: If n = 1. Now. we see that R(1) holds true (already assumed in the hypothesis of the theorem). for all m. 1. If a set of n balls contains a green ball then all the balls in the set are green. We are also given that no two lines in this collection are parallel. That is. this collection of n balls has all green balls. From this collection. we see that all the n + 1 balls are green. let the result be true for any collection of n balls in which there is at least one green ball. let the result be true for any collection of n lines. P (n0 ) is true. we have shown that R(n + 1) holds true. we are done.5 without proof.2. Solution: If n = 1. all the balls in this new collection are also green. We state a corollary of the Theorem 1. for all m. Therefore. Therefore. 1 ≤ m ≤ n”. let us consider a collection of n + 1 lines in the plane. The assumption that R(n) holds true is equivalent to the statement “P (m) holds true. P (n + 1) holds true. the statements “R(n) holds true” and “P (n + 1) holds true” are equivalent to the statement “P (m) holds true. 1 ≤ m ≤ n + 1”. So. That is. let us assume that R(n) holds true.7 (Pitfalls). we see that the result follows. 2 then the result is easily seen to be true. no two of which are parallel. . we assume that if we are given any collection of n lines which are pairwise non-parallel then they pass through a common point. . We need to prove that R(n + 1) holds true. ℓ2 . Therefore. PROPERTIES OF INTEGERS 11 As the first step of the induction hypothesis. by Hypothesis 2. Let P (n) be a statement about a positive integer n such that for some fixed positive integer n0 .6 (Principle of Mathematical Induction). So. . the new collection of n balls has at least one green ball and hence. remove one ball from this collection and put the ball which was left out. for all m. Now. So. 2. Let us denote these lines by ℓ1 . So. P (k + 1) is true whenever one assume that P (m) is true. Again. 2. Then by the induction hypothesis. all the lines pass through a common point.2.2. From this . Then P (n) is true for all positive integer n ≥ n0 . no two of which are parallel. Remark 1. Hence. pick a collection of n balls that contains at least one green ball. In any collection of n lines in a plane.2. ℓn+1 . using the weak-form of the principle of mathematical induction. by induction hypothesis. . Corollary 1.1. n0 ≤ m ≤ k. let us assume that we have a collection of n + 1 balls that contains at least one green ball. Observe that the ball removed is green as by induction hypothesis all balls were green. Hence the result follows by induction hypothesis. ar 2 . Consider the polynomial f (x) = x2 − x + 41. . Thus. . Prove that for all n ≥ 32. a + d. Then prove that 1 + x + x2 + · · · + xn = xn+1 − 1 . By induction hypothesis.12 CHAPTER 1.2. . Prove that 1 + 2 + · · · + n = . a + 2d. let us choose the subset ℓ1 . . all these lines pass through a common point. ℓ2 . PRELIMINARIES collection of lines. 2 . a + (n − 1)d be the first n terms of an arithmetic progression. Prove that 9 divides 22n − 3n − 1. Prove that 12 divides 22n+2 − 3n4 + 3n2 − 4. . . Prove that 6 divides n3 − n for all n ∈ N. f (n) is a prime number. Prove that 7 divides n7 − n. . Let x ∈ R with x 6= 1. 2. 6. ar. Exercise 1. Prove that n(n + 1) is even for all n ∈ N. 4. 8. . . 3. This collection again consists of n non-parallel lines and hence by induction hypothesis. Determine 1 · 2 + 2 · 3 + 3 · 4 + · · · + (n − 1) · n. there exist non-negative integers x and y such that n = 5x + 11y. by the principle of mathematical induction the proof of our statement is complete. This common point is P itself. for all n ∈ N . 5. Prove that for all n ≥ 40. the point of intersection of the lines ℓ1 and ℓ2 . 12. 9. the validity is being negated using the proof technique “disproving by counter-example”. Check that for 1 ≤ n ≤ 40. ℓn−1 . 11. . Let a. 1. say P . Then n−1 P i rn − 1 prove that S = ar = a . for all n ∈ N . ℓn+1 . . Prove that 3 divides n4 − 4n2 . ℓ2 . 2 i=0 14. Then n−1 P n prove that S = (a + id) = (a + nd) . ar n−1 be the first n terms of a geometric progression. for all n ∈ N . there exist non-negative integers x and y such that n = 5x + 9y. . . as P is the point of intersection of the lines ℓ1 and ℓ2 . Now. Let a. . . with r 6= 1.8. Thus. 10. all these lines pass through a common point. 7. x−1 13. Prove that 3 divides n16 − 2n4 + n2 . consider the collection ℓ1 . . Prove that 5 divides n5 − n. consisting of n lines. r−1 i=0   n(n + 1) 2 3 3 3 15. Does this necessarily imply that f (n) is prime for all positive integers n? Check that f (41) = 412 and hence f (41) is not a prime. 3. ℓn . Let a and b be two integers with b > 0. denoted a|b. 1. b ∈ Z \ {0}. That is. The integer q is called the quotient and r. Definition 1. we have shown the existence of integers q. 0 = (q1 − q2 )b = r2 − r1 . Theorem 1. . b).2. commonly known as the “division algorithm”. r2 − r2 ≥ 0 and thus. Greatest Common Divisor: Let a. We claim that 0 ≤ s0 < b. The proof again uses the technique “proof by contradiction”. Let a and b be two non-zero integers. denoted gcd(a. is the largest positive integer c such that (a) c divides a and b. there exists x0 ∈ Z. But this can happen only if the multiple is 0. 3. Proof. Thus. let if possible assume that s0 ≥ b. 2. with 0 ≤ r1 ≤ r2 < b. then d divides c as well. Consider the set S = {a + bx : x ∈ Z} ∩ N. where 0 ≤ r < b. PROPERTIES OF INTEGERS 16. a ∈ S and hence S is a non-empty subset of N. r1 and r2 be integers with a = q1 b + r1 = q2 b + r2 .10 (Greatest Common Divisor). Note that c can be a negative integer. the remainder. such that s0 = a + bx0 . d = gcd(a. 0 ≤ (q1 − q2 )b = r2 − r1 < b. This completes the proof of the lemma. So. one obtains r1 = r2 and q1 = q2 and the proof of uniqueness is complete. Uniqueness: Let if possible q1 . if b = ac. We start with a lemma. by Well-Ordering Principle. In the next few pages.11 (Euclid’s Algorithm).2. Hence. b) = 1. S contains its least element. one has s0 ≥ 0. Then there exists an integer d such that 1. Determine 1 · 3 · 5 + 2 · 4 · 6 + · · · + n · (n + 2) · (n + 4).2. and (b) if d is any positive integer dividing a and b. and 2. say s0 . we have obtained a multiple of b that is strictly less than b.9 (Division Algorithm). Therefore. for some integer c.13 1. 17. y0 such that d = ax0 + by0 . Clearly. Relatively Prime/Coprime Integers: Two integers a and b are said to be relatively prime if gcd(a. Then the greatest common divisor of a and b. This implies that s0 − b ≥ 0 and hence s0 − b = a + b(x0 − 1) ∈ S. Lemma 1. That is. r such that a = qb + r with 0 ≤ r < b. Therefore. Hence. Then there exist unique integers q.2. An integer a is said to divide an integer b. a contradiction to the assumption that s0 was the least element of S. b). Determine 1 · 2 · 3 + 2 · 3 · 4 + 3 · 4 · 5 + · · · + (n − 1) · n · (n + 1). q2 . there exist integers x0 . r such that a = qb + r. As s0 ∈ S ⊂ N. we will try to study properties of integers that will be required later. b). . . −275 = (−2) · 155 + 35 35 = 2 · 15 + 5 155 = 4 · 35 + 15 15 = 3 · 5. the proof of the theorem is complete. rℓ−1 = rℓ qℓ+1 + rℓ+1 with 0 ≤ rℓ+1 < rℓ . Thus. 2. Consider the set S = {ax + by : x. Therefore. there exist integers q and r such that a = dq+r. 5 = gcd(155. for which d = ax + by. To proceed further. . Example 1. Observe that as c divides both a and b.2. In general. r1 = r2 q3 + r3 with 0 ≤ r3 < r2 . y ∈ Z}. Then.2. 5 = (9+31x)·(−275)+(16+55x)·155. by Well-Ordering Principle. there exist integers x0 . say d. we have shown that d satisfies both the conditions of Definition 1. Hence. We first show that d|a. In a similar way.12. . 0 < r < d. assume that r 6= 0. We claim that d obtained as the least element of S also equals gcd(a. On the contrary. by division algorithm. That is. The above theorem is often stated as “the gcd(a. This implies that d|a. This algorithm is also attributed to Euclid. b) is a linear combination of the numbers a and b”.2 and therefore. as exactly one of them is an element of N and both a = a · 1 + b · 0 and −a = a · (−1) + b · 0 are elements of the set {ax + by : x..10. PRELIMINARIES Proof. We need to show that c|d. as 5 = 35−2·15 = 35−2(155−4·35) = 9·35−2·155 = 9(−275+2·155)−2·155 = 9·(−275)+16·155. S contains its least element. we can use the division algorithm to get gcd(a. Thus. Also. = . assume that both a and b are positive and a > b. S is non-empty subset of N. Without loss of generality.10. we need the following definitions. one obtains 1. Thus. note that 275 = 5·55 and 155 = 5·31 and thus. Then by definition. b = r0 q1 + r1 with 0 ≤ r1 < r0 . for all x ∈ Z. This contradicts the fact that d was the least element of S.2.14 CHAPTER 1. Then. That is.. Now. Then the algorithm proceeds as follows: a = bq0 + r0 with 0 ≤ r0 < b. given two non-zero integers a and b. y0 such that d = ax0 + by0 . Thus. we need to show that r = 0. we need to show that d satisfies both the conditions of Definition 1. it can be shown that d|b.2. our assumption that r 6= 0 is false and hence a = dq. b). we see that there are infinite number of choices for the pair (x. r ∈ S and by our assumption r < d. r0 = r1 q2 + r2 with 0 ≤ r2 < r1 . say 155 and −275. Consider two integers. By division algorithm. So. assume that there is an integer c such that c divides both a and b. c also divides both ax0 and by0 and hence c also divides ax0 + by0 = d. −275) and 5 = 9 · (−275) + 16 · 155. r ∈ N and r = a−dq = a−q·(ax0 +by0 ) = a·(1−qx0 )+b·(−qy0 ) ∈ {ax + by : x. with 0 ≤ r < d. y) ∈ Z2 . y ∈ Z}. either a ∈ S or −a ∈ S. Hence. y ∈ Z} ∩ N. rℓ = rℓ+1 qℓ+2 . As d ∈ S. 2. Lemma 1. .15 1. 5n + 7) 6= 1? 3.15 (Euclid’s Lemma). Now. 1. Thus.2. b). if n also equals q1t1 q2t2 · · · qℓtℓ . . 1 ≤ j ≤ k such that pi = qj and si = tj . Then there exist prime numbers p1 > p2 > · · · > pk and positive integers s1 . Also. If p|a. b and c.2. Thus. PROPERTIES OF INTEGERS The process will take at most b − 1 steps as 0 ≤ r0 < b. .2. except for the order in which the prime factors appear”. then we are done.13. Prove that gcd(a. 4. 1 ≤ i ≤ k. for any two non-zero integers a and b. . y such that 1 = ax + py. for any three non-zero integers a. sk such that n = ps11 ps22 · · · pskk . This product is unique. a) = 1. . if p has exactly two factors. using backtracking. is called composite. b = b · 1 = b · (ax + py) = ab · x + p · by. b) = 1 and gcd(a. . q2 . . 2. the condition p|ab implies that p divides ab · x + p · by = b. qℓ and positive integers t1 .16 (Fundamental Theorem of Arithmetic). . We are now ready to prove an important result that helps us in proving the fundamental theorem of arithmetic. b) = rℓ+1 and it can be recursively obtained. c) = 1. Exercise 1. Proof. But p is a prime and hence gcd(p. 1. we have shown that if p|ab then either p|a or p|b. y ∈ Z if and only if 3 divides b. by Euclid’s algorithm.14 (Prime/Composite Numbers). 1 and p itself. namely. . s2 . Prove that gcd(a. Definition 1. . rℓ+1 = rℓ−1 − rℓ qℓ+1 = rℓ−1 − qℓ+1 (rℓ−2 − rℓ−1 qℓ ) = rℓ−1 (1 + qℓ+1 qℓ ) − qℓ+1 rℓ−2 = · · · . . Let n ∈ N with n ≥ 2. b) = gcd(a. there exist integers x. Theorem 1. we are ready to prove the fundamental theorem of arithmetics that states that “every positive integer greater than 1 is either a prime or is a product of primes. bc) = 1 if and only if gcd(a. The positive integer 1 is called the unity or the unit element of Z. An integer that is neither prime and nor is equal to 1.2. for some k ≥ 1. . for distinct primes q1 . tℓ then k = ℓ and for each i. That is. there exists j. 3. Let p be a prime and let a. Now. b+a) = gcd(a+b. Prove that the system 15x + 12y = b has a solution for x. A positive integer p is said to be a prime. Moreover. b ∈ Z. note that gcd(a. If p|ab then either p|a or p|b. let us assume that p does not divide a. Therefore. . t2 .2. Does there exist n ∈ Z such that gcd(2n + 3. So. either p1 will divide q2t2 · · · qℓtℓ . Suppose n is not a prime. b < n. qj ’s and positive integers si and tj ’s such that a = ps11 ps22 · · · pskk .2. If n itself is a prime then we are done. one of its prime factors.2. : 0 ∈ N. This is the first instance where we have used the contrapositive argument technique to prove the result. Thus. for some ℓ. it follows by a repeated application of Lemma 1. there exist primes pi ’s.2. the result is true for all positive integer n.3 Relations and Partitions We start with the definition of cartesian product of two sets and to define relations. Hence. it is clear that in this case s1 = t1 . there exists positive integers a and b such that n = ab and 1 ≤ a. say p then clearly n = p1 and hence the first step of the induction holds true. PRELIMINARIES Proof. b ≤ n. Now. let us assume that the result holds for all positive integers that are less than n. Let n ∈ N with n ≥ 2. say a ≤ n. Also.17.16. For otherwise. giving us a contradiction. Corollary 1. For if. such that n = 2s t. using the string form of the principle of mathematical induction. As an application of the fundamental theorem of arithmetic. say p will satisfy p ≤ a ≤ n.16 CHAPTER 1. We prove the result using the strong form of the principle of mathematical induction. For every positive integer n ≥ 5 prove that 2n > n2 > n. Then there exists positive integers a and b such that n = ab √ √ and 2 ≤ a. say q1 . Exercise 1. Proof. This process can be continued a finite number of times to get the required result. both a. Also. by the strong form of the induction hypothesis. We need to prove the result for the positive integer n. As per as the uniqueness is concerned. √ Thus. if some of the pi ’s and qj ’s are equal.15. If n equals a prime. Hence. √ √ Since a ≤ n. 2. To see this. Else. b > n then n = ab > n. note that at least one of them. or q1 = p1 will divide ps22 · · · pskk . observe that p1 divides n = q1t1 q2t2 · · · qℓtℓ implies that p1 divides exactly one of them (the primes are distinct). for some odd integer t. . Thus. they can be multiplied together to obtain n as a product of distinct prime powers.2. p does not divide n then n is prime. Then prove that there exists s ∈ N. Suppose that for any prime p ≤ √ n. by Theorem 1. Let n ∈ N with n ≥ 2. 1. if n has no prime divisor less than or equal to n then n must be itself be a prime. n = ab = ps11 ps22 · · · pskk q1t1 q2t2 · · · qℓtℓ .18. 1. for some k ≥ 1 and b = q1t1 q2t2 · · · qℓtℓ . one has the following well known result. (b. (d. is a subset of A × A.3. c)}. (c. (c. RELATIONS AND PARTITIONS 17 Definition 1. (c. c. denoted A × B. c)}. 1). (b. where ∼ stands for similarity of triangles. (c. b). 2). c). (f ) R = {(x. c). (a. (b. (a. b). b) : a ∈ A. (c. Definition 1. (b. (b. a). y) ∈ R2 × R2 : 4x21 + 9x22 = 4y12 + 9y22 }. x2 ) and y = (y1 . (b) R = {(x.3. 1) for some α ∈ R∗ }.3. d). 2. Let A be the set of triangles in a plane. y) : x ∈ R}. define R = {(x. Consider the set R2 . b).2. (c. (e) R = {(a. a). b). 2. is defined as A × B = {(a. . a). (c. 1. (d) R = {(x. a). c). 4)}. 3). Example 1. y2 ). (a. b ∈ B}. (b. Also. (b. y) ∈ R2 × R2 : |x| = α|y|}. c). b) ∈ Z2 : a > b}. (b) R = {(a. Then. a). b). 2). Let A = {a. b) ∈ Z2 : n divides a − b}. b). (a. 3. The Euclidean plane. (b) Fix a positive integer n and define R = {(a. c). Then A × A = {(a. b). (b. Example 1. (a. 4).4. some of the relations R on A are: (a) R = A × A. b) ∈ Z2 : a ≤ b}.1. y) ∈ R2 × R2 : x = αy for some α ∈ R∗ }. (c. a). Now. (c) R = {(a. (d. (b. b. d)}. 1).3. b. (a. a). 2). c). (a. (b. 4). denoted R2 = R × R = {(x. 3). b) ∈ Z2 : a|b}. (b. (f ) R = {(a. (a.3. Then their cartesian product. Consider the set Z. Then R = {(a. 1). b) ∈ A2 : a ∼ b}. (d) R = {(a. (b. (a. 1. c). b). (d) R = {(a. y) ∈ R2 × R2 : |x|2 = x21 + x22 = y12 + y22 = |y|2 }. A × B = {(a. (b. 4. 2. 3. (c. d)}. (a. b)}. a). let us write x = (x1 . 4}. (c. c)}. (e) Fix a c ∈ R. (a. (b. c} and B = {1. b). y) ∈ R2 × R2 : x − y = α(1. (c) R = {(a. d}. Let A and B be two sets.1 (Cartesian Product). c). 3). (c. (b. b). y) ∈ R2 × R2 : y2 − x2 = c(y1 − x1 )}. A relation R on a non-empty set A. (c) R = {(x. Some of the relations on Z are as follows: (a) R = {(a. (d. Then some of the relations on R2 are as follows: (a) R = {(x. a). for some positive real number α. Let A = {a. a).3 (Relation). 4. the conditions (a. The equivalence class containing a ∈ A. c ∈ A. 2. the statement “a ≡ b (mod n)” (read “a is equivalent to b modulo n”) is equivalent to saying that a ∼ b if n divides a − b. anti-symmetric. for each equivalence relation. for all a. T ) ∈ P(A) × P(A) : S ⊂ T }. reflexive if (a.4. 6. transitive if. b ∈ A then a ∼ b or R a ∼ b will stand for (a. Example 1.3. Then ∼ is said to form an equivalence relation if ∼ is reflexive. reflexive. Observe that. for any fixed positive integer n. .8. Then verify that ∼ is an equivalence relation. a) ∈ R implies that a = b in A.4. symmetric if (b. [1]. This equivalence relation in modular arithmetic is written as a ≡ b (mod 10). . if 10 divides a − b. let us either use the symbol ∼ or ∼ for relation. a) ∈ R.3. determine which of them are 1. 3. Then R is said to be 1.3. b) ∈ R2 : |a − b| is an integer}. Let a. . Exercise 1. PRELIMINARIES 5. . b). 2. We are now ready to define a relation that appears quite frequently in mathematics.3.3. symmetric and transitive. a) ∈ R whenever (a. for all a. Determine the equivalence relations that appear in Example 1. Now that we have seen quite a few examples of relations. In R. b ∈ Z. Let R be a relation on a non-empty set A. b ∈ A. the equivalence classes can be taken as [0]. is defined as [a] := {b ∈ A : b ∼ a}. That is. In general. For each of the relations defined in Example 1. b). Before R doing so.5. Moreover. 1. . c) ∈ R implies that (a.18 CHAPTER 1. c) ∈ R. b. let us look at some of the properties that are of interest in mathematics. transitive.3. determine a set of equivalence classes. Then A ∼ b. Let ∼ be a relation on a non-empty set A. b) ∈ R. denoted [a]. (b. the conditions (a. Also. 2. if a. Definition 1. 3. Definition 1. anti-symmetric if. Let A be any non-empty set and consider the set P(A). [9]. b) ∈ R. 4. symmetric. (b.7. define a relation R = {(a.6. for 0 ≤ i ≤ 9. [i] = {10n + i : n ∈ Z}. Then one can define a relation R on P(A) by R = {(S. for all a ∈ A. for 1 ≤ i 6= j ≤ m and 2. A2 = {n ∈ N : n is a prime} and A3 = {n ∈ N : n ≥ 3. is a collection of non-empty subsets A1 . 2. Then there exists an equivalence relation on A whose equivalence classes are exactly the sets Ai . A2 .3. {c}} is a partition of A. . . 2.3. . . Theorem 1. In general. . Observe that the equivalence classes produced in Example 1. 4. A2 .10. i=1 Example 1. such a statement is always true. RELATIONS AND PARTITIONS Definition 1.3. d| abc. given any partition Π of A. suppose that A is a non-empty set with an equivalence relation ∼. A10 } forms a partition of Z.2b. 1}. Then a partition Π of A. . This is proved as the next result. . i ∈ I. A1 = {0. Then the set of equivalence classes of ∼ in A gives a partition of A.3. gives rise to a partition of A. 1. defined in Example 1.10. . 10. a| bc| d. Then Π = {{a}. such that 1. Then Π = {A1 . c. ab| c| d. The partitions of A = {a. there is an equivalence relation on A whose equivalence classes are the elements of Π. That is. d} into (a) 3-parts are a| b| cd. c. Then the equivalence classes of ∼ in A. c} and A3 = {d}. d}. Am . b. ac| b| d. Conversely. into m-parts. 2. ad| b| c. . Let A = Z and define (a) A0 = {2x : x ∈ Z} and A1 = {2x + 1 : x ∈ Z}. . Ai ∩ Aj = ∅ (empty set). (b) 2-parts are a| bcd.8. Also. d}. Let A be a non-empty set.11. b. . m S Ai = A. A2 = {b. Then Π = {A0 . Let A = {a. let ∼ define an equivalence relation on the set A. ac| bd and ad| bc. 3. for i = 1.3.19 1. Let A be a non-empty set. Then Π = {A1 . where the expression a|bc|d represents the partition A1 = {a}. (b) Ai = {10n + i : n ∈ Z}. A3 } is a partition of N l.9 (Partition of a set). ab| cd. 1. c| abd. n is composite}. of A. a| bd| c. A2 . Let I be a non-empty index set such that {Ai : i ∈ I} gives a partition of A.3. {b. .1 indeed correspond to the non-empty sets Ai ’s. A1 } forms a partition of Zl into odd and even integers. . b| acd. PRELIMINARIES Proof. Suppose. n) = 1. a ≡ b (mod n). a ∼ b. if x1 and x2 are any two solutions then x1 ≡ x2 (mod n). define a relation ∼ on A as follows: for any two elements a. Thus. But a ∼ b. x ∼ a and x ∼ b. Therefore. b ∈ A. a ∼ b if there exists an i. one also has a ∼ x. the equivalence classes are non-empty and clearly. the equivalence class [a] contains a. a ∼ a. Then prove that (a) for any integer c. Since ∼ is symmetric. also implies that b ∼ a (∼ is transitive) and hence [b] ⊆ [a]. 2.3. Let x ∈ [a] ∩ [b]. verify that the equivalence classes of ∼ are indeed the sets Ai . Moreover. (d) as ≡ bs (mod n). i ∈ I. then [a] = [b]. Also. d be integers with a ≡ b (mod n) and c ≡ d (mod n). Then prove that (a) a + c ≡ b + d (mod n).20 CHAPTER 1. This proves the first part of the theorem. Fix a positive integer n. n) = 1. Hence. Since ∼ is reflexive. 1. We need to show that if [a] and [b] are two equivalence classes of ∼ then either [a] = [b] or [a] ∩ [b] = ∅. for any positive integer s. a ∈ [b] and hence [a] ⊆ [b]. b ∈ Ai . If m and n are two positive integers and a ≡ b (mod mn) then prove that a ≡ b (mod m) and a ≡ b (mod n). for any positive integer m that divides n. Then prove that the system x ≡ a (mod m) and x ≡ b (mod n) are simultaneously solvable for every choice of a and b. i ∈ I such that a. we see that if [a] ∩ [b] 6= ∅. ac ≡ bc (mod n). for any two integers a. . (b) for any integer c. Exercise 1. using the transitivity of ∼.4. (c) a ≡ b (mod m). Fix a positive integer n and let a. by definition. Under what condition on m and n the converse holds true? 5. for all a ∈ A. for each a ∈ A. their union is the whole set A. It can be easily verified that ∼ is indeed reflexive. 3.3. Let a and n be two positive integers such that gcd(a. explicitly determine the equivalence classes. a + c ≡ b + c (mod n). 4. we see that a ∼ x and x ∼ b and hence. Then prove that the system ax ≡ b (mod n) has a solution. For each of the equivalence relations given in Example 1. b. symmetric and transitive. b. 6. (b) ac ≡ bd (mod n). For the second part. Then by definition. Thus. Thus. c. for every b. Let m and n be two positive integers such that gcd(m.12. . if a + b < m. f (b) = 3 and f (c) = 3. 2. 3. called the empty function.1 (Function). The set B is called the co-domain of the function f . The set A is called the domain of the function f . 2.3. Let Zm = {0. 2. m − 1}. In Zm . .21 1.4. one assumes that there is a function. This binary operation is called addition modulo m. Some books use the word “map” in place of “function”. from A to B. we define the binary operation ⊕m by ( a + b. Let A = {a. commonly known as multiplication modulo m. c}. both the words may be used interchangeably through out the notes. solve the equation 2x ≡ 1 (mod 5). (b) f : A−→B.4. 3. . f (b) = 2 and f (c) = 2. What happens when we consider the equation 2x ≡ 1 (mod 7) in Z7 ? What if we consider 2x ≡ 1 (mod p) in Zp . 4}. whenever the phrase “let f : A−→B be a function” is used. Then verify that the examples given below are indeed functions. Through out these notes. p a prime? 1. a ⊕m b = a + b − m. 1. Remark 1. Then a function f : A−→B is a rule that assigns to each element of A exactly one element of B. . If B = ∅. b. defined by f (a) = 3. 2. Example 1.4. then by convention. 1. (a) f : A−→B. then it can be easily observed that there is no function from A to B. defined by f (a) = 3. it will be assumed that both A and B are non-empty sets.2. if a + b ≥ m. 3} and C = {3. 1. we also define the binary operation ⊗m . (b) In Z5 .4 Functions Definition 1. If A = ∅. 4. In Zm . The readers should carefully read the following important remark before proceeding further. So.4. Let A and B be two sets. (a) Prove that i (mod n) + j (mod n) = i + j (mod n) and i (mod n) · j (mod n) = ij (mod n). . B = {1. by a ⊗m b = the remainder when a · b is divided by m. FUNCTIONS 7. 1. such that f (a) = b”. Verify that the following examples give functions. the function f is said to be onto if “for every element b ∈ B there exists an element a ∈ A. for all x ∈ Z. defined by f (a) = 3. for each x ∈ A. for all x ∈ R. if x > 0. the function f is said to be one-to-one if “for any two distinct elements a1 . f (4) = c. Let f : A−→B be a function. Let f : Z−→Z such that (a) f (x) = 1. Exercise 1. for all x ∈ R∗ . 1. 3. defined by f (3) = a. Do the following give examples of functions? Give reasons for your answer. Let f : R−→R such that f (x) = √ 4. f (b) = 3 and f (c) = 3. the range/image of A under f equals f (A) = {f (a) : a ∈ A}. 3.4. (b) f (x) = 1.5. a2 ∈ A.4. f : Z−→Z. f (x) = x2n . (c) f (x) = x (mod 10). 2. √ 2. for every a ∈ A. for all x ∈ R+ . for all x ∈ Z. if x is odd. . (e) for a fixed positive integer n. if x is a multiple of 3. for all x ∈ R. (c) f (x) = x3 . PRELIMINARIES (c) f : A−→B. for all x ∈ Z. (b) f (x) = −1. 2. otherwise. the composition g ◦ f : A−→C is a function defined by  (g ◦ f )(a) = g f (a) . Let f : R∗ −→R such that f (x) = loge |x|. for all x ∈ Z. f (a1 ) 6= f (a2 )”. for some a ∈ Z and −1. the element f (x) ∈ B is called the image of x under f .22 CHAPTER 1. for all x ∈ Z. 1. for all x ∈ R. Let f : R+ −→R such that f (x) = ± x. defined by f (a) = 3. (d) f : A−→C. if x is a multiple of 2 and f (x) = 5. Definition 1. Then. (d) f (x) = 1. if x = a2 . 5. 6. (d) for a fixed positive integer n. f (0) = 0 and f (x) = 1. if x < 0. if x is even and f (x) = 5. 4. (a) f (x) = 1. f (x) = x2n+1 . x. f (b) = 1 and f (c) = 2. 5. Let f : R−→C such that f (x) = √ x. (e) f : C−→A. Let f : R−→R such that f (x) = tan x. for any function g : B−→C.4. 2 for all x ∈ N. in case both x and y are odd.4. f (x) = 2x and g(x) = x/2. The next theorem gives some result related with composition of functions. for some a1 . Hence. it is clear that f is indeed one-one and g is not one-one. Then if x is odd. ((h ◦ g) ◦ f ) (a) = (h ◦ g) (f (a)) = h (g (f (a))) = h ((g ◦ f ) (a)) = (h ◦ (g ◦ f )) (a). Solution: Let us use the contrapostive argument to prove that f is one-one. let us assume that both x and y are even. 2. Let f : N−→Z and g : Z−→Z be defined by. h ◦ (g ◦ f ) are functions from A to D. if x is even. Exercise 1. 2. g : B−→C and h : C−→D. Proof of Part 1: The first part is direct. one sees that x and y are either both −x −y odd or both even. onto and/or both. a2 ∈ A then a1 = a2 ”. g ◦ f : N−→Z is also one-one. = 2 2 and hence x = y. y ∈ N.4.6. functions that are one-one.7. Consider the functions f : A−→B. First note that g ◦ f : A−→C and both (h ◦ g) ◦ f. f is indeed onto. x ≤ 0. for some x. FUNCTIONS  −x  . Proof. Claim: f is onto. If f and g are one-to-one then the function g ◦ f is also one-to-one. range. then −2x ∈ N and f (−2x) = Solution: By definiton. 2 Example 1.8 (Properties of Functions). Using the definition. Theorem 1. But g ◦ f (x) = g(f (x)) = g(2x) = 2x = x. 2. A similar argument holds. respectively. Let x ∈ Z with x ≥ 1.4. 2 ( 0. 1.4. Proof of Part 2: Need to show that “whenever (g ◦ f )(a1 ) = (g ◦ f )(a2 ). If f and g are onto then the function g ◦ f is also onto. Is f onto? if x is even. as for each a ∈ A. For each of the functions given in Example 1. Hence. 3. In this case. determine the 1. . if x is odd.23 1.4.3. If x ∈ Z and 2 −(−2x) = x. Let f : N−→Z be defined by f (x) = x + 1  . Let if possible f (x) = f (y). Then 2x − 1 ∈ N and f (2x − 1) = (2x − 1) + 1 = x. 2 prove that f is one-one. 1. Then prove that the functions f and g ◦ f are one-one but g is not one-one. Then (h ◦ g) ◦ f = h ◦ (g ◦ f ) (associativity holds). So. 24 CHAPTER 1. Proof of Part 3: The readers are advised to supply the proof. a2 ∈ A. and 2.4. Let us now prove that if f : A−→B is an invertible map then the map g : B−→A. The map g is generally denoted by f −1 . Then verify that g ◦ f : N−→N is the identity map. it is clear that e is one-one and onto. Theorem 1. x/2. (f ◦ e)(a) = f (e(a)) = f (a).12 (Invertible Function). Theorem 1. there exists b ∈ B such that g(b) = c. g defined in Definition 1. for all a ∈ A.4. f ◦ g : B−→B is the identity map on B. As g is onto. Proof of Part 1: Since e(a) = a.4. there exists a ∈ A such that (g ◦f )(a) = c”. As g is one-one. the map e ◦ g = g. if x is even. f (x) = 2x and g(x) = ( 0.4. Hence. whereas f ◦ g maps even numbers to itself and maps odd numbers to 0. Then the map 1. for some a1 . let e : A−→A be the identity map defined above. Example 1. But f is also given to be onto. Hence.9 (Identity Function). Also. g ◦ f : A−→A is the identity map on A.12 is unique. Let f. f ◦ e = f .13. Then the function eA is called the identity function or map on A. 3. Fix a set A and let eA : A−→A be defined by eA (a) = a. for the given c ∈ C. A function f : A−→B is said to be invertible if there exists a function g : B−→A such that the map 1.10 (Properties of Identity Function). for all a ∈ A. defined above is unique. the assumption gives f (a1 ) = f (a2 ). . whenever there is no chance of confusion about the domain of the function. Proof of Part 3: To show that “given any c ∈ C.4. we see that c = g(b) = g(f (a)) = (g ◦ f )(a). Proof. Proof of Part 2: BY definition. Hence. PRELIMINARIES So. 2. 1.4.4. if x is odd.11. Definition 1.9 will be removed. Let f : A−→B be an invertible map. But f is also one-one and hence a1 = a2 . g : N−→N be defined by. let us assume that g(f (a1 )) = (g ◦ f )(a1 ) = (g ◦ f )(a2 ) = g(f (a2 )). the map f ◦ e = f . e is a one-one and onto map. there exists a ∈ A such that f (a) = b. for the b obtained in previous step. for all a ∈ A. Definition 1. Then 1. The subscript A in Definition 1. Fix two non-empty sets A and B and let f : A−→B and g : B−→A be any two functions. 14. To prove onto. Hence.  Thus. We now state the following important theorem whose proof is beyond the scope of this book. for each b ∈ B. To show.15 (Cantor Bernstein Schroeder Theorem). Hence. Consider the map f −1 : B−→A defined by “f −1 (b) = a whenever f (a) = b”. f is one-one implies that the element a obtained in the previous line is unique.12. f is onto as well. Let A and B be two sets. f is invertible. The theorem is popularly known as the “Cantor Bernstein Schroeder theorem”. by definition. FUNCTIONS 2. Then. h : B−→A are two maps satisfying the conditions in Definition 1. g ◦ f = eA = h ◦ f and f ◦ g = eB = f ◦ h. Theorem 1. we get   a1 = eA (a1 ) = f −1 ◦ f (a1 ) = f −1 (f (a1 )) = f −1 (f (a2 )) = f −1 ◦ f (a2 ) = eA (a2 ) = a2 . f −1 (b) ∈ A and f f −1 (b) =  f ◦ f −1 (b) = eB (b) = b. 1. with f (x) = tan x.4. using associativity of functions. Proof. for each b ∈ B. Proof. Also. for some a1 . ∞)−→ . Exercise 1. We end this section with the following set of exercises. This map is well-defined as f is onto implies that for each b ∈ B. Then f is invertible if and only if f is one-one and onto. f is one-one and onto.   −π π (a) f : (−∞. determine f −1 . onto map f : A−→B.25 1. Prove that the functions f . one has g(b) = g(eB (b)) = g ((f ◦ h)(b)) = (g ◦ f ) (h(b)) = eA (h(b)) = h(b). the maps h and g are the same and thus the proof of the first part is over.4.4. Let f : A−→B be a function. Then. Then A and B are said to have the same cardinality if there exists a one-one. there exists the map f −1 : B−→A such that f ◦ f −1 = eB and f −1 ◦ f = eA . are one-one and onto. f is one-one. Therefore.4. Since. let us assume that f is one-one and onto. f −1 −1 = f. defined below. Suppose g. Definition 1. Hence. it can be easily verified that f ◦ f −1 = eB and f −1 ◦ f = eA and hence f is indeed invertible. there exists a ∈ A.16. Prove that |A × B| = |A| · |B|.4. Also. Now. let b ∈ B. To show. using the map f −1 . now suppose that f (a1 ) = f (a2 ). Now. Let us now proceed with the proof of the first part. Let A and B be two finite sets. 2 2 . f is invertible. 2. So. Let f be invertible. The proof of the second part is left as an exercise for the readers. such that f (a) = b. a2 ∈ A. ∞). PRELIMINARIES (b) f : [0. 1) and B = (1.26 CHAPTER 1. is the natural exponential function. 3. ∞)−→[1. 1)−→(1. 1) and B = R. ∞)−→[2. . (a) A = N and B = Z. Prove that the pair of sets A and B. ∞) with f (x) = . ∞) with f (x) = ex . have the same cardinality. (e) f : R−→(0. (b) A = (0. ∞) with f (x) = x2 + 1. given below. 1 (c) f : (0. x (d) f : [0. (c) A = (0. ∞) with f (x) = |x| + |x − 1| + |x + 1|. . Then the total number of functions f : M −→N equals nm ? Proof: Let M = {a1 . Observe that Lemma 2. we had seen the following: Let A and B be two non-empty finite disjoint subsets of a set S. f↔ f (a1 ) f (a2 ) · · · f (am ) where f (ai ) ∈ {b1 . Since a function is determined as soon as we know the value of f (ai ). . am } and N = {b1 .1 is equivalent to the following question: In how many ways can m distinguishable/distinct balls be put into n distinguishable/distinct boxes? Hint: Number the balls as a1 . .1 Distinguishable Balls Lemma 2. bn .1 Principles of Basic Counting In the previous chapter. . . 2. . . b2 . . f (a2 ) has n choices. b2 . . . .2. am and the boxes as b1 . the total number of functions f : M −→N is n · · · · · n} = nm . . . | · n {z m times Remark 2. . .1. bn and so on. bn }.1.Chapter 2 Counting and Permutations 2. . b1 . a2 . . .1. a function f : M −→N has the form ! a2 ··· am a1 . . . . 3. As there is no restriction on the function f . a2 . Let M and N be two sets such that |M | = m and |N | = n. b2 . . Then 1. for 1 ≤ i ≤ m. for 1 ≤ i ≤ m. b1 . 2. . |A × B| = |A| · |B|. Thus.1. . A and B have the same cardinality if there exists a one-one and onto function f : A−→B. . f (a1 ) has n choices. .1. . b2 . 27 . |A ∪ B| = |A| + |B|. bn }. Similarly. b2 . bn . . . each student reads exactly one news paper. bn } \ {f (a1 )}).1.3. B’s. am } and N = {b1 . if m > n. . there are only n−2 choices for f (a3 ) (f (a3 ) has to be chosen from the set {b1 . . . Thus. So. then the number of such functions is 0.1. . f (a1 ) has n choices. How many distinct ways are there to make a 5 letter word using the ENGLISH alphabet? 3. 1. Similarly.5. In Hall-III. and is commonly called . “The Times of India” and “Dainik Jagran” are respectively. let us assume that m ≤ n with M = {a1 . 1. Therefore. The product n(n − 1) · · · · 3 · 2 · 1 is denoted by n!. f (a2 )}). “n factorial”. . bn . . . b2 . . and D’s are there that (a) contain the word “CAC”? (b) contain the word “CCC”? (c) contain the word “CDC”? (d) does not contain the word “CCD”? Lemma 2. Once f (a1 ) is chosen. b2 . Proof: Observe that “f is one-to-one” means “whenever x 6= y we must have f (x) 6= f (y)”. Determine the total number of possible outcomes if (a) two coins are tossed? (b) a coin and a die are tossed? (c) two dice are tossed? (d) three dice are tossed? (e) five coins are tossed? 5. COUNTING AND PERMUTATIONS Exercise 2. b2 . .1.4. b1 . . If the number of students reading “Indian Express”. Let M and N be two sets such that |M | = m and |N | = n. . and so on. . Then by definition. Then the total number of distinct one-to-one functions f : M −→N is n(n − 1) · · · (n − m + 1). . bn }\{f (a1 ). there are only n − 1 choices for f (a2 ) (f (a2 ) has to be chosen from the set {b1 . C’s. b2 . . . bn }. How many distinct 5-letter words using only A’s. . then determine the total number of students in Hall-III? 2. How many distinct ways are there to make a 5 letter word using the ENGLISH alphabet (a) with ONLY consonants? (b) with ONLY vowels? (c) with a consonant as the first letter and a vowel as the second letter? (d) if the vowels appear only at odd positions? 4. a2 . . say “Indian Ex- press” or or . the required number is n · (n − 1) · (n − 2) · · · · · (n − m + 1). 130. . Remark 2. 155 and 235.28 CHAPTER 2. . one gets a one-to-one function g : {1. 4. and is called the falling factorial of n. . n(0) = 1 for all n ≥ 1.1. . How many distinct ways are there to arrange the 5 couples on 10 chairs so that the couples sit together? 4. Then the number of distinct n! subsets of N . By convention. Using the factorial notation n · (n − 1) · (n − 2) · · · · · (n − m + 1) = n(m) = 0 and if n = m then n(m) = n!. . 2. with Ram and Shyam sitting next to each other? Lemma 2. we assume that 0! = 1. The proof of the next corollary is immediate from Lemma 2. k! (n − k)! Proof: It can be easily verified that the result holds for k = 1. Let N be a finite set consisting of n elements. The following conventions will be used in these notes: 0! = 0(0) = 1. 2. . This expression (n − m)! is generally denoted by n(m) . a set K = Im(f ) = {f (i) : 1 ≤ i ≤ k}. Hence. Corollary 2. k}−→K. . for 1 ≤ i ≤ k. 1 ≤ k ≤ n.4 and hence the proof is omitted. Then observe that any one-to-one function f : {1.7. Also.1. 2.6. How many distinct ways can 8 persons. . 0(m) = 0 for m 6= 0. . . PRINCIPLES OF BASIC COUNTING 29 2. defined by g(i) = f (i). we define two sets A and B by A = {f : {1. if m > n then 3. including Ram and Shyam. . 2. . n! . How many distinct ways are there to make 5 letter words using the EN- GLISH alphabet if the letters must be different? 2. Then the number of one-to-one functions f : M −→N equals n!.1. k}−→N gives rise to the following: 1. we fix a positive integer k.1. . How many distinct ways are there to arrange the 5 letters of the word ABCDE? 3. and B = {K ⊂ N | |K| = k} × {f : {1. given the set K = Im(f ) = {f (i) : 1 ≤ i ≤ k}. with 2 ≤ k ≤ n. . Exercise 2. sit in a row. . called “n-factorial”. k}−→N | f is one-to-one}. Thus. 00 = 1. . Let M and N be two sets such that |M | = |N | = n (say).2. 2. equals .8. The set K is a subset of N and |K| = k (as f is one-to-one). of size k. .1. k}−→K | f is one-to-one}. . . 1. Therefore. the required result follows. there is one-to-one correspondence between subsets of size k and subsets of size n − k. from each of the above n-terms). the number k! (n − k)!  k”. Then the numbers n k are called Binomial Coefficients as they appear in the expansion of (x + y)n (see Lemma 2. 0 ≤ k ≤ n. 0 ≤ k ≤ n. and is called “n choose 1. if k = 0. nk = n−k . Thus. Substituting x = y = 1. the above argument implies that there is a bijection between the sets A and B and therefore.  n! is generally denoted by nk . k! (n − k)! · k! Remark 2. using Item 3 on Page 27. Let N be a set consisting of n elements. 3. we know that |A| = n(k) and |B| = |{K ⊂ N | |K| = k}| × k!. y n (x + y) = n   X n k=0 k xk y n−k . Then N \ K is again a subset of N of size n − k. Then. Hence.1. 1. one gets 2n = n P k=0 n k . Note that in this | {z } expression.9. nk is a positive integer and equals “Number of subsets. Hence Number of subsets of N of size k = |{K ⊂ N | |K| = k}| = n(k) n! = . the term xk y n−k appears nk times as we need to choose k places from n places.1.1.10). it follows that |A| = |B|. Observe that (x + y + z)n = (x + y + z) · (x + y + z) · · · · · (x + y + z) . for some choice of k. Therefore. Also. if n < k. Proof: The expression (x + y)n = (x + y) · (x + y) · · · · · (x + y) .1. (  0. Then for any two symbols x. Let K be a subset of N of size k. say ntimes .11. Since either x or y is chosen from each of the n-terms. Fix a positive integer n. COUNTING AND PERMUTATIONS Thus. the product looks like xk y n−k . for n ≥ k. The following conventions will be used: nk = 1.  for x (and thus leaving n − k places for y). Thus. using Lemma 2. for a fixed  k. Fix a positive integer n.1. of size k”. of a set consisting of n elements. Note that the above mul| {z } ntimes tiplication is same as adding all the 2n products (appearing due to the choice of either choosing x or choosing y.4. we need to choose. 3.  n  Thus. 2.10.30 CHAPTER 2. 2. Lemma 2. giving the expression nk as a coefficient of xk y n−k . Remark 2. such that i1 + i2 + · · · + ik = n. PRINCIPLES OF BASIC COUNTING (a) i places from the n possible places for x (i ≥ 0). . . or ii. In this case. .n−i−j . determine the number of ways of forming a committee consisting of 5 students. Similarly.i+j≤n 4.j. . it was felt that the committee should have at least 3 girls. ik are non-negative integers. . either the members are different.1. who will act as “spokesperson” and “treasurer”. i2 .31 2.. (a) Determine the number of ways of forming the committee consisting of 5 students. . determine the number of ways of forming the committee consisting of 5 students (no one is to be designated as spokesperson and/or treasurer). then the coefficient of xi11 xi22 · · · xikk in the expansion of (x1 + x2 + · · · + xk )n equals   n n! . i2 ..12. 2. . 5. . (c) Due to certain restrictions. Hence.ik ≥0 i1 +i2 +···+ik =n   n xi11 xi22 · · · xikk . A committee of 5 students is to be formed to represent the class. if i1 . ik These coefficient and called multinomial coefficients. . Exercise 2. Note that two committees are different if i. (n − i − j)!  n i. . n (x1 + x2 + · · · + xk ) = X i1 . The expression n i · n−i j = n! is also denoted by i! j!. = i1 .. . ik i1 ! · i2 ! · · · ik ! That is. i j i. . they have different students as spokesperson and/or treasurer. (b) Suppose the committee also needs to choose two different people from among themselves. In this case. i2 . . one has     X n n − i i j n−i−j n · xy z (x + y + z) = . (b) KAGART HALAM N AGART HALAM . Determine the number of ways of arranging the letters of the word (a) ABRACADABARAARCADA. i1 .j≥0. 1. (b) j places from the remaining n − i places for y (j ≥ 0) and thus leaving the n − i − j places for z (with n − i − j ≥ 0).1. In a class there are 17 girls and 20 boys. even if the members are the same.. 2.32 CHAPTER 2. Example 2. b. We are now ready to look at the problem of counting the number of onto functions f : M −→N . e} .1.13. the Stirling number of second kind. The symbol S(n. denote the balls in the i-th box. A2 . c}. c. if n > 0. . f (d) = 2 and f (e) = 3.17. 3.1. i=1 (c) As each box is non-empty. with n1 + n2 ≥ m. d. e}−→{1. m) is given in Lemma 2. Then the number of partitions of the set A into m-parts is denoted by S(n.14.    0. Remark 2. . The following conventions will be used:     1. . Hence. But to make the argument clear. for 1 ≤ i ≤ n. n). d. m) = 0.1. m) is called the Stirling number of the second kind.4). Let |A| = n.15. 1. Then this onto function. Consider the problem of determining the number of ways of putting m distinguishable/distinct balls into n indistinguishable boxes with the restriction that no box is empty? Let M = {a1 . Thus. A1 . 3} be an onto function given by f (a) = f (b) = f (c) = 1. Also. a2 . . . e} into 3-parts. Definition 2. we can assume that the number of balls in each of the boxes is in a non-increasing order. the number of required ways is given by S(m. Before proceeding further. b. A2 = {b. c. suppose that we are given a partition A1 = {a. An . B2 = {d} and B3 = {e} of the set {a. am } be the set of m distinct balls. Let f : {a. each Ai is non-empty. m). . . 2. into n-parts. b. we take an example. recall the definition of partition of a non-empty set into m parts given on Page 19. if n = m S(n. we observe the following: (a) Since the boxes are indistinguishable. we see that we have obtained a partition of the set M . COUNTING AND PERMUTATIONS 3. m) is also given in Equation (2. d}. consisting of m elements. If n > m then a recursive method to compute the numbers S(n. Determine the number of ways of selecting a committee of m people from a group consisting of n1 women and n2 men.1. gives a partition B1 = {a. for 1 ≤ i ≤ n. if n < m. m = 0 . A formula for the numbers S(n. Then |A1 | ≥ |A2 | ≥ · · · ≥ |An | n S and Ai = M . (b) Let Ai . . Then. f2 (A1 ) = 1. f3 (c) = 3. 1 ≤ i ≤ n. . f6 (b) = f6 (e) = 2. A2 . for 1 ≤ i ≤ n. f2 (A2 ) = 3. c. f5 (A2 ) = 1.e. f2 (b) = f2 (e) = 3.1. say A1 .e. b. Fix i. 2. .. That is. So. |f (Ai )| = |{bi }| = 1. f1 (b) = f1 (e) = 2. e} into 3-parts.. . and • a one-to-one function g : {A1 . . d.e. then A1 . . . f1 (A2 ) = 2. i . f4 (A3 ) = 1 f5 (a) = f5 (d) = 3. d.. Proof: By definition. Let M and N be two finite sets with |M | = m and |N | = n. A2 . n S f −1 (bi ) = M as the domain of f is M . each onto function f : M −→N is completely determined by • a partition. f2 (c) = 2. . 3}: f1 (a) = f1 (d) = 1. of M into n = |N | parts. An gives a partition of M into n-parts. 3. Then. f4 (b) = f4 (e) = 3. f5 (A1 ) = 3. if we write Ai = f −1 (bi ). f6 (A2 ) = 2. whenever x ∈ Aj and g(Aj ) = bi . . 2. f5 (b) = f5 (e) = 1. f4 (c) = 1. f4 (A2 ) = 3. f5 (c) = 2. f6 (c) = 1. we observe the following: 1. i=1 Therefore. Then the total number of onto functions f : M −→N is n!S(m. Then. f1 (A3 ) = 3 f2 (a) = f2 (d) = 1. f3 (A1 ) = 2. n).33 2.. f5 (A3 ) = 2 f6 (a) = f6 (d) = 3. Lemma 2. b. for 1 ≤ i ≤ n and x ∈ Ai . Therefore. . whenever 1 ≤ i 6= j ≤ n as f is a function.e. for 1 ≤ i ≤ n. A2 . where f (x) = bi .1. let us assume that m ≥ n and N = {b1 . bn }. . . the number of onto functions f : M −→N is 0. f2 (A3 ) = 2 f3 (a) = f3 (d) = 2. i .. Hence. An }−→N . PRINCIPLES OF BASIC COUNTING and A3 = {c} of {a. f6 (A1 ) = 3. Then f −1 (bi ) = {x ∈ M |f (x) = bi } is a non-empty set as f is an onto function. whenever m < n. i . we note that f (x) = bi . e} into {1. f1 (A1 ) = 1.e. b2 ..16. . i . f3 (b) = f3 (e) = 1. f −1 (bi ) ∩ f −1 (bj ) = ∅. . this partition gives rise to the following 3! onto functions from {a. . f4 (A1 ) = 2. i . . f1 (c) = 3. i .e. f3 (A3 ) = 3 f4 (a) = f4 (d) = 2. Conversely. . f6 (A3 ) = 1. An . . Also. “f is onto” implies that “for all y ∈ N there exists x ∈ M such that f (x) = y. f3 (A2 ) = 1. c. . . . . {f : M −→N : f is onto}. = . .{g : {A1 . . An }−→N : g is one-to-one}. . A2 . . . . ×. Partition of M into n-parts. n). (2.1) Lemma 2. (2. n}.2) . = n! S(m. Then n m = ℓ   X n k=1 k k!S(m.17. Let m and n be two positive integers and let ℓ = min{m.1. k). Now. n}. Let f0 : M −→N be any function and let K = f0 (M ) = {f (x) : x ∈ M } ⊂ N . A = Ak . 1 ≤ k ≤ ℓ = min{m. using f0 . a subset of N of size k can be selected in nk ways. Thus. The second method uses the idea of onto functions. for all x ∈ M .1.1. We compute |A| using two different methods to get Equation (2.2). The first method uses Lemma 2. for 1 ≤ k ≤ ℓ. Thus.34 CHAPTER 2.1 to give |A| = nm . for 1 ≤ k ≤ ℓ . whenever  1 ≤ j 6= k ≤ ℓ. k=1 where Ak = {f : M −→N | |f (M )| = k}. Then. Then clearly ℓ S g is an onto function with |K| = k for some k. by g(x) = f0 (x). COUNTING AND PERMUTATIONS Proof: Let M and N be two sets with |M | = m and |N | = n and let A denote the set of all functions f : M −→N . using Lemma 2.8. we define a function g : M −→K. Note that Ak ∩ Aj = ∅. . . . |Ak | = . |K| = k}.{K : K ⊂ N. × . {f : M −→K | f is onto}. k .   n k!S(m. = Therefore. k). . ℓ ℓ ℓ   . [ . X X n . . |A| = . Ai . = |Ak | = k!S(m. k). . . 1). (b) Use this to verify that S(5.2). k) can be recursively calculated using Equation (2. 2. k k=1 Remark 2. . the above two calculations implies that S(m. So. k) = 1 · 1! · S(m. the 4 cohesive groups can be arranged in 4! ways. S(5.1. S(5. The problem of counting the total number of onto functions f : M −→N . taking n ≥ 1 and substituting m = 1 in Equation (2. Hence. k) = n · 1! · S(1.1. Thus.18. Determine the number of ways to seat 4 couples in a row if each couple seats together? Solution: A couple can be thought of as one cohesive group (they are to be seated together). using n = 1 and m ≥ 2 in Equation (2. 2) = 15. S(5. with |M | = m and |N | = n is similar to the problem of determining the number of ways to put m distinguishable/distinct balls into n distinguishable/distinct boxes with the restriction that no box is empty. 4) = 10.2) gives m 1=1 = 1   X 1 k=1 k k!S(m. But a couple can sit either as “wife and husband” or “husband and wife”. S(1. Example 2. 1) = 1. 1) = 1 for all m ≥ 1.19. k=1 k=1 1. (a) For example. . the total number of arrangements is 24 4!. Now. So.2) gives n = n1 = 1   X n k=1 k k!S(1. 1). The numbers S(m. 5) = 1. 3) = 25. 2. . How many ways are there to distribute 20 distinguishable toys among 4 children so that each children gets the same number of toys? 6. k)’s? 9.    (b) n0 + n2 + · · · + nn = 2n−1 . . 0 ≤ t ≤ n. m) is called the nth Bell number. n P k  n n n−ℓ (d) . PRINCIPLES OF BASIC COUNTING We end this section with the following exercises. such that NO box is empty? 7. In how many ways can m distinguishable balls be put into n indistinguishable boxes. . = ℓ=0 n P ℓ r ℓ=r ℓ P k=0 t k   n+ℓ ℓ .1. chap1:exe5:21 Prove the following results. 2. Determine the number of ways of selecting r distinguishable objects from n distinguishable objects when n ≥ r? 5. (a) Pascal’s Identity:   (b) k nk = n n−1 k−1 . n ≥ 0. compute the values of b(n). results related to Binomial coefficients.20. for all n ∈ N.35 2. .  n−t ℓ−k . Then prove the following Exercise 2. b(0) = 1 = b(1). let b(n) denote the number of partitions of the set {1.1. k=ℓ (e) (f ) (g) (h) m+n ℓ n+r+1 r  n+1 r+1 n ℓ  = ℓ P = = k=0 r P m n  k ℓ−k . For a positive integer n. for any t. for all n ∈ N. k≥0 k≥0 3. In how many ways can m distinguishable balls be put into n indistinguishable boxes? 8. By definition. Then S has exactly 2n subsets. . n}. (a) Let S be a finite set consisting of n elements. Determine a recurrence relation to get the values of S(n. . ℓ k = ℓ 2 n r = n−1 r + n−1 r−1 . n P Then b(n) = S(n. P n P n  (c) 2k = 2k+1 . Determine the number of n-letter words that are formed using r A’s and n − r B’s? 4. m=0 For 2 ≤ n ≤ 10.     (c) kℓ nk = nℓ n−ℓ k−ℓ . Fix positive integers n and r with n ≥ r. 1. Suppose Xo and Xe . 13. x2 = 3. Thus the total number of solutions is       9 9 6 + (4 − 1) = = . A function f : N −→N is said to be idempotent if f f (x) = f (x) for all x ∈ N . The answer will remain the same as we just need to replace A’s with +’s and B’s with 1’s in any string of 3 A’s and 6 B’s. . Determine the number of solutions to the equation x1 + x2 + x3 + x4 = 6. Find a closed form expression for  n P [n/2]  X = k=0 (2k + 1) k=0  n = 2n−1 . Hence or otherwise.2 Indistinguishable Balls and Distinguishable Boxes Example 2. respectively.1. 2k + 1 n  2k+1 n P and (5k + 3) k=0 n  2k+1 12. 2. 3 6 6 We now generalize this example to a general case. where x1 = 0. Take a sequence. Describe a bijection to prove that |Xo | = |Xe |. a solution. Let X be a non-empty set.1. COUNTING AND PERMUTATIONS 10. for the A’s. we need to find 3 places. Compute |S| in two ways to obtain m (n + 1) = m   X m k=0 k nk . calculate the number of ways they can get down so that at least one person gets down at each level. say +111 + 1 + 11 of 3 +’s and 6 1’s. x3 = 0 and x4 = 1 of the given equation gives rise to a sequence 11111 + + + 1 of 3 +’s and 6 1’s.1. denote the set of all even and odd subsets of X. where each xi ∈ Z and 0 ≤ xi ≤ 6. Then. 3. 4 and 5. prove that [n/2]  X k=0 n 2k 11.1. If n  P kn−k nk . x2 = 0. 2. suppose the lift stops at the levels 1.  14. Suppose 13 people get on the lift at level 0. |N | = n + 1}. x3 = 1 and x4 = 2. Determine the number of distinct strings that can be formed using 3 A’s and 6 B’s? What if we are interested in the strings that are formed using +’s and 1’s in place of A’a and B’s? Solution: Note that the 3 A’s are indistinguishable among themselves and the same holds for 6 B’s. If all the people get down at some level. Solution: We will show that this problem is same as Example 2.  the answer is 93 .1. Fix positive integers m and n and let S = {f : M −→N | |M | = m. Hence. |N | = n.36 CHAPTER 2. one can think of this sequence representing a solution 0 + 3 + 1 + 2 of x1 + x2 + x3 + x4 = 6. 1. from the 9 = 3 + 6 places. say x1 = 5. In the same way. prove that the number of such functions equals k=1 2.1. Thus. How many 4-letter words (with repetition) are there with the letters in alphabetical order? 2.1. How many ways can 10 men and 7 women be seated in a row with no 2 women next to each other? 6. n and let xi .2. . we note that the sequence is determined if we know the number of times a particular number has appeared in the sequence. 1. 2. Proof: Note that the number m can be replaced with m 1’s (or m indistinguishable symbols). How many ways can 8 persons. . including Ram and Shyam. we are interested in finding out the number of balls in each of the distinguishable boxes. using the idea in Example 2. where each xi ∈ Z and 0 ≤ xi ≤ m.2.1. How many 26-letter permutations of the alphabet have no 2 vowels together? 4.1. we see that it is enough to find the number of distinct strings formed using n − 1 +’s and m 1’s. for 1 ≤ i ≤ n. So. Determine the number of solutions to the equation x1 + x2 + · · · + xn = m. PRINCIPLES OF BASIC COUNTING 37 Lemma 2. Observe that solutions in non-negative integers to the equation x1 + x2 + · · · + xn = m is same as the following problems. How many 26-letter permutations of the alphabet have at least two consonants between any two vowels? 5.1. for 1 ≤ i ≤ n. Hint: Since we are looking at a non-decreasing sequences. Hint: Since the balls are indistinguishable. . So. As the +’s are indistinguishable among themselves and the same holds for 1’s. denote the number of balls in the i-th box. Once this is done. Determine the number of ways to put m indistinguishable balls into n distinguishable boxes. let xi .1. . Determine the number of non-decreasing sequences of length m using the numbers 1. 2. 1. . In how many ways can m indistinguishable balls be put into n distinguishable boxes with the restriction that no box is empty. . . . we get       n−1+m n−1+m m+ n−1 = = . How many arrangements of the letters of KAGARTHALAMNAGARTHALAM have the vowels in alphabetical order? .2.3. n. 3. sit in a row with Ram and Shyam not sitting next to each other? 7. Exercise 2.4.1. denote the number of times the number i has appeared in the sequence. m n−1 m Remark 2. let the boxes be numbered 1. 2. How many ways are there to arrange the letters in ABRACADABRAARCADA so that the first (a) A precedes the first B? (b) B precedes the first A and the first D precedes the first C? (c) B precedes the first A and the first A precedes the first C? 17. how many ways are there to select r things from n distinguishable things? 14. how many ways are there to select r things from n distinguishable things? 16. How many arrangements of the letters of RECURRENCERELATION have no 2 vowels adjacent? 9. How many nonnegative integer solutions are there to the equation x1 + x2 + · · · + x5 = 67? 10. how many ways are there to select r things from n distinguishable things? 13. With repetition NOT allowed and order NOT counting.38 CHAPTER 2. With repetition NOT allowed and order counting. How many positive integer solutions are there to the equation x1 + x2 + · · · + x5 = 67? 11. How many nonnegative integer solutions are there to the inequality x1 + x2 + · · · + x5 ≤ 68? 12. How many ways are there to distribute 50 balls to 5 persons if Ram and Shyam together get no more than 30 and Mohan gets at least 10? . How many ways are there to arrange the letters in KAGART HALAM N AGART HAT AM with the first (a) A preceding the first T ? (b) M preceding the first G and the first H preceding the first A? (c) M preceding the first G and the first T preceding the first G? 18. COUNTING AND PERMUTATIONS 8. how many ways are there to select r things from n distinguishable things? 15. With repetition allowed and order NOT counting. With repetition allowed and order counting. . How many ways can we pick 20 letters from 10 A’s. we study the partition of a number m into n parts and look at a few problems in which this idea can be used. the distinct partitions of 7 into 4 parts are given by 4 + 1 + 1 + 1. 3 + 2 + 1 + 1. Example 2. the problem reduces to counting the number of balls in each box with the condition that no box is empty. n). is n P a non-increasing sequence of positive numbers x1 .6. . .1. How many ways are there to select 12 integers from the set {1. we have the answer as Π(m. . Π(7. Verify that Π(7) = 15. Hence. Remark 2. whenever n > m. Hence.7.1. Π(m) = m P Π(m. Determine the number of ways to sit 10 men and 7 women so that none of the women are sitting next to each other? 24. We are now ready to associate the study of partitions of a number with the following problems. 15 B’s and 15 C’s? 20. 4) = 3. we were lead to the study of “partition of a set consisting of m elements into n parts”. Hence. x2 .3 Indistinguishable Balls and Indistinguishable Boxes To study the number of onto functions f : M −→N .39 2. k).1. they can be arranged in such a way that the number of balls inside them are in non-increasing order. In this section. Determine the number of ways to sit 5 men and 7 women so that none of the men are sitting next to each other? 23. 2) = 3 and Π(7. 2. including Ram and Shyam. Determine the number of ways to sit 8 persons. . xn such that xk = m. . Determine the number of ways of putting m indistinguishable balls into n indistinguishable boxes with the restriction that no box is empty? Solution: Since the balls are indistinguishable balls. with Ram and Shyam NOT sitting next to each other? 2. 3) = 4. Verify that Π(7. Π(m) denotes the number of partitions of m. . A partition of a positive integer m into n parts. . PRINCIPLES OF BASIC COUNTING 19. 2 + 2 + 2 + 1. How many 10-element subsets of the alphabet have a pair of consecutive letters? 22. 100} such that the positive difference between any two of the 12 integers is at least 3? 21. we let Π(0. Definition 2. 3. n).1. n) = 0. 1. 1.5 (Partition of a number). For a fixed positive integer m. By convention.1. As the boxes are also indistinguishable. For example. k=1 3. . 0) = 1 and Π(m. The number k=1 of such partitions is denoted by Π(m. 2. 8. Then relative to this person. n) with Π(n−1. . That is. 3. where as Π(m) corresponds to “putting m balls into m indistinguishable boxes”. if we are arranging the four distinct chairs. Hint: Π(2m.1. That is. i. named A. each of the n boxes are non-empty. m−1) and/or Π(n−m. m) corresponds to “putting 2m indistinguishable balls into m indistinguishable boxes with the condition that no box empty”. Then.8. 8. Exercise 2. That is.4 Round Table Configurations Till now. So. the total number of arrangements is 7!. . . we can pick one of the person and ask him/her to sit on the chair that has been numbered 1. B.40 CHAPTER 2. n).” This new problem is same as “in how many ways can m + n indistinguishable balls be put into n indistinguishable boxes?” Therefore.1. initially.e. 3. at a round table then the arrangements ABCD and the arrangement BCDA are the same. we need to fix an object and assign it the number 1 position and study the distinct arrangement of the other n − 1 objects relative to the object which has been assigned position 1. . COUNTING AND PERMUTATIONS 2. we briefly study the problem of arranging the objects into a circular fashion.1. we have been looking at problems that required arranging the objects into a row. the answer to our problem reduces to computing Π(m + n. So. 1. For a fixed positive integer n.1.. we differentiated between the arrangements ABCD and BCDA. 1. Calculate Π(n). . Now let us determine the number of ways of putting m indistinguishable balls into the n indistinguishable boxes that are already non-empty. m)? 2. Use the above idea to show that Π(2m. 2. Example 2. the other persons (7 of them) can be arranged in 7! ways. m) = Π(m) for any positive integer m. Determine the number of ways to put m indistinguishable balls into n indistinguishable boxes? Solution: The problem can be rephrased as follows: “suppose that each box already has 1 ball. Determine the number of ways to sit 8 persons at a round table? Solution: Method 1: Let us number the chairs as 1. . 2. determine a recurrence relation for the numbers Π(n. We will look at two examples to understand this idea. m). Method 2: The total number of arrangements of 8 persons if they are to be seated in a row is 8!. Since the cyclic arrangement P1 P2 · · · P8 is same as the arrangement P8 P1 P2 · · · P7 . to get distinct arrangements at a round table. The problems related with round table configurations will be dealt at length in Chapter 4. for n = 1. In this section. C and D. . Hint: Use the previous exercise to relate Π(m. . the main problem that we come across circular arrangements as compared to problems in the previous sections is “there is no object that can truly be said to be placed at the number 1 position”. 2. Determine the number of ways to sit 8 persons. The set S = {(m.} are said to be the points of the lattice and the lines joining these points are called the edges of the lattice. n = 0.1. Solution: Note that using Example 2.19. . n2 − 1) or ek = (m2 − 1. bi ). Then we define an increasing/lattice path from (m1 .1.2. . 1. for 1 ≤ i ≤ k. then for 2 ≤ j ≤ k. Recall Example 2. either ek = (m2 . Determine the number of ways to select 6 men from 25 men who are sitting at a round table if NO adjacent men are to be chosen? 2. Now. . n2 ) to be a subset {e1 . LATTICE PATHS 41 and so on. ek } of S such that 1. if we represent the tuple ei = (ai . . the 4 cohesive units can be arranged in 3! ways. 2. . at a round table with Ram and Shyam NOT sitting diametrically opposite to each other? 5. Determine the number of ways to sit 5 men and 7 women at a round table with NO 2 men sitting next to each other? 2. n2 ). let us look at some of the questions related to this topic. Determine the number of ways to sit 8 persons.2.2 Lattice Paths Consider a lattice of integer lines in the plane. n1 ). e2 . including Ram and Shyam. That is. either e1 = (m1 . n2 . n1 ) to (m2 . .1. . n) : m. Hence. with m2 ≥ m1 and n2 ≥ n1 . (a) either aj = aj−1 and bj = bj−1 + 1 (b) or bj = bj−1 and aj = aj−1 + 1. 2. the movement on the lattice is either to the RIGHT or UP (see Figure 2. n1 ) and m2 .1. 2.1). let us fix two points in this lattice. Determine the number of ways to sit 10 men and 7 women at a round table so that NO 2 women sitting next to each other? 3. n1 + 1) or e1 = (m1 + 1. Suppose we are now interested in making the 4 couples sit in a round table. 1. Now. But we can still have the couples to sit either as “wife and husband” or “husband and wife’. the required answer is 24 3!. we need to divide the number 8! by 8 to get the actual number as 7!. say (m1 . and 3. at a round table with Ram and Shyam NOT sitting next to each other? 4. . including Ram and Shyam. 0) to (ℓ. n + 1). Now.2. are all distinct and hence the result follows. ℓ m ℓ=0 Solution: Observe that the right hand side corresponds to the number of lattice paths from (0. Also. as we vary ℓ. the coordinates of the lattice path increases. Determine the number of solutions in non-negative integers to the system x0 + x1 + x2 + · · · + xk = n. Then to each lattice path from (0. find a bijection to prove that the above problem is same as determining the number of lattice paths from (0.2. 0) Figure 2. Exercise 2. n + 1) and finally from (ℓ. 0) to (m. 1. 7) Example 2. 7) (2. 3) to (8. where 0 ≤ ℓ ≤ m. n + 1).2. Then the path P ∪ Q. gives a lattice path from (0. Solution: Note that at each stage. COUNTING AND PERMUTATIONS (8. the total increase in the X-direction is exactly m and in the Y -direction is exactly n.42 CHAPTER 2. each lattice path is a sequence of length m + n. 2. Use the method of lattice paths to prove the following result on Binomial Coefficients:    m  X n+ℓ n+m+1 = . 1. we need to find m places for the R’s among the m + n places (R and U together). 0 ≤ ℓ ≤ m. we adjoin the path Q = U |RR{z · · · R} . . n) to (ℓ. 0) to m−ℓ times (ℓ.1. These lattice paths. for 0 ≤ ℓ ≤ m. Determine the number of lattice paths from (0. 0) to (m. consisting of m R’s (movement along X-axis/RIGHT) and n U ’s (movement along the Y -axis/UP). 0) to (ℓ. Therefore. 0) to (m. Thus. n). n + 1) to (m. the  required answer is m+n m . n) and from (ℓ. corresponding to a lattice path from (0. 0) to (n. by exactly one positive value. n + 1).1: A lattice with a lattice path from (2. to reach (m. either in the X-coordinate or in the Y -coordinate. That is. So. whereas the left hand side corresponds to the number of lattice paths from (0. 0). k). 3) UP RIGHT (0. n). n). say P . n) from (0. fix ℓ. P2k−1 = P2k = U and the sub-path P2k+1 P2k+2 . 0) to (k. 0) to (n − k. 0) to (n. . 0) to (n. . n) that cross the line Y = X. 0) to (n. all our lattice paths are from (1. 0) to (n − k. say (k.43 2. n − 2) (0.2. k) (0. .2. the total number of lattice paths from (1. Let P be a path from (1. k) (k. Claim: there exists a 1-1 correspondence between lattice paths from (1. So. k) and nk = n−k also represents a lattice path from 3. . n 2n−1 we need to subtract from n a number. . 1) to (n + 1.1.2).1 Catalan Numbers Determine the number of lattice paths from (0. 0)) as we are not allowed to go above the line Y = X. 0) to (n.] 2. 2. So. n). . . k) To compute the value of N0 . Then this path crosses the line Y = X for the first time at some point. in principle. k) to (n. LATTICE PATHS 2. 0) (n + 1. 1 ≤ k ≤ n − 1. (n. 0) is R (corresponding to moving to the point (1. where N0 equals the number of lattice paths from (1. . 0) to (n.2: Lattice paths giving the mirror symmetry from (0. n − 1).  Using Example 2. n) (n. . n) that crosses the line Y = X and the lattice paths from (0. [Hint: n k  represents a lattice path from (0. say N0 . n) with the condition that these paths do not cross the line Y = X. n) is 2n−1 . [Hint: nk represents  n  a lattice path from (0. Also. 0) to (n.]  using lattice paths. Let P = P1 P2 . n} gives positions. Solution: The first move from (0. Construct a proof of n 0  + n 1  +···+ n n  = 2n using lattice paths. . . n) that crosses the line Y = X. Then P1 . Construct a proof of n 2 n 2 n 2 0 + 1 +· · ·+ n = 2n n (n − k. . P2n−1 consist of a sequence that has . where we need to take the step U . n) that crosses the line Y = X. P2 . n) (k. we decompose each lattice path that crosses the line Y = X into two sub-paths. k) and any subset of {1. n) that do not go above the line Y = X (see Figure 2. 0) to (n. 0) Figure 2. P2k−1 P2k P2k+1 .2.1. . k). P2k−2 consist of a sequence of (k − 1) R’s and (k − 1) U ’s. . P2n−1 be the path from (1. Hence. 1). in the sub-path P1 P2 . such that Qi = {R. 1 ≤ i ≤ 2k − 2. the number of lattice paths from (1. if 2k + 1 ≤ i ≤ 2n − 1. an+1 . n) that crosses the line Y = X equals the number of lattice paths from (0. . Then there are (k + 1) R’s and (k − 1) U ’s till the first (2k)th instant and (n − k) R’s and (n − 1 − k) U ’s ( in the remaining part of the sequence. AABBAB. U } \ (Q )i . # of R’s = |{j : Pj = R. .1) ( Pi . in any such sequence an instant occurs when the number of R’s exceeds the number of U ’s by 2. Then we see that the path Q consists of exactly (k − 1) + 2 + (n − k) = n + 1 R’s and (k − 1) + (n − k − 1) = n − 2 U ’s. Thus. Pi . (a1 ((a2 a3 )a4 )). A few of them are mentioned here for the inquisitive mind. for some k. U } \ Pi . n − 1). using Example 2. for any i. The book titled “enumerative combinatorics” by Stanley [7] gives a comprehensive list of places in combinatorics where Catalan numbers appear. Also. P is mapped to a path Q. So. if Q′ is a path from (0.3. 1) to (n + 1. be replaced by a path P ′ . . if 2k + 1 ≤ i ≤ 2n − 1. So. ′ It can be easily verified that P is a lattice path from (1. AABABB. Now. n) that crosses the line Y = X. 1 ≤ ℓ ≤ i}| = # of U’s. the number of lattice paths from (0. . ((a1 a2 )(a3 a4 )).44 CHAPTER 2. then Q′ consists of (n + 1) R’s and (n − 2) U ’s. 0) to (n. The equivalence between these problems can be better understood after the chapter on recurrence relations.1. for 1 ≤ i ≤ 2k. we need to multiply n + 1 given numbers. C3 = 5 = |{AAABBB. n) that does not go above the line Y + X is       2n − 1 2n − 1 1 2n − = . . (a1 (a2 (a3 a4 )))}|. Then the different ways of multiplying these numbers.2. implies that the path Q starts from the point (0. 0) to (n. Also. denoted Cn . (2.1. 1 ≤ k ≤ n − 1.2. ABAABB. U } \ Pi . For example. say a1 . 0) to (n. . the condition that Qi = {R. if 1 ≤ i ≤ 2k. without changing the order of the elements. n − 1) equals 2n−1 n+1 . COUNTING AND PERMUTATIONS (n − k) R’s and (n − k − 1) U ’s. the number  of lattice paths from (0. Suppose in an election two candidates A and B get exactly n votes. For example. Suppose this occurrence happens for the first time at the (2k)th instant. Therefore. Suppose. 1) and consists of (n + 1) R’s and (n − 2) U ’s and hence Q ends at the point (n + 1. C3 = 5 = |{(((a1 a2 )a3 )a4 ). 1. ((a1 (a2 a3 ))a4 ). ABABAB}|. Hence. But. equals Cn . 1) to (n + 1. n n+1 n+1 n This number is popularly known as the nth Catalan Number. 1) to (n + 1. . Q is a path that starts from (0. such that (P ′ )i = ′ {R. Then Cn equals the number of ways of counting the votes such that candidate A is always ahead of candidate B. Also. n − 1). a2 . the proof of the claim is complete. Q′ can (Q′ )i . 1 ≤ j ≤ i}| ≥ |{ℓ : Pℓ = U. n − 1). if 1 ≤ i ≤ 2k. Remark 2. 2. 1 ≤ i ≤ n. 0) to (n. where recall that a Dyck path is a movement on an integer lattice in which each step is either in the North East or in the South East direction (so the only movement from (0. 6. Cn also equals the number of integer sequences that satisfy 1 ≤ a1 ≤ a2 ≤ · · · ≤ an and ai ≤ i. Let An denote the set of all lattice paths from (0.4: Full binary trees on 7 vertices (or 4 leaves) 5. where recall that a full binary tree is a rooted binary tree in which every node either has exactly two offsprings or has no offspring.2. ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ Figure 2. 0) is either to (1. Cn is also equal to the number of full binary trees on 2n + 1 vertices. 1) or to (1. −1)). 0) to (2n. n) and let Bn ⊂ An denote the set of . 0). The following article has been taken from [1]. Cn also equals the number of ways that a convex (n+2)-gon cab be sub-divided into triangles by its diagonals so that no two diagonals intersect inside the (n + 2)-gon? For example. Figure 2. Cn also equals the number of n nonintersecting chords joining 2n points on the circumference of a circle.45 2. the different ways are 3 3 2 4 4 3 2 4 1 5 3 2 3 2 4 2 4 1 1 1 5 5 5 5 Figure 2. Cn is also equal to the number of Dyck paths from (0. for all i.5: Non-intersecting chords using 6 points on the circle 7. LATTICE PATHS 3.3: Different divisions of pentagon 1 4. for a pentagon. f1 . Rn ) satisfying Equation (2.2). Given any path P ∈ An . . Now. . say S0 . These Ri ’s satisfy 0 ≤ R1 ≤ R2 ≤ · · · ≤ Rn ≤ n. 0 ≤ k ≤ n and a path R ∈ Bn such that fk (R) = P . .1. . 0 ≤ k ≤ n. any element of An can be represented by an ordered n-tuple (R1 . Ri2 ⊕n+1 k. let k!(n − k)!  n · (n − 1) · · · (n − k + 1)  us think of nk = . . . (n − k)! divides n!. Note that. R2 = 0.2) That is. 0) to (n. n). . in Figure 2. . . we use the tuples that represent the elements of Bn to get n + 1 maps. R2 . . . Rn . the numerical values of |An | and |Bn | imply that (n + 1) · |Bn | = |An |. n such that 0 ≤ Ri1 ⊕n+1 k ≤ Ri2 ⊕n+1 k ≤ · · · ≤ Rin ⊕n+1 k. the numbers nk can k! . Exercise 2. fj (Bn ) ∩ fk (Bn ) = ∅. 0) to (n. R2 . . . . and vice-versa. for 1 ≤ i ≤ n are elements of Bn . for 0 ≤ j 6= k ≤ n. Fix k. using Remark 2. 0 ≤ j 6= k ≤ n. . . The question arises: can we find a partition of the set An into (n + 1)-parts. . 1. n S and An = fk (Bn ). COUNTING AND PERMUTATIONS all lattice paths from (0. 4. 3. . 0 ≤ k ≤ n. . 0 ≤ k ≤ n. for 1 ≤ i ≤ n. The readers are advised to prove the following exercise as they give the required partition of the set An . R2 . among the above n-tuples. Then. Rn ) satisfying Equation (2. . S2 . .2.8. where Ri equals ℓ if and only if Ri lies on the line Y = ℓ. Rn ) = (Ri1 ⊕n+1 k. the tuples that satisfy Ri ≤ i − 1. nk = . whenever R. fn . the map fk : Bn −→An is defined k=0 by  fk (R1 . . Then prove that fk (R) 6= fk (R′ ). . . . n) has n right moves. the path is specified as soon as we know the successive right moves R1 . With this understanding. R3 = 1. for a fixed k. S1 . . for each k. it can be easily verified that any ordered n-tuple (R1 .4. in is a rearrangement of the numbers 1. . there exists a positive integer k. 2. k be non-negative integers with 0 ≤ k ≤ n.3 Some Generalizations 1. . The answer is in affirmative. R4 = 1. R′ ∈ Bn 2. i2 . . . Observe that any path from (0. in such a way that fj (Bn ) and fk (Bn ) are disjoint. In particular. . . prove that fk (Bn ) ∩ Bn = ∅. . k.2) corresponds to a lattice path from (0.46 CHAPTER 2. Sn such that S0 = Bn and |Si | = |S0 |. “the number of ways of choosing a subset of size k from a set consisting of n elements” was denoted by the  n! binomial coefficients. . For k 6= 0. Conversely. . For example. (2. . 0) to (n. . f0 .7. R1 = 0. . For each j. R2 . Let n. . .2. So. and R 6= R′ . Rin ⊕n+1 k). Since.2. n) that does not go above the line Y = X.3. 2. where ⊕n+1 denotes addition modulo n + 1 and i1 . Then in Lemma 2. Equation (2.     1 r+1 2 X r+k−1 (1 + x) = = 1 − rx + x + (−x)k . . b ∈ R with |a| < |b|. one has the following theorem and is popularly known as the generalized binomial theorem.3) gives 2     1 1 1 1 · − 1 ··· −k+1 1 · (−1) · (−3) · · · (3 − 2k) (−1)k−1 (2k − 2)! 2 2 2 2 = = = . 1 (a) Let n = . 1 2 r In particular. in the generalized form. In this case.3. Then       n n 2 n r n (1 + x) = 1 + x+ x + ··· + x + ··· . k! if k = 0. With the notations as above. b b r r r≥0 r≥0 Let us now understand Theorem thm:generalized:binomial through the following examples.1.3) gives     −r −r · (−r − 1) · · · (−r − k + 1) k r+k−1 = = (−1) . where r is a positive integer. Recall that the Taylor series expansion of f (x) around x = 0 equals ′′ P f (k) (0) k 1 −1 ′ ′′ f (x) = f (0) + f ′ (0)x + f 2!(0) x2 + k! x . for k ≥ 1. We state it without proof. k k! 2k k! 22k−1 (k − 1)!k! Thus. That is. k 2 2 2 22k−1 (k − 1)!k! 2 k≥0 k≥4 This can also be obtained using the Taylor series expansion of f (x) = (1 + x)1/2 around x = 0. Equation (2. if (1 − x)−1 = 1 + x + x2 + x3 + · · · and if a. Theorem 2.      0. SOME GENERALIZATIONS be generalized. n 6= k if n = k (2. one has   0. for k ≥ 3.3.  k      n · (n − 1) · · · (n − k + 1) . for any n ∈ C and for any non-negative integer k.3) otherwise. f (0) = 2 .47 2. Then. k k! k Thus. Let n be any real number. 1/2 (1 + x) = X 1 X (−1)k−1 (2k − 2)! −1 1 1 xk = 1 + x + 3 x2 + 4 x3 + xk . k (1 + x)r 2 n k≥3 The readers are advised to get the above expression using the Taylor series expansion of (1 + x)n around x = 0. for k ≥ 1. (b) Let n = −r. then  X n  a r X n a n n n n (a + b) = b 1 + =b = ar bn−r . f (0) = 22 k≥3 and in general f (k) (0) = 1 2 · ( 12 − 1) · · · ( 12 − k + 1). if k < 0   n = 1. where f (0) = 1. A = 3 3 3 3  − · · · 0 −   0 1 2 3  . 2)  .. n! k (2. We end this chapter with an example which has a history (see [3]) of being solved by many mathematicians such as Montmort. . k) that appeared in Lemma 2. Determine the number of ways of collecting the umbrellas so that no student collects the correct umbrella when they finish the examination? This problem is generally known by the Derangement problem.2. . Recall the identity nm = m P k=0 n k k!S(m.    . COUNTING AND PERMUTATIONS 2. k) = n P k=0 n k k!S(m. . m ∈ N. 1 ≤ i ≤ n.   .  .   .. Let n.  .1. .  .2)). So.        (−1)n n0 (−1)n−1 n1 (−1)n−2 n2 (−1)n−3 n3 · · · nn This gives us a way to calculate the Stirling numbers of second kind as a function of binomial coefficients. . 2. . . . . That is. .   n  n!S(m. 3 3    ··· 0  2 3 ... Check that   0 0 0 0 · · · 0 0    1  − 1 0 0 ··· 0  0 1     2 2 2 − 1 0 ··· 0   0 2 −1  . we are interested in the number of permutations . ..3. verify that   1 X k n S(m. Example 2.17 (see Equation (2. N.. . .  . if we know the inverse of the matrix A. 1)   2   0 ··· 0   2  and Y =  2!S(m. . .  . the above identity is same as the matrix     0 0m 0  01 1  m  1   0 1    2  m 2 2    0 1    X =  m  . .   n n nm 0 1 product X = AY . .4) k≥0 The above ideas imply that for all non-negative integers n the identity   X n  X k n a(n) = (−1) b(k) holds if and only if b(n) = a(k) holds.48 CHAPTER 2... A =  3 3  0 3  1  .. 0) 0 0 ··· 0      1!S(m.. Bernoulli and de Moivre.  . n students leave their umbrellas (which are indistinguishable) outside their examination room. n) n · · · nn 2 3 Hence. where    0 0 ··· 0  0!S(m.. We present the idea that was proposed by Euler. n and suppose that the ith student has the umbrella numbered i. k k k≥0 k≥0 3.   . We note that for a fixed positive integer m... .. . Solution: Let the students be numbered 1. n) = (−1) (n − k)m . On a rainy day. we can write Y = A−1 X. j is not placed at the j th position. . Hence. for 1 ≤ i ≤ n. . 2. n − 1 at the places 1. Let us rename the positions as a1 . . Therefore. in this case. Case (a): Fix i. . . . . SOME GENERALIZATIONS 49 of the set {1. . n − 1 at places a1 . Then the position of n is at the ith place but i is not placed at the nth position.2. with this renaming. in other words lim n−→∞ Dn 1 = . for 1 ≤ i ≤ n − 1. . the number of derangements corresponding to the first case equals (n − 1)Dn−2 . . That is. the problem reduces to placing the numbers 1. . n. n − 1. Then it can be checked that D2 = 1 and D3 = 2. 1 ≤ i ≤ n − 1. . . Thus. 1 ≤ i ≤ n − 1 (a) n appears at the ith position and i appears at the nth position. i − 1. . = n(n − 1) · · · 4 · 3 D2 + n(n − 1) · · · 4(−1)3 + · · · + n(−1)n−1 + (−1)n   −1 (−1)2 (−1)n−1 (−1)n = n! 1 + + + ··· + + . . Case (b): Fix i. Then the position of n and i is fixed and the remaining numbers j. the problem reduces to the number of derangements of n − 2 numbers which by our notation equals Dn−2 . 1! 2! (n − 1)! n! Or. for 1 ≤ j ≤ n − 1. 312 for n = 3. Or equivalently. 2. n should not appear at the j th place. As j 6= i. . the problem reduces to placing the numbers 1. . As i can be any one of the integers 1. . . . Let us have a close look at the required permutations. in this case the number of derangements equals (n − 1)Dn−1 . We note that n should not be placed at the nth position. n has to appear some where between 1 and n − 1. Then. 1 ≤ i ≤ n − 1. . . n} such that the number i is not at the ith position. . an−1 . This corresponds to the derangement of n − 1 numbers that this by our notation equals Dn−1 .  Dn = nDn−1 + (−1)n = n (n − 1)Dn−2 + (−1)n−1 + (−1)n = n(n − 1)Dn−2 + n(−1)n−1 + (−1)n . for j 6= i. . Dn = (n − 1)Dn−1 + (n − 1)Dn−2 . 2. So. . . . . n such that the number i is not to be placed at the nth position and for j 6= i. We will try to find a relationship of Dn with Di .. 2. an−1 such that the number j. D2 = 1 and D1 = 0 imply   Dn − nDn−1 = − Dn−1 − (n − 1)Dn−2 = (−1)2 Dn−2 − (n − 2)Dn−3 = · · · = (−1)n . 2. for some i. is not placed at aj ’th position. .3. where ai = n and aj = j for j 6= i. . They correspond the permutations 21 for n = 2 and 231. . a2 . Let Dn represent the number of derangements. or (b) n appears at the ith position and i does not appear at the nth position. i + 1. n! e We end this chapter with another set of exercises. a2 . . . . So. then the distinct compositions are 4.50 CHAPTER 2. (c) The set of distributions of n distinct objects into m distinct boxes. (d) The set of n-tuples on m letters. Prove that there exists a bijection between any two of the following sets. no other object can be put in the same box”. b. a2 . b. A composition of n is an expression of n as a sum of positive integers. f (b) = 3 and f (c) = 1 then the corresponding multiset is {a. 1 + 1 + 1 + 1.3. (a) The set of words of length n on an alphabet consisting of m letters. . 2 + 2. a. an } and let fi denote the image of ai . for all x ∈ X. Prove that there exists a bijection between any two of the following sets. (b) The set of distributions on n non-distinct objects into m distinct boxes. (c) The set of distributions of n distinct objects into m distinct boxes. A function f : X −→ W is said to give rise to a multiset if f (x) is finite. Then. . . . b. if n = 4. (d) The set of n-tuples on m letters. 1 ≤ i ≤ n. 4. (b) The set of maps of an n-set into a m-set. without repetition. 1 + 2 + 1. (b) The set of one-one functions from an n-set into a m-set. (a) The set of n letter words with distinct letters out of an alphabet consisting of m letters. For example. (a) The set of increasing words of length n on m ordered letters. . 1 + 1 + 2. Prove that there exists a bijection between any two of the following sets. The number f (x) is P f (x) is called the size of the multiset. 3 + 1. subject to “if an object is put in a box.1 Miscellaneous Exercises 1. c} and f (a) = 2. 5. 2. For example. 1 + 3. Determine the number of ways of distributing n distinct objects into m distinct boxes so that objects in each box are arranged in a definite order. (c) The set of combinations of m symbols taken n at a time with repetitions permitted. If |X| = n. called the size of x ∈ X and x∈X if X = {a. COUNTING AND PERMUTATIONS 2. determine the number of multiset of size k. c} and the size of this multiset is 6. b. (e) The set of permutations of m symbols taken n at a time. Let X be a finite set and let W be the set of non-negative integers. [Hint: Let X = {a1 . 3. is the problem equivalent to finding the number of solutions in non-negative integers to the equation f1 + f2 + · · · + fn = k?] 6. 2 + 1 + 1. Fix a positive integer n. Let s(n. k − 1). k) = (n − 1)s(n − 1. (1)(234). [Hint: Is the problem equivalent to finding the number of solutions in positive k≥1 integers to the equation f1 + f2 + · · · + fk = n?] 7. (14)(23). k). [Hint: Either the number n appears as a sinlge/separate cycle or it appears with some other number(s). (142)(3). s(4. (134)(2). 0) = 1 and s(n.3. . they give rise to the same sequence of numbers and are commonly known as the Stirling numbers of first kind. Then prove that if x(n) = P a(n. S2 (4) = 3. k) denote the number of permutations of S that have k disjoint cycles. That is. (123)(4) and (132)(4). Let S = {1. we are looking at s(n − 1. we are looking at (n − 1)s(n − 1. k) + s(n − 1. In the first case. (a) Determine a recurrence relation for the numbers s(n. . (143)(2). . whenever n ≥ 1. Determine the numbers Sk (n). k)’s satisfy the same recurrence relation as s(n. Hence. S3 (4) = 3 and S4 (4) = 1. (124)(3). 0) = 0 = s(0. k − 1) and in the second case. determine P Sk (n). ] (b) Recall that x(n) = x(x+1)(x+2) · · · (x+n−1). k)’s with the same initial conditions. for 1 ≤ k ≤ n. . k)xk k≥0 then the numbers a(n. Then S1 (4) = 1. we take s(0. For example. k). [4] and [5]. SOME GENERALIZATIONS Let Sk (n) denote the number of compositions of n into k parts. as the number n can be placed at any of the n − 1 positions to form a permutation. 2) = 11 and it corresponds to the permutations (12)(34). n}.51 2. n). By convention. Notes: Most of the ideas for this chapter have come from the books [2]. 2. (1)(243). . (13)(24). s(n. Also. COUNTING AND PERMUTATIONS .52 CHAPTER 2. Recall that the expression ⌈x⌉. then there is at least one hole (box) that contains two or more pigeons. Example 3.1. Let N ∈ N. Dirichlet was the one who popularized this principle. {α} = α − ⌊α⌋. then there is a hole with more than one pigeon. Then prove that there exist infinitely p 1 many rational numbers s = . n then there is at least one hole that contains ⌈ ⌉ pigeons. there is an empty hole if and only if there’s a hole with more than one pigeon.1.Chapter 3 Advanced Counting 3. For two finite sets A and B. there exists a one to one and onto function f : A −→ B if and only if |A| = |B|.1 Pigeonhole Principle The pigeonhole principle states that if there are n + 1 pigeons and n holes (boxes). such that |a − s| < 2 . If n pigeons are put into m pigeonholes. with n > m. 1. we assume that a > 0. is the smallest integer ℓ. That is. If m pigeons are put into m pigeonholes.1. such that k ≤ x. called the ceiling function. Remark 3. 3. Without loss of generality.2. such that ℓ ≥ x and the expression ⌊x⌋. It can be easily verified that the pigeonhole principle is equivalent to the following statements: 1. we will denote the fractional part of α. called the floor function. Let a be an irrational number. is the largest integer k. q q Proof. m 2. 53 . [Generalized Pigeonhole Principle] if there are n pigeons and m holes with n > m. 1. 2. By {α}. We will now show q q q that the number of such pairs (p. Hence r 6= ri for all q 1 i = 1. Then prove that this sequence has a subsequence of either (m + 1) numbers that is strictly increasing or (n + 1) numbers that is strictly decreasing. |{ua} − {va}| < p 1 1 ≤ 2 |a − | < q Nq q as 0 < q ≤ N. . consider the fractional parts {0}. we have found a rational number On the contrary. v and w such that u > v but {ua} ∈ [ w w+1 w w+1 . This sequence neither has an increasing subsequence of 4 numbers nor a decreasing subsequence of 5 numbers. 2. Now. Clearly {ka}. For example. . p p 1 such that |a − | < 2 . consider the sequence 4. . none of the differences |a − ri |. we also have. for 1 ≤ iM . 2. Q for all i = 1. {N a} of the first (N + 1) multiples of a and the N subintervals [0. assume that there are only a finite number of rational numbers. M. . The argument gives the existence of a p 1 fraction r = such that |a − r| < Q < |a − ri |. 2. 10. 1) of [0. . {a}. Observation: The statement is NOT TRUE if there are exactly mn numbers. qi2 Since a is an irrational number. Let T be the given sequence. . . M. let q = u − v N and p = ⌊ua⌋ − ⌊va⌋. M . amn+1 } be a sequence of distinct mn + 1 real numbers. and |a − ri | < 1 . Thus. we get Thus. . Let {a1 . . ) and {va} ∈ [ . ADVANCED COUNTING Now. q 6= 0 and |qa − p| < N1 . . [ N1 . N2 ). . . Therefore. 6. ). will be exactly 0. . . . qi for i = 1. [ NN−1 . . and define Proof. there exists an integer Q such that |a − ri | > 1 . . . That is. 2. . Then p. there exist integers u. for k a positive integer. That is. 2. N N N N 1 and |{ua} − {va}| = |(u − v)a − (⌊ua⌋ − ⌊va⌋)|. s . two of the above fractional parts must fall into the same subinterval. . |a−r| < 2 contradicting the assumption q that the fractions ri . say r1 . for i = 1. . rM such that ri = pi . 11. 1). 7. 8. {2a}. .54 CHAPTER 3. were all the fractions with this property. Therefore. a2 . M . N1 ). We now. 3. 9 of 12 = 3 × 4 distinct numbers. . . . 12. M. 1. for i = 1. . . Dividing by q. . . q ∈ Z. . . r2 . . . 5. 2. cannot be an integer as a is an irrational number. On the other hand. T = {ak }mn+1 k=1 ℓi = max{s : an increasing subsequence of length s exists starting with ai }. . by the pigeonhole principle. . . q) is infinite. apply our earlier argument to this Q. . of length ℓi2 + 1. . Consider the set S = {1 = 30 . ain+1 are all equal. 3. Proof. such that the remainders of 3j and 3i . if we divide the numbers in S with 2011. . starting with ai2 . This gives a contradiction to the equality. starting with ai1 . We now claim that ai1 > ai2 > · · · > ain+1 . ℓmn+1 ) and all of them have to be put in the boxes numbered 1. there exist i > j such that the remainders of 3i and 3j . in Equation (3. . 2. this completes the proof. 2011 divides 3j − 3i . . Also. .1. m. 32 .1). 4. 32011 }. . On the contrary. So. Prove that there exists a power of three that ends with 0001. ℓi1 ≥ ℓi2 + 1. 1 ≤ j ≤ mn+1. . . . PIGEONHOLE PRINCIPLE Then there are mn+1 positive integers ℓ1 . . . . That is. Prove that there exist two powers of 3 whose difference is divisible by 2011. are equal. let us assume that m there exist numbers 1 ≤ i1 < i2 < · · · < in+1 ≤ mn + 1. . the length of the largest increasing subsequences of T starting with the numbers ai1 . when divided by 2011. 2011) = 1”. That is. Now. . (3. ℓi1 = ℓi2 . So. there exists an increasing sequence of length m + 1 starting with aj and thus the result follows. ai2 . when . such that ℓi1 = ℓi2 = · · · = ℓin+1 . . 32 . . This subsequence with the assumption that ai1 < ai2 gives an increasing subsequence ai1 < ai2 = α1 < α2 < · · · < αℓi2 of T . . 1. 3.}. . 2. by definition of ℓi ’s. Hence the proof of the example is complete.1) That is. on the contrary assume that ℓi ≤ m. by the generalized pigeonhole principle. . we have mn + 1 numbers (ℓ1 . A similar argument will give the other inequalities and hence the proof of the claim. 33 . As |S| > 104 . 3. Therefore. So. . Proof. there are at least   mn + 1 = n + 1 numbers (ℓi ’s) that lies in the same box. 33 . let if possible ai1 < ai2 (recall that ai ’s are distinct) and consider a largest increasing subsequence ai2 = α1 < α2 < · · · < αi2 of T . . such that ℓj ≥ m + 1. for 1 ≤ i ≤ mn + 1. Observe that this argument also implies that “there exists a positive integer ℓ such that 2011 divides 3ℓ − 1 as gcd(3. . that has length ℓi2 . let us divide each element of S by 104 . then by definition of ℓj . If there exists a j. . . we know that when we divide positive integers by 2011 then the possible remainders are 0. ℓ2 . .55 3. Hence. ℓmn+1 . then by pigeonhole principle there will exist at least two numbers 0 ≤ i < j ≤ 2011. 2010 (corresponding to exactly 2011 boxes). So. We will show that ai1 > ai2 . Consider the set S = {1 = 30 . . Then |S| = 2012. Let S be a set consisting of five lattice points. . 1. . are equal. x2 . 2. At a party of n people.1... . Prove that there exist two points in S. If f (x) = 11 for five distinct integers. there always exists a pair at the distance not greater than . . say a1 . .3. 9. Let n be an odd integer. 4. Does there exist a multiple of 2013 that ends with 23? Explain your answer. a2 . 14. That is 3ℓ = s · 104 + 1 and hence the result follows. and a total of 600 books over the entire year. Does there exist a multiple of 2013 that starts with 23? Explain your answer. If f (x) = 14 for three distinct integers. a5 then prove that for no integer f (x) can be equal to 9.. Suppose f (x) is a polynomial with integral coefficients. 2. x2012 be a sequence of 2012 integers... Exercise 3. 104 divides 3ℓ − 1. Suppose f (x) is a polynomial with integral coefficients. . then prove that for no integer f (x) can be equal to 15. . Then prove that there exists a positive integer ℓ such that n divides 2ℓ − 1. a book store. 8. Consider a chess board with two of the diagonally opposite corners removed. 6. 10. x1008 be a sequence of 1008 integers. 13. Prove that there exist 1 ≤ i < j ≤ n such that xj + xi or xj − xi is a multiple of 2013. Let x1 . which was open 7 days a week. sold at least one book each day. . 3) = 1 and thus. 11. ADVANCED COUNTING are divided by 104 . such that the mid-point of P and Q is also a lattice point? 5. . We assume that each person is friendly to at least one person at the party. Let n be an odd positive number. Let x1 . 7. Show that there must have been a period of consecutive days when exactly 125 books were sold. . 3ℓ − 1 = s · 104 for some positive integer s. . Then prove for any permutation σ of the set {1. .(n − σ(n)) is necessarily even. some pair of people are friends with the same number of people at the party. Is it possible to cover the board with pieces of rectangular dominos whose size is exactly two board squares? 12. . Prove that among any five points selected inside an equilateral triangle with side equal to 1 unit. b and c.5 units. x2 . During the year 2000. say a. n} the product P (σ) = (1 − σ(1))(2 − σ(2)). But gcd(104 . 3.56 CHAPTER 3. . say P and Q. Prove that there exist 1 ≤ i < j ≤ n such that xi + xi+1 + · · · + xj−1 + xj is a multiple of 2012. Does there exist a multiple of 2013 that has all its digits 2? Explain your answer. That is. positive or negative. (b) there is an equilateral triangle all of whose vertices have the same color. . say yellow and green. Consider two discs A and B. 2n} then some pair of numbers in the subset are relatively prime. . Suppose you are given a set A of ten different integers from the set T = {1. . 17. Prove that you can always find two disjoint non-empty subsets. PIGEONHOLE PRINCIPLE 57 15. 25. . an is greater than or equal to their average . 2. Then prove that T has at least two elements whose sum is odd. . . such that the sum of elements in S equals the sum of elements in T. . . For disc B there are no constrains. . n 20. one above the other. so that at least n corresponding regions have the same colors. . 18. 10} and T be any subset of S consisting of 6 elements. 24. not necessarily all different. . On disc A exactly n sectors are colored yellow and exactly n are colored green. Is it possible to select two of them. 22. a pair that differ by 12. . 2. Let S = {1. (c) there is a rectangle all of whose vertices have the same color. Show that if we select a subset of n + 1 numbers from the set {1. Suppose each sector is painted either yellow or green. each having 2n equal sectors. there will be some two that differ by 9. Color the plane with two colors. 21. there need not be a pair of numbers that differ by 11. Prove that however one selects 55 integers 1 ≤ x1 < x2 < x3 < · · · < x55 ≤ 100.3. say x and y such 1 x−y <√ ? that 0 < 1 + xy 3 23. some two that differ by 10.. Then prove the following: (a) there exist two points at a distance of 1 unit which have been colored with the same color. Show that there is a way of putting the two discs. Does there exist a number of the form 777 · · · 7 which is a multiple of 2007. 19. 2. and a pair that differ by 13.1. Show that in any group of six people there are either three mutual friends or three mutual strangers. Surprisingly.. a2 . Show that the pigeonhole principle is the same as saying that at least one of the numbers a1 + a2 + · · · + an a1 . prove that there exists a consecutive subsequence that has the property that the sum of the members of this subsequence is a multiple of n. S and T of A. There are 7 distinct real numbers.. . . 16. 116}. Given any sequence of n integers. 58 CHAPTER 3. ADVANCED COUNTING 3.2 Principle of Inclusion and Exclusion The following result is well known and hence we omit the proof. Theorem 3.2.1. Let U be a finite set. Suppose A and B are two subsets of U . Then the number of elements of U that are neither in A nor in B are  |U | − |A| + |B| − |A ∩ B| . Or equivalently, |A ∪ B| = |A| + |B| − |A ∩ B|. A generalization of this to three subsets A, B and C is also well known. To get a result that generalizes Theorem 3.2.1 for n subsets A1 , A2 , . . . , An , we need the following notations: S1 = n X i=1 |Ai |, S2 = X 1≤i<j≤n |Ai ∩Aj |, S3 = X 1≤i<j<k≤n |Ai ∩Aj ∩Ak |, · · · , Sn = |A1 ∩A2 ∩· · ·∩An |. With the notations as defined above, we have the following theorem, called the inclusionexclusion principle. This theorem can be easily proven using the principle of mathematical induction. But we give a separate proof for better understanding. Theorem 3.2.2. [Inclusion-Exclusion Principle] Let A1 , A2 , . . . , An be n subsets of a finite set U . Then the number of elements of U that are in none of A1 , A2 , . . . , An is given by |U | − S1 + S2 − S3 + · · · + (−1)n Sn . (3.1) |A1 ∪ A2 ∪ · · · ∪ An | = S1 − S2 + · · · + (−1)n−1 Sn . (3.2) Or equivalently, Proof. We show that if an element x ∈ U belongs to exactly k of the subsets A1 , A2 , . . . , An , for some k ≥ 1, then its contribution in (3.1) is zero. Suppose x belongs to exactly k subsets Ai1 , Ai2 , . . . , Aik . Then we observe the following: 1. The contribution of x in |U | is 1. 2. The contribution of x in S1 is k as x ∈ Aij , 1 ≤ j ≤ k. 3. The contribution of x in S2 is 4. The contribution of x in S3 is Proceeding this way, we have 5. The contribution of x in Sk is k 2 k 3 k k as x ∈ Aij ∩ Ail , 1 ≤ j < l ≤ k. as x ∈ Aij ∩ Ail ∩ Aim , 1 ≤ j < l < m ≤ k. = 1, and 6. The contribution of x in Sℓ for ℓ ≥ k + 1 is 0. 59 3.2. PRINCIPLE OF INCLUSION AND EXCLUSION So, the contribution of x in (3.1) is        k k k k−1 k k 1−k+ − + · · · + (−1) + (−1) + 0 · · · + 0 = (1 − 1)k = 0. k−1 k 2 3 This completes the proof of the theorem. The readers are advised to prove the equivalent condition. Example 3.2.3. 1. Determine the number of 10-letter words on ENGLISH alphabet that does not contain all the vowels. Solution: Let U be the set consisting of all the 10-letters words on ENGLISH alphabet and let Aα be a subset of U that does not contain the letter α. Then we need to compute |Aa ∪ Ae ∪ Ai ∪ Ao ∪ Au | = S1 − S2 + S3 − S4 + S5 , where S1 = P α∈{a,e,i,o,u} |Aα | = 5 10 1 25 , S5 = 2110 . So, the required answer is 5 P S2 = 5 10 2 24 , (−1)k−1 k=1 5 k  S3 = (26 − k)10 . 5 10 3 23 , S4 = 5 10 4 22 and 2. Determine the number of integers between 1 and 1000 that are coprime to 2, 3, 11 and 13. Solution: Let U = {1, 2, 3, . . . , 1000} and let Ai = {n ∈ U : i divides n}, for i = 2, 3, 11, 13. Then note that we need the value of |U | − |A2 ∪ A3 ∪ A11 ∪ A13 |. Observe that 1000 1000 1000 1000 ⌋ = 500, |A3 | = ⌊ ⌋ = 333, |A11 | = ⌊ ⌋ = 90, |A13 | = ⌊ ⌋ = 76, 2 3 11 13 1000 1000 1000 |A2 ∩ A3 | = ⌊ ⌋ = 166, |A2 ∩ A11 | = ⌊ ⌋ = 45, |A2 ∩ A13 | = ⌊ ⌋ = 38, 6 22 26 1000 1000 1000 |A3 ∩ A11 | = ⌊ ⌋ = 30, |A3 ∩ A13 | = ⌊ ⌋ = 25, |A11 ∩ A13 | = ⌊ ⌋ = 6, 33 39 143 |A2 ∩ A3 ∩ A11 | = 15, |A2 ∩ A3 ∩ A13 | = 12, |A2 ∩ A11 ∩ A13 | = 3, |A2 | = ⌊ |A3 ∩ A11 ∩ A13 | = 2, |A2 ∩ A3 ∩ A11 ∩ A13 | = 1. Thus, the required number is  1000− (500+333+90+76)−(166+45+38+30+25+6)−(15+12+3+2)−1 = 1000−720 = 280. 3. (Euler’s φ-function Or Euler’s totient function) Let n denote a positive integer.Then the Euler φ-function is defined by φ(n) = . k) = 1}.{k : 1 ≤ k ≤ n. gcd(n. (3.3) Determine a formula for φ(n) in terms of its prime factors. Solution: Let n = pα1 1 pα2 2 · · · pαk k be the unique decomposition of n as product of distinct .. Determine the number of ways to put 30 distinguishable balls into 10 distinguishable boxes such that at least 1 box is empty. 10. say 1. 7. 9. U = {1. . 2. d and e. . 9. . n students leave their umbrellas (which are indistinguishable) outside their examination room. Prove Theorem 3. 5.60 CHAPTER 3. b. for 1 ≤ i ≤ k. 8. . . In how many ways can n pairs of socks be hung on a line so that adjacent socks are from different pairs. Determine the number of strings of length 15 consisting of the 10 digits. . n} and let Api = {m ∈ U : pi divides m}. 1. by definition φ(n) = |U | − S1 + S2 − S3 + · · · + (−1)k Sk = n− = n k X n + pi i=1 k  Y i=1 Exercise 3. Suppose 15 people get on a lift that stops at 5 floors. 6.2. . ADVANCED COUNTING primes p1 . (3. Determine the number of ways for people to get out of the lift if at least one person gets out at each floor. where |M | = m. Find the number of ways in which no student collects the correct umbrella when they finish the examination. . 10.4. . Determine the number of ways to distribute 40 distinguishable books to 25 boys so that each boy gets at least one book.2.4) 1. if socks within a pair are indistinguishable and each pair is different. p2 . 3. 12. |N | = n and n ≤ m (Recall (2. pk . Determine the number of ways to put r distinguishable balls into n distinguishable boxes so that no box is empty. Determine the number of ways to arrange 10 integers. so that the number i is never followed immediately by i + 1. 4. 2. . 1 1− pi X 1≤i<j≤k  n n − · · · + (−1)k pi pj p1 p2 · · · pk . . Determine the number of onto functions f : M −→ N . say a. Then. . . 2. 0. . . . Determine the number of ways to put 30 indistinguishable red balls into 4 distinguishable boxes with at most 10 balls in each box.2 using the principle of mathematical induction. On a rainy day. 11. . 3. so that no string contains all the 10 digits.1) for another expression). Determine the number of ways to put r distinguishable balls into n distinguishable boxes such that at least 1 box is empty. Recall the Derangement problem (see Page 48). c. Let x be a positive integer less than or equal to 9999999. show and pet occurs.2. . (b) How many of the solutions obtained in the first part consist of 7 digits.3. (a) Find the number of x’s for which the sum of the digits in x equals 30. 14. run. PRINCIPLE OF INCLUSION AND EXCLUSION 61 13. Determine the number of ways of permuting the 26 letters of the ENGLISH alphabet so that none of the patterns lazy. 62 CHAPTER 3. ADVANCED COUNTING . 1 Groups Our aim in this chapter is to look at groups and use it to the study of questions of the type: 1. let us look at the properties of the sets N. is an element of Z (Q. Additive Identity: the element zero. b. Once we have learnt a bit about groups. R.Chapter 4 Polya Theory 4. Q. we need to understand the symmetries of a hexagon. R. (a + b) + c = a + (b + c). denoted 0. R. This study helps us in defining an equivalence relation on the set of color configurations for a given necklace. R. a + b. called the addition of a and b. 3. Before coming to the definition and its properties. a + 0 = a = 0 + a. c ∈ Z (Q. Z. C). C). Addition is Associative: for every a. How many different necklace configurations are possible if we use 12 beads among which 3 are red. 63 . R. we study group action. is an element of Z (Q. 5 are blue and 4 are green? And a generalization of this problem. C) and has the property that for every a ∈ Z (Q. Q. R and C. C). And it turns out that the number of distinct color configurations is same as the number of equivalence classes. We know that the sets Z. b ∈ Z (Q. It can be easily observed that if we want to look at different color configurations of a necklace formed using 6 beads. R and C satisfy the following: Binary Operation: for every a. Counting the number of chemical compounds which can be derived by the substitution of a given set of radicals in a given molecular structure. How many different necklace configurations are possible if we use 6 beads of 3 different colors? Or for that matter what if we use n beads of m different colors? 2. C). Such a study is achieved through what in literature is called groups. the element b that satisfies a ∗ b = e = b ∗ a is denoted by a−1 . an abstract notion called groups is defined. C∗ ). R∗ . we see that similar statements hold true for the sets Z∗ . for all a ∈ G (Existence of Identity). Now. C∗ ). a · 1 = a = 1 · a. such that the elements of G satisfy the following: 1. b ∈ Z∗ (Q∗ . C∗ ). C∗ ) and for all a ∈ Z∗ (Q∗ . Binary Operation: for every a. c ∈ G. for every a. c ∈ Z∗ (Q∗ .1. Whereas. b ∈ Z (Q. for every element a ∈ G. R∗ = R − {0} and C∗ = C − {0}. The readers are advised to prove it for themselves.2. (a ∗ b) ∗ c = a ∗ (b ∗ c) (Associativity Property) holds in G. Therefore. a · b. Multiplicative Identity: the element one. there exists an element −a ∈ Z (Q. Multiplication is Commutative: One also has a · b = b · a for every a. is a non-empty set together with a binary operation. 2. R∗ . called the multiplication of a and b. 2. C).1 (Group). A group G. usually denoted (G. b. Let (G. R∗ and C∗ one can always find a b such that a · b = 1 = b · a. Based on the above examples. Hence. The identity element of G is unique. Before proceeding with examples of groups that concerns us. there exists an element b ∈ G such that a∗b = e = b∗a (Existence of Inverse). POLYA THEORY Additive Inverse: For every element a ∈ Z (Q. one defines a group as follows. R∗ . is an element of Z∗ (Q∗ . For each fixed a ∈ G. for each a ∈ G. Remark 4. ∗) be a group. Addition is Commutative: We also have a + b = b + a for every a. Then the following hold: 1. b ∈ Z∗ (Q∗ . Namely. C∗ ). the identity element is denoted by e. the element b ∈ G such that a∗b = e = b∗a is also unique. b. R∗ . ∗). C) such that a + (−a) = 0 = −a + a. Q∗ .1. then G is said to be an abelian (commutative) group. Definition 4. R. we state a few basic results in group theory without proof. In addition. is an element of Z∗ (Q∗ . (a · b) · c = a · (b · c). Q∗ = Q − {0}. R∗ . Formally. let us look at the sets Z∗ = Z − {0}. Multiplication is Associative: for every a. As in the previous case. say ∗. C∗ ).64 CHAPTER 4. R∗ . for the sets Q∗ . 3. denoted 1. Observe that if we choose a ∈ Z∗ with a 6= 1. C). −1 then there does not exist an element b ∈ Z∗ such that a · b = 1 = b · a. R. . R. if the set G satisfies a ∗ b = b ∗ a. for every a. there is an element e ∈ G such that a ∗ e = a = e ∗ a. R∗ and C∗ . b ∈ G. for all i = 1. . That is. Similarly. for each f ∈ Sn . This group is called the Symmetric/Permutation!group on n letters. For each a ∈ G. Thus (Sn . for each a ∈ G. 5. Hence. . In the remaining part of this chapter. 2.3. . one uses the composition of functions to define the composite function  f ◦ g : N −→N by (f ◦ g)(x) = f g(x) . As f : N −→N is a one-to-one and onto function. The function e : N −→N defined by e(i) = i. A function f : N −→N is called a permutation on n elements if f is both one-to-one and onto. n is the identity function. 2. b. 4. Now. is a well defined function and is also one-to-one and onto. . ◦) is a group. denoted ◦. 3. “composition of function”. If 1 2 ··· n σ ∈ Sn then one represents this by writing σ = . f −1 ∈ Sn and f ◦ f −1 = e = f −1 ◦ f . . (an )−1 = (a−1 )n . GROUPS 65 3. for all f ∈ Sn . . 2. . n}. for all a ∈ G. Also. n. the total number of elements in Sn is n! = n(n − 1) · · · 2 · 1. Example 4. . . the cancelation laws in G. . check that f ◦ e = f = e ◦ f . for all i = 1. f −1 : N −→N defined by f −1 (i) = j. g ∈ Sn . .1. d ∈ G then b = c. That is. . c. Then the following can be verified: 1. (a−1 )−1 = a. Therefore. Then it can be easily verified that f ◦ g is also one-to-one and onto. Let Sn = {f : N −→N | f is one to one and onto}. there are n choices for σ(1). . for some b. we assume a0 = e. . . Thus. . If a∗b = a∗c. . That is. For each a. σ(2). It is well known that the composition of functions is an associative operation and thus (f ◦ g) ◦ h = f ◦ (g ◦ h). the binary operation may not be explicitly mentioned as it will be clear from the context.1. b ∈ G. Suppose f. 2. for all n ∈ Z. let us now look at a few examples that will be used later in this chapter. This representation σ(1) σ(2) · · · σ(n) of an element of Sn is called a two row notation. . Now let f ∈ Sn . c ∈ G then b = c.4. Sn is the set of all permutations of the set {1. 2. That is. 4. n − 1 choices for σ(2) (all elements of N except σ(1)) and so on. n}. . 7. . . defines a binary operation in Sn . it can be checked that N = {σ(1). Symmetric group on n letters: Let N denote the set {1. (ab)−1 = b−1 a−1 . 6. Then f : N −→N and g : N −→N are two one-to-one and onto functions. if b∗d = c∗d. By convention. whenever f (j) = i. Observe that as σ is one-to-one and onto function from N to N . σ(n)}. Hence f ◦ g ∈ Sn . That is. for some a. ! 1 2 3 4 5 Example 4. (σ ◦τ )(5) = 2. σ(3) = 1. . for all ℓ = 1. is obtained as follows:    (σ ◦ τ )(1) = σ τ (1) = σ(3) = 1. . Definition 4. Definition 4. . . This notation is called the cycle notation. none of which is the identity. σ(5) = 6 and σ(6) = 5. . As seen above. Two cycles σ = (i1 .5. . σ(2) = 2 3 1 4 6 5 3.1. k − 1. . j2 . σ(4) = 4. Remark 4.1. Theorem 4. js ) are said to be disjoint if {i1 . verify that (1456)(152) = (16)(245). i1 ) and so on.6.8. . That is.7. i2 . . let us try to understand the group Sn .1. ik ) or (i2 . . any element σ ∈ Sn can be represented using a two-row notation. The permutation σ = in cycle notation can be written 2 3 4 1 5 as (1234). n} be distinct. it } ∩ {j1 . . . . this element is formed with the help of two cycles (123) and (56). (σ ◦ τ )(2) = σ τ (2) = σ(4) = 3. i2 . Hence σ ◦ τ = (143)(27)(1357)(246) = ! 1 2 3 4 5 6 7 1 3 5 6 2 7 4 = (235)(467). Let σ ∈ Sn and let S = {i1 . . . σ(2) = 3. (3412). 2. ik . i2 . 4. The representation of an element σ ∈ Sn as product of disjoint cycles is called the cyclic decomposition of σ. . 2. There is another notation for permutations that is often very useful. . . . The permutation in cycle notation equals (123)(65) as σ(1) = 2. . . 1. . . . Observe that the representation of a permutation as a product of disjoint cycles. . Let us try to understand this notation. σ(ik ) = i1 and σ(r) = r for r 6∈ S then σ is called a k-cycle and is denoted by σ = (i1 . Let σ ∈ Sn . ik } ⊆ {1. Similarly.4. . (σ ◦ τ )(3) = σ τ (3) =  σ(5) = 5. POLYA THEORY Before discussing other examples. . . is unique up to the order of the disjoint cycles. . σ(4) = 1 and σ(5) = 5. σ(3) = 4. (σ ◦τ )(4) = σ τ (4) = σ(6) = 6. Consider two permutations σ = (143)(27) and τ = (1357)(246). or (4123) as σ(1) = 2. i3 . it ) and τ = (j1 . . there composition. . i2 . .1. If σ satisfies σ(iℓ ) = iℓ+1 .66 CHAPTER 4. Then σ can be written as a product of disjoint cycles. (2341). j2 . (σ ◦τ )(6) = 7 and (σ ◦τ )(7) = 4. . denoted σ ◦ τ . . ! 1 2 3 4 5 6 2. js } = ∅. .1. Then. 3. The proof of the following theorem can be obtained from any standard book on abstract algebra. . Then note that the possible configurations correspond to the set G = {e. all the terms f. (b) In the same way. (1.1. it can be checked that (r 2 f )2 = (r 3 f )2 = e. observe that (rf )2 = (rf )(rf ) = r(f r)f = r(r 3 f )f = r 4 f 2 = e. This group is denoted by D3 and is represented as D3 = {e.1. r 3 f } with relations r 4 = e = f 2 and f r 3 = rf. r. 0).1: Symmetries of a square. 1. rf. 1.2. rf. r 2 f. r 3 . r 2 f and r 3 f are flips.1). (BC). r 2 .1): 4 1 1 r 3 2 2 2 90◦ 4 3 3 180◦ 3 1 3 3 4 270◦ 4 2 2 2 1 rf f 1 4 4 r 2 90◦ 1 3 180◦ 2 4 1 270◦ 1 3 4 Figure 4. (12)(34). (13)(24). The group G is generally denoted by D4 and is called the Dihedral group or the symmetries of a square. (CA).1). (ABC).1) Using (4. Using Figure 4. (24). The question arises. f. (ACB). r 2 f } with relations r 3 = e = f 2 and f r 2 = rf. 0). (1432). r 2 . 0. (4. f. (0.2). Symmetries of regular n-gons in plane. . (AB)}. 3 one can check that the group D3 can also be represented by where r is a counter-clockwise rotation by 120◦ = D3 = {e. This group can also be represented as follows: {e. (13)}. rf. Our aim is to move the square in space such that the position of the vertices may change but they are still placed at the above mentioned coordinates. what are the possible ways can this be done? It can be easily verified that the possible configurations are as follows (see Figure 4. (a) Suppose a unit square is placed at the coordinates (0. 0. r. Similarly. (1234). Exercise: Relate the two representations of the group D4 . 0). (14)(23). That is. 0) and (1.67 4. Let r denote the counter-clockwise rotation of the square by 90◦ and f denote the flipping of the square along the vertical axis passing through the midpoint of opposite horizontal edges (see Figure 4. 1.9. (4.2) 2π and f is a flip. one can define the symmetries of an equilateral triangle (see Figure 4. GROUPS Example 4. G = {e. (132). (234). . (134). (2. 3)}. 4 and 5 then G = {e. Observe that a tetrahedron has 6 edges. Or equivalently. 4). f. 2)(3. 3 and 4. If we denote the vertices of the tetrahedron with numbers 1. (142). r. 5). 3. 3. 2). with the numbers 1. r 2 . (1. r 2 f. f. r n−1 . POLYA THEORY C r B 120◦ 240◦ B A C rf C r A B C A f A B B A 120◦ 240◦ C A B C Figure 4. (1. if we label the vertices of a regular pentagon. 5). it can be verified that the group of symmetries of a regular pentagon is given by G = {e. . This group is denoted by Dn .1). then the symmetries of the tetrahedron can be represented with the help of the group.68 CHAPTER 4. 4 vertices and 4 faces. r 2 . 5)(2. (1. r 3 f. (124). 4. where r denotes a counter-clockwise rotation through an angle of 72◦ = 5 and f is a flip along a line that passes through a vertex and the midpoint of the opposite edge. (1. 2. 5). 2. . 3)(4. (123). 4). 5. counter-clockwise. 5. r 4 . . (c) For a regular pentagon. . (14)(23)}. 2.3) Here the symbol r stands for a counter-clockwise rotation through an angle of 2π and n f stands for a vertical flip. (13)(24). Symmetries of regular platonic solids. 3. r 3 . rf. 5)(3. (1. rf. r 4 f } with r 5 = 2 = f 2 and 2π rf = f r 4 . . 4. 4. 2. (a) Recall from geometry that a tetrahedron is a 3-dimensional regular object that is composed of 4-equilateral triangles such that any three triangles meet at a vertex (see Figure 4. 3. 5. . one can define symmetries of a regular n-gon. (12)(34). r. 3). . (1. 4)(2.has 2n elements and is represented as {e. 2. (4. 2. (143). (243). 4). . (d) In general.2: Symmetries of an Equilateral Triangle. r n−1 f } with r n = e = f 2 and f r n−1 = rf. (1. (1. . the identity element.3: Regular Platonic solids. For the cube (see Figure 4. (1432)(5876). e. (b) Consider the Cube and the Octahedron given in Figure 4. the group element (ij)(kℓ) is formed by a rotation of 180◦ along the line that passes through mid-points of the edges (ij) and (kℓ). ii. (1265)(3784). j. A Dodecahedron An Icosahedron 1 5 8 5 1 6 4 7 6 2 1 4 2 3 4 2 3 A Cube A Tetrahedron 3 An Octahedron Figure 4. The readers are required to compute the group elements for the symmetries of the octahedron. (16)(25)(38)(47). the group elements are (1234)(5678). (13)(24)(57)(68). (1584)(2673). the group elements are i. (1485)(2376). It can be checked that the group of symmetries of the two figures has 24 elements. j and k. GROUPS where. the element (ijk) is formed by a rotation of 120◦ along the line that passes through the vertex ℓ and the centroid of the equilateral triangle with vertices i.3).1. 3 × 3 = 9 elements that are obtained by rotations along lines that pass through the center of opposite faces (3 pairs of opposite faces and each face is a square: corresponds to a rotation of 90◦ ). In terms of the vertices of the cube.3. Similarly. (18)(45)(27)(36).69 4. We give the group elements for the symmetries of the cube. for distinct numbers i. k and ℓ. when the vertices of the cube are labeled. (1562)(3487). one has i. the identity element. 2 × 4 = 8 elements that are obtained by rotations along lines that pass through opposite vertices (4 pairs of opposite vertices and each vertex is incident with 3 edges: correspond to a rotation of 120◦ ). (275)(138).70 CHAPTER 4. We give the idea of the group elements for the symmetries of the icosahedron. POLYA THEORY iii. It can be checked that the group of symmetries of the two figures has 60 elements. 6 × 4 = 24 elements that are obtained by rotations along lines that pass through opposite vertices (6 pairs of opposite vertices and each vertex is incident with 5 edges: corresponds to a rotation of 72◦ ). (23)(58)(17)(46). (136)(475). (163)(457). (c) Consider now the icosahedron and the dodecahedron (see Figure 4. (34)(56)(17)(28). (257)(183). The corresponding elements in terms of the vertices of the cube are (14)(67)(28)(35). e. The group elements in terms of the vertices of the cube are (254)(368). Figure 4. pass through opposite edges. The readers are required to compute the group elements for the symmetries of the dodecahedron. 1 × 6 = 6 elements that are obtained by rotations along lines that pass through the midpoint of opposite edges (6 pairs of opposite edges: corresponds to a rotation of 180◦ ). Note that the icosahedron has 12 vertices. ii. (26)(48)(17)(35). 5 7 4 2 8 6 1 3 7 4 2 3 120◦ rotations along lines that 180◦ rotations along lines that pass through opposite vertices. 2 × 10 = 20 elements that are obtained by rotations along lines that pass through the center of opposite faces (10 pairs of opposite faces and each face is an equilateral triangle: corresponds to a rotation of 120◦ ). iv. . (15)(37)(28)(64). iii. (245)(386). (12)(78)(36)(45). 5 8 6 1 5 7 6 4 2 8 1 3 90◦ rotations along lines that pass through opposite faces. (168)(274). (186)(247). 12 faces and 30 edges. 20 faces and 30 edges and the dodecahedron has 20 vertices.3).4: Understanding the group of symmetries of a cube. For the icosahedron. ∗) a group in its own right (it is important to note that the binary operation is the same as that in G). To proceed further. Definition 4. Then by the previous paragraph.1. the set of integers. These two subgroups are called trivial subgroups. As H is non-empty. r. Formally.1. 1 × 15 = 15 elements that are obtained by rotations along lines that pass through the midpoint of opposite edges (15 pairs of opposite edges: corresponds to a rotation of 180◦ ). a rectangle. Hence. The set {e. H has the identity element of G. Let G be a group and let H be a non-empty subset of G. Let (G.12. note that for a = e and b = h the condition ab−1 ∈ H reduces to h−1 = eh−1 ∈ H. y ∈ H. if H itself forms a group with respect to the binary operation ⋆. are subgroups of (R. Before proceeding further. That is. 4. b ∈ H. y −1 ∈ H. let us look at the following two results which help us in proving “whether or not a given non-empty set H of a group G is a subgroup of not”? Theorem 4. ab−1 ∈ H. We now need to prove that for each h ∈ H. h−1 ∈ H. Then a non-empty subset H of G is said to be a subgroup of G. So. Let σ ∈ S4 . the set of rational numbers. Consider H = {e.1. Determine the group of symmetries of a parallelogram. Example 4. and Q. . we study the notion of subgroup of a given group.10. With this understanding it can be easily verified that the group D4 is a subgroup of S4 . Then H is a subgroup of G if for each a. .1. r 2 . Then. Then it can be easily verified that H is a subgroup of D4 . Exercise 4.1. we have the following definition. eh = h = he. Therefore. ∗) be a group. r n−1 } as a subset of Dn . we can find an x ∈ H.7. Therefore. 5. To do so. we show that H is closed with respect to the binary operation of G. +). we know that σ has a cycle representation. f.13 (Subgroup Test). the set of real numbers with respect to addition. for a = x and . Proof. Z. for each h ∈ H ⊂ G. r 2 . 3. . the condition ab−1 ∈ H implies that e = aa−1 ∈ H. r 2 f } forms a subgroup of D4 . As a third step. . Let G be a group with identity element e. a rhombus and an octahedron? By now. 1. for a = x and b = x. Then G and {e} are them- selves groups and hence they are subgroups of G. we have already come across lots of examples of groups that arise as symmetries of different objects. ∗) is a group and H is a non-empty subset of G then under what condition is (H.11 (Subgroup).1. GROUPS iv. Thus. let us assume that x. using Theorem 4. if (G. 2.71 4. +). 1. 2. −3. Theorem 4. b ∈ G such that x = a2 and y = b2 .. Example 4. let us prove that K is a subgroup of G. Thus. the given sub- sets do not for a subgroup. (b) Let H = Z \ {0} = {. . Thus. Then in the following cases. Also. . But H is not a subgroup of Z as 1 + 1 = 2 6∈ H. b−1 ∈ G. b ∈ H. But H is not a subgroup of Z.14.} ⊂ Z. . H is closed with respect to the binary operation of G). .13. We now give a few examples to understand the above theorems.} ⊂ Z. as for all n 6= 0. We will now use Theorem 4. Consider the sets H = {x ∈ G : x2 = e} and K = {x2 : x ∈ G}. −1. 3. y ∈ K implies that there exists a. Hence. Thus. Clearly e ∈ H and e ∈ K. Note that x. We have already seen that K is non-empty. a−1 ∈ H. As H is non-empty. 1. ab ∈ H (i. Consider the group (Z.1. We first show that H is a subgroup of G.1. 1. y ∈ H. . Finally.e. h−1 = −h ∈ H. 2. pick x. Note that. we just need to show that for each x.1. H is also closed with respect to the binary operation of G. −2. xy −1 = a2 (b2 )−1 = a2 (b−1 )2 = (ab−1 )2 ∈ K as G is abelian and ab−1 ∈ G. 0. we see that since the binary operation of H is same as that of G and since associativity holds G it holds in H as well. Note that. . . Then H is a subgroup if the two conditions given below hold. x2 = e = y 2 . 3. For each a ∈ H. Then H contains the identity element 0 of Z and for each h ∈ H. (c) Let H = {−1. But this is clearly true as G is abelian implies that xy −1 2 = x2 (y −1 )2 = e(y 2 )−1 = e−1 = e. 2. [Two-Step Subgroup Test] Let H be a non-empty subset of a group G.1. 1} ⊂ Z. xy −1 ∈ K. y ∈ K. . 1. K is also a subgroup of G. (a) Let H = {0. both H and K are non-empty subsets of G. . Then prove that both H and K are subgroups of G. For each a. b ∈ H. 2. for each a. the identity element 0 6∈ H and hence H is not a subgroup of Z. Thus.72 CHAPTER 4.15. POLYA THEORY b = y −1 the condition ab−1 ∈ H implies that xy = x(y −1 )−1 ∈ H. As b ∈ G. Let G be an abelian group with identity e. −n 6∈ H. . a + b ∈ H and the identity element 0 ∈ H. H is indeed a subgroup of G by Theorem 4. Hence. But this is equivalent to showing that xy −1 = e. We now give another result without proof that helps us in deciding whether a non-empty subset of a group is a subgroup or not. 2 to show that xy −1 ∈ H. Proof.13. Now. Now consider the set S = {a. That is. . 3) and is parallel to the X-axis. (x2 . (2. 3) ∈ R2 . Thus. 1. for each (x1 . 5.1. Consider the group D3 . By Theorem 4. does the set {e. there exist positive integers. using Remark 4.1. Fix a positive integer n and consider the group Dn . all these elements of S cannot be distinct. y1 + y2 ). an .1. 0). To do so. rf } form a subgroup of D3 ? 2. for each integer i. . [Finite Subgroup Test] Let G be a group and let H be a non-empty finite subset of G. 3) + H2 represents a line that passes through the point (2. 0 ≤ i ≤ n − 1. r i f } form a subgroup of Dn ? Justify your answer. As H is closed with respect to the binary operation of G. If a = e ∈ H then a−1 = e−1 = e ∈ H. we just need to show that for each a ∈ H. y) : y = 0} = {(2 + x. say m. y2 ) ∈ R2 . y1 ) + (x2 . 3) + (x. Exercise 4. Fix the element (2.17. Now. . S ⊂ H. . the binary operation is defined by (x1 .4. 2. y ∈ R}. LAGRANGE’S THEOREM 73 As a last result of this section. Example 4. Hence. 3. 4. y2 ) = (x1 + x2 . Consider the set R2 = {(x. H2 = {(x.1. . y) ∈ R2 : y = 3x} are subgroups of R2 . let us assume that a 6= e and a ∈ H. a2 . Determine all the subgroups of D4 . If H is closed with respect to the binary operation of G then H is a subgroup of G. Theorem 4. 3) : x ∈ R}. That is. This is the equation of a line that passes through the point (2. y) : x.1. Note that H1 represents the X-axis.2. a−1 = am−n−1 and by definition am−n−1 ∈ H. H1 = {(x. 3) and is parallel to the Y -axis. .2 Lagrange’s Theorem In this section.2. 4.}. Then 1. we start with the following example to motivate our definition and the ideas that they lead to. one has am−n = e. n with m > n. 3) + H1 = {(2. verify that (2.2. Hence. y) ∈ R2 : x = 0} and H3 = {(x. non-empty subset of a group G. Proof. But H has only finite number of elements.16. such that am = an .14. Hence. H2 represents the Y -axis and H3 represents a line passes through the origin and has slope 3. Does the subset {e. a−1 ∈ H. Determine all the subgroups of the group of symmetries of a tetrahedron. Then R2 is an abelian group with respect to component wise addition. we prove that the condition of the above theorems can be weakened if we assume that H is a finite. Determine all the subgroups of the group of symmetries of a cube. Check that if H is a subgroup of R2 then H represents a line passing through (0. y1 ). . we prove the first fundamental theorem for groups that have finite number of elements. . y) ∈ R2 : y = 0}. So. a3 . rf } = rf H. Example 4.1 also implies that for each g ∈ G. (4. for any two (x0 . Therefore. y0 ) + H gives a line that is a parallel shift of the line represented by H and (x0 . r 2 f } = f K = K r 2 f = r 2 f K and K f r = {f r. (x1 . f } = Hf. y) + H = R2 .2. Kr = {r. r 2 f } = r 2 f H and H r 3 = {r 3 . Hence.74 CHAPTER 4. Consider the group D4 and let H = {e. (4. Hence. 3) + H3 = {(2 + x. Remark 4. Hr = {r. r 3 f } = r 3 f H. in R2 by (x1 . x∈R y∈R That is. denoted ∼. H r 2 = {r 2 . 3 + 3x) : x ∈ R} = {(x. y1 ) ∼ (x2 . y1 ) + H. Similarly. the equivalence class containing the point (x0 . f r 3 } = f r K = K f r 3 = f r 3 K.3. we are led to the following definition. Let G be a group and let H be a subgroup of G. y) ∈ R2 : y = 3x − 3}. r 3 } = rK = Kr 3 = r 3 K Kf = {f. S S 3.2 (Left and Right Coset).3) .2. POLYA THEORY 3. r 2 } be two subgroups of D4 . we see that if we fix a subgroup H of R2 and take any point (x0 .4. for each fixed g ∈ G.2. f } = f H. (x. Example 4.2. y0 ) + H = (x1 . y0 ) ∈ R2 . if we define a relation. we need to consider the set g + H. (4. Moreover. (x1 . Then observe the following: H = {e. Then for each g ∈ G the set 1. y0 ) + H = (x1 . So. (2. it may be possible to partition the group G into subsets that are in some sense similar to H itself. y0 ). g = ge ∈ gH. as (x. 2. y1 − y2 ) ∈ H. y0 ) + H if and only if (x0 . Hg = {hg : h ∈ H} is called the right coset of H in G. y1 ) ∈ R2 . f r 3 } = H f r 3 . r 2 H = {r 2 . y0 ) + H contains the point (x0 . Hence. either (x0 . y2 ). f r 2 } = H f r 2 and H = {e. gH = {gh : h ∈ H} is called the left coset of H in G. we get a partition of R2 . this represents a line that has slope 3 and passes through the point (2.1) r 3 H = {r 3 . y) vary over all the points of R2 . y0 ).2) K = {e. r 2 } = Kr 2 = r 2 K. then the above observations imply that this relation is an equivalence relation. then the set (x0 . if G is an additive group or either the set gH or the set Hg. y1 ) lies on the line (x0 . Definition 4. So. it can be easily observed that 1. So. we often say that gH is the left coset of H containing g. whenever (x1 − x2 . we see that given a subgroup H of a group G. 3). 2. if G is a multiplicative group. Since the identity element e ∈ H. f } and K = {e. y1 ) + H or they represent two parallel lines which themselves are parallel to the line represented by H. rH = {r. y0 ) + H. g ∈ Hg and hence Hg is said to be the right coset of H containing g. f r} = H f r. y0 ) is the set (x0 . g2 H. The proof of the theorem is left as an exercise for the readers. Moreover. This leads to to study of normal subgroups and beyond. then G is called a group of finite order. . Let H be a subgroup of a group G. aH = bH if and only if a−1 b ∈ H. aH is a subgroup of G if and only if a ∈ H. Suppose a. Since G is a finite group. 2. namely the Lagrange’s Theorem.2. Theorem 4. Then by Theorem 4.5.5. That is. Theorem 4. Ha is a subgroup of G if and only if a ∈ H. .2. Let g1 H. Furthermore. . is called the order of G. The number of elements in G. for each g ∈ D4 . Ha = Hb if and only if ab−1 ∈ H. . . 1. Ha = H if and only if a ∈ H. The interested reader can look at any standard book in abstract algebra to go further in this direction. we see that Kg = gK. We are now ready to prove the main result of this section. We give the proof for left cosets. Let H be a subgroup of a finite group G. 3.2.7. b ∈ G. 4. G is a disjoint union of the sets g1 H. aH = Ha if and only if H = aHa−1 = {aha−1 : h ∈ H}. Now. for each g ∈ D4 .2). two cosets are either equal or they are disjoint. Definition 4.6 (Order of a Group). aH = H if and only if a ∈ H. . Similarly one obtains the following results for right cosets of H in G. 3. there should be a way to distinguish between these two subgroups of D4 . Also.3).1) and (4. If |G| < ∞. LAGRANGE’S THEOREM 75 From (4. 2. it can be easily verified . . So. we need the following definition. denoted |G|. either aH = bH or aH ∩ bH = ∅. gm H be the collection of all left cosets of H in G. A similar proof holds for right cosets. let us come back to the partition of a group using its subgroup. gm H. the |G| number of distinct left (right) cosets of H in G equals . either Ha = Hb or Ha ∩ Hb = ∅. the number of left cosets of H in G is finite. |H| Proof. Then the following results hold for left cosets of H in G: 1. we note that in general Hg 6= gH. 4. To proceed further. whereas from (4. g2 H.4.2. .2. Then |H| divides |G|. m that . for all . Hence. for each a. |gi H| = |H|. b ∈ G.|aH|m= |bH|. S . P i = 1. . . . Thus. 2. m. . |G| = . . gi H . . = |gi H| = m|H| (the disjoint union gives the second i=1 i=1 |G| equality). Thus. |H| divides |G| and the number of left cosets equals m = . |H| . } forms a subgroup of any finite group G gives the proof of the next result.2. all the 8 elements of order 3 must be elements of H. and is denoted by [G : H] or iG (H). (12)(34).7 is a statement about any subgroup of a finite group.10.5. In general. consider H = 10Z as a subgroup of the additive group Z. for a fixed positive integer m. where G = {e. POLYA THEORY Remark 4. using Theorem 4. . rf. If there is no such positive integer then g is said to have infinite order.17. The first corollary is about the order of an element of a finite group. f. The number m in Theorem 4. (243). G has exactly 8 elements of order 3.7 is called the index of H in G. O(a) = O(a−1 ). Let G be a group and let g ∈ G. whereas the elements r and r 3 have order 4.5. This is absurd as |H| = 6.76 CHAPTER 4. The only element of order 1 in a group G is the identity element of G. r f have order 2. Then using Theorem 4. Definition 4. 2.2. H be a subgroup of order 6 in G. Before coming to our next remark. aH and a2 H are distinct. for distinct numbers i. 2.9. Let if possible. the elements r 2 . Hence. at most two of the cosets H.2. . That is. Then the smallest positive integer m such that gm = e is called the order of g.2. Determine the order of each subgroup that were obtained in Exercise 4. Hence. The order of an element is denoted by O(g). Then [Z : H] = 10. (143). (132). j and k. g.1. But. Prove that for each a ∈ G. Theorem 4.2a. Then it can be easily verified that [Z : mZ] = m. 1. One still talks of index of H in G in such cases. H must have at least 9 elements (8 elements of order 3 and one identity). Whereas it can be shown that G doesn’t have a subgroup of order 6. we now prove that in general. To see this consider the group G discussed in Example 4.2. the possible cosets could be H. This group has 12 elements and 6 divides 12.11. Exercise 4. The observation that for each g ∈ G. 1. the converse of Lagrange’s Theorem is not true. . (234).1. In D4 . Let a ∈ G with O(a) = 3. we need the following definition and example. . Observe that G has exactly 8 elements of the form (ijk).2. (124). (123). Proof. (13)(24). we now derive some important corollaries of Lagrange’s Theorem. We give a proof for better understanding of cosets. With the definition of the order of an element. aH and a2 H (as a3 = e. g2 . (14)(23)}. It may so happen that the group G and its subgroup H may have infinite number of elements but the number of left (right) cosets of H in G may be finite. We omit the proof as it can be found in any standard textbook in abstract algebra.9 (Order of an Element). and each has order 3. the set H = {e. we see that cosets of H in G will be exactly 2 and at the same time. (134). (142). no other coset exists).2. Example 4. g3 .2. Therefore. r 2 f.8. it can be easily verified that the equality of any two of them gives a ∈ H. consider the subgroup mZ of the additive group Z. For example. 2. the unit place in the expansion of 131001 is 3. Then.14. Let a be any positive integer and let p be a prime. check that Z∗p forms a group with respect to the binary operation a ⊙ b = the remainder. . to do so. if p does not divide a.14. Corollary 4.13. If gcd(a. 3|U10 | = 1 (mod 10). n) = 1 then aϕ(n) ≡ 1 (mod n). Then. To state this. the notation “a ≡ b (mod p)” indicates that p divides a − b.2.2. let Un = {k : 1 ≤ k ≤ n.15. Hence. Hence g|G| = gm·O(g) = (gO(g) )m = em = e.2. with binary operation a ⊙ b = the remainder. Find the unit place in the expansion of 131001 . Solution : Observe that 13 ≡ 3 (mod 10).17. Let G be a finite group. Corollary 4. Let G be a finite group. . . Now applying Corollary 4. 6.2. O(g) ∈ {1. 5.12 implies that if G is a finite group of order n then the possible orders of its elements are the divisors of n. |G| = m · O(g).2.2. Also.2. popularly known as the Euler’s Theorem. recall that for a. ap ≡ a (mod p). . Also. for each g ∈ G. Let G be a finite group and let g ∈ G. we have shown that for any g ∈ G.2. 131001 ≡ 31001 ≡ 34·250+1 ≡ (34 )250 · 31 ≡ 1 · 3 ≡ 3 (mod 10). 30}.2. for each positive integer n. Applying Corollary 4. 1. Let P be an odd prime and consider the set Z∗p = {1. for each positive integer n. n) = 1}. That is. recall that the symbol ϕ(n) gives the number of integers between 1 and n that are coprime to n. Thus. Let a.14 to Z∗p gives the famous result called the Fermat’s Little Theorem. Example 4. We now state without proof a generalization of the Fermat’s Little Theorem. Then in the first corollary. O(g) divides |G|. when ab is divided by n forms a group. gives the next result. So. Then ap−1 ≡ 1 (mod p). Corollary 4. LAGRANGE’S THEOREM 77 Corollary 4. 131001 ≡ 31001 (mod 10). For example. if |G| = 30 then for each g ∈ G. 2.2. b ∈ Z. In general. Corollary 4. Then O(g) divides |G|.16. |Un | = ϕ(n). Then Un . 15. 10. 3.12. n ∈ Z with n > 0. when ab is divided by p. Therefore. p − 1}.4. . for some positive integer m.14 to Un .2. g|G| = e. This observation gives our next result. 3 ∈ U10 and therefore by Corollary 4. gcd(k. Remark 4. But |U10 | = 4 and 1001 = 4·250+1. with r 6 = e = f 2 and rf = f r 5 . . for all x ∈ X and g. . . . is first acted upon by an element h ∈ G and then by an element g ∈ G then the final position of x0 is same as the position it would have reached if it was acted exactly once by the element g ⋆h ∈ G. . Example 4. onto function from X into itself. That is. Then the set {g ⋆ x : x ∈ X} = X. (b) the second condition implies that if a point. the points in X remain fixed when they are acted upon by the identity element of G.3. Hence 231002 ≡ 2340·25+2 ≡ (2340 )25 · 232 ≡ 1 · 232 ≡ 529 ≡ 29 (mod 100). y ∈ X such that g ⋆ x = g ⋆ y. But |U100 | = 40 and 1002 = 40 · 25 + 2. the unit place is 9 and the tens place is 2 in the expansion of 231002 . r 5 . say x0 ∈ X. rf. f stands for the vertical flip and r stands for counter clockwise π rotation by an angle of . Or equivalently.5). by definition. . Solution : Observe that 23 ∈ U100 and 23|U100 | = 1 (mod 100). Remark 4. g just permutes the elements of X. for all x ∈ X. That is. Hence. with g 6= h such that g ⋆ x = h ⋆ x. Then D6 acts on the labeled edges/vertices of a regular hexagon 3 by permuting the labeling of the edges/vertices (see Figure 4. Definition 4. Then. Then.3 Group Action Definition 4. ·) be a group with identity e. Then G is said to act on a set X. Before proceeding further with definitions and results related with group action.1 can be interpreted as follows: (a) the first condition implies that the identity element of the group does not move any element of X. g ⋆ (h ⋆ x) = (g · h) ⋆ x.3. 3. r 5 f }. POLYA THEORY 2. . x = e ⋆ x = (g−1 · g) ⋆ x = g−1 ⋆ (g ⋆ x) = g−1 (g ⋆ y) = (g−1 · g) ⋆ y = e ⋆ y = y. .1.3. if there exists an operator ⋆ : G × X−→X satisfying the following conditions: 1. f. Consider the dihedral group D6 = {e. Find the unit and tens place in the expansion of 231002 . for all x ∈ X. r.2.3.78 CHAPTER 4. 1. Here. each g ∈ G gives rise to a one-one. Let (G. There may exist g.. Let us assume that X consists of a set of points and let us suppose that the group G acts on X by moving the points.3. 2. there exist x. e ⋆ x = x. 4. let us look at a few examples. and 2. Fix an element g ∈ G. For otherwise. h ∈ G. 1. h ∈ G. . for all g ∈ G. (a) x1 and x16 are mapped to itself under the action of every element of D4 . the figure labeled x9 in Figure 4. r 3 . For example. Then the dihedral group D4 = {e. Let X denote the set of ways of coloring the vertices of a square with two colors. g ⋆ x1 = x1 and g ⋆ x16 = x16 . Let G act on a set X. where the vertices south-west. 2. For example. Then. The distinct colorings have been depicted in Figure 4. We first define them and then try to understand them using an example. That is.3. |X| = 16. north-east and north-west are respectively.6 corresponds to h(1) = R = h(4) and h(2) = B = h(3).1. 2. B B B x12 R B B x13 B B B B x6 R R R R R R B B B B B B R R R B R R R R R B B R B B B R x10 B B R R R R R x11 B R x4 R B x16 B B x3 R B x9 x2 R R x15 x8 x1 R R x14 x7 R B B R x5 B B R Figure 4. Blue}. Definition 4. where R stands for the vertex colored “Red” and B stands for the vertex colored “Blue”.5: Action of f on labeled edges and of r 2 on labeled vertices of a regular hexagon.6. south-east. Now.79 4. There are three important sets associated with a group action. Red and Blue. (b) r ⋆ x2 = x5 and f ⋆ x2 = x3 . 3 and 4. say. r. 4}−→{Red. GROUP ACTION a2 a3 a2 a1 a4 a6 3 a1 f − → 2 1 6 a3 4 and a6 r2 → − 1 a4 a5 a5 5 2 6 5 3 4 Figure 4.3. 3. labeled as 1. f.1.4. r 2 . Then . r 2 f. Then X equals the set of all functions h : {1.6: Coloring the vertices of a square. using Lemma 2. r 3 f } acts on the set X. 2. let us denote the permutation (1234) by r and the permutation (12)(34) by f . rf. Consider the map τ : S−→O(x) by τ (gGx ) = g ⋆ x. we have O(x2 ) = {x2 . Then S = {gGx : g ∈ G} and |S| = [G : Gx ]. Moreover. if g ⋆ x = t then Gx = g−1 Gt g. using Theorem 4. Then for each fixed x ∈ X.6. x10 . one obtains the following sequence of assertions: gGx = hGx ⇐⇒ h−1 g ∈ Gx ⇐⇒ (h−1 g) ⋆ x = x ⇐⇒ h−1 ⋆ (g ⋆ x) = x ⇐⇒ g ⋆ x = h ⋆ x. x3 . 2. 1. Let G act on a set X.5. x5 }. O(x) = {g ⋆ x : g ∈ G} ⊂ X is called the Orbit of x. 3.6 helps us to relate the distinct orbits of X under the action of G with the cosets of G. Furthermore. for each fixed g ∈ G. 3. Let us now understand the above definitions using the following example.3. So. Moreover.3. Then. Gx2 = {e. Fg = {x ∈ X : g · x = x} ⊂ X is called the Fix of g. |O(x)| = [G : Gx ]. on the set X. Example 4.2. Consider the set X given in Example 4. Then O(x) = O(t). if G is a finite group then |G| = |O(x)| · |Gx |. gGx = hGx .5 and the definition of group action. We now state a few results associated with the above definitions. for each fixed x ∈ X. the equivalence class containing x ∈ X equals O(x) = {g ⋆ x : g ∈ G} ⊂ X. Fix x ∈ X and let t ∈ O(x). Theorem 4. In particular. Proposition 4.7.3.80 CHAPTER 4. and Frf = {x1 . the number of left cosets of Gx in G. . Let S be the set of distinct left cosets of Gx in G.6. for each fixed x ∈ X. rf }. denoted ∼. Then using the depiction of the set X in Figure 4.2. x15 . That is. x2 . x4 . Let us first check that this map is well-defined. x16 }.3. Let a group G act on a set X. The readers should compute the different sets by taking other examples to understand the above defined sets. Let G act on a set X. POLYA THEORY 1. suppose that the left cosets gGx and hGx are equal. Then for each fixed x ∈ X.3. for all x ∈ X. x7 . 2. This is stated and proved as the next result. The proofs are omitted as they can be easily verified. the set Gx is a subgroup of G. Then Proposition 4. x13 . there is a one-to- one correspondence between the elements of O(x) and the set of all left cosets of Gx in G. Define a relation. Then prove that ∼ defines an equivalence relation on the set X. x4 . Proof. Gx = {g ∈ G : g ⋆ x = x} ⊂ G is called the Stabilizer of x in G.3. by x ∼ y if there exists g ∈ G. such that g ⋆ x = y. if we need to list all the elements of X then we can already pick the ones that are distinct. Also.8. Check that the number of distinct colorings are 16 1 X 1 |Gxi | = (8 + 2 + 2 + 2 + 2 + 2 + 4 + 2 + 2 + 4 + 2 + 2 + 2 + 2 + 2 + 8) = 6. [G : Gx ] = .3. |G| |G| |G| |G| i=1 y∈O(xi ) x∈X i=1 Example 4. That is. Let us come back to Example 4. |G| x∈X Proof. Let G be a finite group acting on a set X. Therefore. the question arises what is the need of Theorem 4. . Hence. for all y ∈ X.3. . . Recall that. X x∈O(y) |Gx | = |G|. we have shown that τ gives a one-to-one correspondence between O(x) and the set S. Then N= 1 X |Gx |. |O(x)| |O(y)| |O(y)| |O(y)| x∈O(y) x∈O(y) Theorem 4. GROUP ACTION Thus. there exists an h ∈ G.3. Lemma 4.3. X x∈O(y) |Gx | = X x∈O(y) X X |G| |G| |G| |G| = = 1= |O(y)| = |G|. Let N denote the number of distinct orbits of X under the action of G.9. The other part follows by observing that by |G| definition .9. Then. note that for each y ∈ O(x). one has gGx = hGx ⇐⇒ τ (gGx ) = τ (hGx ). But it is important to observe that this method requires us to list all elements of X.3. by definition of the map τ .3.6 and Theorem 4. x2 .81 4. Hence. using Theorem 4. for this choice of h ∈ G. Hence. Therefore. Let x1 . τ is not only well-defined but also one-one. .10. τ is onto. xN be the representative of the distinct orbits of X under the action of G. Let G be a finite group acting on a set X. This completes the proof of the first part. So. such that h ⋆ x = y. for this choice of h ∈ G.3. for each x ∈ O(y). |G| 8 i=1 Observation: As the above example illustrates.3.3. one has |G| = |Gx | · |O(x)|. τ (hGx ) = h ⋆ x = y holds. We give the proof for the sake of completeness. for all x ∈ X. By Lemma 4. Then N N 1 X 1 X X 1 X 1 |Gx | = |Gxi | = |G| = N · |G| = N.7. for each subgroup Gx of G whenever |G| is finite. we are able to find the number of distinct configurations using this method.3. Therefore. Proof. the coset hGx ∈ S. for each y ∈ X.3.7. Also.2. . note that P x∈O(y) |Gx | = |G|. |Gx | The following lemmas are an immediate consequence of Proposition 4. To show τ is onto.8. |O(x)| = |O(y)|. Redfield and Polya observed that elements of G with the same cyclic decomposition made the same contribution to the sets of fixed points. Lemma 4. Hence. one feels that the calculation may become easy if one has to look at the elements of the group D4 as one just needs to look at 8 elements of D4 . Then. |Ff | = 4. . As the first method. Let us come back to Example 4. then |X| = 34 = 81. They defined the notion of cycle index polynomial to keep track of the cycle decomposition of the elements of G. 4. |S| = |Gx |. |Frf | = 8.4 The Cycle Index Polynomial Let G be a group acting on a set X.3. the question arises. for each fixed g ∈ G. can we get a formula that relates the number of distinct orbits with the elements of the group. POLYA THEORY if we color the vertices of the square with 3 colors. |S| = |Fg |. the number of distinct configurations are 1 X 1 |Fg | = (16 + 2 + 4 + 2 + 4 + 8 + 4 + 8) = 6.9. Let N denote the number of distinct orbits of X under the action of G. Check that |Fe | = 16. Gx gives the P collection of elements of G that satisfy g ⋆ x = x. Consider the set S = {(g. using Theorem 4. g∈G P P one has x∈X |Gx | = |S| = g∈G |Fg |. |G| g∈G Example 4.11 (Cauchy-Frobenius-Burnside’s Lemma). we need to understand the cycle decomposition of each g ∈ G as product of disjoint cycles. |G| 8 g∈G It seems that we may still need to know all the elements of X to compute the above terms. Hence. |G| g∈G Proof. |Fr | = 2. whereas the number of elements of D4 (the group that acts as the group of symmetries of a square) remains 8. Then as mentioned at the end of the previous section. Let G be a finite group acting on a set X. So. x∈X As the second method. Then 1 X N= |Fg |. we have N= 1 X |Fg |.12.3. x) ∈ G × X : g ⋆ x = x}. for each fixed x ∈ X.3. we just need to know the decomposition of g as product of disjoint cycles. |Fr2 f | = 4 and |Fr3 f | = 8. So. |Fr2 | = 4. We calculate |S| by two methods. Then. So. Thus. let us fix g ∈ G. But it will be shown in the next section that to compute |Fg . Let us start with a few definitions and examples to better understand the use of cycle decomposition of an element of a permutation group. for any g ∈ G. So.3.2. Fg gives the collection P of elements of X that satisfy g ⋆ x = x. using two separate methods. |Fr3 | = 2.3. let us fix x ∈ X. in place of the elements of the set X? This query has an affirmative answer and is given as our next result.82 CHAPTER 4. for 1 ≤ i ≤ n. Let G be a permutation group on n symbols.9. For a fixed g ∈ G. Then e = (1)(2)(3)(4)−→z14 .2a). Let G be the dihedral group D4 (see Example 4.2).1. Let e be the identity element of Sn .1. r 3 = (1432)−→z4 . σ = (1 3 7 2 6) (4 10) (5 14 12) (8 13) (9 15) (11). let ℓk (g) denote the number of cycles of length k. zn ) =  1  |G| X ℓ (g) z11 ℓ (g) z22 g∈G  · · · znℓn (g)  . note that for each fixed g ∈ G. 11 31 for exactly 8 elements corresponding to 3 cycles. Definition 4. Let σ = 4 5 6 7 8 9 10 11 12 13 14 15 ! . r = (1234)−→z4 . Then the elements of G have the following cycle structure: 14 for exactly 1 element corresponding to the identity element. implies that each term z11 summation satisfies 1 · ℓ1 (g) + 2 · ℓ2 (g) + · · · + n · ℓn (g) = n. if t P i · ki = n. 3. the cycle structure of σ is 11 23 31 51 . z2 . 2. 1 2 3 2.1d.2. Consider the group G of symmetries of the tetrahedron (see Example 4. 1 ≤ k ≤ n.4.1. as a permutation group on n symbols. in the cycle representation of g.4. Then e = (1) (2) · · · (n) and hence the cycle structure of e. . PG (z1 .4.3. Thus.4. z3 . 8 . . Then it can be 3 6 7 10 14 1 2 13 15 4 11 5 8 12 9 easily verified that in the cycle notation. The group in Example 4. . . Determine the cycle structure of the following groups: 1.2a. 22 for exactly 3 elements corresponding to (12)(34). f = (14)(23)−→z22 . as an element of Sn equals 1n . 1. zn given by PG (z1 . r 2 = (13)(24)−→z22 . z4 ) =  1 4 z1 + 2z4 + 3z22 + 2z12 z2 . 1 ≤ k ≤ n. r 2 f = (12)(34)−→z22 . (13)(24)&(14)(23). we look at a few examples.5. Exercise 4. rf = (1)(3)(24)−→z12 z2 . .1. Example 4. THE CYCLE INDEX POLYNOMIAL Definition 4. Observe that i=1 Example 4.4.83 4. z2 . Before. . A permutation σ ∈ Sn is said to have the cycle structure 1k1 2k2 · · · nkn . z2 .1. The group in Example 4. is a polynomial in n variables z1 .9. r 3 f = (13)(2)(4)−→z12 z2 . ℓ (g) z22 ℓ (g) · · · znn in the 1. Note that this will depend on the factorization of n as product of distinct primes. the cycle representation of σ has ki cycles of length i.9.9. the condition that g has ℓ (g) exactly ℓk (g) cycles of length k.4. . Thus. Then the cycle index polynomial of G.4. . g ∈ G and φ ∈ Ω. where |G| g∈G Fg = { φ ∈ Ω : (g ⊛ φ)(x) = φ(x). Also. Consider the set Ω that denotes the set of all functions from X to C. g ⊛ φ is an element of Ω and hence it gives a function from X to C. . z3 . Theorem 4. Proof. Since. We claim that “g ∈ G fixes a color pattern (or an element of Ω) if and only if φ colors the elements in a given cycle of g with the same color”. N . |C|). g ⋆ x ∈ X. Let C. (h ⊛ (g ⊛ φ)) (x) = (hg ⊛ φ)(x). Also.11. z2 . is given by PG (|C|. let C be a finite set (say. distinct up to the action of G. denoted ⊛. Also. Let G be a subgroup of the group of permutations of the object S.6.1.9. We claim that ⊛ indeed defines a group action on the set Ω. One can also obtain an action of G on Ω. . note that for each h. g ∈ G and φ ∈ Ω. Then observe that G is a subgroup of Sn . POLYA THEORY 2. by Burnside’s Lemma 4. z4 . So. for all x ∈ X. z8 ) = 4. using the above notations.4. by the following rule: Fix an element x ∈ X. Now. . let G be a subgroup of the group of permutations of the object S. for all φ ∈ Ω. Hence. for all x ∈ X. each g ∈ G can be written as a product of disjoint cycles. Verify that the cycle index polynomial of the symmetries of a cube induced on the set of vertices equals PG (z1 . |C|.1c).84 CHAPTER 4. To do so. Observe that an element of Ω gives a color pattern on the object S. Then the number of distinct color patterns (distinct elements of Ω). of colors). Then  1 5 z1 + 4z5 + 5z1 z22 . Let |X| = n. Hence. Then. So. . one defines (g ⊛ φ)(x) = φ(g−1 ⋆ x). Hence. 24 Applications Let S be an object (a geometrical figure) and let X be the finite set of points of S. S. X and Ω be as defined above. G acts on the elements of X. Let us denote this action by ⋆. the number of 1 P distinct color patterns (distinct orbits under the action of G). we have the following theorem.3. z5 ) = 10 3. . .4. one has h ⊛ (g ⊛ φ) = hg ⊛ φ. the definition of the action on X and Ω gives   (h ⊛ (g ⊛ φ)) (x) = (g ⊛ φ)(h−1 ⋆ x) = φ g−1 ⋆ (h−1 ⋆ x) = φ g−1 h−1 ⋆ x  = φ (hg)−1 ⋆ x = (hg ⊛ φ)(x).1  1 8 z1 + 6z42 + 9z24 + 8z12 z32 . the proof of the claim is complete. z2 . PG (z1 . for each h. equals |Fg |. for each φ ∈ Ω and g ∈ G. . . Let G be the dihedral group D5 (see Example 4. . for all x ∈ X}. Suppose we are given beads of 3 different colors and that there are at least 6 beads of each color. the group D6 acts on the 6 beads of the necklace. a cycle of g can be given a color independent of another cycle of g. Thus. for a fixed x0 ∈ X. for all x ∈ X. z2 . Hence.. when the vertices of a pentagon is colored with 3 colors. Solution: We know that the group D5 . Verify that PD5 (z1 . Also. φ(x) = φ g−1 ⋆ x = (g ⊛ φ)(x).4. Note that. . Hence. z2 .4. the required number equals N = 1 5 (3 + 4 · 3 + 5 · 3 · 32 ) = 39.4. (g ⊛ φ)(x) = φ(x).6. |D5 | 10 Thus. by definition. Example 4. |G| |G| g∈G g∈G We now give a few examples to indicate the importance of Theorem 4. . then φ assigns the same color to each element of any cycle of g. That is. Determine the number of distinct color patterns. z6 ) = 1 (z 6 + 2z6 + 2z32 + z23 + 3z23 + 3z12 z22 ).) corresponds to a cycle of g. Solution: Since we are forming a necklace using 6 beads. g ⊛ φ = φ. 12 3.4. for each fixed x0 ∈ X and g ∈ G. That is. Or equivalently. the number of distinct colors equals |C|. Conversely. Hence. . z5 ) = 1 z 5 + 4z5 + 5z1 z22 (z15 + 4z5 + 5z1 z22 ) = 1 . Also. . by Theorem 4. . . . the permutation (x0 . g2 ⋆x0 . So. z5 .e. .6. Consider the 2 × 2 square given in Figure 4. g ⋆x0 . using the definition. Determine the number of distinct color patterns. Thus. the cycle index polynomial of D6 equals PD6 (z1 . 1 X 1 X N= |Fg | = |C|ℓ1 (g) · |C|ℓ2 (g) · · · |C|ℓn (g) = PG (|C|. Determine the distinct necklace patterns that are possible using the 6 beads. 1. . THE CYCLE INDEX POLYNOMIAL Suppose that g ⊛ φ = φ. for each x ∈ X. we observe that for a fixed g ∈ G. is the group of symmetries of a pentagon. |C|. |Fg | = |C|ℓ1 (g) · |C|ℓ2 (g) · · · |C|ℓn (g) .85 4. In particular. ℓk (g) denotes the number of cycles of g of length k. for all x ∈ X.7. when the vertices of the given figure are colored with two colors. . g fixes the color pattern φ. Hence. . . φ(x) =  φ(g ⋆ x). 1 ≤ k ≤ n. if g fixes a color pattern φ. . . Solution: Observe that D4 is the group of symmetries of the 2 × 2 square and it needs to . for a fixed g ∈ G. Therefore. the proof of the claim is complete. Therefore.6. |C|). D5 acts on the color patterns. fix an element g ∈ G and let φ be a color pattern (a function) that has the property that every point in a given cycle of g is colored with the same color. i. the number of distinct |D6 | 1 1 6 necklace patterns equals (3 + 2 · 3 + 2 · 32 + 4 · 33 + 3 · 32 · 32 ) = 92. one has φ(g−1 ⋆ x) = φ(x). g ⊛ φ = φ. by Theorem 4.4.7. Hence. where for each k. 10 2. . one also has  φ(x0 ) = φ(g ⋆ x0 ) = φ g2 ⋆ x0 = · · · . for all x ∈ X. 24 4. 2. Then the weight of a color pattern φ : X−→C. an element of a commutative ring with identity. To start with. we have the following definitions.9 (Weight of a color pattern). . . the ideas of the previous subsection are generalized. z12 ) = 1 . Hence. Definition 4. z6 ) = z1 + 6z12 z4 + 3z12 z22 + 6z23 + 8z32 . . 24 Thus. Hint: The cycle index polynomial equals  1 6 PG (z1 . Let w : C−→A be a map that assigns weights to each color. a variable or in general. To do this.7: Faces and Vertices of Squares 4. Let A be a commutative ring with identity (the elements of A are called weights). . .2 Polya’s Inventory Polynomial In this section. The setup for our study remains the same. .4. with respect to the weight function w is given by  Q w(φ) = w φ(x) . Determine the number of distinct color patterns when the faces of a cube are colored with 2 colors.86 CHAPTER 4. . . each element of C is assigned a weight. Solution: Using the group of symmetries of the cube given on Page 69. This generalization allows us to count the distinct number of necklaces even if there are not sufficient number of beads of each color. the edges of a cube are colored with 2 colors. .4. the z 9 + 2z1 z42 + z1 z24 + 4z13 z23 cycle index polynomial is given by PD4 (z1 . . Exercise 4. . POLYA THEORY act on 9 vertices. Determine the number of distinct color patterns when 1. 13 14 15 16 9 10 11 12 5 6 7 8 1 2 3 4 The 4 × 4 Square 7 8 9 4 5 6 1 2 3 The 2 × 2 Square Figure 4.7 are colored with 2 colors. the faces of the 4 × 4 square given in Figure 4. z2 . This weight may be a number. the cycle index z 12 + 6z43 + 3z26 + 8z34 + 6z12 z25 polynomial corresponding to the faces equals PG (z1 . that in turn gives weight to each color pattern. we need to write the elements of D4 as a subgroup of S9 . . x∈X . the required number is 218.8.4. z9 ) = 1 and the 8 number of distinct color patterns equals 102. So. w(∆) = w(φ). with respect to w. x∈X (4. As G acts on Ω. G be the group of symmetries of the cube and let C consist of two colors ‘Red’ and ‘Blue’. Similarly.3. The above examples indicate that different color patterns need not have different weights. we are ready to prove the Polya’s Enumeration Theorem. This Lemma is the weighted version of the Burnside’s Lemma 4. for a fixed φ ∈ Ω. for each fixed g ∈ G and φ ∈ Ω.87 4. for some g ∈ G. under the P action of G on Ω. Thus.4.4. The pattern inventory.4. That is. the application of Lemma 4. |Gφ | · |∆| = |G|. THE CYCLE INDEX POLYNOMIAL Fix g ∈ G. R3 B 3 corresponds to “any three faces being colored ‘Red’ and the remaining three faces being colored ‘Blue’ and so on. Also.4. we first need to prove the weighted Burnside’s Lemma. To do so. X 1 X X I= w(∆) = w(φ).1) y∈X as {g ⋆x : x ∈ X} = X (see Remark 4. Since ∆ is an orbit under the action of G. Proof. With the definitions and notations as above.3. |∆| |∆| |G| |G| φ∈∆ φ∈∆ φ∈∆ φ∈∆ . for each φ ∈ ∆. Lemma 4. is the sum of the weights of the orbits. for all φ ∈ ∆. the weight of each element of O(φ) = {g ⊛ φ : g ∈ G} is the same and it equals w(φ). for each α ∈ Ω. Thus. 3. w(φ) = w(ψ). one has w(g ⊛ φ) = Y x∈X Y Y    w g ⊛ φ(x) = w φ(g−1 ⋆ x) = w φ(y) = w(φ).11. That is. whenever ψ = g ⊛ φ. denoted I. That is. Example 4. |G| ∆ g∈G φ∈Ω g⊛φ=φ where the sum runs over all the distinct orbits ∆ obtained by the action of G on Ω. Definition 4. R2 B 4 corresponds to “any two faces being colored ‘Red’ and the remaining four faces being colored ‘Blue’. Then we have seen that g fixes a color pattern φ ∈ Ω if and only if φ colors the elements in a given cycle of g with the same color.10. if the weights R and B are assigned to the two elements of C then the weight 1. B 6 corresponds “all faces being colored Blue”. I = w(∆). Let X consist of the set of faces of a cube.11 (Pattern Inventory).7 gives |Gα | · |O(α)| = |G|.3. We also need the following definition to state and prove results in this area. by definition.2). the set of color patterns and let w : C−→A be a weight function. Let G be a group acting on the set Ω.12. 2. X 1 X |Gφ | 1 X 1 X w(∆) = w(φ) = w(φ) = w(φ) = w(φ) = |Gφ | · w(φ). ∆ With the above definitions. where the sum runs over all the distinct orbits ∆ obtained by the action of G on Ω. 4. the condition that x and g ⋆ x belong to the same cycle of g. Thus. . it is easy to see that X1 . ∆ where the sum runs over all the distinct orbits ∆ obtained by the action of G on Ω and xi = P w(c)i . fix a g ∈ G. Suppose g has exactly t disjoint cycles. i=1 t Q  P w(c)|Xi |  Note that if we pick a term from each factor in and take the product of i=1 c∈C  t Q P these terms. With the definitions and notations as above. The argument can also be reversed and hence it follows that ! t t X XY Y X w(φ) = w(φ(si ))|Xi | = w(c)|Xi | .4. All these terms also appear in i=1 t P Q w(φ(si ))|Xi | c∈C because as φ is allowed to vary over all elements of Fg . w(φ) = Y w(φ(x)) = t Y Y w(φ(x)) = i=1 x∈Xi x∈X t Y w(φ(si ))|Xi | . . X I= w(∆) = PG (x1 . for each si ∈ Xi . . is the ith power sum of the weights of the colors. As Fg consists precisely of those color schemes which color each cycle of g with just one color. . for φ∈Fg i=1 1 ≤ i ≤ t. . |C|. . for 1 ≤ i ≤ t. Also. Using the weighted Burnside Lemma 4. xn ). x2 . . . recall that Fg consists precisely of those color schemes which color each cycle of g with just one color (see the argument used in the second paragraph in the proof of Theorem 4. we obtain all the terms of w(c)|Xi | .13 (Polya’s Enumeration Theorem). define Xi to be that subset of X whose elements form the cycle gi . Xt defines a partition of X. . the images φ(si ). . |C|). To do so. . we just need to determine the weight of such a color pattern. X2 . Now. Proof.88 CHAPTER 4.6). . . |G| |G| φ∈Ω g∈Gφ g∈G φ∈Fg We are now in a position to prove the Polya’s Enumeration Theorem. for each φ ∈ Fg . we need to prove that X X X ℓ (g) ℓ (g) w(φ) = x11 x22 · · · xℓnn (g) . . In particular. POLYA THEORY Let Fg = {φ ∈ Ω : g ⊛ φ = φ}. one has w(φ(si )) = w(φ(g ⋆ si )). gt .4. g∈G φ∈Fg g∈G where ℓi (g) is the number of cycles of length i in the cycle representation of g. Then I = X w(∆) = ∆ = P P w(φ) = φ∈Ω g∈Gφ P P w(φ) and hence g∈G φ∈Fg X 1 X 1 XX 1 X |Gφ | · w(φ) = |Gφ | · w(φ) = |Gφ | · w(φ) |G| |G| |G| ∆ φ∈∆ ∆ φ∈∆ φ∈Ω 1 X X 1 X X w(φ) = w(φ). take all values in C. g2 . Then. Before doing so. . say g1 . I = PG (|C|. Theorem 4. φ∈Fg φ∈Fg i=1 i=1 c∈C . 1 ≤ i ≤ t. . if weight of each color c∈C is 1.12. .2b on Page 69 . In how many ways can we distribute the six spheres on the 6 vertices of an octahedron freely movable in space? Solution: Here X = {1. 4. . for the first part. three Red.4. the required result follows. But before doing so. 2. then determine (a) the number of necklaces that have at least one R bead. Consequently.13. THE CYCLE INDEX POLYNOMIAL Now.15. 2. as x1 = w(c). z6 ) = 1 6 (z + 4z23 + 2z32 + 2z6 + 3z12 z22 ). Y }. B and G. Suppose we are given 6 similar spheres in three different colors. 6} and C = {R.1. . If there are 3 color choices. (b) the number of necklaces that have three R. the number 1 appears ℓ1 (g) times. For the second part. . two B and one G bead. . define the weights as R. Using Example 4. .4. z2 . So. This means that in the collection |X1 |. Therefore.4. Then I = 1 (R + B + G)6 + 4(R2 + B 2 + G2 )3 + 2(R3 + B 3 + G3 )2 12  +2(R6 + B 6 + G6 ) + 3(R + B + G)2 (R2 + B 2 + G2 )2 . |Xt |. say. 1 ≤ k ≤ n. at least one R needs to be used and the remaining can be any number of B and/or G.89 4. I = 1 (x + 1 + 1)6 + 4(x2 + 1 + 1)3 + 2(x3 + 1 + 1)2 12  +2(x6 + 1 + 1) + 3(x + 1 + 1)2 (x2 + 1 + 1)2 = x6 + 2x5 + 9x4 + 16x3 + 29x2 + 20x + 15. we give the following example with which Polya started his classic paper on this subject. . the required answer is 1 + 2 + 9 + 16 + 29 + 20 = 77. the number 2 appears ℓ2 (g) times and so on till the  number n appears ℓn (g) times (note that some of the ℓi (g)’s may be  t n Q Q P P P ℓ (g) zero). by Polya’s Enumeration Theorem 4. two Blue and one Yellow (spheres of the same color being indistinguishable). 5. B. So.4. c∈C w(c)n . Consider a necklace consisting of 6 beads. B and G itself. 12 1 So. 1. x2 = w(c)2 and i=1 so on till xn = P c∈C Example 4. c∈C k=1 P w(φ) = φ∈Fg n Q k=1 ℓ (g) xkk c∈C and thus. w(c)|Xi | equals xkk . say R. we define the weight of the color R as x and that of B and G as 1. 12 3. |X2 |. .9. The required answer equals the coefficient of R3 B 2 G in I. 1 12 3!2! We end this chapter with a few Exercises.14. 3. Example 4. which equals      1 6 1 6! +3·2·2 = + 6 = 6. Solution: Recall that D6 acts on a regular hexagon and its cycle index polynomial equals PD6 (z1 . assume that g has ℓk (g) cycles of length k. Hence. when there are exactly 6 beads of color “RED”. Let p be a prime suppose that we want to make a necklace consisting of p beads. (b) Write the elements of the group as a subgroup of Sn . Use this number to prove the Fermat’s little theorem.4.8. Three ear-rings are shown in Figure 4. the ear-ring can be rotated along the horizontal axis passing through the central vertex (highlighted with dark circle). In each case. 4. if the necklace can be only be rotated. C6 H6 and CH4 given in Figure 4.16. 24 Hence. for a proper choice of n. If the beads of the same color are indistinguishable. 1. . then determine the number of distinct necklace patterns. the number of patterns of the required type is the coefficient of the term R3 B 2 Y in I = 1 (R + B + Y )6 + 6(R + B + Y )2 (R4 + B 4 + Y 4 ) + 3(R + B + Y )2 (R2 + B 2 + Y 2 )2 24  +8(R3 + B 3 + Y 3 )2 + 6(R2 + B 2 + Y 2 )3 . 6. if the hydrogen atoms can be replaced by either Fluorine. Then determine the number of patterns that have exactly four black edges and two white edges. determine the number of distinct necklace patterns. POLYA THEORY the cycle index polynomial corresponding to the symmetric group of the octahedron that acts on the vertices of the octahedron is given by  1 6 z1 + 6z12 z4 + 3z12 z22 + 8z32 + 6z23 . one has n choices of colors. (d) Determine the possible distinct color patterns. Verify that this number equals 3. If for each bead. What is the number if the necklace can be rotated and turned over? 2.8. determine the number of possible molecules that can be formed. 3. In essentially how many different ways can we color the vertices of a cube if n colors are available? 5. Suppose the edges of a regular tetrahedron are being colored with white and black. Chlorine or Bromine. Exercise 4. Then determine the following: (a) The group that acts on the ear-rings. Three black and three white beads are strung together to form a necklace. Consider the molecules C2 H4 .90 CHAPTER 4. In each case. (c) Determine the number of distinct color patterns when there are sufficient number of beads of both the colors “RED” and “BLUE”. . . 24  1 12 z1 + 6z43 + 3z26 + 8z34 + 6z12 z25 .91 4. z12 ) = PG (z1 . Prove that the cycle index polynomial for the vertices. . 24  1 8 z1 + 6z42 + 9z24 + 8z12 z32 . .4. . CH4 . equal to PG (z1 . z2 . . z6 ) = PG (z1 . . 24 . THE CYCLE INDEX POLYNOMIAL H H H H C H H H H C C H C H H C C C C H H H H C H 8 6 8 7 2 7 6 5 5 3 1 2 9 3 4 3 8 1 1 7 4 5 6 9 2 10 10 4 Figure 4. . 7. . edges and faces of the octahedron is respectively. . z2 .8: Three ear-rings and three molecules. C2 H6 and C6 H6 . . z2 . . z8 ) =  1 6 z1 + 6z12 z4 + 3z12 z22 + 8z32 + 6z23 . POLYA THEORY .92 CHAPTER 4. Chapter 5 Generating Functions and Its Applications 5. These ideas will be used to get some binomial identities. Given a sequence of numbers {an : n = 0. 3. .1. 2. In general. 1. one associates two P P P xn formal power series. We k! now start with the definition of “formal power series” and then its properties are studied in some detail.1. Definition 5. That is. an = [xn ]f (x). 93 . namely. 2. . 1. To do so. for the numbers {a(n) : n ≥ 0}. one is not interested in evaluating them for any value of x. Remark 5. the binomial   n(n − 1)(n − 2) · · · (n − k + 1) coefficients. then one does find out the “radius of convergence” of the series and evaluates within that radius. nk .}.1 Formal Power Series In this chapter. for n ≥ 0. One just thinks of them as algebraic expressions. Let f (x) = P n≥0 an xn be a formal power series. The expression an xn is called n! n≥0 n≥0 n≥0 P xn the generating function and the expression an is called the exponential generating n! n≥0 function. But if at all there is a need to evaluate. in f (x) is denoted by [xn ]f (x). k ≥ 0.2. . An algebraic expression of the form f (x) = P an xn n≥0 is called a formal power series in the indeterminate x. Then the coefficient of xn . we first recall from Page 47 that for all n ∈ Q and k ∈ Z. we will try to first develop the theory of generating functions by getting closed form expressions for some known recurrence relations. are well defined. using the idea that nk = . a0 = [x0 ]f (x) and for n ≥ 1. an xn and an .1 (Formal power series). the questions n≥0 arises. for n ≥ 0. [xm ]ee as the expression x ee x −1 n! = m X [xm ] n=0 (ex − 1)n . our main aim is to study the series by means of algebraic rules. with coefficients from R. can we find g(x) ∈ P(x) such that f (x)g(x) = 1.94 CHAPTER 5. where the identity element is given by the formal P power series f (x) = 1.3 (Equality of two formal power series). sum/addition is defined by f (x) + g(x) = X an xn + n≥0 bn xn ∈ P(x). Let P(x) denote the set of all formal power series in the indeterminate x. the element f (x) = an xn is said to have a reciprocal if n≥0 P there exists another element g(x) = bn xn ∈ P(x) such that f (x) · g(x) = 1. under the algebraic operations defined above. g(x) = n≥0 n≥0 1.. Two elements f (x) = P bn xn of P(x) are said to be equal if an = bn . where dn = n! n≥0 n≥0 k=0 P x P n≥0 n k ak bn−k . .1. We need the following definition to proceed further. n! (5. the product of f (x) = n P P xn and g(x) = bn equals dn xn . f (x) · g(x) =  n≥0 X bn xn = where cn = n≥0 n X k=0 ak bn−k . product is defined by     X X X an xn  ·  bn xn  = cn xn .1) is a sum of a finite number of real numbers. an xn n! 2. for all n ≥ 0. So. GENERATING FUNCTIONS AND ITS APPLICATIONS In this chapter. Remark 5.5. In this ring. Definition 5. Thus. will indeed require an infinite sum. In case of exponential power series.1. under what conditions on the coefficients of f (x).1. Where x is not a formal power series as the computation of [xm ]ee . Then their X n≥0 n≥0 (an + bn )xn . Note that the expression ee −1 is a well defined formal power series as the definition ey = P yn P (ex − 1)n x implies that ee −1 = and hence n! n≥0 n! n≥0 [xm ]ee x −1 = [xm ] X (ex − 1)n n≥0 That is. Let f (x) = P P an xn . for each m ≥ 0. n≥0 2. g(x) = P an xn and n≥0 n≥0 We are now ready to define the algebraic rules: Definition 5. i.e. it can be checked that the set P(x) forms a Commutative Ring with identity. for n ≥ 0. 1. This product is also called the Cauchy product. for all m ≥ 0. The answer to this question is given in the following proposition.4. Then. . Therefore. a0 b1 = −1 · (a1 b0 ) as 0 = a0 b1 + a1 b0 . one just needs to consider the terms a0 + a1 g(x) + a2 (g(x))2 + · · · + ak (g(x))k . Therefore. a0 b2 = −1 · (a2 b0 + a1 b1 ) as 0 = a0 b2 + a1 b1 + a2 b0 . Then n≥0 n≥0 the composition (f ◦ g)(x) is well defined if either f is a polynomial or b0 = 0. Then. we show that the coefficients bn ’s can be recursively obtained as follows: b0 = 1 as 1 = c0 = a0 b0 . Then (f ◦ g)(x) = x = (g ◦ f )(x) under the condition that b0 = 0. let f (x) = ex and g(x) = x + 1. suppose that a0 = 0 and both (f ◦ g)(x) and (g ◦ f )(x) are well defined. P Proof. we see that f (x)g(x) = 1 if and only if c0 = 1 and cn = 0. then br+1 = −1 · (ar+1 b0 + ar b1 + · · · + a1 br ) as 0 = ar+1 b0 + ar b1 + · · · + a1 br + a0 br+1 . for all n ≥ 1. Therefore. where cn = n≥0 n P k=0 ak bn−k . Then there exists g(x) ∈ P(x) satisfying f (x) · g(x) = 1 if and only if a0 6= 0. (f ◦ g)(x) = f (g(x)) = f (x + 1) = ex+1 . if we have already computed a0 the values of bk . Let f (x) = P n≥0 an xn ∈ P(x). And in general. Let g(x) = n≥0 P cn xn .1. Moreover. Note that g(0) = 1 6= 0.7. for all n ≥ 0. P bn xn ∈ P(x). using the definition of equality of two power series. The next result gives the condition under which the composition (f ◦ g)(x) is well defined. a1 6= 0 and b1 6= 0. So. a0 P Let us now look at the composition of two formal power series. For example. The proof of the other part is left to the readers. P ak xk and as function f ◦ g is well defined. FORMAL POWER SERIES Proposition 5. Now. but there is no formal procedure to write ex+1 as k≥0 hence ex+1 is not a formal power series. Let (f ◦ g)(x) = f (g(x)) = cn xn and suppose that either f is a polynomial or n≥0 b0 = 0. Hence. Then to compute ck = [xk ] (f ◦ g)(x).95 5. observe n≥0 n≥0 that the composition of two formal power series may not be defined (just to compute the constant term of the composition.6. Recall that if f (x) = an xn n≥0 P P and g(x) = bn xn then the composition (f ◦ g)(x) = f (g(x)) = cn xn . Here. This completes the proof of the first portion. by the definition of Cauchy product. let a0 6= 0. for k ≥ 0. each ck is a real number and (f ◦ g)(x) is well defined. P P Proposition 5. for k ≤ r.1. f (x)g(x) = Proof. if a0 = 0 then c0 = 0 and hence the Cauchy product f (x)g(x) can never equal 1. Let f (x) = an xn and g(x) = bn xn be two formal power series.1. one may have to look at an infinite sum). We now define the formal differentiation of elements of P(x). 96 CHAPTER 5. 1−x k=0 n≥0 cn where cn = k=0 P bn xn equals n≥0 n P ak . for all k ≥ 0. f (x) = a0 ex whenever Df (x) = f (x).1. S = 1−x (1 − x)2 P an xn and g(x) = n≥0 ak bn−k . Proposition 5. P xn equals n≥0 2. let us look at some important examples. Then the formal differentia- Df (x) = a1 + 2a2 x + · · · + nan xn−1 + · · · = X nan xn−1 . Determine a closed form expression for P n≥0 nxn ∈ P(x). Then xS = x2 + 2x3 + 3x4 + · · · . whenever Df (x) = 0. Also.1). recall that the formal power series 1. one needs k=0 Hence.10.8 (Differentiation). the closed form expression is . P n 1 1 Solution: As = x . for any N ≥ 1. Let f (x) = P n≥0 an xn ∈ P(x). a constant. to get cn =   n P 1 n bk = 1. we omit the proof. n≥1 With the definitions as above. . That is. the following proposition can be easily proved. k=0 Solution: Recall that the Cauchy product of f (x) = P xn . . (1 − x)2  1 1−x  =D P xn n≥0 ! = P nxn−1 .3. Using the generalized binomial theorem (see Theorem 2.1. denoted Df (x). Thus.1. Let f (x) = P n≥0 an xn ∈ P(x). Example 5. Therefore. Then f (x) = a0 .9. Before proceeding further. n≥0 (1 − x)S = x + x2 + x3 + · · · = x(1 + x + x2 + · · · ) = 4. So. (1 − x)r 3. where the above results can be used. 1−x n+r−1 n x n equals 1 . P n≥0 1 . n≥0 This can also be computed as follows: P Let S = nxn = x + 2x2 + 3x3 + · · · . GENERATING FUNCTIONS AND ITS APPLICATIONS Definition 5. n P x x . the Cauchy product helps us in computing the sum of the first N coefficients of a formal power series. ak = cn = [x ] f (x) · . one has =D 1 − x n≥0 (1 − x)2 x Thus. Determine n P ak . is defined by an xn ∈ P(x). Hence. for n ≥ 0. Let f (x) = P n≥0 tion of f (x). 4       N X x(1 + x) 1 1 1 2 N N −1 N −2 k = [x ] · = [x ] + [x ] (1 − x)3 1 − x (1 − x)4 (1 − x)4 k=1     N −1+4−1 N −2+4−1 = + N −1 N −2 N (N + 1)(2N + 1) = .2) Thus. using the (1 − x)2 kxk = k≥0 differentiation operator. So.   1 k−1 Solution: Using Example 5. k=1 . observe that k = [x ] .1.10. we observe that we can inductively use this technique to get a closed form expression N P for kr . Determine the sum of the squares of the first N positive integers. k=1 Solution: Using Equation (5.10.1. Determine a closed form expression for N P k3 .4   N X x(1 + 4x + x2 1 k3 = [xN ] · (1 − x)4 ) 1−x k=1       1 4 1 N −1 N −2 N −3 = [x ] + [x ] + [x ] (1 − x)5 (1 − x)5 (1 − x)5       N −1+5−1 N −2+5−1 N −3+5−1 = +4 + N −1 N −2 N −3  2 N (N + 1) = . observe that P x . Therefore.10. for any positive integer r. by Example 5. 2 3 N −1 (1 − x) 1 − x (1 − x) 2 k=1 6.1.3. using (1 − x)2 Example 5. Determine a closed form expression for N P k2 . 6 7.1. FORMAL POWER SERIES 5. k=1 Solution: Using Example 5.10.2. one has     N X 1 1 1 N −1+3−1 N (N + 1) N −1 N −1 k = [x ] · ] = = = [x .1. 2 Hence. Therefore. (1 − x)3 (5. one obtains    X X k 2 xk = x  k2 xk−1  = xD k≥0 k≥0 x (1 − x)2  = x(1 + x) . (1 − x)4 Thus.2). by Example 5.10.4. observe that P k 2 xk = k≥0 X k≥0 3 k  k x = x X k≥0  3 k−1  k x = xD  x(1 + x) (1 − x)3 x(1 + x) . (1 − x)3  = x(1 + 4x + x2 ) .1.97 5. Therefore. recall that the series ex = . Determine a closed form expression for one needs to find a convergent series. 8. n! . converges for all x ∈ R and n≥0 n! P 1 n evaluating ex at x = 1. Thus. which when evaluated at some x0 . gives the required P xn expression. gives = e. Cauchy product cannot be used.98 CHAPTER 5. = [xn ] (xD(ex )) = [xn ] (xex ) and n! n! n≥0  n2 = [xn ] (xD(xDex )) = [xn ] (x + x2 )ex . n! n≥0 Solution: As we need to compute the infinite sum. Similarly. GENERATING FUNCTIONS AND ITS APPLICATIONS P n2 + n + 6 . Also. X n2 + n + 6 . 2 x x x. = (x + x )e + xe + 6e . 11. one needs to consider the forP ki 1 mal power series x that equals . for non-negative integers xk ’s. n! x=1 n≥0 9. Similarly.1. where r = x1 +x2 +· · · +xn . Then determine the number of non-negative integer solutions to the system x1 + x2 + · · · + xn = r? Solution: Recall that this number was already computed in Lemma 2. we can think of the problem as follows: the above system can be interpreted as coming from the monomial xr . Then determine the number of non-negative integer solutions to the system x1 + 2x2 + · · · + nxn = r? Solution: Note that using the ideas in Example 5. r In this chapter. x4 ≤ 10 gives the formal power k≥4 . we are interested in getting a formal power series and then its coefficients give the answer to the questions raised. (1 − y)(1 − y) · · · (1 − y) (1 − y)n r We now look at some examples that may require the use the package “MATHEMATICA” or “MAPLE” to obtain the exact answer. P i 1 Now. = 9e. Determine the number of solutions in non-negative integer to the system x1 +x2 +· · ·+x5 = n such that x1 ≥ 4. in the examples that we give below. the problem reduces to finding the coefficients of y xk of a formal power series.2 and equals r+n−1 .1. forcing P k us to look at the formal power series x . 1 − y i≥0 Hence. recall that the terms y xk appear with a coefficient 1 in the expression = y. 4. the question reduces to computing     1 1 r+n−1 r r [y ] = [y ] = . Solution: Note that the condition x1 ≥ 4 corresponds to looking at xk . xr is a multiple of r.1. 1.9. (1 − x)(1 − x2 ) · · · (1 − xn ) 2. Example 5.10. That is. x4 ≤ 10 and for r 6= 1. So. Let n and r be two fixed positive integers. the question reduces to computing the 1 − xk i≥0 coefficient of xr in 1 . Let n and r be two fixed positive integers. Hence. for k ≥ 4. Determine the number of ways in which 100 voters can cast their 100 votes for 10 candidates such that no candidate gets more than 20 votes. we are interested in computing the coefficient of xn in the product k≥0   X k≥4  xk · 10 X k=0 ! xk · X k≥0  x2k · X k≥0  x3k · X k≥0  x5k  = x4 (1 − x11 ) . Determine the number of ways of putting r indistinguishable balls into n distinguishable boxes so that the number of balls in each box is a number between m and 2m (endpoints included)? 3.99 5.12. gives the formal power xrk . What is the coefficient of xr in the formal power series xmn (1 − xm+1 )n ? (1 − x)n Before moving to the applications of generating functions/formal power series to the solution of recurrence relations. Then prove that the following problems are equivalent? 1. . we need to find the coefficient of x100 in 20 X k=1 xk !10 = (1 − x21 )10 = (1 − x)10   10 X i 10 (−1) x21i i i=0     4 X 109 − 21i i 10 (−1) · . Determine the number of solutions in non-negative integer to the system x1 + x2 + · · · + xn = r. 4. Solution: Note that we are assuming that the voters are identical. with 0 ≤ xi ≤ 20. So. = i 9  !  X 10 + j − 1 · xj  j j≥0 i=0 Exercise 5. let us list a few well known power series. (1 − x)2 (1 − x2 )(1 − x3 )(1 − x5 ) 3. So. for r 6= 1.1. FORMAL POWER SERIES series series 10 P k=0 P xk and the condition xr is a multiple of r. and r be fixed positive integers. with m ≤ xi ≤ 2m? 2. The readers are requested to get a proof of their satisfaction. So. Let m. we need to solve the system in non-negative integers to the system x1 + x2 + · · · + x10 = 100.1. for 1 ≤ i ≤ 10. n. 100 CHAPTER 5. Hence or otherwise find a formula for the numbers f (n). xk . for n ≥ 1 with a(0) = 1. P Solution: Define A(x) = a(n)xn . |x| < 1 |x| < 1 P (−1)r x2r+1 r≥0 (2r + 1)! P x2r+1 r≥0 (2r + 1)! = 1 1−x 1 √ 1 − 4x xn (1 − x)n+1 xk .2 Applications to Recurrence Relation This section contains the applications of generating functions to solving recurrence relations. Thus. |x| < 1 − k≥0 = P k≥0 = P k≥0 cos(x) = cosh(x) = √ 2k k n k   xk . (1 − x)2 1 + x2 5 1 1 = − − . Example 5. |x| < 2x k+1 k 4 k≥0 √  n X 2k + n 1 1 1 − 1 − 4x √ = xk . 1. |x| < .1. 2x k 4 1 − 4x 1− k≥0 5.10. n ≥ 0.2. Determine a generating function for the numbers f (n) that satisfy the recurrence relation f (n) = f (n − 1) + f (n − 2). . |x| < 1 a+k−1 k k≥0 P log(1 − x) = P xk .3. Determine a formula for the numbers a(n)’s. GENERATING FUNCTIONS AND ITS APPLICATIONS ex = (1 + x)a = 1 (1 − x)a x−r (1 − x)n P xk k≥0 k! P a k r≥0 = P = k≥−r sin(x) = sinh(x) =  n r+k  xk . one has n≥0 A(x) = X a(n)xn = a0 + n≥0 = 3x X n≥1 So. where a(n)’s satisfy the recurrence relation a(n) = 3 a(n − 1) + 2n. |x| < 1 k≥1 k P k x . |x| < 1 4 xn . Let us try to understand it using the following examples. for n ≥ 2 with f (0) = 1 and f (1) = 1.1. |x| < 1 P (−1)r x2r (2r)! r≥0 P x2r r≥0 (2r)! X 1 2k  1 1 − 4x = xk . Then using Example 5. 2 (1 − 3x)(1 − x) 2(1 − 3x) 2(1 − x) (1 − x)2 a(n) = [xn ]A(x) = 5 n 1 5 · 3n − 1 3 − − (n + 1) = − (n + 1). A(x) = X a(n)xn = 1 + n≥1 a(n − 1)x n−1 +2 X n≥1 X n (3 a(n − 1) + 2n) xn nx + 1 = 3xA(x) + 2 n≥1 x + 1. 2 2 2 2. A(x) = X X an−2 x (3 a(n − 1) + 4 a(n − 2)) xn n−2 n≥2 1 + (c − 3)x 1 + (c − 3)x = . If a pair of rabbits starts giving birth to a pair of rabbits as soon as they grow 2 years old. 5 5 (a) If c = 4 then A(x) = . where a(n)’s satisfy the recurrence relation a(n) = 3 a(n − 1) + 4a(n − 2).2. we observe that f (n) ≈ √ 5 √ !n+1 1+ 5 . 1 − 4x 1+c 1 4−c 1 (b) If c 6= 4 then A(x) = · + · and hence 5 1 − 4x 5 1+x n n (1 + c) 4 (−1) (4 − c) an = [xn ] A(x) = + . The numbers f (n).2. APPLICATIONS TO RECURRENCE RELATION P Solution: Define F (x) = f (n)xn .2. for n ≥ 0 are called Fibonacci numbers. a constant. Then one has n≥0 F (x) = X f (n)xn = 1 + x n≥0 X n≥2 = 1+x+x X n≥2 (f (n − 1) + f (n − 2)) xn f (n − 1)xn−1 + x2 X n≥2 f (n − 2)xn−2 = 1 + xF (x) + x2 F (x). 2 (1 − 3x − 4x ) (1 + x)(1 − 4x) 1 and hence an = [xn ] A(x) = 4n . 2 Remark 5. 5 n≥0 1 As β < 0 and |β| < 1. determine the number of rabbits the couple will have in the year 2025. 1 − αx 1 − βx 5 5 n≥0 n≥0 Therefore. So. Determine a formula for the numbers a(n)’s.101 5. F (x) = and β = .  1 X n+1 f (n) = [xn ]F (x) = √ α − β n+1 . It is related with the following problem: Suppose a couple bought a pair of rabbits (each one year old) in the year 2001. Then it can be checked 1 − x − x2 2 2 2 that (1 − αx)(1 − βx) = 1 − x − x and     X X 1 α β 1 F (x) = √ − =√  αn+1 xn − β n+1 xn  . P Solution: Define A(x) = a(n)xn . 3. Let α = Therefore. for n ≥ 2 with a(0) = 1 and a(1) = c. Then n≥0 A(x) = X a(n)xn = a0 + a1 x + n≥0 = 1 + cx + 3x X a(n)xn = 1 + cx + n≥2 X n≥2 a(n − 1)x n−1 n≥2 + 4x 2 = 1 + cx + 3x(A(x) − a0 ) + 4x2 A(x). √ √ 1+ 5 1 1− 5 . using initial conditions. m) = f (n − 1. Equation (5. a(n)xn . Then. Solution: Define A(x) = P n P k=0 a(k)a(n − k) = n+2 2 . m) = 0. m ∈ Z. Gm (y) = . n. m)xm = m≥0 = X X m≥0 m m≥0 f (n − 1. 0) = 1.1) gives m≥0 Fn (x) = X f (n. Determine a generating function for the numbers f (n. m)y n = X n≥0 n≥0 X f (n − 1. A(x) = 1 (1−x)3/2 k=0 ! a(k)a(n − k) xn = −3/2 n and thus a(n) =  = X n + 2  n≥0 2 xn = 1 . P Method 1: Define Fn (x) = f (n. m − 1)) y n X n≥0 f (n − 1. Now. m) = 0. for all n ≥ 0 and f (0.   n m n f (n. m Method 2: Define Gm (y) = P n≥0 Gm (y) = = X f (n. for all n ≥ 1. m) + f (n − 1. m) + f (n − 1. y 1 Gm−1 (y). m − 1)xm = Fn−1 (x) + xFn−1 (x) = (1 + x)Fn−1 (x) = · · · = (1 + x)n F0 (x). GENERATING FUNCTIONS AND ITS APPLICATIONS 4. m). m)y n . for m > n. (n. Determine a sequence. one has n≥0 n X X 2 A(x) = n≥0 Hence. for m ≥ 1. {a(n) ∈ R : n ≥ 0}. m − 1)y n = yGm (y) + yGm−1 (y). such that a0 = 1 and for all n ≥ 1. Therefore. m) + f (n − 1. 2n n! 5. m)xm . Now. m) = 0. n. using the Cauchy product. m)y n + n≥0 (f (n − 1. m ≥ 0 that satisfy f (n. Then. m) 6= (0. m) = [x ](1 + x) = if 0 ≤ m ≤ n and f (n. G0 (y) = and 1−y 1−y  ym ym 1 n n] n−m ] hence Gm (y) = .1) gives f (n.1) f (n. m − 1). 0) with (5. Thus. Then. (1 − x)3 3 · 5 · 7 · · · (2n + 1) . m) = [y = [y = m . find a formula for the numbers f (n. f (n. for n ≥ 1. for all m > 0. Solution: Note that in the above recurrence relation. Hence or otherwise. Equation (5. (1 − y)m+1 (1 − y)m+1 (1 − y)m+1 whenever 0 ≤ m ≤ n and f (n. Thus. for m > n. m − 1)) xm X m≥0 f (n − 1. using the initial conditions. F0 (x) = 1 and hence Fn (x) = (1 + x)n . m). the value of m need not be ≤ n. m)x + (f (n − 1.102 CHAPTER 5. m) = m 1 P (−1)k (m − k)n m! k=1 (5. But it is helpful in showing that the numbers S(n. m ∈ Z. APPLICATIONS TO RECURRENCE RELATION 6. n. m) = mS(n − 1. m ≥ 0 that satisfy S(n. m) = 0. S(n. Observation: (a) Hn (x) = P S(n.2) S(0. n. m). S(n. (1 − y)(1 − 2y) · · · (1 − my) 1 − ky (5. Then. The above expression was already obtained earlier (see Equation (2.103 5. But verify that m≥0 Hn (x) = (x + xD)n · 1 as H0 (x) = 1. Using initial conditions. . Hence or otherwise find a formula for the numbers S(n. The same  n holds for the sequence of binomial coefficients m . m)y n + X n≥0 S(n − 1.1) and Exercise 6). m)y n = n≥0 = m X n≥0 X n≥0 (mS(n − 1. for all n > 0 and S(0. 0) = 0. m − 1)) y n S(n − 1. 1. first increase and then decrease (commonly called unimodal). This identity is generally known as the Stirling’s Identity. m) = m P (−1)k (m − k)n k=1 m k . n . m)xm is not considered.2) gives n≥0 X Gm (y) = S(n. · · · .2.3) k=1 (−1)m−k km . P Solution: Define Gm (y) = S(n. 0) = 1. Hence. m). for m ≥ 1. m − 1). for fixed n. . Gm (y) = ym Gm−1 (y). Therefore. H1 (x) = x. H2 (x) = x + x2 . (n. for 1 ≤ k ≤ m. . . 0) with (5. m). m)y n . . Equation (5. m! k m! k k=1 = k=1 m X (−1)m−k kn k=1 k=1 Therefore. Determine a generating function for the numbers S(n. m − 1)y n = myGm (y) + yGm−1 (y). m) 6= (0. G0 (y) = 1 and hence 1 − my m Gm (y) = X αk ym = ym . m) + S(n − 1. m) = [y ] y = 1 − ky 1 − ky where αk = k=1 = m X αk kn−m = k! (m − k)!     m m 1 X 1 X m−k n m k n m (−1) k = (−1) (m − k) . Therefore. k! (m − k)! ! m m X X αk αk n m [y n−m ] S(n. m = 0. it is difficult to obtain a general formula for its coefficients. m) + S(n − 1. Thus.4) k=1 m k and m! S(n. for all m > 0. m P (−1)m−k kn−1 Hence. Thus. (n − 1)! (n − 1)! m! n! (n − 1 − m)! m! m=0 n≥1 m≥0 n≥0 . Therefore.1. Now. m).5).5) k≥1 kn . Now. by definition. m) = k≥1 m≥k m=1 X m≥1 m XX (−1)m−k kn−1 S(n. GENERATING FUNCTIONS AND ITS APPLICATIONS (b) Since there is no restriction on the non-negative integers n and m.1. But. we know that S(n. for n ≥ 1. n}. k! (m − k)! e k! (5. for of partitions of the set {1. if B(x) = n! n≥0 As. in this case. verify that = 0. b(0) = 1. is the number n P S(n. . b(n) has terms of the form B(x) = 1 + X n≥1   X 1 X k n xn xn   b(n) =1+ n! e k! n! n≥1 k≥1 1 X 1 X (kx)n 1 X 1 X n xn k =1+ = 1+ e k! n! e k! n! n≥1 n≥1 k≥1 k≥1    1 X 1  kx 1 X (ex )k 1 = 1+ e −1 = 1+ − e k! e k! k! k≥1 Recall that ee x −1 k≥1  1 ex x = 1+ e − 1 − (e − 1) = ee −1 . m) = 0. after cross multiplication and an xn n≥0 (n − 1)! b(n) n! n≥0 multiplication with x.6). one has Ln b(n) = ex − 1. denoted b(n). b(n) = n X S(n. implies     n m n X b(n)xn X X X x x   x = xex b(n) = x · b(n)  . . the nth Bell number. differentiation with respect to x n! n≥0 P 1 xn−1 gives P · b(n) = ex . m) = (k − 1)! (m − k)! m≥1 k=1 X kn X (−1)m−k 1 X kn = = . k=1 (k − 1)! (m − k)! 7.    n−1 n m n X X X b(n) b(n)x x  x  X 1 b(m) n n  = [x ] = [x ] x · b(n) = · . 2.9). we compute its exponential generating function (see k! P xn b(n) then Exercise 2. Bell Numbers: For a positive integer n. whenever n < m. Therefore.6) is a valid formal power series (see Remark 5. e (5. let us derive the recurrence relation for b(n)’s.104 CHAPTER 5.4) is also valid for n < m. b(n) = m=1 n ≥ 1 and by convention (see Stirling Numbers). .20. . Thus. (n − 1)! n! m! n! n≥1 n≥0 m≥0 n≥0 Thus. Taking ! the natural logarithm on both the sides of EquaP xn tion (5. the expression Equation (5. Qn = Pn−1 . Clearly Q1 = 1. Thus. if we take P0 = Q1 = 1. Hence. it follows that b(n) = n−1 P m=0  b(m). Let Pn denote the arrangements of those n pairs of parentheses that satisfy “at any stage. one has n n P P P Pn = Qk Pn−k = Pk−1 Qn−k . Also. using P0 = 1. Then. Note that. n−1 m 8. Qn = Pn−1 . Hence. 1 ≤ k ≤ n. Let n ≥ 2 and consider an element of Pn . any element of Qn . for k < n. Determine the number of ways of arranging n pairs of parentheses (left and right) such that at any stage the number of right parentheses is always less than or equal to the number of left parentheses. So. In a similar way. define P (x) = Pn xn . xP (x)2 − P (x) + 1 = 0 and P (x) = 1± √ 1 − 4x . for n ≥ 2.105 5. We now claim that Qn = 1 and for n ≥ 2. let Qn denote those elements of Pn for which. the number of right parentheses is always less than or equal to the number of left parentheses”. “at the 2k-th stage.2. Let us obtain a recurrence relation for these numbers and use it to get a formula for Cn ’s. for n ≥ 2. for n ≥ 1 with b(0) = 1. necessarily starts with two left parentheses and ends with two right parentheses. the first k pairs of parentheses will form an element of Qk and the remaining (n − k) pairs of parenthesis will form an element of Pn−k . for some k. one obtains an element of Qn . Then k=1 n≥0 k=1 P (x) = X n Pn x = 1 + n≥0 X n Pn x = 1 + n≥1 n X X n≥1 k=1 Pk−1 Qn−k ! xn     X X X = 1 + x Pk−1 xk−1 Pn−k xn−k  = 1 + x P (x) Pk−1 xk−1  k≥1 n≥k k≥1 = 1 + x (P (x))2 . the number of left parentheses is strictly greater than the number of right parentheses”. Solution: Recall that this number equals Cn . one 2x . the nth Catalan number (see Page 44). if we remove the first left parenthesis and the last right parenthesis then one obtains as element of Pn−1 . if we add one left parenthesis at the beginning and a right parenthesis at the end of an element of Pn−1 . APPLICATIONS TO RECURRENCE RELATION Hence. Now. Therefore. Let a(0) = a(1) = 1 and let a(n) = a(n − 1) + (n − 1)a(n − 2). . for n ≥ 2. k)’s and hence determine the value of f (n. Exercise 5. k) denote the number of k-element subsets that can be selected from the set {1. Compute the P xn exponential generating function A(x) = a(n) . In each of the following. . . . Let f (n. Hence or otherwise. . To do so. 2. . Determine a recurrence relation for f (n. Let a(0) = 1 and let n P k=0 5. Hence. . Let g(n. 9 that do not have two consecutive appearances of 9’s. obtain a recurrence relation for the numbers an ’s. for all n ≥ 1. 1. Suppose the numbers {1. 2. 2x √  1 [xn ]P (x) = · [xn+1 ] 1 − 1 − 4x  2     1 1 1 1 −1 − 2 ··· −n 1 2 2 2 2 − · (−4)n+1 2 (n + 1)! 1 · (−1) · (−3) · (−5) · · · (1 − 2n) 1 · 3 · 5 · · · (2n − 1) 2(−4)n · = 2n n+1 2 (n + 1)! (n + 1)!   1 2n . Applications to Generating Functions The ideas learnt in the previous sections will be used to get closed form expressions for sums arising out of binomial coefficients.3. Find a recurrence relation for g(n. compute a(n)’s. k). 2. (b) Let an denote the number of sequences of length n that consist of the digits 0. . 3.] 4. . 2. the climber climbs either one stair or two stairs. recall the list of formal power series that appear on Page 100. Hence or otherwise. (c) Let an denote the number of ways in which a person can spend n rupees to buy either a toffee worth 1 rupee or a chocolate worth 2 rupees or an ice-cream worth 3 rupees. n} that do not contain two consecutive integers.2. k). k) denote the number of k-element subsets that can be selected from this round table with the condition that no two consecutive integers appear. k) = f (n − 1. (a) Let an denote the number of ways of climbing a staircase in which “at each step. . k) + f (n − 3. Determine the sequence a(n). . determine a formula for the an ’s. n+1 n We end this section with a set of exercises. the nth Catalan Number.106 CHAPTER 5. GENERATING FUNCTIONS AND ITS APPLICATIONS obtains P (x) = Pn = = = = 1− √ 1 − 4x . . [Hint: g(n. n! n≥0 5. n} are arranged in a round table. k − 1).3 a(k)a(n − k) = 1. 1. k)’s and hence determine the value of g(n. . n≥0     X X k  X k    xn =  A(x) = a(n)xn = xn  n−k n−k n≥0 n≥0 k≥0 k≥0 n≥0   X X X k  X k 1 k x(1 + x) = = x xn−k  = xk (1 + x)k = . 1 − xy 1 − −y2 1 − xy + y 2 (1 − αy)(1 − βy) 1−xy √ √ x2 − 4 x − x2 − 4 and β = . y) = a(n. Thus. Then Example 5. Example 5. x) − a(n − 2.2. 2 2   1 1 α β n − a(n. the n-th 1 − x(1 + x) ⌊n ⌋ 2 P 2. x) = xa(n − 1. Then n−k k  (−1)k xn−2k .107 5. = √ − 2 2 2 x −4 n n Since α and β are the roots of y 2 − xy + 1 = 0. verify that the a(n. APPLICATIONS TO GENERATING FUNCTIONS P 1.3.4. Find a closed form expression for the numbers a(n) = k≥0 P Solution: Define A(x) = a(n)xn . n−k 1 − x(1 + x) X X k≥0 n≥k k≥0 k≥0 Therefore. y) = a(n. x)y n = (−1)k xn−2k  y n k n≥0 n≥0 k=0   X n − k  X = (−1)k y 2k  (xy)n−2k  k k≥0 n≥2k   X t X = (−1)k y 2k (xy)−k  (xy)t  k X X k≥0 t≥k X = (−y 2 )k (xy)−k k≥0 = where α = x+ X  −y 2 k (xy)k 1 = · (1 − xy)k+1 1 − xy 1 − xy k≥0 1 1 1 1 · = = . x). x) = [y ]A(x.1. k n−k  .3. α2 = αx − 1 and β 2 = βx − 1. y) = [y ] = [y ] 1 − xy + y 2 α − β 1 − αy 1 − βy  1 αn+1 − β n+1 = α−β  !n+1 !n+1  √ √ 2 2 1 x− x −4  x+ x −4 . x) = k=0 P Solution: Define A(x. for n ≥ 2. . x) = 1 and a(1. Therefore. 1 = Fn . x)’s satisfy the recurrence relation a(n.2 implies a(n) = [xn ]A(x) = [xn ] Fibonacci number. n≥0  n  ⌊2⌋   X n−k  A(x. Find a closed form expression for the polynomials a(n. x)y n . x) = x. with initial conditions a(0. otherwise. GENERATING FUNCTIONS AND ITS APPLICATIONS Let A = (aij ) be an n×n matrix. x−1 k=0 (c) Hence. It can be verified that if a(n.7) gives the identity n ⌊2⌋    X n − 2k k n−k (−1) = k m−k k=0 (d) Substituting x = 1 in (5. y) = k≥0 P a(n. n−k n−2k k 2 if 0 ≤ m ≤ n. x)’s satisfy the above recurrence relation. for 1 ≤ i ≤ n − 1. P 3. = n + 1. . −2) = [xn ] = (−1)⌈n/2⌉ . Then x2 − 4 = z − and we obtain a(n. equating the coefficient of xm in (5. Or equivalently. 2x)’s are also known as Chebyshev’s polynomial of second kind. . Hence. Then A is an adjacency matrix of a tree T on n vertices. the characteristic polynomial of A. z + 1z ) = 2 . y) = X n≥0 =  X n + k  k≥0 X  y k k≥0 =  x 2k y  k n x = X  y k X n + k x k≥0 X x2k 1 = 2k+1 (1 − x) 1−x 1−x . The polynomials a(n. n with the vertex i being adjacent to i + 1. 0. . (1 − x)2 − xy k≥0 n≥k yx (1 − x)2 2k k xn+k (a) Verify that if we substituting y = −2 then X n + k 1−x (−2)k = [xn ] A(x. Let us now substitute different values for x to obtain different expressions and then use them to get binomial identities.7) gives ⌋ ⌊n 2 P (−1)k k=0 ( 1. y) = n+k k 2k y . z z (z − 1)z n n ⌊2⌋ 2n+2 − 1  P n−k k z + 1 n−2k = z (−1) we have .108 CHAPTER 5. 2. with aij = 1. otherwise. Then Solution: Define A(x. Determine the generating function for the numbers a(n. √ 1 1 z 2n+2 − 1 (a) Let x = z + . . 2k (1 + x2 ) k≥0 (5. whenever |i−j| = 1 and 0. k z (z 2 − 1)z n k=0 n ⌊2⌋   X n−k k k=0 n−2k 2k z 2n+2 − 1 z = (−1)k z 2 + 1 . n ⌊2⌋   X n−k k k=0 n (−1)k (x + 1)n−2k xk = xn+1 − 1 X k = x .7) . z2 − 1 (b) Writing x in place of z 2 . then a(n. x) = det(xIn − A). say 1. we obtain the following identity. y)xn . n≥0 A(x. B(x. This identity is popularly known as the (Reed Dawson’s Identity) k≥0 2. y) = √ spectively replace y with (a) (b) P k≥0 n 2k  n−k k k (−4) P n k n 2k  k k k y and 1 1 ·√ . n ∈ N and define a(n. if n = 0. (−1)k = (−1)m . −4) = [xn ] = (−1)n (2n + 1).3. 1. y) = y . 2 (1 − z)(1 − 4z) 3 1 − 4z 3 1 − z Hence.3. f (n) = [z n ]F (z) = 2 · 4n 1 22n+1 + 1 + = . APPLICATIONS TO GENERATING FUNCTIONS (b) Verify that if we substituting y = −4 then X n + k 1−x (−4)k = [xn ] A(x. Exercise 5. y)xn . ) = = · + · . y) a(n. y) = k k y . to obtain the following identities: 4 2  = 2n n . y) = b(n. (1 − x)m+1 . Then prove that P k≥0 k n+k  2k  (−1) m+2k k k+1 = n−1  m−1 . P m n+k k P m  n k 3. Then verify that n≥0 1 1 − 2z 2 1 1 1 F (z) = A(2z. if n > 0. b(n. P k≥0 m k  m k 4. n ∈ N. y) = n≥0 a(n. y)xn . k · m  (−2)k .109 5. Hence. y) = k k y k≥0 k≥0 P m m+n−k k P P and c(n. Let m. m n k k = [xn ] 1 . y) = P k≥0 P A(x. 2k  n−k = k (−2) ( n  n/2 . Compute A(x. Fix positive integers m. if n is even. 0. 0. Then prove that A(x. Let n be a non-negative integer and define a(n.5. 2k (1 + x)2 k≥0 (c) Let f (n) = n+k  n−k 2k 2 P k≥0 and let F (z) = P f (n)z n . Prove that = = [xn ] (1 + x)m+n = [xn ] (1 + x)m (x + 1)n = n P n+k m  n m k m+n k≥0 (e) m · · P k≥0 m+n−k  (−1)k m n+k m  = 1. y)xn to show the following: n≥0 (a) P k≥0 (b) P k≥0 (c) (d) k P k≥0 k P k≥0 (−1)k = m  n k k k 2 P k≥0 m k  · = P k≥0 m+n−k m m m+n−k . otherwise. y)xn k k n≥0 n≥0 k≥0 P and C(x. re1 − x − 4xy 1−x −1 −1 and . y) = c(n. 3 3 3 We end this chapter with the following set of exercises.  m+1 k m+n−k m  (−1)k = ( 1. . Determine whether or not the following statement is correct.   n X (−1)k+1 n k=1 k k = n X 1 k=1 k . Prove that P (−1)k k≥1 n k   k−1 m = (−1)m+1 . 7.110 CHAPTER 5. Determine the exponential generating function for the numbers a(n)’s that appeared in Exercise 14. GENERATING FUNCTIONS AND ITS APPLICATIONS 5. Notes: Most of the ideas for this chapter have come from book [8]. 6. Wiley-Interscience.Bibliography [1] J. Cofman. [5] R.117. 2th edition. 1999. Wilf. Springer. 108 . Undergraduate Texts in Mathematics. [3] William Dunham.. 2001. John Wiley and Sons. Euler. A. Published and Distributed by The Mathematical Association of America. 111 . Riordan. E. Generatingfunctionology. Combinatorics. P. Counting: The Art of Enumerative COmbinatorics. vol. Academic Press. Stanley. John Wiley and Sons. “Catalan Numbers for the Classroom?”. Enumerative Combinatorics. 1999. [7] R. Introduction to Combinatorial Analysis. I. 1958. New York. S. Cohen. Cambridge University Press. Math. Basic Techniques of Combinatorial Theory. Merris. [8] H. 1978. [4] G. 1990. 52 (1997). [2] D. The Master of Us All. Elem. 2. Martin. 2003. [6] J. New York.
Copyright © 2024 DOKUMEN.SITE Inc.