Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Objective Students will use the rules for counting. Fundamental Counting Rule For a sequence of two events in which the first event can occur m ways and the second event can occur n ways, the events together can occur a total of mn ways. This can be generalized to any finite number. Example Computers are designed so that the most basic unit of information is a bit (or binary digit) which represents either 0 or 1. Letters, digits, and punctuation symbols are represented as bytes. A byte is a sequence of eight bits in a particular order. For example The ASCII coding system uses 01000001 to represent the letter A and 00110111 to represent the digit 7. How many characters can be represented using a byte system? (How many possible sequences of 8 are there?) Solution • This is a FCR problem. • ________ • There are 2 choices for the first, 2 choices for the second, 2 choices for the third, and so on up to the eighth bit. There are 256 possible bytes for 256 different characters. 2 256 8 Permutations and Combinations • Does Order Matter? • A permutation of objects is a sequence of objects where order matters. • A combination of objects is a sequence of objects where order doesn’t matter. • Think permutation position and combination committee. Permutations and Combinations • abc and bca are the same combination. • abc and bca are not the same permutation. • Are there more permutations of the elements {a,b,c} or combinations of them and why? • There are more permutations because each triple is unique. Example • Find all possible combinations of 2 elements of {a,b,c}. • Find all possible permutations of 2 elements of {a,b,c}. Solution • The possible combinations of 2 elements of {a,b,c} are {a,b} {a,c} and {b,c}. 3 combinations exist. • The possible permutations of 2 elements of {a,b,c} are (a,b) ,(a,c) ,(b,a) ,(c,a), (b,c) and, (c,b). 6 permutations exist. Definition The factorial symbol is ! n! means n(n-1)(n-2)…(3)(2)(1). It is a product of decreasing positive whole numbers. For example, 4! 4 3 2 1 24 By special definition, 0! = 1. Permutations Rule If there are n different items available and we select r of the n items (without replacement), the number of permutations (or sequences) of r items selected from n available items (without replacement) is n! n Pr (n r )! NOTE 1.We use a different rule if some of the items are identical to others. 2. We consider rearrangements of the same items to be different sequences. (The permutation of ABC is different from CBA and is counted separately.) Combinations Rule If there are n different items available and we select r of the n items (without replacement), the number of combinations (or sequences) of r items selected from n available items (without replacement) is n! n Cr (n r )!r ! We are dividing by an extra r! NOTE • We consider rearrangements of the same items to be the same. (The combination of ABC is the same as CBA.) Example • Find all possible combinations of 2 elements of {a,b,c} using the formula. n! n Cr (n r )!r ! • Find all possible permutations of 2 elements of {a,b,c} using the formula. n! n Pr (n r )! Factorial Rule (The FCR in disguise) For a sequence of n events in which the first event can occur n ways and the second event can occur n-1 ways, the third event can occur n-2, the events together can occur a total of n! ways. So the number of different permutations of n different items is n! Example A history pop quiz has a question which asks students to arrange the following presidents in chronological order: Hayes, Taft, Polk, Taylor, Grant, Pierce. If an unprepared student totally guesses, what is the probability of guessing correctly? Possible arrangements: 6! 720 1 P guessing correctly 0.00139 720 Solution • This is an FCR problem (without replacement). • ______ • There are 6 choices for the first, 5 choices for the second, 4 choices for the third, and so on all the way to the 6th choice. • 6x5x4x3x2x1 = 720 is the sample space and there is only 1 correct answer. 1/720 = 0.00139. The probability of a correct answer is 0.00139. This student is in trouble… Example • In horse racing a bet on an exacta in a race is won by correctly selecting the horses that finish first and second, and you must select the horses in correct order. The 136th running of the Kentucky derby had a field of 20 horses. If a bettor randomly selects two of those horses for an exacta bet, what is the probability of winning by selecting Super Saver and Ice Box as the first and second? Do all exacta bets have the same probability of winning? Solution • This is a permutations problem of 20P2. We must determine the number of possible permutations of 2 items taken 20. • Our formula is n! n Pr (n r )! where n is 20 and r is 2. Solution continued… • 20!/18! = 380. Our sample space consists of 380 possible outcomes. Since only 1 pair of horses is Super Saver, Ice Box the probability of selecting that winning arrangement is 1/380. • Not all pairings of horses have the same probability of winning because some are faster than others. The Factorial Rule (with repeated elements) If repetitions occur, we must divide by the factorials of the quantities of the repetitions. If there are n1 alike, n2 alike, . . . nk alike, the number of permutations (or sequences) of all items selected without replacement is n! n1 !n2 ! nk ! This is the number of different permutations of n items with k repetitions. Example • • • • For the set of numbers find 6C3 and 6P3. {1,2,3,4,5,6} 6C3 = 6!/(6-3)!3! =6!/3!3!=720/6x6=20 6P3 = 6!/(6-3)! = 720/6=120 Example • Find the number of permutations of the set. • {1,1,1,2,3,4} • 6!/3! = 720/6 = 120 Example In the Pennsylvania Match 6 Lotto, winning the jackpot requires you select six different numbers from 1 to 49. The winning numbers may be drawn in any order. Find the probability of winning if one ticket is purchased. n! 49! Number of combinations: nCr 13,983,816 n r !r ! 43!6! 1 P winning 13,983,816 Quiz • Find all combinations of 2 elements of {a,b,c,d} • Find all permutations of 2 elements of {a,b,c,d} • A thief steals an ATM card and must randomly guess the pin (of four digits out of a possible 0-9). What is the probability of the thief guessing the pin on one try?