Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSNB143 – Discrete Structure

Similar presentations


Presentation on theme: "CSNB143 – Discrete Structure"— Presentation transcript:

1 CSNB143 – Discrete Structure
Topic 6 – Counting Techniques Part II

2 Topic 6 – Counting Techniques
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
Multiplication Principle of Counting If there are two tasks T1 and T2 are to be done in sequence. If T1 can be done in n1 ways, and for each of these ways T2 can be done in n2 ways, the sequence T1T2 can be done in n1n2 ways.

4 Topic 6 – Counting Techniques
Example of implementation of multiplication principle of counting A label identifier for computer system, consists of one letter followed by three digits. If repetitions are allowed, use permutation to see how many label identifiers are possible. Task 1 - Find possible selection of letters, n= 26, r = 1, repetition allowed using nr Task 2 – Find possible selection of digits, n= 10, r =3, repetition allowed Using nr Task 1 : 261 Task 2 : 103 Using multiplication principle Task 1 x Task 2 26 x 10 x 10 x 10 = 26000

5 Topic 6 – Counting Techniques
Distinguishable Permutations The number of distinguishable permutations can be formed from a collection of n objects where the first object appears k1 times, the second appears k2 times, and so on ____n!____ k1! k2! … kt! Where k1 + k2 + K3 … kt = n Try CANADA

6 Topic 6 – Counting Techniques
Example of implementation In how many ways can we select a committee of two women and three men from a group of five distinct women and six distinct men? Task 1 - Find possible selection of women, n= 5, r = 2, repetition not allowed (distinct) using Task 2 – Find possible selection of digits, n= 6, r =3, repetition not allowed

7 Topic 6 – Counting Techniques
Example of implementation Find the number of distinguishable permutation of the letters in PASCAL Find the number of distinguishable permutation of the letters in REQUIREMENTS

8 Topic 6 – Counting Techniques
Example of implementation How many different seven-person committees can be formed each containing three women from an available set of 20 women and four men from an available set of 30 men? Permutation or Combination? Repeated or not repeated? Formula to be used?

9 Topic 6 – Counting Techniques
Example of implementation Supposed 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}, the remaining six characters are letters chosen from the English alphabet or a digit and may be repeated. Permutation or Combination? Repeated or not repeated? Formula to be used?

10 Topic 6 – Counting Techniques
Example of implementation How many permutations of the letters ABCDEF contain the substring DEF? How many permutations of the letters ABCDEF contain the letters DEF together in any order?

11 Topic 6 – Counting Techniques
Example of implementation How many arrangement of the letters in the word BOUGHT can be formed if the vowels must be kept next to each other?

12 Topic 6 – Counting Techniques
Pigeonhole Principle Pigeonhole Principle is a principle that ensures that the data exists, but there is no information to identify which data or what data. Example: If there are n pigeons assigned to m pigeonholes, where the number of pigeons are more than the number of pigeonholes, then at least one pigeonhole will contain more than one pigeons.

13 Topic 6 – Counting Techniques
Pigeonhole Principle Show that any five numbers from 1 to 8 are chosen, two of them will add to 9. Solution: 1, 2, 3, 4, 5, 6,7, 8, 9 2 numbers that add up to 9, placed in sets: A={1,8} B={2,7} C={3,6} D={4,5} Each of the 5 numbers chosen must belong to one of these sets. Since there are only 4 sets, the pigeonhole principle tells us that two of the chosen numbers belong to the same set

14 Topic 6 – Counting Techniques
Pigeonhole Principle Example: In a group of 8 people show that at least two have their birthday on the same day of the week. Solution: The people (8 of them) are the pigeons and the weekdays (7 of them) are the pigeon-holes. By the PHP, there is a weekday such that at least 2 people have that day as their birthday (proven)


Download ppt "CSNB143 – Discrete Structure"

Similar presentations


Ads by Google