Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSNB143 – Discrete Structure Topic 6 – Counting Techniques.

Similar presentations


Presentation on theme: "CSNB143 – Discrete Structure Topic 6 – Counting Techniques."— Presentation transcript:

1 CSNB143 – Discrete Structure Topic 6 – Counting Techniques

2 Learning Outcomes Student should be able to explain all types of counting techniques. Students should be able to distinguish the techniques learned. Students should be able to use each of the counting techniques based on different questions and situations.

3 Topic 6 – Counting Techniques Introduction Calculations in probability theory often involve working out the number of different ways in which something can happen. Since simply listing the ways can be tedious and reliable, it is helpful to work out some techniques for doing this kind of counting. Assumed Knowledge Use calculator for the exercises. Cancel manually as much as possible to avoid multiplying a large series of numbers

4 Topic 6 – Counting Techniques Permutation & Combination In English we use the word "combination" loosely, without thinking if the order of things is important. In other words: – Combination : "My fruit salad is a combination of apples, grapes and bananas" We don't care what order the fruits are in, they could also be "bananas, grapes and apples" or "grapes, apples and bananas", its the same fruit salad. – Permutation : "The combination to the safe was 472". Now we do care about the order. "724" would not work, nor would "247". It has to be exactly 4-7-2. So, in Mathematics we use more precise language: – If the order doesn't matter, it is a Combination. If the order does matter it is a Permutation. – A Permutation is an ordered Combination. Source: http://www.mathsisfun.com

5 Topic 6 – Counting Techniques Permutations with Repetition These are the easiest to calculate. When you have n things to choose from... you have n choices each time. So when choosing r of them, the permutations are: n × n ×... (r times) = n r (Because there are n possibilities for the first choice, THEN there are n possibilities for the second choice, and so on.) Example: In a lock, there are 10 numbers to choose from (0,1,..9) and you choose 3 of them: 10 × 10 ×... (3 times) = 10 3 = 1000 permutations So, the formula is simply: n r where n is the number of things to choose from, and you choose r of them (Repetition allowed, order matters)

6 Topic 6 – Counting Techniques Permutation with Repetition Another Example : If A = { , , ,  }, how many words that can be built with length 3, repetition allowed? n = 4, r = 3, then n r = 4 3 = 64 words A sequence of r elements from n elements of A is always said as ‘permutation of r elements chosen from n elements of A’, and written as n P r or P(n, r)

7 Topic 6 – Counting Techniques Permutation without Repetition In this case, you have to reduce the number of available choices each time. For example, what order could 16 pool balls be in? After choosing, say, number "14" you can't choose it again. So, your first choice would have 16 possibilites, and your next choice would then have 15 possibilities, then 14, 13, etc. The total permutations would be 16 × 15 × 14 × 13... = 20,922,789,888,000. Mathematically this is written using the factorial function. ! So, if you wanted to select all of the pool balls the permutations would be: 16! = 20,922,789,888,000

8 Topic 6 – Counting Techniques Permutation without Repetition But maybe you don't want to choose them all, just 3 of the balls, so that would be only: 16 × 15 × 14 = 3360 In other words, there are 3,360 different ways that 3 pool balls could be selected out of 16 balls. The formula used of this is

9 Topic 6 – Counting Techniques Permutation without Repetition Another example: If A = {p, q, r, s}, find the number of permutations for 3 elements, without repetition. The formula used is : where n = 4, r =3 4 P 3 = __ 4!__ = 4.3.2.1 = 24 (4-3)! 1

10 Topic 6 – Counting Techniques Permutation without Repetition Another example: Choose 3 alphabets from A …. Z where n = 26, r =3 26 P 3 = __ 26!__ = 26.25.24.23….3.2.1 = 26.25.24 (26-3)! 23.33……3.2.1

11 Topic 6 – Counting Techniques Combination with Repetition There are n things to choose from, and you choose r of them. Order does not matter, and you can repeat The formula used is

12 Topic 6 – Counting Techniques Combination with Repetition Example In how many ways can a prize winner choose a combination of three CDs from the Top Ten list if repetition is allowed The formula used is n = 10, r = 3 4 C 3 = __( 10 + 3 – 1)!_ = 12.11.10.9.8.7…..3.2.1 = 220 ways 3!(10 - 1)! 3.2.1.9.8.7……3.2.1

13 Topic 6 – Counting Techniques Combination without Repetition This is how lotteries work. The numbers are drawn one at a time, and if you have the lucky numbers (no matter what order) you win! Going back to our pool ball example, let us say that you just want to know which 3 pool balls were chosen, not the order. The formula used is

14 Topic 6 – Counting Techniques Combination without Repetition The pool balls example will be counted as follows:

15 Topic 6 – Counting Techniques Combination without Repetition Another example: If A = {p, q, r, s}, find the number of combinations for 3 elements, no repetition is allowed The formula used is: where n = 4, r = 3 4 C 3 = __ 4!__ = 4.3.2.1 = 4 3!(4-3)! 3.2.1.1


Download ppt "CSNB143 – Discrete Structure Topic 6 – Counting Techniques."

Similar presentations


Ads by Google