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

Slides:



Advertisements
Similar presentations
Basic Counting Rosen 4.1. Sum Rule If a first task can be done in n 1 ways and a second task can be done in n 2 ways, and if these tasks cannot be done.
Advertisements

Lecture 13 Elements of Probability CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Introduction to Probability Experiments, Outcomes, Events and Sample Spaces What is probability? Basic Rules of Probability Probabilities of Compound Events.
Recursively Defined Functions
Section 4.1: The Basics of Counting As we have seen, one way to count the number of objects in a finite set S is to produce a one-to-one correspondence.
College of Information Technology & Design
Mathematics in Today's World
Counting Chapter 13 sec 1. Break up into groups One method of counting is using the tree diagram. ◦ It is useful to keep track of counting. ◦ Order of.
Copyright © Zeph Grunschlag, Counting Techniques Zeph Grunschlag.
1 Section 4.1 Basics of Counting. 2 Basic Counting Principles: Sum Rule Suppose you have two tasks to perform: –The first task can be done in n 1 ways;
CSE115/ENGR160 Discrete Mathematics 04/10/12
Combinatorics Chapter 3 Section 3.1 Trees and Equally Likely Outcomes Finite Mathematics – Stall.
Recursive Definitions Rosen, 3.4 Recursive (or inductive) Definitions Sometimes easier to define an object in terms of itself. This process is called.
Combinatorics 3/15 and 3/ Counting A restaurant offers the following menu: Main CourseVegetablesBeverage BeefPotatoesMilk HamGreen BeansCoffee.
Counting Chapter 6 With Question/Answer Animations.
Chapter The Basics of Counting 5.2 The Pigeonhole Principle
Fall 2015 COMP 2300 Discrete Structures for Computation
Discrete Maths Objective to introduce some of the counting rules (product, sum, subtraction, division, pigeonhole) through examples , Semester 2,
Counting. Why counting  Determine the complexity of algorithms To sort n numbers, how many instructions are executed ?  Count the number of objects.
1 Discrete Structures – CNS2300 Text Discrete Mathematics and Its Applications (5 th Edition) Kenneth H. Rosen Chapter 4 Counting.
1 Discrete Structures – CNS2300 Text Discrete Mathematics and Its Applications Kenneth H. Rosen Chapter 3 Mathematical Reasoning, Induction and Recursion.
Fall 2002CMSC Discrete Structures1 One, two, three, we’re… Counting.
The Practice of Statistics
ICS 253: Discrete Structures I Counting and Applications King Fahd University of Petroleum & Minerals Information & Computer Science Department.
1 Discrete Structures – CNS2300 Text Discrete Mathematics and Its Applications (5 th Edition) Kenneth H. Rosen Chapter 5 Counting.
The Basics of Counting Section 6.1.
Section Section Summary The Product Rule The Sum Rule The Subtraction Rule The Division Rule Examples, Examples, and Examples Tree Diagrams.
CSNB143 – Discrete Structure
Chapter 6 Lesson 6.1 Probability 6.1: Chance Experiments and Events.
CS 103 Discrete Structures Lecture 16
Basic Concepts of Probability
1 Basics of Counting CS/APMA 202 Rosen section 4.1 Aaron Bloomfield.
Discrete Structures Counting (Ch. 6)
Notes Over A school team sells caps in two colors (blue or white), two sizes (child or adult), and two fabrics (cotton or polyester). Draw a.
Discrete Structures – CNS2300 Text Discrete Mathematics and Its Applications (5 th Edition) Kenneth H. Rosen Chapter 4 Counting.
Introduction to Discrete Probability Epp, section 6.x CS 202.
Chapter 7 – Counting Techniques CSNB 143 Discrete Mathematical Structures.
1 Discrete Structures - CSIS2070 Text Discrete Mathematics and Its Applications Kenneth H. Rosen Chapter 4 Counting.
16-3 The Binomial Probability Theorem. Let’s roll a die 3 times Look at the probability of getting a 6 or NOT getting a 6. Let’s make a tree diagram.
2/24/20161 One, two, three, we’re… Counting. 2/24/20162 Basic Counting Principles Counting problems are of the following kind: “How many different 8-letter.
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.
Section Basic Counting Principles: The Product Rule The Product Rule: A procedure can be broken down into a sequence of two tasks. There are n 1.
CS 104: Discrete Mathematics
Spring 2016 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University.
C HAPTER 6: P ROBABILITY Section 6.1 – The Idea of Probability.
AP STATISTICS LESSON AP STATISTICS LESSON PROBABILITY MODELS.
Discrete Mathematics and Its Applications Sixth Edition By Kenneth Rosen Chapter 5 Counting 歐亞書局.
COUNTING Discrete Math Team KS MATEMATIKA DISKRIT (DISCRETE MATHEMATICS ) 1.
Fundamental counting principle Fundamental Counting Principal = Fancy way of describing how one would determine the number of ways a sequence of events.
SECURITY A hacker uses a software program to guess the passwords in Activity 2. The program checks 600 passwords per minute. What is the greatest amount.
Section 5.1 Day 2.
Adding Probabilities 12-5
ICS 253: Discrete Structures I
Chapter 5, Section 5.1 The Basics of Counting
Chapter 7: Counting Principles
CSNB 143 Discrete Mathematical Structures
The Pigeonhole Principle
Bring a penny to class tomorrow
Counting Chapter 6 With Question/Answer Animations
EXAMPLE 1 Find a sample space
Recursively Defined Functions
One, two, three, we’re… Counting.
Mutually Exclusive and Inclusive Events
Xuan Guo Lab 9 Xuan Guo
CS100: Discrete structures
Discrete Structures for Computer Science
Probability Trees By Anthony Stones.
Counting techniques Basic Counting Principles, Pigeonhole Principle, Permutations and Combinations.
Discrete Structures Counting.
Representations of Integers
Presentation transcript:

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

2 Section 4.1 The Basics of Counting

3 Pick a Block OR a Cylinder

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 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 = 7

6 Tree Diagrams Roll a Die 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 Flip a Coin Heads Tails Roll a Die T1H1 T1H2 T1H3 T1H4 T1H5 T1H6 T1T1 T1T2 T1T3 T1T4 T1T5 T1T Flip a Coin Heads Tails

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 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 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 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 Inclusion-Exclusion Principle

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

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 finished