Combinatorics 3/15 and 3/29. 6.1 Counting A restaurant offers the following menu: Main CourseVegetablesBeverage BeefPotatoesMilk HamGreen BeansCoffee.

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.
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.
Chapter 6 With Question/Answer Animations. Chapter Summary The Basics of Counting The Pigeonhole Principle Permutations and Combinations Binomial Coefficients.
THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph , N.V. Bilous.
Counting and Probability The outcome of a random process is sure to occur, but impossible to predict. Examples: fair coin tossing, rolling a pair of dice,
CSE115/ENGR160 Discrete Mathematics 04/17/12
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;
Discrete Mathematics Lecture 6 Alexander Bukharovich New York University.
Recursive Definitions Rosen, 3.4 Recursive (or inductive) Definitions Sometimes easier to define an object in terms of itself. This process is called.
CS100 : Discrete Structures
4. Counting 4.1 The Basic of Counting Basic Counting Principles Example 1 suppose that either a member of the faculty or a student in the department is.
Counting and Probability Sets and Counting Permutations & Combinations Probability.
Counting Chapter 6 With Question/Answer Animations.
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.
The Basics of Counting Section 6.1.
Counting. Techniques for counting Rule 1 Suppose we carry out have a sets A 1, A 2, A 3, … and that any pair are mutually exclusive (i.e. A 1  A 2 =
Basic Counting Lecture 12: Oct 28. This Lecture We will study some basic rules for counting. Sum rule, product rule, generalized product rule Permutations,
Basic Counting. This Lecture We will study some basic rules for counting. Sum rule, product rule, generalized product rule Permutations, combinations.
Chapter The Basics of Counting 5.2 The Pigeonhole Principle
Topics to be covered: Produce all combinations and permutations of sets. Calculate the number of combinations and permutations of sets of m items taken.
Generalized Permutations and Combinations
Binomial Coefficients, Inclusion-exclusion principle
9.3 Addition Rule. The basic rule underlying the calculation of the number of elements in a union or difference or intersection is the addition rule.
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.
Chapter 3 Permutations and combinations
3. Counting Permutations Combinations Pigeonhole principle Elements of Probability Recurrence Relations.
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.
Elements of Combinatorics (Continuation) 1. Pigeonhole Principle Theorem. If pigeons are placed into pigeonholes and there are more pigeons than pigeonholes,
1 Binomial Coefficients CS 202 Epp, section ??? Aaron Bloomfield.
Simple Arrangements & Selections. Combinations & Permutations A permutation of n distinct objects is an arrangement, or ordering, of the n objects. An.
4.1.2 Pigeonhole principle:Strong Form  Theorem 4.2: Let q 1,q 2,…,q n be positive integers. If q 1 +q 2 +…+q n -n+1 objects are put into n boxes, then.
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.
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,
Some other set notation We will use the notation to mean that e is an element of A. We will use the notation to mean that e is not an element of A.
Spring 2016 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University.
CS Lecture 8 Developing Your Counting Muscles.
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.
Operations on Sets Union of Sets Intersection of Sets
Chapter 6 With Question/Answer Animations Copyright © McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written.
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.
Section 6.3. Section Summary Permutations Combinations.
Discrete Mathematics Counting.
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
COCS DISCRETE STRUCTURES
Permutations and Combinations
9. Counting and Probability 1 Summary
CS 2210 Discrete Structures Counting
CS100: Discrete structures
Math/CSE 1019: Discrete Mathematics for Computer Science Fall 2011
Permutations and Combinations
Basic Counting.
Basic Counting Lecture 9: Nov 5, 6.
CMPS 2433 Chapter 8 Counting Techniques
Presentation transcript:

Combinatorics 3/15 and 3/29

6.1 Counting A restaurant offers the following menu: Main CourseVegetablesBeverage BeefPotatoesMilk HamGreen BeansCoffee If you must choose 1 main course, 1 vegetable, and 1 beverage, in how many ways can you order a meal?

The Multiplication Principle: 1.If a process can be broken down into two steps, performed in order, with n 1 ways of completing the first step and n 2 ways of completing the second step after the first step is completed, then there are n 1n 2 ways of completing the process. 2.More generally, if a process can be understood as a sequence of k steps performed in order, with n i the possible number of ways of completing the i-th step after the first i-1 steps have been completed, then the number of ways of completing the process is the product n 1 n 2 n k.

Example How many 3-digit positive integers are there?

Permutations In how many ways can six students line up to go outside for recess?

Permutations The number of permutations of n distinct objects is given by n!=n (n-1) 2 1.

Permutations How many three digit numbers are there if you cannot use a number more that once?

P(n,r) The number of ways a subset of r elements can be chosen from a set of n elements is given by

The Addition Principle Suppose that {X 1, X 2, , X k } is a collection of disjoint sets, where X i has n i elements for each integer i, 1<=i<=k. If a process is completed by choosing one element from exactly one of the sets in this collection, then the number of ways to complete the process is the sum n 1 +n 2 +···+n k. A die is tossed, and a chip is drawn from a box containing three chips numbered 1, 2, and 3. How many possible outcomes can be obtained from this experiment? Verify your answer with a tree diagram.

Example 1 A die is tossed, and a chip is drawn from a box containing three chips numbered 1, 2, and 3. How many possible outcomes can be obtained from this experiment? Verify your answer with a tree diagram.

Example 2 A password needs to start with 2 letters then 4 numbers. How many passwords are there?

6.2 Combinatorics What happens if the order of the permutation is not important?

Example There are 25 students in a class. –In how many ways can four students be selected to be in an assembly?

Formula for C(n,r) The number of r permutations of a set of n elements is denoted by If order is not important, then for any choice of r objects, there are r! different arrangements. So

Examples C(6,3) C(4,4) C(5,0) C(4,1)

Example Let S be a set of 7 elements. How many subsets of S are there that contain –No elements, 1 element, 2 elements, etc.?

Poker 1.How many different poker hands can be dealt? 2.How many of those hands are flushes? 3.How many of those hands have a three of a kind?

6.3 Pascal’s Triangle How does Pascal’s triangle relate to combinations?

Conjecture and Proof

Binomial Coefficients What is (x+y) n ? Conjecture and Proof.

6.4 Permutations and Combinations with Repetitions How many distinct arrangements are there of the letters in the word MISSISSIPPI?

Theorem Suppose we have n objects of k different types, with n k identical objects of the kth type. Then the number of distinct arrangements of those n objects is equal to

Example Find the coefficients of (x+y+z) 5.

Permutations with non-adjacency conditions Suppose there are 15 students in a class, with 10 of them boys. If we do not want to have two girls next to each other in line, how many different options do we have?

Theorem If n and k are positive integers, with k  n+1, then the number of distinct arrangements of n boys and k girls with no two consecutive girls is C(n+1,k).

6.5 The Pigeonhole Principle If m pigeons fly into n pigeonholes, where m>n, then there must be at least one pigeonhole containing more than one pigeon. Musical Chairs

Pigeonholes in Geometry Show that if 7 points are chosen on or inside a regular hexagon with edges of length 5 cm, then there must be two points within 5 cm of each other.

Example A baseball player had at least one hit in each of 34 consecutive games. Over those 34 games, he had a total of 52 hits. Show that there was some period of consecutive games in which he had exactly 15 hits.

6.6 The Inclusion-Exclusion Principle Find the number of positive integers less than or equal to 100 that are multiples of –5 –6 –8

Example ctd. Find the number of positive integers less than or equal to 100 that are multiples of –Both 5 and 8 –Either 5 or 8 –Both 6 and 8 –Either 6 or 8

Example ctd. Find the number of positive integers less than or equal to 100 that are multiples of –5, 6, and 8 –Either 5, 6, or 8

Inclusion-Exclusion Principle If X 1, X 2, …, X n are finite sets, then the size of their union is equal to the sum of the sizes of all intersections of an odd number of those sets minus the sum of the sizes of all intersections of an even number of those sets.

Homework Homework #10 –6.1 Exercises (15, 16, 18) –6.2 Exercises (2, 6, 7) –6.3 Exercises (8, 12, 15) Homework #11 –6.4 Exercises (4, 6, 11) –6.5 Exercises (4, 6, 8, 12, 14) –6.6 Exploratory (2) –6.6 Exercises (6, 7, 10, 11)