CMPS 2433 Chapter 8 Counting Techniques

Slides:



Advertisements
Similar presentations
Counting. Counting = Determining the number of elements of a finite set.
Advertisements

CMPS 2433 Chapter 8 Counting Techniques Midwestern State University Dr. Ranette Halverson.
Permutations and Combinations Rosen 4.3. Permutations A permutation of a set of distinct objects is an ordered arrangement these objects. An ordered arrangement.
Permutations r-permutation (AKA “ordered r-selection”) An ordered arrangement of r elements of a set of n distinct elements. permutation of a set of n.
CSE 321 Discrete Structures Winter 2008 Lecture 16 Counting.
Combinations We should use permutation where order matters
Counting Techniques: r-combinations with
Counting Techniques The Fundamental Rule of Counting (the mn Rule); Permutations; and Combinations.
Recursive Definitions Rosen, 3.4 Recursive (or inductive) Definitions Sometimes easier to define an object in terms of itself. This process is called.
Chapter 8 Counting Techniques PASCAL’S TRIANGLE AND THE BINOMIAL THEOREM.
Chapter 11 Counting Methods © 2008 Pearson Addison-Wesley. All rights reserved.
Combinatorics 3/15 and 3/ Counting A restaurant offers the following menu: Main CourseVegetablesBeverage BeefPotatoesMilk HamGreen BeansCoffee.
Counting. Why counting  Determine the complexity of algorithms To sort n numbers, how many instructions are executed ?  Count the number of objects.
Topics to be covered: Produce all combinations and permutations of sets. Calculate the number of combinations and permutations of sets of m items taken.
Discrete Mathematical Structures (Counting Principles)
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 9- 1.
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.
Section 10-3 Using Permutations and Combinations.
3. Counting Permutations Combinations Pigeonhole principle Elements of Probability Recurrence Relations.
ICS 253: Discrete Structures I Counting and Applications King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Elements of Combinatorics (Continuation) 1. Pigeonhole Principle Theorem. If pigeons are placed into pigeonholes and there are more pigeons than pigeonholes,
Chapter 12 PROBABILITY Counting, Combinations, Permutations, Probability, Binomial Theorem.
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.
Ch Counting Principles. Example 1  Eight pieces of paper are numbered from 1-8 and placed in a box. One piece of paper is drawn from the box, its.
CSNB143 – Discrete Structure
Spatial Statistics and Spatial Knowledge Discovery First law of geography [Tobler]: Everything is related to everything, but nearby things are more related.
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,
1 Melikyan/DM/Fall09 Discrete Mathematics Ch. 6 Counting and Probability Instructor: Hayk Melikyan Today we will review sections 6.6,
Discrete Structures Combinations. Order Doesn’t Matter In the previous section, we looked at two cases where order matters: Multiplication Principle –
Chapter 7 – Counting Techniques CSNB 143 Discrete Mathematical Structures.
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.
Section 6.4. Powers of Binomial Expressions Definition: A binomial expression is the sum of two terms, such as x + y. (More generally, these terms can.
2.6 APPLICATIONS OF INDUCTION & OTHER IDEAS IMPORTANT THEOREMS MIDWESTERN STATE UNIVERSITY – COMPUTER SCIENCE.
Binomial Coefficients and Identities
Chapter 12.6 Notes. O A positive integer n is the product of the positive integers less than or equal to n. 0! Is defined to be 1. n! = n ● (n -1) ● (n.
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.
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 歐亞書局.
Week 9 - Friday.  What did we talk about last time?  Permutations  Counting elements in sets  Brief introduction to combinations.
Chapter 10 Counting Methods.
L14: Permutations, Combinations and Some Review
The Pigeonhole Principle
ICS 253: Discrete Structures I
Chapter 5, Section 5.1 The Basics of Counting
Chapter 12.5 The Binomial Theorem.
CSNB 143 Discrete Mathematical Structures
Today’s topics Counting Reading: Sections , 4.4 Upcoming
The Pigeonhole Principle
COCS DISCRETE STRUCTURES
The Binomial Theorem.
Permutations and Combinations
Permutations and Combinations
9. Counting and Probability 1 Summary
CS 2210 Discrete Structures Counting
CS100: Discrete structures
A Brief Summary for Exam 2
2.6 Applications Of Induction & other ideas Important Theorems
Math/CSE 1019: Discrete Mathematics for Computer Science Fall 2011
Combinatorics: Combinations
Permutations and Combinations
Combinatorics.
CSE 321 Discrete Structures
Counting techniques Basic Counting Principles, Pigeonhole Principle, Permutations and Combinations.
Chapter 10 Counting Methods.
Chapter 10 Counting Methods 2012 Pearson Education, Inc.
Section 11.7 The Binomial Theorem
Presentation transcript:

CMPS 2433 Chapter 8 Counting Techniques Midwestern State University

Review From Previous Chapters 2.6 Binary Search For an ordered list of 2n items, @most n+1 comparisons are needed to find an item For an ordered list of n items, at most log2 n comparisons are needed Example: How many comparisons for list of… 100o items? 1,000,000 items?

Review Permutation: an ordering of a set of elements Permutations of set S with n elements is n! Permutations of r elements taken from n is (n!)/(n-r)! Example - S contains 7 elements How many different permutations? 7! How many permutations of only 5 of the elements? 7!/3!

Review Theorem 1.3: A set of N elements has exactly 2N subsets Consider S = {1, 3, 5, 7, 90} – include or not? Theorem 2.10 (p. 89) :Set S has n elements. # of subsets containing r elements is (n!)/(r! (n-r)!) Referred to as Combinations of n items taken r at a time. C(n,r) Note: r! term eliminates duplicates Example: How many subsets of size 3 from S?

Section 8.2 ~ 3 Fundamental Principles Pigeonhole Principle: If pigeons are placed in pigeon holes and there are more pigeons than holes, then some holes must contain at least 2 pigeons. ~~ If number of pigeons is more than k times the number of holes, then some hole must contain at least k+1 pigeons.

Section 8.2 ~ 3 Fundamental Principles Applications: Pigeonhole Principle How many people must be selected from a collection of 15 couples to ensure at least one couple is selected? How many distinct integers must be chosen to assure there are at least 10 having the same congruence modulo 7? Select any 5 points on the interior of an equilateral triangle having sides length 1. Show that there is at least one pair of points with distance between <= ½.

Fundamental Principle #2 Multiplication Principle: Consider a procedure of k steps. S’pose step 1 can be done in n1 ways, step 2 in n2 ways, etc. The number of different ways the entire procedure can be performed is n1*n2*n3*…*nk.

Fundamental Principle #2 Applications: Multiplication Principle Couple has 5 first names & 3 middle chosen for a baby. How many different baby names? Binary numbers: How many different binary numbers of length 8 are there? What are the values? Phone numbers: How many numbers are possible in the 940 area code? (First 2 digits cannot be 0 or 1) Example 8.10 (p. 410)

Fundamental Principle #3 Addition Principle: Assume k sets with n1 elements in set 1, n2 in set 2, etc. and all elements are distinct. The number of elements in the union of the sets is n1+n2+n3+…+nk Note: Sometimes “solution” is to define the distinct sets so that they can be easily counted.

Fundamental Principle #3 Applications: Addition Principle Couple has 5 girl names and 7 boy names for baby. How many different names? How many integers between 1 – 100 (inclusive) are even or end in 5? Example 8.14 (p. 412)

Homework Section 8.2 Section 8.2 – page 413+ 1 – 36 ~ All except proofs

8.1 Pascal’s Triangle & Binomial Theorem For integers r & n, 1 <= r <= n, C(n,r) = C(n-1,r-1) + C(n-1,r) Example: C (7,5) = C (6,4) + C (6,5) Reminder: C(n,r) = n! / (r! (n-r)!)

Pascal’s Triangle C(0,0) C(1,0) C(1,1) C(2,0) C(2,1) C(2,2) C(3,0) C(3,1) C(3,2) C(3,3) etc…

Pascal’s Triangle 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 etc…

Application of Pascal’s Triangle Theorem 8.2: If r and n are integers such that 0 <= r <= n, then C(n,r) = C(n,n-r) Example: C(5,2) = C(5,3)

Theorem 8.3: Binomial Theorem For every positive integer n, (x + y)n = C(n,0)xn + C(n,1)xn-1 y + … + C(n,n-1) x yn-1 + C(n,n)yn C(n,r) are called binomial coefficients

Homework Section 8.1 – page 405+ Problems 1 - 24