Presentation is loading. Please wait.

Presentation is loading. Please wait.

Discrete Mathematics, 1st Edition Kevin Ferland Chapter 6 Basic Counting 1.

Similar presentations


Presentation on theme: "Discrete Mathematics, 1st Edition Kevin Ferland Chapter 6 Basic Counting 1."— Presentation transcript:

1 Discrete Mathematics, 1st Edition Kevin Ferland Chapter 6 Basic Counting 1

2 6.1 The Multiplication Principle (Dinner Choices). A guest at a formal dinner has 4 entrée choices and 2 dessert choices. If a guest’s dinner is entirely determined by these two choices, then how many different dinner choices are there? The total number of dinner choices is given by the product 4 · 2 = 8. 2 Ch6-p303

3 EXAMPLE 6.1 (Solution) (Cont.) 3 Ch6-p304

4 THEOREM 6.1 4 Ch6-p304

5 6.2 Permutations and Combinations Permutations A permutation of a set of objects is an ordering of those objects. Permutations reflect selections for which an ordering is important. 5 Ch6-p311

6 EXAMPLE 6.8 (Lining Up). How many ways are there to put 8 children in a line to get ice cream? 6 Ch6-p311

7 EXAMPLE 6.8 (Solution) There are 8 children from which to pick the child who is first. Then there are 7 children left from which to pick the second child. Then there are 6 left, and so on. Therefore, there are 8 · 7 · 6 · 5 · 4 · 3 · 2 · 1 = 8! = 40320 ways to line up the children. 7 Ch6-p311

8 THEOREM 6.2 8 Ch6-p311

9 DEFINITION 6.1 A permutation of k objects from a set of size n is an ordered list of k of the n objects. The number of permutations of k objects from n is denoted P(n, k). 9 Ch6-p312

10 THEOREM 6.3 10 Ch6-p313

11 Combinations DEFINITION 6.2 A combination of k elements from a set of size n is a subset of size k. 11 Ch6-p313

12 THEOREM 6.4 12 Ch6-p313

13 EXAMPLE 6.18 How many license plates consisting of 6 digits (0 to 9) with exactly 2 of the same digit are possible? 13 Ch6-p314

14 EXAMPLE 6.18 (Solution) There are 10 digits from which to choose the repeated one. There are ways to choose the two positions to contain the repeated digit. 14 Ch6-p314

15 EXAMPLE 6.18 (Solution) (Cont.) Then there are P(9, 4) ways to fill in the 4 remaining distinct digits. By the Multiplication Principle, there are 6-digit license plates with exactly 2 digits the same. 15 Ch6-p314

16 6.3 Addition and Subtraction 16 Ch6-p320

17 6.3 Addition and Subtraction EXAMPLE 6.20 How many possible license plates consisting of 6 digits (0 to 9) have either all digits distinct or all digits the same? 17 Ch6-p320

18 EXAMPLE 6.20 (Solution) There are P(10, 6) plates with all digits distinct and 10 with all digits the same. Certainly no one plate can have both of these properties. Hence, the total number of license plates under consideration is P(10, 6) + 10 = 151210. 18 Ch6-p320-321

19 THEOREM 6.6 19 Ch6-p322

20 EXAMPLE 6.26 A byte is a binary number consisting of 8 digits. How many bytes have at least 2 zeros? There are 2 8 binary sequences of length 8. Of them, 1 has no zeros and 8 have one zero. Since the rest have at least 2 zeros, there are 2 8 − (1 + 8) = 247 sequences with at least 2 zeros. 20 Ch6-p323

21 THEOREM 6.7 21 Ch6-p323

22 EXAMPLE 6.29 A standard (6-sided) die is rolled a sequence of 5 times. In how many ways can the sequence of numbers resulting be all even or all multiples of 3? 22 Ch6-p325

23 EXAMPLE 6.29 (Solution) Since there are 3 even values (2, 4, and 6), there are 3 5 ways to get all even numbers. Since there are 2 multiples of 3 (3 and 6), there are 2 5 ways to get all multiples of 3. Only the value 6 is both even and a multiple of 3, so there is 1 way to do both. Therefore, the desired number of ways is 3 5 + 2 5 − 1 = 274. 23 Ch6-p325

24 6.4 Probability EXAMPLE 6.31 Consider the task of tossing two dice and recording the numbers showing. Compute the probability that the sum is 8. 24 Ch6-p328

