Chapter 7 – Counting Techniques CSNB 143 Discrete Mathematical Structures.

Slides:



Advertisements
Similar presentations
4-1 Chapter 4 Counting Techniques.
Advertisements

COUNTING AND PROBABILITY
How many possible outcomes can you make with the accessories?
Multiplication Rule. A tree structure is a useful tool for keeping systematic track of all possibilities in situations in which events happen in order.
Today Today: Reading: –Read Chapter 1 by next Tuesday –Suggested problems (not to be handed in): 1.1, 1.2, 1.8, 1.10, 1.16, 1.20, 1.24, 1.28.
ENM 207 Lecture 5. FACTORIAL NOTATION The product of positive integers from 1 to n is denoted by the special symbol n! and read “n factorial”. n!=1.2.3….(n-2).(n-1).n.
Combinations We should use permutation where order matters
Copyright © Ed2Net Learning Inc.1. 2 Warm Up 1.List all combinations of Roshanda, Shelli, Toshi, and Hector, taken three at a time 2. In how many ways.
Permutations and Combinations AII Objectives:  apply fundamental counting principle  compute permutations  compute combinations  distinguish.
Combinatorics 3/15 and 3/ Counting A restaurant offers the following menu: Main CourseVegetablesBeverage BeefPotatoesMilk HamGreen BeansCoffee.
Chapter The Basics of Counting 5.2 The Pigeonhole Principle
Counting. Product Rule Example Sum Rule Pigeonhole principle If there are more pigeons than pigeonholes, then there must be at least one pigeonhole.
Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)
Chapter The Basics of Counting 5.2 The Pigeonhole Principle
Topics to be covered: Produce all combinations and permutations of sets. Calculate the number of combinations and permutations of sets of m items taken.
Methods of Counting Outcomes BUSA 2100, Section 4.1.
Dr. Eng. Farag Elnagahy Office Phone: King ABDUL AZIZ University Faculty Of Computing and Information Technology CPCS 222.
3. Counting Permutations Combinations Pigeonhole principle Elements of Probability Recurrence Relations.
© The McGraw-Hill Companies, Inc., Chapter 4 Counting Techniques.
ICS 253: Discrete Structures I Counting and Applications King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Lesson Counting Techniques. Objectives Solve counting problems using the Multiplication Rule Solve counting problems using permutations Solve counting.
Elements of Combinatorics (Continuation) 1. Pigeonhole Principle Theorem. If pigeons are placed into pigeonholes and there are more pigeons than pigeonholes,
Unit 7 Permutation and Combination IT Disicipline ITD1111 Discrete Mathematics & Statistics STDTLP 1 Unit 7 Permutation and Combination.
Part 2 – Factorial and other Counting Rules
Sullivan Algebra and Trigonometry: Section 14.2 Objectives of this Section Solve Counting Problems Using the Multiplication Principle Solve Counting Problems.
CSNB143 – Discrete Structure Topic 6 – Counting Techniques.
Counting CSC-2259 Discrete Structures Konstantin Busch - LSU1.
Permutations – Page 1CSCI 1900 – Discrete Structures CSCI 1900 Discrete Structures Permutations Reading: Kolman, Section 3.1.
CSNB143 – Discrete Structure
PERMUTATIONS and COMBINATIONS
Discrete Structures Combinations. Order Doesn’t Matter In the previous section, we looked at two cases where order matters: Multiplication Principle –
Discrete Structures Counting (Ch. 6)
Menu Traditional Menu Other Menu Nasi LemakBeef Burger Roti Canai Potatoes Chip Capati French Bread Mee Goreng Drink : Coffee, Tea, Coke and Pepsi.
Counting Principles Multiplication rule Permutations Combinations.
Lesson 0.4 (Counting Techniques)
Counting Techniques Tree Diagram Multiplication Rule Permutations Combinations.
Permutations Counting where order matters If you have two tasks T 1 and T 2 that are performed in sequence. T 1 can be performed in n ways. T 2 can be.
Chapter 3 – Sequence and String CSNB 143 Discrete Mathematical Structures.
1 Chapter 2 Pigeonhole Principle. 2 Summary Pigeonhole principle –simple form Pigeonhole principle –strong form Ramsey’s theorem.
Introduction Suppose that a password on a computer system consists of 6, 7, or 8 characters. Each of these characters must be a digit or a letter of the.
CS 104: Discrete Mathematics
ICS 253: Discrete Structures I Counting and Applications King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Discrete Mathematics and Its Applications Sixth Edition By Kenneth Rosen Chapter 5 Counting 歐亞書局.
Section The Product Rule  Example: How many different license plates can be made if each plate contains a sequence of three uppercase English letters.
COUNTING Discrete Math Team KS MATEMATIKA DISKRIT (DISCRETE MATHEMATICS ) 1.
13 Lesson 1 Let Me Count the Ways Fundamental Counting Principle, Permutations & Combinations CP Probability and Statistics FA 2014 S-ID.1S-CP.3S-CP.5.
Section 6.3. Section Summary Permutations Combinations.
Discrete Mathematics Counting.
The Multiplication Rule
Permutations and Combinations
4-1 Chapter 4 Counting Techniques.
ICS 253: Discrete Structures I
Permutations and Combinations
CSNB 143 Discrete Mathematical Structures
Generalized Permutations and Combinations
Chapter 0.4 Counting Techniques.
4-1 Chapter 4 Counting Techniques.
4-1 Chapter 4 Counting Techniques.
CS100: Discrete structures
Permutations and Combinations
Counting techniques Basic Counting Principles, Pigeonhole Principle, Permutations and Combinations.
Permutations and Combinations
Discrete Structures Counting.
4-1 Chapter 4 Counting Techniques.
Bellwork Practice Packet 10.3 B side #3.
Permutations and Combinations
Standard DA-5.2 Objective: Apply permutations and combinations to find the number of possibilities of an outcome.
Permutations and Combinations
Lecture 7: Permutations and Combinations
Presentation transcript:

