Discrete Mathematics with Applications MATH236 Dr. Hung P. Tong-Viet School of Mathematics, Statistics and Computer Science University of KwaZulu-Natal Pietermaritzburg Campus Semester 1, 2013 Tong-Viet (UKZN MATH236 Semester 1, 2013 1 / 27
Table of contents 1 Permutations 2 Counting permutations 3 Combinations Tong-Viet (UKZN MATH236 Semester 1, 2013 2 / 27
Permutations Inverses of Permutations To find the inverse of a permutation interchange the top and bottom rows of the matrix Re-order (if necessary the elements in the new first row The inverse of ( 1 2 3 2 3 1 is Tong-Viet (UKZN MATH236 Semester 1, 2013 3 / 27
Permutations Inverses of permutation ( 2 3 1 1 2 3 Reordering the top row into ascending order, we obtain: ( 1 2 3 3 1 2 Tong-Viet (UKZN MATH236 Semester 1, 2013 4 / 27
Permutations Multiplication of permutations Let and Then g f is f = g = g f = ( 1 2 3 2 1 3 ( 1 2 3 1 3 2 ( 1 2 3 3 1 2 Tong-Viet (UKZN MATH236 Semester 1, 2013 5 / 27
Power of permutations Permutations Let Then f 2 = f f is ( 1 2 3 f f = 2 1 3 f = ( 1 2 3 2 1 3 ( 1 2 3 2 1 3 = ( 1 2 3 1 2 3 A nontrivial permutation f is called an involution if f = f 1 or equivalently f 2 = 1 Tong-Viet (UKZN MATH236 Semester 1, 2013 6 / 27
Counting permutations Counting permutations We consider how to count permutations and similar mathematical objects How many permutations of the set S = {a, b, c} are there? Tong-Viet (UKZN MATH236 Semester 1, 2013 7 / 27
Counting permutations Counting permutations (cont. Think of each permutation on S as a 3-tuple (f (a, f (b, f (c The question then becomes: How many such 3-tuples are there? Notice that all the values f (a, f (b and f (c are pairwise disjoint since f is one-to-one First of all, f (a can take any values on {a, b, c} For each choice of f (a, there are only two choices left for f (b Finally, for each choice of f (b, there is only one possibility for f (c By the Multiplication Principle, the total number of such 3-tuples is 3 2 1 = 6 Tong-Viet (UKZN MATH236 Semester 1, 2013 8 / 27
Counting permutations Factorial Definition Let n be a positive integer. The n factorial function is the function with the rule 0! = 1 and for n 1, n! = 1 2 3 (n 1 n Tong-Viet (UKZN MATH236 Semester 1, 2013 9 / 27
Counting permutations How many permutations of an n-set are there? An n-set is a set containing n elements Suppose that the elements of the n-set are x 1, x 2,, x n We consider each permutation to be an n-tuple (f (x 1, f (x 2,, f (x n We have n choices for f (x 1 Once we re chosen f (x 1, there are (n 1 possible choices for f (x 2 there are (n 2 choices for f (x 3 and so on. So, the number of permutations of an n-set is n(n 1(n 2 2 1 = n! Tong-Viet (UKZN MATH236 Semester 1, 2013 10 / 27
Counting permutations The number of k-tuples How many k-tuples can be chosen from an n-set if repetition of elements is not allowed? We consider the k-tuple (x 1, x 2,, x k There are n possible choices for the first position Once we ve chosen x 1, there are n 1 choices for x 2 Once we ve chosen x 2, there are (n 2 choices for x 3 When we reach the kth position, there are n (k 1 = n k + 1 possibilities By the Multiplication Principle, the number of such k-tuples is thus n(n 1(n 2 (n k + 2(n k + 1 Tong-Viet (UKZN MATH236 Semester 1, 2013 11 / 27
Counting permutations There are 6 5 4 = 120 3-tuples from a set of 6-elements Definition Let n and k be positive integers with 1 k n. The expression (n k = n(n 1(n 2 (n k + 1 = The quantity (n k is called a falling factorial n! (n k! Tong-Viet (UKZN MATH236 Semester 1, 2013 12 / 27
Counting permutations Number of words How many six-letter words can be formed from the letters a, b, c, d, e, f, g, h, i, where each letter can be used only once? Each word corresponds to a 6-tuple The question becomes: How many 6-tuples can be formed from a set of 9 elements The answer is (9 6 = 9! (9 6! = 60480 Tong-Viet (UKZN MATH236 Semester 1, 2013 13 / 27
Counting permutations In how many ways can a President, Vice President and Secretary be elected from a group of 15 peple? We need to know how many 3-tuples of the form (President, Vice-President, Secretary there are The answer is (15 3 = 15! (15 3! = 2730 Tong-Viet (UKZN MATH236 Semester 1, 2013 14 / 27
Counting permutations In how many different ways can the 26 letters of the alphabet be arranged so that no two of the vowels a, e, i, o, u occur in consecutive positions? There are 21 consonants Firstly, ignoring all the vowels There are 21! ways of arranging the consonants Tong-Viet (UKZN MATH236 Semester 1, 2013 15 / 27
Counting permutations Once we re arranged the consonants, we must place the vowels in the 22 holes between, before and after the consonants Also, whichever hole we place one vowel in, we cannot place any of the others in the same hole Thus, once the consonants have been arranged, there are (22 5 ways of distributing the vowels. By the Multiplication Principle, the number of ways of arranging all the letters is 21!(22 5 = 21! 22! 17! Tong-Viet (UKZN MATH236 Semester 1, 2013 16 / 27
Combinations Combinations Definition Let n, k be nonnegative integers with k n. We define n choose k to be the quantity ( n = k n! (n k!k! = (n k k! The quantity ( n k is also called a binomial coefficient. ( 6 = 4 6! (6 4!4! = 15 Tong-Viet (UKZN MATH236 Semester 1, 2013 17 / 27
Combinations ( n 0 = n! n!0! ( = 1 n 1 = n! (n 1!1! = n = n! ( n 2 ( n n 1 ( n n (n 2!2! = n(n 1 2 = n! 1!(n 1! = n = n! 0!n! = 1 Tong-Viet (UKZN MATH236 Semester 1, 2013 18 / 27
Binomial equality Combinations Theorem Let n, k be nonnegative integers with k n. Then ( ( n n = k n k Proof. ( n = k = n! (n k!k! = n! n! (n (n k!(n k! = (n k!(n (n k! ( n n k Tong-Viet (UKZN MATH236 Semester 1, 2013 19 / 27
Combinations Binomial Binomial coefficients play several important roles in mathematics Recall that a k-subset is a subset of cardinality k Let T (n, k be the set of all k-tuples chosen from the set {1, 2,, n} Let S(n, k be the set of all k-subsets of {1, 2,, n} Define the function f : T (n, k S(n, k by f ((x 1, x 2,, x k = {x 1, x 2,, x k } Tong-Viet (UKZN MATH236 Semester 1, 2013 20 / 27
Combinations The number of k subsets of an n-set Theorem Let n, k be nonnegative integers with k n. The number of k-subsets of an n-set is ( n k. Proof. Notice that for each k-subet S of S(n, k, there are exactly k! k-tuples T with f (T = S It follows that We know that T (n, k = (n k The result follows. T (n, k = k! S(n, k Tong-Viet (UKZN MATH236 Semester 1, 2013 21 / 27
Combinations In how many different ways can three representatives be chosen from a group of 15 people? As the 3-tuple (Paul, Tom, Adam is the same as (Tom, Adam, Paul The three representatives are unordered and thus this is a subset rather than a tuple Thus the answer is ( 15 3 = 455. Tong-Viet (UKZN MATH236 Semester 1, 2013 22 / 27
Pascal s Identity Combinations Theorem Let n, k be positive integers with k n 1. Then ( ( ( n n 1 n 1 = +. k k 1 k Proof. We use a combinatorial proof Let N be the number of k-subsets of of the set S = {1, 2,, n}. We know from previous theorem that N = ( n k Tong-Viet (UKZN MATH236 Semester 1, 2013 23 / 27
Pascal s Identity (cont Combinations Proof. We now count the number of k-subsets of S in a different way Let N 1 be the number of k-subsets of S that always contain the number 1 Let N 2 be the number of k-subsets of S that always do not contain the number 1 Clearly N = N 1 + N 2 Now each set that contributes to N 1 contains the number 1 and k 1 other elements chosen from the (n 1-set {2, 3,, n} Hence N 1 = ( n 1 k 1 Tong-Viet (UKZN MATH236 Semester 1, 2013 24 / 27
Pascal s Identity (cont. Combinations Proof. Each subset that contributes to N 2 does not contain 1, so it is a set of k-elements chosen from the (n 1-set {2, 3,, n}. Thus, N 2 = ( n 1 k Therefore, ( ( n 1 n 1 N = + k 1 k Tong-Viet (UKZN MATH236 Semester 1, 2013 25 / 27
Combinations The number of subsets of a set Theorem Let n be a nonnegative integer. Then ( ( ( n n n + + + = 2 n. 0 1 n Proof. If n = 0, then both sides equal 1, so we assume that n 1. We use a combinatorial proof again. Consider the set S = {1, 2,, n} Let N be the number of subsets of S. Tong-Viet (UKZN MATH236 Semester 1, 2013 26 / 27
Proof Combinations Proof. We know that N = 2 n We now determine N in a different way For each k {0, 1, 2,, n} denote by N k the number of k-subsets of S N = N 0 + N 1 + + N n We know that N k = S(n, k = ( n k Thus ( ( n n N = + + + 0 1 ( n n Tong-Viet (UKZN MATH236 Semester 1, 2013 27 / 27