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

Slides:



Advertisements
Similar presentations
9.5 Counting Subsets of a Set: Combinations
Advertisements

Basic Permutations and Combinations
5.3 Permutations and Combinations
22C:19 Discrete Math Sets and Functions Fall 2011 Sukumar Ghosh.
Counting. Counting = Determining the number of elements of a finite set.
The Pigeonhole Principle College of Information Technology & Design
Inclusion-Exclusion Selected Exercises
CS Discrete Mathematical Structures
Lecture 4 4.1,4.2 Counting. 4.1 Counting Two Important Principles: Product Rule and Sum Rule. Product Rule: Assume we need to perform procedure 1 AND.
CMPS 2433 Chapter 8 Counting Techniques Midwestern State University Dr. Ranette Halverson.
12 April 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction.
Counting Chapter 6 With Question/Answer Animations.
Recursively Defined Functions
3.5 Paradox  1.Russell’s paradox  A  A, A  A 。  Russell’s paradox: Let S={A|A  A}. The question is, does S  S?  i.e. S  S or S  S?  If S  S,
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 Non-regular languages. 2 Regular languages Non-regular languages.
Chapter 8 Counting Techniques PASCAL’S TRIANGLE AND THE BINOMIAL THEOREM.
1 Permutations and Combinations CS/APMA 202 Epp section 6.4 Aaron Bloomfield.
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
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 9- 1.
Binomial Coefficients, Inclusion-exclusion principle
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.
R. Johnsonbaugh Discrete Mathematics 5 th edition, 2001 Chapter 4 Counting methods and the pigeonhole principle.
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
ICS 253: Discrete Structures I
Chapter 5, Section 5.1 The Basics of Counting
The Pigeonhole Principle
Standard Representations of Regular Languages
CSE322 PUMPING LEMMA FOR REGULAR SETS AND ITS APPLICATIONS
COCS DISCRETE STRUCTURES
Counting Chapter 6 With Question/Answer Animations
CS 2210 Discrete Structures Counting
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
Elementary Questions about Regular Languages
Non-regular languages
CSE 321 Discrete Structures
CMPS 2433 Chapter 8 Counting Techniques
Presentation transcript:

22C:19 Discrete Math Counting Fall 2011 Sukumar Ghosh

The Product Rule

Example of Product Rule

The 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

Tree diagrams

Pigeonhole Principle If 20 pigeons flies into 19 pigeonholes, then at least one of the pigeonholes must have at least two 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 How many students should be there in the class so that at least two students get the same score? 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 applications of pigeonhole principle

Permutation

Note that P (n,n) = n!

Example of permutation

Exercise

Combination In permutation, order matters.

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

Proof of combination formula

Circular seating

Other applications

Book shelf problem

Pascals Identity If n, k are positive integers and n k, then C(n+1, k) = C(n, k) + C(n, k-1)

Binomial Theorem

Proof 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.