Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Discrete Structures – CNS2300 Text Discrete Mathematics and Its Applications (5 th edition) Kenneth H. Rosen Chapter 4 Counting.

Similar presentations


Presentation on theme: "1 Discrete Structures – CNS2300 Text Discrete Mathematics and Its Applications (5 th edition) Kenneth H. Rosen Chapter 4 Counting."— Presentation transcript:

1 1 Discrete Structures – CNS2300 Text Discrete Mathematics and Its Applications (5 th edition) Kenneth H. Rosen Chapter 4 Counting

2 2 Section 4.1 The Basics of Counting

3 3 Pick a Block OR a Cylinder

4 4 The Sum Rule If a task can be done in n 1 ways and a second task in n 2 ways, and if these tasks cannot be done at the same time, then there are n 1 + n 2 ways to do either task.

5 5 Example: Suppose that there are three different types of pie and 4 types of ice cream. If you are allowed pie or ice cream (not both) for desert, how many choices do you have? pie OR ice cream 3 + 4 = 7

6 6 Tree Diagrams Roll a Die 1 2 3 4 5 6 1 2 3 4 5 6 Heads 1 Heads 2 Heads 3 Heads 4 Heads 5 Heads 6 Tails 1 Tails 2 Tails 3 Tails 4 Tails 5 Tails 6 Flip a Coin Heads Tails

7 7 Flip a Coin Heads Tails Roll a Die 1 2 3 4 5 6 1 2 3 4 5 6 T1H1 T1H2 T1H3 T1H4 T1H5 T1H6 T1T1 T1T2 T1T3 T1T4 T1T5 T1T6 1 2 3 4 5 6 1 2 3 4 5 6 Flip a Coin Heads Tails

8 8 The Product Rule Suppose that a procedure can be broken down into two tasks. If there are n 1 ways to do the first task and n 2 ways to do the second task after the first task has been done, then there are n 1 n 2 ways to do the procedure

9 9 There are four major auto routes from Boston to Detroit and six from Detroit to Los Angeles. How many major auto routes are there from Boston to Los Angeles via Detroit? task 1 = drive from Boston to Detroit n 1 = 4 task 2 = drive from Detroit to Los Angeles n 2 = 6 task 2 follows task 1 |Boston to Los Angles via Detroit| = (4)(6) = 24 Boston Detroit Los Angeles

10 10 Example The Telephone Numbering Plan Let X = 0…9 N = 2…9 Y = 0,1 Using the plan currently in existence in North America, numbers must be of the form NXX-NXX-XXXX How many numbers are possible in North America?

11 11 More Complex Example Each user on a computer system has a password, which is six characters long, where each character is an uppercase letter or a digit. Each password must contain at least one digit. How many possible passwords are there?

12 12 Inclusion-Exclusion Principle

13 13 The Pigeonhole Principle If you have more pigeons than pigeonholes, at least one pigeon is going to have to double up. ?

14 14 Example There are 38 different time periods during which classes at a university can be scheduled. If there are 677 different classes, how many different rooms will be needed?

15 15 finished


Download ppt "1 Discrete Structures – CNS2300 Text Discrete Mathematics and Its Applications (5 th edition) Kenneth H. Rosen Chapter 4 Counting."

Similar presentations


Ads by Google