CS 2210 Discrete Structures Counting

Slides:



Advertisements
Similar presentations
22C:19 Discrete Math Counting Fall 2011 Sukumar Ghosh.
Advertisements

Counting. Counting = Determining the number of elements of a finite set.
Practice Quiz 3 Recursive Definitions Relations Basic Counting Pigeonhole Principle Permutations & Combinations Discrete Probability.
Counting Chapter 6 With Question/Answer Animations.
Recursively Defined Functions
Discrete Structures Chapter 5 Pigeonhole Principle Nurul Amelina Nasharuddin Multimedia Department.
CSE 321 Discrete Structures Winter 2008 Lecture 16 Counting.
Fall 2004COMP 3351 Standard Representations of Regular Languages Regular Languages DFAs NFAs Regular Expressions Regular Grammars.
Recursive Definitions Rosen, 3.4 Recursive (or inductive) Definitions Sometimes easier to define an object in terms of itself. This process is called.
1 Permutations and Combinations CS/APMA 202 Epp section 6.4 Aaron Bloomfield.
Permutations and Combinations
CS100 : Discrete Structures
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. Why counting  Determine the complexity of algorithms To sort n numbers, how many instructions are executed ?  Count the number of objects.
Counting. Product Rule Example Sum Rule Pigeonhole principle If there are more pigeons than pigeonholes, then there must be at least one pigeonhole.
Chapter The Basics of Counting 5.2 The Pigeonhole Principle
Generalized Permutations and Combinations
Chapter 6 With Question/Answer Animations 1. Chapter Summary The Basics of Counting The Pigeonhole Principle Permutations and Combinations Binomial Coefficients.
Fall 2002CMSC Discrete Structures1 One, two, three, we’re… Counting.
September1999 CMSC 203 / 0201 Fall 2002 Week #8 – 14/16 October 2002 Prof. Marie desJardins.
Dr. Eng. Farag Elnagahy Office Phone: King ABDUL AZIZ University Faculty Of Computing and Information Technology CPCS 222.
Inclusion-Exclusion Selected Exercises Powerpoint Presentation taken from Peter Cappello’s webpage
ICS 253: Discrete Structures I Counting and Applications King Fahd University of Petroleum & Minerals Information & Computer Science Department.
1 Binomial Coefficients CS 202 Epp, section ??? Aaron Bloomfield.
September1999 CMSC 203 / 0201 Fall 2002 Week #9 – 21/23/25 October 2002 Prof. Marie desJardins.
The Pigeonhole Principle. The pigeonhole principle Suppose a flock of pigeons fly into a set of pigeonholes to roost If there are more pigeons than pigeonholes,
CS 103 Discrete Structures Lecture 16
Discrete Structures Counting (Ch. 6)
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.
CS 104: Discrete Mathematics
L14: Permutations, Combinations and Some Review EECS 203: Discrete Mathematics.
Pigeonhole Principle. If n pigeons fly into m pigeonholes and n > m, then at least one hole must contain two or more pigeons A function from one finite.
Discrete Mathematics. Exercises Exercise 1:  There are 18 Computer Science (CS) majors and 325 Business Administration (BA) majors at a college.
Section The Pigeonhole Principle If a flock of 20 pigeons roosts in a set of 19 pigeonholes, one of the pigeonholes must have more than 1 pigeon.
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.
L14: Permutations, Combinations and Some Review
The Pigeonhole Principle
Permutations and Combinations
ICS 253: Discrete Structures I
Chapter 5, Section 5.1 The Basics of Counting
Lecture 10 To define the Binomial Theorem
Copyright © Zeph Grunschlag,
Generalized Permutations and Combinations
Today’s topics Counting Reading: Sections , 4.4 Upcoming
The Pigeonhole Principle
Standard Representations of Regular Languages
CSE322 PUMPING LEMMA FOR REGULAR SETS AND ITS APPLICATIONS
COCS DISCRETE STRUCTURES
Permutations and Combinations
Permutations and Combinations
Copyright © Zeph Grunschlag,
Counting Chapter 6 With Question/Answer Animations
Recursively Defined Functions
Lecture 08 Counting Profs. Koike and Yukita
CS100: Discrete structures
Mathematics for Computer Science MIT 6.042J/18.062J
A Brief Summary for Exam 2
Math/CSE 1019: Discrete Mathematics for Computer Science Fall 2011
Elementary Questions about Regular Languages
Non-regular languages
Combinatorics.
CSE 321 Discrete Structures
Representations of Integers
Inclusion-Exclusion Principle
CMPS 2433 Chapter 8 Counting Techniques
Presentation transcript:

CS 2210 Discrete Structures Counting Fall 2017 Sukumar Ghosh

The Product Rule

Example of Product Rule

Example of Product Rule

The Sum Rule

Example of Sum Rule

Example of Sum Rule

Wedding picture example

Counting subsets of a finite set Let S be a finite set. Use product rule to show that the number of different subsets of S is 2|S|

Counting loops How many times will the following program loop iterate before the final solution is generated? What is the final value of K? K:=0 for i1: = 1 to n1 for i2 := 1 to n2 for i3:= 1 to n3 K:= K+1

The Inclusion-Exclusion Principle

The Inclusion-Exclusion Principle

Tree diagrams

Tree diagrams

Pigeonhole Principle If 20 pigeons fly into 19 pigeonholes, then at least one of the pigeonholes must have two or more pigeons in it. Such observations lead to the pigeonhole principle. THE PIGEONHOLE PRINCIPLE. Let k be a positive integer. If more than k objects are placed into k boxes, then at least one box will contain two or more objects.

Application of Pigeonhole Principle An exam is graded on a scale 0-100. How many students should be there in the class so that at least two students get the same score? (Do not consider scores with fractional points.) Answer: More than 101.

Generalized Pigeonhole Principle If N objects are placed in k boxes, then there is at least one box containing at least ꜒N/k˥objects. Application 1. In a class of 73 students, there are at least ꜒73/12˥=7 who are born in the same month. Application 2.

More examples

More examples

Permutation

Permutation Note that P (n, n) = n!

Example of permutation

Exercise

Combination In permutation, order matters, in combination, it doesn’t.

Example of combination In how many bit strings of length 10, there are exactly four 1’s?

Proof of combination formula

Proof of combination formula

Circular seating

Other applications

Book shelf problem

Pascal’s Identity If n, k are positive integers and n ≥ k , then

Binomial Theorem

Proof of Binomial Theorem

Proof of Binomial Theorem

Proof of Binomial Theorem

Proof of Binomial Theorem

Example of Binomial Theorem

Example of Binomial Theorem

Example: Approximating (1+x)n The number of terms to be included will depend on the desired accuracy.