25 EXAMPLE 6.31 (Cont.) The set of possible results of our task is thus S = { (1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6), (2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (2, 6), (3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6), (4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (4, 6), (5, 1), (5, 2), (5, 3), (5, 4), (5, 5), (5, 6), (6, 1), (6, 2), (6, 3), (6, 4), (6, 5), (6, 6) }. 25 Ch6-p328

26 EXAMPLE 6.31 (Solution) From the possible results listed in S, we are interested in the subset E = {(2, 6), (3, 5), (4, 4), (5, 3), (6, 2)}. The probability of E is given by. 26 Ch6-p328

27 DEFINITION 6.3 Let S be a finite sample space. The outcomes in S are said to be equally likely if ∀ x, y ∈ S, P(x) = P(y). That is, ∀ x ∈ S, P(x) = 27 Ch6-p329

28 DEFINITION 6.4 If the outcomes in a finite sample space S are all equally likely, then the probability of an event E is given by 28 Ch6-p329

29 THEOREM 6.9 29 Ch6-p330

30 EXAMPLE 6.34 The license plates issued by a certain state consist of 3 letters (A to Z) followed by 4 digits (0 to 9). If all possible plates are equally likely to be chosen, then what is the probability that a randomly chosen plate will have some letter or digit repeated? 30 Ch6-p330-331

31 EXAMPLE 6.34 (Solution) The sample space S is the set of all possible plates consisting of 3 letters followed by 4 digits. Hence, |S| = 26 3 · 10 4 = 175760000. 31 Ch6-p331

32 EXAMPLE 6.34 (Solution) (Cont.) Let E be the subset of plates in which some letter or digit is repeated. Clearly, |E c | = P(26, 3) · P(10, 4) = 78624000. The desired probability is 32 Ch6-p331

33 THEOREM 6.10 33 Ch6-p331

34 EXAMPLE 6.36 (Home Security). A home security code consists of 4 digits (0 to 9). If all such codes are equally likely to be chosen, then what is the probability that a randomly chosen code will contain exactly 1 three or exactly 2 sixes? 34 Ch6-p331

35 EXAMPLE 6.36 (Solution) Let S be the sample space of all possible 4- digit codes. Let E be the subset of codes containing exactly 1 three, and let F be the subset of codes containing exactly 2 sixes. So E ∪ F consists of all codes containing exactly 1 three or exactly 2 sixes. We seek P(E ∪ F). 35 Ch6-p331

36 EXAMPLE 6.36 (Solution) (Cont.) Since 36 Ch6-p332

37 EXAMPLE 6.36 (Solution) (Cont.) Theorem 6.10 gives that 37 Ch6-p332

38 Conditional Probability DEFINITION 6.5 Let E and F be events in a sample space S with P(F) > 0. The conditional probability of E given F, denoted P(E | F ), is given by 38 Ch6-p332

39 EXAMPLE 6.37 At a company picnic, the children played a soccer game, after which one player’s name was randomly drawn to win a prize. The winning team in the soccer game consists of 7 girls and 4 boys, and the losing team consists of 5 girls and 6 boys. Given that the prize winner is a boy, what is the probability that he also comes from the winning soccer team? 39 Ch6-p332

40 EXAMPLE 6.37 (Solution) Let S be the set of 22 children that played soccer, let E be the event that the prize winner is from the winning team, and let F be the event that the prize winner is a boy. The probability that we seek is P(E|F). 40 Ch6-p333

41 EXAMPLE 6.37 (Solution) (Cont.) Note that E ∩ F is the event that the prize winner is a boy from the winning team. Clearly, We conclude that 41 Ch6-p333

42 DEFINITION 6.6 Two events E and F in a sample space S are said to be independent if P(E ∩ F ) = P(E) · P(F ). 42 Ch6-p333

43 EXAMPLE 6.38 Consider the experiment of tossing two dice in sequence. Let E be the event that the first die shows a value of at most 3, let F 1 be the event that the values on the two dice are the same, and let F 2 be the event that the sum of the values on the two dice is 5. Note that 43 Ch6-p333

44 EXAMPLE 6.38 (Cont.) (a) Are E and F1 independent? Solution. and. It follows that So yes, E and F 1 are independent. 44 Ch6-p333

45 EXAMPLE 6.38 (Cont.) (b) Are E and F2 independent? Solution. and. It follows that So no, E and F 2 are not independent. 45 Ch6-p333

46 THEOREM 6.11 46 Ch6-p334

47 THEOREM 6.11 -- Proof E = E ∩ S = E ∩ (F 1 ∪ ·· · ∪ F n ) = (E ∩ F 1 ) ∪ ·· · ∪ (E ∩ F n ) is a disjoint union. It follows that 47 Ch6-p334

48 COROLLARY 6.12 48 Ch6-p334

49 EXAMPLE 6.39 In a recent election, the majority of female voters preferred a different candidate from the one preferred by the majority of the male voters. Exit polls showed that 75% of female voters chose candidate A, whereas 55% of male voters chose candidate B. 49 Ch6-p334

50 EXAMPLE 6.39 (Cont.) 50 Ch6-p334 Assume that each voter chose either candidate A or candidate B and that an equal number of men and women voted. (a) Which candidate won the election? Explain. (b) If a randomly chosen voter is known to have voted for candidate A, then what is the probability that the voter is a female?

51 EXAMPLE 6.39 (Solution) To be simple, let A be the event that a voter chooses candidate A, let B be the event that a voter chooses candidate B, let F be the event that a voter is female, and let M be the event that a voter is male. 51 Ch6-p334

52 EXAMPLE 6.39 (Solution) (Cont.) Based on the exit polls and the assumption that each voter chose A or B, we know that P(A | F) =.75, P(B | F) =.25, P(A | M) =.45, P(B | M) =.55. We are also assuming that P(F) = P(M) =.5. 52 Ch6-p334

53 EXAMPLE 6.39 (Solution) (Cont.) (a) To determine who won, we apply Theorem 6.11. Observe that P(A) = P(A | F)P(F) + P(A | M)P(M) = (.75)(.5) + (.45)(.5) =.6. Since candidate A received 60% of the votes, candidate A won the election. 53 Ch6-p334

54 EXAMPLE 6.39 (Solution) (Cont.) (b) We seek P(F | A), the probability that a voter is female given that she voted for candidate A. For this, Bayes’ Formula gives that 54 Ch6-p335

55 6.5 Applications of Combinations ( Choices with Repetition) EXAMPLE 6.42 (Barbecue Orders). A barbecue is attended by 7 people. Each person has the choice of a hamburger, a piece of barbecued chicken, or a hot dog (but only one in each case) for the first food item. If the cook will barbecue all 7 items at the same time and does not care who ordered what, then how many different barbecue orders are possible for the cook? We assume that there are ample supplies of each food type. 55 Ch6-p341

56 EXAMPLE 6.42 (Solution) This is considered a problem involving choices with repetition, since the cook may receive multiple requests for any of the 3 items: hamburger B, barbecued chicken C, or hot dog D. 56 Ch6-p346

57 EXAMPLE 6.42 (Solution) (Cont.) A total order would consist of a list of length 7 of B’s, C’s, and D’s, but with no specified number of any particular choice. For example, one order might be CBBDBDB. To help motivate our counting technique, such an order could be recorded in the form of a table. 57 Ch6-p346

58 EXAMPLE 6.42 (Solution) (Cont.) Imagine that the cook simply places a  in the appropriate column of an order sheet as each order is taken. At the end, the order could more efficiently be recorded as a sequence of length 9 consisting of 7  ’s and 2 |’s.     |  |   58 Ch6-p346

59 EXAMPLE 6.42 (Solution) (Cont.) Here the headers B, C, D are understood. The point is that this is a binary sequence of length 9 containing 7  ’s (and 2 |’s). Note that the number of |’s is one fewer than the number of item choices. We conclude that the number of possible barbecue orders is 59 Ch6-p346

60 THEOREM 6.13 60 Ch6-p346

61 6.6 Correcting for Overcounting EXAMPLE 6.44 (Seating Arrangements). How many ways are there to seat 5 girls at a circular table if the particular seat taken by each girl does not matter and what matters to each girl is (a) who is sitting to her left and who is sitting to her right? (b) who is sitting next to her (which side does not matter)? 61 Ch6-p351

62 EXAMPLE 6.44 (Solution) Temporarily call one seat the head of the table. If we keep track of which girl is seated at the head, then there are 5! ways to seat the girls clockwise around the table. However, 5! is an overcounting of what we want, since we have carried the extra structure of who is seated at the head of the table. Given any such seating, if all of the girls stood up and shifted one position clockwise, then the new seating should be considered the same as the original. 62 Ch6-p351

63 EXAMPLE 6.44 (Solution) (Cont.) (a) Each girl would still have the same neighbor to her left and the same neighbor to her right. Since there are 5 different rotations of any seating, we need to divide the original 5! count by 5. Therefore, there are different seatings around the table. 63 Ch6-p351

64 EXAMPLE 6.44 (Solution) (Cont.) (b) When which neighbor is to the left of a girl and which is to the right no longer matters, there are fewer than 24 different seatings. Since only the set of 2 neighbors matters, if we take the mirror reflection of any seating from part (a), then the reflected seating should now be considered the same as the original. 64 Ch6-p351

65 EXAMPLE 6.44 (Solution) (Cont.) Reflection preserves neighbors (and switches sides). 65 Ch6-p351

66 EXAMPLE 6.44 (Solution) (Cont.) Since each seating from part (a) should be paired with its reflection, we need to divide the answer from part (a) by 2. Thus, there are different seatings in which only neighbors matter. 66 Ch6-p351


Download ppt "Discrete Mathematics, 1st Edition Kevin Ferland Chapter 6 Basic Counting 1."

Similar presentations


Ads by Google