chap6blank
22 Pages

chap6blank

Course Number: MATH 222, Fall 2009

College/University: UMBC

Word Count: 3113

Rating:

Document Preview

Chapter 6 Counting 6.1 Counting and Probability Suppose you ip a coin twice. What is the probability that you get one head and one tail? What are the possible outcomes? Which ones are we interested in? Here are some sample runs of a c++ program that simulates ipping 2 coins where Heads, Tails, and Tails, Heads are considered the same outcome: Total Trials Tails, Tails Heads, Tails Heads, Heads 10 0 or 0% 7 or...

Unformatted Document Excerpt
Coursehero >> Maryland >> UMBC >> MATH 222

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

6 Chapter Counting 6.1 Counting and Probability Suppose you ip a coin twice. What is the probability that you get one head and one tail? What are the possible outcomes? Which ones are we interested in? Here are some sample runs of a c++ program that simulates ipping 2 coins where Heads, Tails, and Tails, Heads are considered the same outcome: Total Trials Tails, Tails Heads, Tails Heads, Heads 10 0 or 0% 7 or 70% 3 or 30% 100 16 or 16% 59 or 59% 25 or 25% 3 10 244 or 24.4% 489 or 48.9% 267 or 26.7% 106 250147 or 25.01% 499568 or 49.96% 250285 or 25.03% Denition 6.1.1: A of a random process or experiment. An space. is the set of all possible outcomes is a subset of a sample Theorem 6.1.2: If S is a nite sample space in which all outcomes are equally likely and E is an event in S, then the denoted is 6.1.1 Math 222 UC Cariboo, v1.0 Example 6.1.3: Suppose we roll 2 dice. What is the probability that the sum is 8? 6.1.2 Theorem 6.1.4: If m and n are integers and m n, then there are integers from m to n inclusive. Example 6.1.5: How many even numbers are there between 52 and 88 (inclusive)? Practice: pp 279 280: do all with answers Math 222 UC Cariboo, v1.0 6.2.1 6.2 The Rules of Sum and Product The study of combinatorial mathematics begins with two basic principles of counting: the rules of sum and product. Enumeration, i.e. counting, in complicated problems is often solved by breaking down problems into simpler pieces, each of which can be solved using these basic principles. Denition 6.2.1: The Rule of Sum: If a rst task can be performed in m ways, while a second task can be performed in n ways, and the two tasks cannot be performed simultaneously, then performing either task can be accomplished in ways. any one of Example 6.2.2: It is Friday night and you have been invited to three parties. You could also go to a movie. There are ve movies playing at the local theatre. Assuming you go to one party or one movie (but not both), in how many ways can you spend your evening? The signal that one should use the rule of sum is the word Example 6.2.3: In how many ways can a person get a total of four when a black die and a blue die are rolled? Denition 6.2.4: The Rule of Product: If a procedure can be broken down into a rst and a second stage, and if there are m ways to perform the rst stage and for each of these, there are n ways to perform the second stage, then the total ways. procedure can be carried out, in the designated order, in This rule can be extended to any nite number of stages. It is sometimes referred to as the principle of choice. Example 6.2.5: Back to Friday nights choices! Assuming now you would like to go to a movie rst (5 choices) and then to a party afterwards (3 choices), in how many ways can you now spend the evening? Math 222 UC Cariboo, v1.0 6.2.2 The keyword is a signal to use the Rule of Product. Example 6.2.6: (a) Suppose a computer password consists of 5 letters from the English (Latin) alphabet. Repetition of letters is allowed and case is not important. How many dierent passwords are possible? (b) Suppose no repetition of letters is allowed. How many dierent passwords are now possible? The dreaded over counting: The Rule of Product is not always easy to apply. In fact, in some situations it will lead you to an incorrect solution if you are not careful! Example 6.2.7: Consider the following problem. Three ocers, a president, a treasurer, and a secretary, are to be chosen from amoung four people: Ann, Babak, Chin, and Dopey. In how many ways can the ocers be chosen? Now suppose that Ann cannot be the president and either Chin or Dopey must be the secretary. In how many ways can the ocers now be chosen? Incorrent Solution: Math 222 UC Cariboo, v1.0 Correct Solution: 6.2.3 Example 6.2.8: Suppose a blue die and a black die are rolled. How many distinct outcomes are possible? Now suppose the two dice are indentical looking. How many dierent outcomes are possible? Permutations Denition 6.2.9: For any integer n 0, by: , denoted n!, is dened Example 6.2.10: 3! = 6! = Factorial expressions grow quickly! For example, 10! = 3628800 represents the number of seconds in six weeks; whereas, 13! = 6227020800 exceeds the number of seconds in a century. Check it out! The earth is approximately 4.5 billion years old. What is the smallest value of n such that n! exceeds the age of the earth is seconds? Math 222 UC Cariboo, v1.0 6.2.4 Denition 6.2.11: Given a collection of n distinct objects (with no repetition allowed), any (linear) arrangement of these objects is called a of the collection. Example 6.2.12: The set A = {1, 2, 3} has the following permutations of its elements: Example 6.2.13: Given 6 people, (a) in how many ways can they be arranged in a line? (b) in how many ways can they be arranged with person #6 and person #5 beside each other? Example 6.2.14: In how many ways can 3 people from a group of 8 people be arranged in a line? The previous example illustrates the following general result: Theorem 6.2.15: Given n distinct objects and an integer r, 1 r n, then by the rule of product, the number of permutations of size r for the n objects is given by: Math 222 UC Cariboo, v1.0 6.2.5 Denition 6.2.16: We call a permutation of size r an . The number of r-permutations of a collection of n objects is denoted by the symbol P (n, r) = Special Cases: P (n, 0) = (# ways to make empty selection) P (n, n) = (# ways to select all objects) Note that the special cases agree (and should agree) with our previous work. Example 6.2.17: The number of permutations of the letters in the word RICHMOND is If only ve of the letters are used, then the number of 5-permutations is If repetition is allowed, the number of linear arrangements of ve letters is Example 6.2.18: In how many ways can the letters of CARIBOO be arranged? Incorrect Solution: Lets begin by assuming the two 0s are distinguishable. Notice the permutations can be grouped into pairs where each pair has the Os in the same places (but in the opposite order). The total number of groups is Example 6.2.19: In how many ways can the letters of REPLETE be arranged? Math 222 UC Cariboo, v1.0 6.2.6 The previous examples illustrate the following general principle for arrangements with repeated symbols. Theorem 6.2.20: Given n objects with n1 of the rst type, n2 of a second type, . . ., and nk of a k th type, where n1 + n2 + + nk = n, there are (linear) arrangements of the given n objects. Example 6.2.21: (a) In how many ways can the letters of the word MISSISSIPPI be arranged? (b) How many arrangements are there in which all four Ss together? We conclude this section with some examples of arrangements which are not linear. Example 6.2.22: (a) In how many ways can eight people be arranged in a circle if arrangments are considered the same when one can be obtained from the other by a rotation? Solution 1: Since a circle has no beginning and no end, x one person on the circle and place all the remaining people relative to this person. Math 222 UC Cariboo, v1.0 6.2.7 Solution 2: Arrange the people around the circle by wrapping a linear arrangement around the circle. Next group the arrangements together in collections so that all arrangements in each collection can be obtained from each other by rotation, i.e. we consider all arranges in one group as equivalent. (b) Suppose two of the eight people refuse to sit next to each other around the circle. How many circular arrangements are now possible? Practice: 32, 36, 38 pp 292 295, 1, 6, 8, 9, 11a, 12a,b, 13a,b, 14, 19, 21, 24, 26, 29, 31, Math 222 UC Cariboo, v1.0 6.3.1 6.3 Counting elements of sets We have already developed the theory for counting disjoint sets, namely the rule of sum. Example 6.3.1: Suppose |A| = 34 and |B| = 20. What is |A B|? Inclusion/Exclusion Rule To count the union of sets when the sets are not disjoint we use the following rule: Theorem 6.3.2: The Inclusion/Exclusion Rule for two or three sets. If A, B, and C are nite sets, then |A B| = and |A B C| = Example 6.3.3: In a group of 15 people, 8 speak German, 5 speak French, and 3 speak both German and French. (a) How many people speak at least one of the two languages? (b) How many speak German but not French? (c) How many speak exactly one of the two languages? By using Venn diagrams we can also count |A B| = |A| |A B| and |A B| = |A| + |B| 2|A B|. Math 222 UC Cariboo, v1.0 6.3.2 Example 6.3.4: The Microsock computer rm comes to UCC and interviews 65 students. They ask each student what languages they know and they nd the following: 38 know C++; 36 know Java; 15 know Visual Basic; 18 know both C++ and Java; 11 know both C++ and Visual Basic; 3 know both Java and Visual Basic; 60 know at least one of the three languages. (a) How many students know all three languages? (b) How many know C++ and Java but not Visual Basic? (c) How many know only Java? Practice: 303 pp 306: Do all with answers in back Math 222 UC Cariboo, v1.0 6.4.1 6.4 Combinations: countings subsets Denition 6.4.1: Given nonnegative integers n and r with 0 r n, an unordered selection of r elements taken from n elements is called an The symbols or , read , are used interchangeably to represent the number of r-combinations (subsets of size r) taken from a set of n elements. Example 6.4.2: Let A = {1, 2, 3} r-combinations 0-combinations 1-combinations 2-combinations 3-combinations subset number Example 6.4.3: How do we compute n without listing all the subsets? As before, lets r begin with r-permutations and dene two r-permutations to be the same if one is a reordering of the other. Theorem 6.4.4: Given integers n and r with 0 r n, C(n, r) = n r = Math 222 UC Cariboo, v1.0 6.4.2 Example 6.4.5: (a) How many 5 person committees can be chosen from a group of 13 people? (b) How many if one member of the group will not serve on any committee? (c) How many if there are 2 people who insist on being on any committees together? (d) How many if 2 people do not get along and must not sit on any committee together? Example 6.4.6: How many teams can be formed from 7 women and 4 men if (a) the team consists of 3 women and 2 men? (b) the team consists of an equal number of women and men? (c) the team consists of 4 people, at least two of which are women? Math 222 UC Cariboo, v1.0 6.4.3 The next example illustrates how to concepts of both arrangements and combinations can be used together in the solution of an enumeration problem. Example 6.4.7: (a) In how many ways can the letters of MISSISSIPPI be arranged? (b) How many of these arrangements have noadjacent Ss? The next example illustrates the ever present danger of over counting, plus the technique of counting the complement. Example 6.4.8: (a) How many 5 card hands can be dealt from a standard 52 card deck? (b) How many of these hands contain exactly one club? (c) How many of these hands contain at least one club? Incorrect solution: 13 51 counts {3, 2, 2, 5, 2} and {5, 2, 2, 3, 2} as 1 4 dierent hands, and they are not. Correct solution (i): Correct solution (ii): Whenever a selection of r objects is made from n objects, the process leaves behind n r objects. The following theorem is an easy consequence of this observation. Theorem 6.4.9: For any integer n and r with 0 r n: n r = Practice: pp 320322, 3, 6, 8, 13, 19, 23 Math 222 UC Cariboo, v1.0 6.5.1 6.5 Combinations with Repetition: Distributions We have already studied the number of ways to choose r objects, without replacement, from a set of size n where the order of the selections does not matter the result is n . Now r consider the problem of choosing r objects from n, again the order of the selections does not matter, but each object may be selected more than once. Example 6.5.1: How many unordered selections of 4 objects from the set {a, b, c} are there if repetition is allowed? Solution 1: Lets try our previous trick of grouping equivalent objects. That is, lets count the number of selections of 4 objects with replacement and group together those selections that are the same when order is removed. Solution 2: Lets agree on a standard way to list a selection. That is, by using alphabetical order, a selection of four objects has a standard, or what mathematicians call a canonical, represention. We can now simply list all four letter selections. aaaa aaab aaac aacc abbb abbc bbbb bbbc bbcc aabb aabc abcc accc bccc cccc unordered selections with replacement That answer to the question is there are How can we solve this problem without listing all possibilities? We develop a general formula for counting the number of such selections. The crux of the development is to associate each selection above with a binary string that contains exactly two zeros. Since the order in which the letters above are selected does not matter, we can always order the letters so that all the as come rst, the bs come second, and the cs come third, i.e. use the canonical representation. For each selection construct a binary sequence. For example, the selection aabc corresponds to the sequence 110101. The 0s act as seperators between dierent types of objects, the 1s tell us how many of each object there is. Together: Math 222 UC Cariboo, v1.0 a 1 a 1 0 b 1 0 c 1 6.5.2 Hence, we can count the number of selections if, and only if, we can count the number of binary strings of length six that contain exactly four 1s and two 0s This is equivalent to simply choosing four locations out of the six to put the 1s in, i.e. there are 6 such strings. 4 Notice there is an easy conrmation here that 6 = 6 . Can you explain? 4 2 Note: Some authors uses x and | instead of 1 and 0. Theorem 6.5.2: The number of unordered selections, with repetition, of r objects from a set of n objects is given by: We can now summerize the four types of selection of r objects from n objects: With Replacement Without Replacement Ordered Selections nr P (n, r) Unordered Selections n+r1 r n r Example 6.5.3: Terris Twenty-Two Types boasts 22 dierent avours of ice cream. Terri sells a banana-split-light that has three scoops of ice cream but no toppings. Assuming that the order of the scoops does not matter (e.g. chocolate, strawberry, vanilla is the same as vanilla, chocolate, strawberry) how many dier...
MOST POPULAR MATERIALS FROM MATH 222
MOST POPULAR MATERIALS FROM MATH
MOST POPULAR MATERIALS FROM UMBC