Presentation is loading. Please wait.

Presentation is loading. Please wait.

Spring 2016 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University.

Similar presentations


Presentation on theme: "Spring 2016 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University."— Presentation transcript:

1 Spring 2016 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1 Chapter 9.3 Counting Elements of Disjoint Sets: The Addition Rule

2 The Addition Rule Suppose a finite set A equals the union of k distinct mutually disjoint subsets Then, 2 Spring 2016 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University

3 Counting Password with Three or Fewer Letters A computer access password consists of from one to three letters chosen from the 26 in the alphabet with repetitions allowed. How many different passwords are possible? 3 Spring 2016 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University

4 Counting Password with Three or Fewer Letters – cont’ A computer access password consists of from one to three letters chosen from the 26 in the alphabet with repetitions allowed. How many different passwords are possible? 4 Spring 2016 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University

5 Counting the Number of Integers Divisible by 5 How many three-digit integers are divisible by 5? 5 Spring 2016 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University

6 Counting the Number of Integers Divisible by 5 – cont’ How many three-digit integers are divisible by 5? 6 Spring 2016 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University 9 choices (1 ~ 9) 10 choices (0 ~ 9) 2 choices (0 or 5)

7 The Difference Rule If A is a finite set and B is a subset of A, then 7 Spring 2016 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University

8 Counting PINs with Repeated Symbols The PINs are made from exactly four symbols chosen from the 26 letters of the alphabet and the ten digits, with repetitions allowed. How many PINs contain repeated symbols? If all PINs are equally likely, what is the probability that a randomly chosen PIN contains a repeated symbol? 8 Spring 2016 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University

9 Counting PINs with Repeated Symbols – cont’ The PINs are made from exactly four symbols chosen from the 26 letters of the alphabet and the ten digits, with repetitions allowed. How many PINs contain repeated symbols? Total possible cases: # of cases without any repetition: Solution: If all PINs are equally likely, what is the probability that a randomly chosen PIN contains a repeated symbol? 9 Spring 2016 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University

10 Formula for the Probability of the Complement of an Event If S is a finite sample space and A is an event in S, then 10 Spring 2016 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University

11 The Inclusion/Exclusion Rule Theorem 9.3.3: The Inclusion/Exclusion Rule for Two or Three Sets If A, B, and C are any finite sets, then and 11 Spring 2016 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University

12 Counting Elements of a General Union How many integers from 1 through 1,000 are multiple of 3 or multiples of 5? How many integers from 1 through 1,000 are neither multiples of 3 nor multiples of 5? 1000 – 467 = 533 12 Spring 2016 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University

13 Counting Elements of a General Union – cont’ How many integers from 1 through 1,000 are multiple of 3 or multiples of 5? # of multiple of 3: 3, 6, …, 999 = 3 (1, 2, …, 333) # of multiple of 5: 5, 10, …, 1000 = 5 (1, 2, …, 200) # of multiple of 15: 15, 30, …, 990 = 15 (1, 2, …, 66) Answer: 200 + 333 – 66 = 533 = 467 How many integers from 1 through 1,000 are neither multiples of 3 nor multiples of 5? 1000 – 467 = 533 13 Spring 2016 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University

14 Counting the Number of Elements in an Intersection Out of a total of 50 students in the class, 30 took precalculus 18 took calculus 26 took java 9 took both precalculus and calculus 16 took both precalculus and java 8 took both calculus and java 47 took at least one of the three courses How many students did not take any of the three courses? How many students took all three courses? How many students took precalculus and calculus but not java? 14 Spring 2016 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University

15 Counting the Number of Elements in an Intersection Out of a total of 50 students in the class, 30 took precalculus 18 took calculus 26 took java 9 took both precalculus and calculus 16 took both precalculus and java 8 took both calculus and java 47 took at least one of the three courses How many students did not take any of the three courses? How many students took all three courses? How many students took precalculus and calculus but not java? 15 Spring 2016 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University


Download ppt "Spring 2016 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University."

Similar presentations


Ads by Google