Chapter 7 – Counting Techniques CSNB 143 Discrete Mathematical Structures

OBJECTIVES Student should be able to understand all types of counting techniques. Students should be able to identify the three techniques learned. Students should be able to use each of the counting techniques based on different questions and situations.

What, Which, Where, When 1. Permutation Redundant elements(Clear / Not Clear) Non-redundant elements(Clear / Not Clear) The use of n P r (Clear / Not Clear) 2. Combination Non-redundant elements(Clear / Not Clear) The use of n C r (Clear / Not Clear) 3. Pigeonhole Pigeonhole Principle(Clear / Not Clear) Identifying n and m(Clear / Not Clear)

Permutation An order of objects  we count no. of sequence Theorem 1 If there are two tasks T 1 and T 2 are to be done in sequence. If T 1 can be done in n 1 ways, and for each of these ways T 2 can be done in n 2 ways, the sequence T 1 T 2 can be done in n 1 n 2 ways.

Example 1 T1 T2 2 ways 3 ways T1T2 T2T1 2 x3 = 6 ways 3x2 = 6 ways

Theorem 2 If there are k tasks T 1, T 2, T 3, …, T k are to be done in sequence. If T 1 can be done in n 1 ways, and for each of these ways T 2 can be done in n 2 ways, and for each of these n 1 n 2 ways, T 3 can be done in n 3 ways, and so on, then the sequence T 1 T 2 T 3 …T k can be done in n 1 n 2 n 3 …n k ways.

E.x 1: A label identifier, for a computer system consists of one letter followed by 3 digits. If repetition allowed, how many distinct label identifier are possible? 26 x 10 x10 x 10 = possible identifiers. Problem 1: How many different sequences, each of length r, can be formed using elements from set A if: a) elements in the sequence may be repeated? b) all elements in the sequence must be distinct?

Theorem 3 For problem 1 (a): Let A be a set with n elements and 1  r  n. Then the number of sequences of length r that can be formed from elements of A, allowing repetitions, is n.n.n.n… = n r that is n is multiplied r times Ex 2: If A = { , , ,  }, how many words that can be build with length 3, repetition allowed? n = 4, r = 3, then n r = 4 3 = 64 words

