Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Fundamental Principles of Counting OBJECTIVES: At the end of this chapter, students should be able to: 1. describe the concepts of permutation (arrangement)

Similar presentations


Presentation on theme: "1 Fundamental Principles of Counting OBJECTIVES: At the end of this chapter, students should be able to: 1. describe the concepts of permutation (arrangement)"— Presentation transcript:

1 1 Fundamental Principles of Counting OBJECTIVES: At the end of this chapter, students should be able to: 1. describe the concepts of permutation (arrangement) and combination (selection) 2. apply permutation and combination in problem solving

2 2 CONTENTS i. Rules of Sum and Product ii. Permutations iii. Combinations iv. Combinations with Repetition

3 3 Preamble - Permutation

4 4 Rule of Sum Task 1 can be performed in m ways Task 2 can be performed in n ways, the two tasks cannot be performed simultaneously, then performing either task can be accomplished in any one of m + n ways.

5 5 Rule of Sum More formally, the rule of sum is a fact about set theory. set theory It states that sum of the sizes of a finite collection of pairwise disjoint sets is the size of the union of these sets.pairwise disjoint That is, if S 1,S 2,...,S n are pairwise disjoint sets, then we have : |S 1 |+|S 2 | + … +|S n | = |S 1 U S 2 U …U S n |

6 6 Example 1.1 A college library has 40 textbooks on Databases and 50 textbooks dealing with Calculus. By the rule of sum, a student can select among 40 + 50 = 90 textbooks to learn more about one or the other of these two languages.

7 7 Example 1.2 A computer science instructor has 7 different introductory books each on C++, Java, and Perl He can recommend any one of these 21 books to a student who is interested in learning a first programming language.

8 8 Example 1.3 A lady has decided to shop at one store today, either in the north part of PJ or the south part of PJ. If she visits the north part of PJ, she will either shop at a mall, a furniture store, or a jewelry store (3 ways). If she visits the south part of PJ then she will either shop at a clothing store or a shoe store (2 ways). Thus there are 3+2=5 possible shops the woman could end up shopping at today.

9 9 Rule of product Suppose a computer installation has 4 I/O unit (A,B,C,D) and 3 CPU (X,Y,Z). Any I/O can be paired with any CPU. How ways to pair an I/O with a CPU. Pairing the two types of units as a two-step operation: Step 1: Choose the I/O unit Step 2: Choose the CPU unit There are 12 ways (e.g AX,AY,AZ,…)

10 10 Rule of Product If an operation consists of k steps and the step 1 can be performed in n 1 ways the step 2 can be performed in n 2 the step k can be performed in n k ways Then the entire operation can be performed in n 1 n 2 …n k ways.

11 11 Rule of Product (cont.) Example 1.5 The drama club of Central University is holding tryouts for a spring play. With six men and eight women auditioning for the leading male and female roles, by the rule of product the director can cast his leading couple in 6 x 8 = 48 ways.

12 12 Rule of Product (cont.) Example 1.6 Consider the manufacture of license plates consisting of 2 letters followed by 4 digits. (e.g. AM1234) If no letter or digit can be repeated, there are 26 x 25 x 10 x 9 x 8 x 7 = 3,276,000 different possible plates. With repetitions of letters and digits, 26 x 26 x 10 x 10 x 10 x 10 = 6,760,000 different plates are possible. If repetitions are allowed, as in part (b), how many of the plates have only vowels (A,E,I,O,U) and even digits? (0 is an even integer.)

13 13 Example 1.7 An address is represented by an ordered list of eight bits, collectively referred to as a byte. Using the rule of product, there are 2 x 2 x 2 x 2 x 2 x 2 x 2 x 2 = 2 8 = 256 such bytes. So we have 256 addresses

14 14 Permutation Continuing to examine applications of the rule of product, we turn now to counting linear arrangements of objects. These arrangements are often called permutation when the objects are distinct.

15 15 Permutation (cont.) Example 1.9 In a class of 10 students, five are to be chosen and seated in a row for a picture. How many such linear arrangements are possible? 10 x 9 x 8 x 7 x 6 1 st 2 nd 3 rd 4 th 5 th = 10!/5! = 30,240 arrangements.

16 16 Question ?????

17 17 Permutation In general, if there are n distinct objects, denoted a 1, a 2, …, a n, and r is an integer, with 1 ≤ r ≤ n, then by the rule of product, the number of permutations of size r for the n objects is n x (n-1) x (n-2) x … x (n-r+1) = n!/(n-r)!

18 18 Permutation (cont.) We denote this number by P (n, r). For r = 0, P(n, 0) = 1 = n !/(n - 0)!, so P(n, r ) = n!/(n-r )! 0≤ r ≤n Note P(n, r) counts (linear) arrangements in which the objects cannot be repeated. However, if repetitions are allowed, then by the rule of product there are n r possible arrangements with r ≥ 0.

19 19 Example 1.10 The number of permutations of the letters in the word COMPUTER is 8!. If only four of the letters are used, the number of permutations (of size 4) is P(8, 4) = 8! = 8! (8 - 4)! 4! = 1680

20 20 Permutation (cont.) Example 1.11 Unlike Example 1.10, the number of (linear) arrangements of the four letters in BALL is 12, not 4! or 24. If the two L’s are distinguished as L1,L2, then we can use our previous ideas; with the four distinct symbols B, A, L1, L2, we have 4! = 24 permutations, including A B L1 L2 and A B L2 L1

21 21 Permutation (cont.) Example 1.12 Now consider the arrangements of all six letters in PEPPER. the number of arrangements of the six letters in PEPPER is 6!/(3!x2!) = 60

22 22 General Permutation In general, if there are n objects with n 1 of a first type, n 2 of a second type, …, and n r of an r th type, where n 1 + n 2 + … + n r = n, then there are n! __ n 1 ! n 2 ! … n r ! arrangements of the given n objects. (Objects of the same type are indistinguishable).

23 23 Example 1.13 The MASSASAUGA is a brown and white venomous snake. Arranging all of the letters in MASSASAUGA, we find that there are 10! = 25,200 arrangements. 4! 3! 1! 1! 1! Arrangements in which all four A’s are together are 7! = 840 3! 1! 1! 1! 1! To get this last result, we considered all arrangements of the seven symbols AAAA (one symbol), S, S, S, M, U, G.

24 24 THANK YOU


Download ppt "1 Fundamental Principles of Counting OBJECTIVES: At the end of this chapter, students should be able to: 1. describe the concepts of permutation (arrangement)"

Similar presentations


Ads by Google