CSE 321 Discrete Structures

Slides:



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

Counting. Counting in Algorithms How many comparisons are needed to sort n numbers? How many steps to compute the GCD of two numbers ? How many steps.
Basic Permutations and Combinations
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.
Counting. Counting = Determining the number of elements of a finite set.
Permutations and Combinations Rosen 4.3. Permutations A permutation of a set of distinct objects is an ordered arrangement these objects. An ordered arrangement.
Counting Chapter 6 With Question/Answer Animations.
CSE115/ENGR160 Discrete Mathematics 04/17/12
Lecture 5 Counting 4.3, Permutations r-permutation: An ordered arrangement of r elements of a set of n distinct elements. Example: S={1,2,3}:
MATH 310, FALL 2003 (Combinatorial Problem Solving) Lecture 22, Friday, October 24.
CSE 321 Discrete Structures Winter 2008 Lecture 16 Counting.
More Probability and Counting Friday, April 9, 2004.
Combinatorics 3/15 and 3/ Counting A restaurant offers the following menu: Main CourseVegetablesBeverage BeefPotatoesMilk HamGreen BeansCoffee.
MAT 2720 Discrete Mathematics Section 6.1 Basic Counting Principles
Counting. Why counting  Determine the complexity of algorithms To sort n numbers, how many instructions are executed ?  Count the number of objects.
Basic Counting. This Lecture We will study some basic rules for counting. Sum rule, product rule, generalized product rule Permutations, combinations.
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.
Permutations and Combinations
Notes 9.2 – The Binomial Theorem. I. Alternate Notation A.) Permutations – None B.) Combinations -
Fall 2002CMSC Discrete Structures1 One, two, three, we’re… Counting.
1 Lecture 4 (part 1) Combinatorics Reading: Epp Chp 6.
ICS 253: Discrete Structures I Counting and Applications King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Lecture 5 Counting 4.3, Permutations r-permutation: An ordered arrangement of r elements of a set of n distinct elements. Example: S={1,2,3}:
Simple Arrangements & Selections. Combinations & Permutations A permutation of n distinct objects is an arrangement, or ordering, of the n objects. An.
Counting CSC-2259 Discrete Structures Konstantin Busch - LSU1.
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,
1 Melikyan/DM/Fall09 Discrete Mathematics Ch. 6 Counting and Probability Instructor: Hayk Melikyan Today we will review sections 6.6,
CS 103 Discrete Structures Lecture 16
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.
CS 104: Discrete Mathematics
L14: Permutations, Combinations and Some Review EECS 203: Discrete Mathematics.
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.
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.
Combinatorics. What is Combinatorics? Wide ranging field involving the study of discrete objects.
MAT 2720 Discrete Mathematics
L14: Permutations, Combinations and Some Review
The Pigeonhole Principle
CSE15 Discrete Mathematics 04/19/17
ICS 253: Discrete Structures I
Chapter 5, Section 5.1 The Basics of Counting
CSC-2259 Discrete Structures
COCS DISCRETE STRUCTURES
12.2 Permutations and Combinations
Permutations and Combinations
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
A Brief Summary for Exam 2
Counting I: One-To-One Correspondence and Choice Trees
Permutations and Combinations
Basic Counting.
Combinatorics.
CSE 321 Discrete Structures
CSE 321 Discrete Structures
Counting techniques Basic Counting Principles, Pigeonhole Principle, Permutations and Combinations.
Basic Counting Lecture 9: Nov 5, 6.
Permutations and Combinations
Representations of Integers
Inclusion-Exclusion Principle
CSE 321 Discrete Structures
Discrete Math for CS CMPSC 360 LECTURE 27 Last time: Counting. Today:
CSE 321 Discrete Structures
CMPS 2433 Chapter 8 Counting Techniques
Counting I: Choice Trees and Correspondences
Presentation transcript:

CSE 321 Discrete Structures Winter 2008 Lecture 17 Counting TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AA

Announcements Readings Counting Homework 5.3, (4.3) Permutations and Combinations 5.4, (4.4) Binomial Coefficients 5.5, (4.5) Generalized Permutations and Combinations Homework

Highlights from Lecture 16 Counting Product Rule |A1 A2| = |A1||A2| Sum Rule A1 and A2 disjoint, |A1 A2| = |A1| + |A2| Inclusion-Exclusion |A1 A2| = |A1| + |A2| - |A1 A2| Pigeon Hole Principle Example: How many license plates of the form LLLDDD that do not have 3 repeated letters or 3 repeated digits

Clever PHP Applications Every sequence of n2 + 1 distinct numbers contains a subsequence of length n+1 that is either strictly increasing or strictly decreasing. 4, 22, 8, 15, 19, 11, 2, 1, 9, 20, 10, 7, 16, 3, 6, 5, 14 Aside: design an efficient algorithm for finding the longest increasing subsequence

Proof Let a1, . . . am be a sequence of n2+1 distinct numbers Let ik be the length of the longest increasing sequence starting at ak Let dk be the length of the longest decreasing sequence starting at ak Suppose ik  n and dk  n for all k There must be k and j, k < j, with ik = ij and dk = dj

Permutations vs. Combinations How many ways are there of selecting 1st, 2nd, and 3rd place from a group of 10 sprinters? How many ways are there of selecting the top three finishers from a group of 10 sprinters?

r-Permutations An r-permutation is an ordered selection of r elements from a set P(n, r), number of r-permutations of an n element set

r-Combinations An r-combination is an unordered selection of r elements from a set (or just a subset of size r) C(r, n), number of r-permutations of an n element set

How many Binary strings of length 10 with 3 0’s How many different ways of assigning 38 students to the 5 seats in the front of the class How many different ways of assigning 38 students to a table that seats 5 students

Prove C(n, r) = C(n, n-r) [Proof 1] Proof by formula

Prove C(n, r) = C(n, n-r) [Proof 2] Combinatorial proof

Counting paths How many paths are there of length n+m-2 from the upper left corner to the lower right corner of an n  m grid?

Binomial Theorem

Binomial Coefficient Identities from the Binomial Theorem

Pascal’s Identity and Triangle