advertisement

MATH 109 Counting Techniques A fundamental practice in mathematics is determining the number of ways a certain outcome may occur. For example, when you roll two dice, how many ways are there to obtain a sum of seven? When you deal five cards from a shuffled deck, how many possible hands can be dealt? The area of mathematics that deals with counting techniques is called combinatorics. The original purpose for the development of counting techniques was to determine the appropriate odds, payoffs, and expected earnings for games of chance. As applied to casinos and lotteries, this use of counting is still one of the most common applications of combinatorics. We shall begin our study of counting with two fundamental principals. The Principal of Choice Let A be a set with N distinct objects. Then there are N possible ways to choose exactly one object from set A . If we allow ourselves the additional choice of not choosing an object, then there are N + 1 possible choices. If we choose one object at random from set A so that each object is equally likely to be chosen, then the probability of choosing any single object is 1 / N . Example 1. Suppose you have 41 pairs of shoes and you are trying to decide what to wear. (a) In theory, how many choices do you have? (b) Are all of these choices really equally likely? If you do grab a pair of shoes at random, then what is the probability of grabbing your favorite pair? (c) In reality, do you actually have the same number of choices if you are going to the swimming pool as compared to going out on a formal dinner date? Solution. (a) In theory, you have 42 choices because you might decide to go barefoot. (b) Depending on where you are going, the choices probably are not equally likely. If you were to choose a pair at random though, then each pair of shoes would have a 1/41 chance of being picked. (c) If you are going to the pool, then your choices most likely are narrowed down to barefoot, sandals, flip-flops, or sneakers. You normally would choose from a different set of options (dress shoes) for a formal dinner date. Example 2. A vending machine has 20 different types of snacks, including Ruffles. You are thinking about buying a snack. (a) How many choices do you have? (b) If you do decide to buy a snack and you choose one at random, then what is the probability of choosing Ruffles? Explain what this probability really means. Solution. (a) You actually have 21 choices because you may decide not to buy anything. (b) If you do choose one at random, then there is a 1/20 chance. of picking Ruffles. That is, if you were to pick one of these snacks at random, over and over, many times, then about 5% of the time you would pick Ruffles. The Multiplication Principal 1. Let A be a set with N distinct objects. If we repeatedly choose objects from set A with repeats allowed, a total of k times, then there are N ! N !. .. ! N = N k possible outcomes for the ordered sequence of k choices. 2. Let A1 be a set with N1 distinct objects, let A2 be a set with N2 distinct objects, . . . , let Ak be a set with Nk distinct objects. If we choose one object from each of the sets A1 , A2 , . . ., Ak , then there are N1 ! N2 ! . . . ! N k possible outcomes for the sequence of choices. Example 3. How many phone numbers are there of the form 745-xxxx? Solution. For each of the last four digits, there are 10 choices (from 0 – 9). The digits are 4 ordered with repeats allowed; thus, there are 10 ! 10 ! 10 ! 10 = 10 = 10,000 such phone numbers. Example 4. You are choosing an 8-character alpha-numeric password. You must choose characters from a–z, 0–9, or from 11 other symbols such as !, @, #, etc. The code is not case-sensitive and you may repeat characters. (a) How many possible passwords are there? (b) How many passwords have 5 digits (from 0–9) followed by 3 letters? Solution. (a) For each character you may choose from 26 letters, 10 digits, and 11 symbols giving 47 choices. Since there are 8 characters which are ordered with possible 8 13 repeats, there are a total of 47 ! 47 ! 47 ! 47 ! 47 ! 47 ! 47 ! 47 = 47 ≈ 2.3811287 ! 10 such passwords. 5 3 (b) There are 10 ! 26 = 1,757,600,000 passwords with 5 digits followed by 3 letters. Example 5. In the 2012 election, the ballot in one precinct will have races for President/Vice President (4 candidates), U.S. Senate (3 candidates), U.S. House (2 candidates), District Judge (4 candidates), and Mayor (5 candidates). Assuming you do not vote for any write-in candidates, how many possible choices do you have for casting this ballot? Solution. Assuming that we actually vote for someone in each race, then we have 4 ! 3 ! 2 ! 4 ! 5 = 480 choices. By allowing ourselves the extra choices of not voting in some (or all) races, then we have 5 ! 4 ! 3 ! 5 ! 6 = 1800 choices. Choosing an Ordered Sequence from a Set With No Repeats Let A be a set with N distinct objects. If we choose a sequence of objects from set A in order with no repeats, then on each successive choice we have one less choice. Example 6. A Master lock uses three numbers from 0 – 39 without repeats. How many possibilities are there? Solution. Including the 0, there are 40 choices for the first digit. These choices decrease by one for each successive digit because repeats are not allowed. Also the sequence of numbers is ordered; thus, there are 40 ! 39 ! 38 = 59,280 possible combinations for the lock. Example 7. A state’s license plate is of the form CBE 925, (three letters followed by three digits). (a) How many such plates with this form are possible? (b) What percentage of these plates have no letter or digit repeated? Solution. (a) In theory, all letters and digits may be repeated; so there are 3 3 26 ! 26 ! 26 ! 10 ! 10 ! 10 = 26 ! 10 = 17,576,000 possible license plates of this form. (b) The number of plates with no repeated letters or digits is given by 26 ! 25 ! 24 ! 10 ! 9 ! 8 = 11,232,000 for a proportion of 11,232,000/17,576,000 ≈ 0.639. So around 63.9% of these license plates do not have any repeated letters or digits. (And around 36.1% will have a repeated letter or digit.) Example 8. What percentage social security numbers have a repeated digit? Solution. There are nine digits in a social security number; so theoretically there are 10 (one-billion) possible SSNs. The number of cards without a repeated digit is 9 10 ! 9 ! 8 ! 7 ! 6 ! 5 ! 4 ! 3 ! 2 = 3,628,800. So there are 10 9 ! 3, 628, 800 = 996,371,200 cards with a repeated digit. Thus the 996,371, 200 proportion of cards with a repeated digit is = 0.9963712. That is, about 109 99.637% of social security numbers have a repeated digit. Exercises 1. Suppose you have 40 HD channels in your cable package including ESPN. (a) When you plop down in front of the set, how many choices do you have in choosing an HD channel to watch? (b) If you choose an HD channel at random, then what is the probability of ESPN being chosen? Explain what this probability means. 2. There are 52 cards in a standard deck. If you choose one card at random, then how many choices do you have? What is the probability of each choice? 3. In the SGA elections, there are 3 people running for President and 4 people running for Treasurer. How many choices do you having for casting a ballot for these two offices? 4. To complete the General Education requirements, a student needs one course in each of Foreign Language (Cat. A. II), Mathematics (Cat. D. II) and Physical Development (Cat. E.). There are 13 foreign language courses, 7 mathematics courses, and 10 physical development courses. In theory, how many choices does the student have in choosing three courses to satisfy these Gen. Ed. requirements? 5. A combination lock has 4 tumblers each with the numbers 0 – 14. (a) How many possible combinations for the lock are there if numbers can be repeated? (b) How many of these combinations do not repeat any numbers? (c) What percentage of the combinations have repeated numbers? 6. A serial number has 4 digits (chosen from 0–9), followed by 3 consonants, followed by 2 vowels. (a) How many such serial numbers are possible if repeated characters are allowed? (b) What percentage of these serial numbers have no repeated characters? 7. In a lottery game, players must match five numbers chosen from 1 – 40, and then match the Lucky Powerball in the sixth spot chosen from 1 – 30. How many choices are there for the six numbers, if in the first five places (a) numbers are in order with repeats allowed? (b) numbers must be in order with no repeats? Solutions To receive maximum partial credit on the exam in the case of an incorrect answer, it is best to show the terms that you are multiplying and then give the final answer. For example, 10 ! 9 ! 8 = 720. 1. (a) If you include the option of not choosing an HD channel, then you have 41 choices. (b) But if you do choose an HD channel at random, then each channel, including ESPN, has probability 1/40 of being chosen. That is, if you were to choose an HD channel at random, over and over, many times, then about 2.5% of the time you would choose ESPN. 2. When choosing a card at random, there are 52 possible outcomes each occurring with probability 1/52. 3. If you actually cast a vote for each office, then you have 3 " 4 = 12 choices. But in reality, you have the extra choices of not voting for one or both offices which actually gives you 4 " 5 = 20 choices. ! 4. By choosing one course from each category, the student has 13 ! 7 ! 10 = 910 ways of ! finishing up these Gen. Ed. requirements. 4 5. (a) If numbers can be repeated, then there are 15 ! 15 ! 15 ! 15 = 15 = 50,625 possible combinations. (b) The number of combinations without repeated numbers is 15 ! 14 ! 13 ! 12 = 32,760. (Thus there are 50,625 – 32,760 = 17,865 combinations that have a repeated number.) (c) 17,865/50,625 ≈ 0.352888 . . . So around 35.29% of the possible combinations have a repeated number. 6. (a) With repeats allowed, there are (10 ! 10 ! 10 ! 10) ! (21! 21 ! 21) ! (5 ! 5) = 2,315,250,000 possible serial numbers. (b) There are (10 ! 9 ! 8 ! 7) ! (21 ! 20 ! 19) ! (5 ! 4) = 804,384,000 of these serial numbers having no repeated characters. Thus around 34.74% of these serial numbers have no repeated characters. 7. (a) If in the first five places the numbers are in order with repeats allowed, then 5 there are 40 ! 30 = 3,072,000,000 choices. (over 3 billion) (b) If there are no repeats allowed, then there are (40 ! 39 ! 38 ! 37 ! 36) ! 30 = 2,368,828,800 choices. (nearly 2.4 billion)