Theorem 4 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) For problem 1 (b): If 1  r  n, then n P r is the number of permutation of n objects taken r at a time, is n(n-1)(n-2)… (n-(r - 1)) When r = n, that is from n objects, taken r at a time from A, where r = n, it is a n P n or n factorial, written as n!.

Ex 3: Choose 3 alphabet from A = {a, b, c} 3 P 3 = 3! = = 6, that are abc, acb, bac, bca, cab, cba. So, if there are n elements, taken r at a time, n P r = n.(n-1).(n-2)….. (n-(r-1)).(n-r).(n- (r+1))…..2.1 (n-r).(n-(r-1))….2.1 = n.(n-1).(n-2)….. (n-(r-1))

= n! (n - r)! Ex 4: If A = {p, q, r, s}, find the number of permutation for 3 elements. 4 P 3 = = = 24(ex: pqr, pqs, prq, prs, psq, psr, …….)

Ex 5: Choose 3 alphabets from A..Z 26 P 3 = … …… =

Theorem 5 The number of distinguishable permutations that can be formed from a collection of n objects where the first object appears k 1 times, the second object appears k 2 times, and so on, is: n! k 1 !k 2 !…k i ! Ex 6: a) MISSISSIPPIb) CANADA a) 11!= !4!4!2!

Exercise : A bank password consists of two letter of the English alphabet followed by two digits. How many different passwords are there? A coin tossed four times and the result of each toss is recorded. How many different sequences of head and tails are possible?

Combination Order does not matter.  we count no. of subset Theorem 1 Let A be a set with |A| = n, and let 1  r  n. Then the number of combinations of the elements of A, taken r at a time, written as n C r, is given by n C r = n! r! (n - r)!

Ex 7: If A = {p, q, r, s}, find the number of combination for 3 elements. 4 C 3 = = 4 (ex: pqr, pqs, prs, qrs) (pqr, prq, rpq, rqp, all are the same)

Exercise: Compute each of the following: 7 C 7 b) 7 C 4 c) 16 C 5 Suppose that a valid computer password consists of seven characters, the first of which is a letter chosen from the set A, B, C, D, E, F, G and the remaining six characters are letter chosen from the English alphabet or a digit. How many different passwords are possible?

Pigeonhole Pigeonhole Principle is a principle that ensures that the data is exist, but there is no information to identify which data or what data. Theorem 1 If there are n pigeon are assigned to m pigeonhole, where m < n, then at least one pigeonhole contains two or more pigeons.

Ex 9: if 8 people were chosen, at least 2 people were being born in the same day (Monday to Sunday). Show that by using pigeonhole principle. Sol:Because there are 8 people and only 7 days per week, so Pigeonhole Principle says that, at least two or more people were being born in the same day. Note that Pigeonhole Principle provides an existence proof. There must be an object or objects with certain characteristic. In the above example, the characteristic is having born on the same day of the week. The pigeonhole principle guarantees that they are at least two people with

this characteristic but gives no information on identifying this people. Only their existence are guaranteed. In order to use pigeonhole principle we must identify pigeons (object) and pigeonholes (categories of the desired characteristic) and be able to count the number of pigeons and the number of pigeonholes.

Ex 10:Show that if any five numbers from 1 to 8 are chosen, two of them will add to 9. Two numbers that add up to 9 are placed in sets as follows: A 1 = {1, 8},A 2 = {2, 7},A 3 = {3, 6},A 4 = {4, 5} Sol:Each of the 5 numbers chosen must belong to one of these sets. Since there are only four sets, the pigeonhole principle tells us that two of the chosen numbers belong to the same set. These numbers add up to 9.

The Extended Pigeonhole Principle If there are m pigeonholes and more than 2m pigeons, three or more pigeons will have to be assigned to at least one of the pigeonholes. Notation If n and m are positive integers, then  n/m  stands for largest integer less than equal to the rational number n/m.  3/2  = 1,  9/4  = 2  6/3  = 2

Theorem 2 If n pigeons are assigned to m pigeonholes, then one of the pigeonholes must contain at least  (n-1)/m  + 1 pigeons.