Counting Techniques Counting Techniques • Multiplication Principle (also called the Fundamental Counting Principle) • Combinations • Permutations • Number of subsets of a given set Multiplication Principle Suppose there are n different decisions and each decision has ri choices where i is some number from 1 to n. Then the overall total number of ways in which those n decisions can be made is the product r1 r2 r3 rn Examples • Suppose you have 7 different shirts, 5 different pairs of pants and 3 pairs of shoes. How many outfits are possible? • Suppose there are 10 questions on a multiple-choice exam and each question can be answered in 5 different ways (A, B, C, D or E). How many ways are there to complete the exam assuming every question is answered? Examples • Suppose you have 7 different shirts, 5 different pairs of pants and 3 pairs of shoes. How many outfits are possible? – Answer: 7*5*3=105 possible outfits • Suppose there are 10 questions on a multiple-choice exam and each question can be answered in 5 different ways (A, B, C, D or E). How many ways are there to complete the exam assuming every question is answered? – Answer: 510 9,765,625 ways to complete the exam. Combinations • The number of ways of choosing r distinct objects from n distinct objects is given by the formula n! nCr (n r )! r! • Note n! n (n 1) (n 2) 3 2 1 and 0! = 1 Examples • How many ways can 3 movies be chosen from a list of 5 movies? • A committee consists of 10 people. How many ways are there to form a coalition of 5 people from the committee? Examples • How many ways can 3 movies be chosen from a list of 5 movies? – Answer: 5 C3 5 4 3 10 3 2 • A committee consists of 10 people. How many ways are there to form a coalition of 5 people from the committee? – Answer: 10 C5 252 Permutations • The number of ways of selecting r distinct objects from n distinct objects and rearranging those r objects is given by the formula n! n Pr (n r )! Examples • Suppose there are 10 movies playing in the theater. How many ways are there of selecting and ranking your favorite 3? • There are 5 people in a coalition of voters. How many ways are there to rearrange those 5 people in distinct orderings? Examples • Suppose there are 10 movies playing in the theater. How many ways are there of selecting and ranking your favorite 3? – Answer: P 10 9 8 720 10 3 • There are 5 people in a coalition of voters. How many ways are there to rearrange those 5 people in distinct orderings? – Answer: 5! = 120 ways Number of Subsets • Given a set with n elements, the number of subsets of the given set is 2 n . • Examples: – Let A = {x, y, z}. How many subsets does A have? – Suppose a committee consists of 3 people. How many possible coalitions can be formed from this committee? Number of Subsets • Examples: – Let A = {x, y, z}. How many subsets does A have? • Answer: 23 8 subsets – Suppose a committee consists of 3 people. How many possible coalitions can be formed from this committee? • Answer: 2 8 3 coalitions