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
Chapter 2 Section 2.3 Introduction to Combinatorics Counting It is often important to be able to count how many elements are in a set. This seems strange when it is first discussed since you usually think just enumerate (count them one by one) the elements in the set. For example: The number of elements in set A = {, , , } 1 2 3 4 n(A)=4 The problem with this method is that sometimes sets are too big (in the millions or billions) or very complicated and are described rather than having the elements listed out. One way to approach this is with a decision tree. Example: A certain style of T-shirt comes in 3 different colors, red (R), green (G), blue (B) and 4 different sizes, small (S), medium (M), large (L) and extra large (XL). How many different types of this style of T-shirt are there? Answer: 12 R G B S M L XL S M L XL S M L XL S M L XL S M L XL S M L XL The idea is to think of the tree to the right in levels. Each level represents a decision that needs to be made or a bunch of choices or options you have. G B Choose a Color (3 choices) S M L XL S M L XL Choose a Size (4 choices) R S M L XL What we notice is if multiply the number of choices or decisions together we get the total number of different types of T-shirt. 3 4 Color Size 34 = 12 Total Types This idea can be generalized as described below. Fundamental Counting Principle If an element in a set can be described with a series of k choices (decisions or options) with the number of different options for each of the k choices being: n1,n2,n3,…,nk respectively. The total number of elements in the set is: n1n2n3 nk Fundamental Counting Principle The idea for counting the number of things in a set by breaking it into a series of choices, decisions or options to make then multiplying them together is called the Fundamental Counting Principle. This says if there are m choices for how to select option 1, along with n choices for how to select option 2 then the number of ways to select both option 1 and option 2 at the same time is mn. (If there are more than two options you would multiply more numbers together.) The tough part of any idea like this is how to apply it. Consider the following example. A fast food restaurant offers a combo special. You get a choice from each category below. How many ways can you order a combo special. Sandwich Hamburger Cheeseburger Chicken Fish 4 choices Side French Fries Onion Rings Side Salad 3 choices Drink Cola Diet Cola Root Beer Orange Lemonade 5 choices The Fundamental Counting Principle shows the total ways to order a combo special is: 4 3 5 = 60 The difficult thing is how to apply this idea. A certain issue of a series of car license plates in the state of Ohio had the plates consisting of 3 letters followed by 4 numbers. For example: CGT 4317. How many different license plates can be made this way? We use the Fundamental Counting Principle. There are 7 choices to be made, the 1st letter, 2nd letter, 3rd letter, 1st number, 2nd number, 3rd number and 4th number. 26 26 26 1st 2nd 3rd letter letter letter 10 10 10 10 1st 2nd 3rd 4th number number number number 26262610101010 = 263104 = 175,760,000 Some restrictions on the elements may limit some of your choices. In the example above how many license plates begin with the letter P? 1262610101010 1 26 26 10 10 10 10 = 262104 1st 2nd 3rd 1st 2nd 3rd 4th = 6,760,000 letter letter letter number number number number How many begin with a vowel? 5 26 26 1st 2nd 3rd letter letter letter 10 10 10 10 1st 2nd 3rd 4th number number number number 5262610101010 = 5262104 = 33,800,000 The choices you make at one stage may restrict the number of choices you make at the next stage. For example: If 10 horses run a race in how many different ways can they finish in 1st, 2nd, and 3rd place? (In racing this is called a trifecta.) Whichever horse finished 10 9 8 st can not finish 2nd and 1098 = 720 1 1st 2nd 3rd neither of them can finish place place place 3rd. In how many different ways can all 10 horses finish the race in places 1 through 10? Answer: 10987654321 = 3,628,800 = 10! (read "ten factorial") The factorial is a shorthand way of writing a long string of consecutive decreasing numbers being multiplied together. Here are some more examples. 0! = 1 4! = 4321 = 24 8! = 87654321 = 40,320 1! = 1 5! = 54321= 120 9! = 987654321 = 362,880 2! = 21 = 2 6! = 654321 = 720 10! = 10987654321 = 3,628,800 3! = 321=6 7! = 7654321 = 5040 11! = 1110987654321=39,916,800 Evaluating Expressions with Factorials When finding the value of an expression with a factorial (!) in it remember a couple of tips. 1. In fractions usually much cancellation can occur 2. Remember to do what is in parenthesis first. Find the value of each expression below. a) 10! 7! 10! 10 9 8 7 6 2 1 10 9 8 720 7! 7 6 2 1 b) 50! (50 2)! 50! 50! 50 49 48 47 2 1 50 49 2450 (50 2)! 48! 48 47 2 1 12! c) 3!(12 3)! 12! 12! 12 1110 9 8 2 1 12 1110 2 1110 220 3!(12 3)! 3!9! 3 2 1 9 8 2 1 3 2 1