combinatorics - lecture 1 (basics of counting, pigeonhole principle, permunation and combination)_2

41
Basic Counting Rules Pigeonhole Principle Permutation Combination Basics of Counting, Pigeonhole Principle, Permutation, Combination Richard Bryann Chua CS 55 (Discrete Mathematical Structures) June 8, 2010 Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combinati

Upload: sasha-newman

Post on 28-Dec-2015

13 views

Category:

Documents


2 download

TRANSCRIPT

Basic Counting RulesPigeonhole Principle

PermutationCombination

Basics of Counting, Pigeonhole Principle,Permutation, Combination

Richard Bryann ChuaCS 55 (Discrete Mathematical Structures)

June 8, 2010

Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination

Basic Counting RulesPigeonhole Principle

PermutationCombination

Outline

1 Basic Counting Rules

2 Pigeonhole Principle

3 Permutation

4 Combination

Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination

Basic Counting RulesPigeonhole Principle

PermutationCombination

2 Basic Counting Rules

Definition(Sum Rule) If there are |A| ways to do A and |B| ways to do B,and these tasks cannot be done at the same time, then thenumber of ways to do either task is |A|+ |B|. This can beexpanded to any number of terms.

Definition(Product Rule) Suppose that a procedure can be broken into 2tasks. If there are |A| ways to do A, and |B| ways to do B afterthe first task has been done, then there are |A| · |B| ways to dothe procedure. This can be expanded to any number of terms.

Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination

Basic Counting RulesPigeonhole Principle

PermutationCombination

2 Basic Counting Rules

Definition(Sum Rule) If there are |A| ways to do A and |B| ways to do B,and these tasks cannot be done at the same time, then thenumber of ways to do either task is |A|+ |B|. This can beexpanded to any number of terms.

Definition(Product Rule) Suppose that a procedure can be broken into 2tasks. If there are |A| ways to do A, and |B| ways to do B afterthe first task has been done, then there are |A| · |B| ways to dothe procedure. This can be expanded to any number of terms.

Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination

Basic Counting RulesPigeonhole Principle

PermutationCombination

2 Basic Counting Rules

Determine how many 3-digit numbers can be formed fromthe digits 1 to 9 if no digit is to be repeated? if to berepeated?

Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination

Basic Counting RulesPigeonhole Principle

PermutationCombination

2 Basic Counting Rules

Aling Lita is opening a restaurant with a lunch hour special.For Php60, a customer has a choice of rice (plain or fried),a main dish and dessert. There are 3 main dishes: chickenadobo, pork chop, chicken barbeque, and 2 desserts: fruitsalad and leche flan. How many different combinationmeals are possible?

Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination

Basic Counting RulesPigeonhole Principle

PermutationCombination

2 Basic Counting Rules

A telephone company wants to set up a system for acertain province. Company officials are thinking of using asystem where each telephone number has 6 digits: thefirst 2 digits with 44, 45, 47 or 49 and the last 4 digits beingany number from 1-9. What is the largest number ofcustomers that the system can service?

Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination

Basic Counting RulesPigeonhole Principle

PermutationCombination

2 Basic Counting Rules

A certain company uses identification numbers consistingof 4 different digits for all its employees. Male employeeshave odd ID numbers while female employees have evenID numbers. Furthermore, the rank and file employeeshave ID numbers that begin with 3, 4, 5, 6, or 7. What isthe maximum number of female rank and file employeesthat can be given ID numbers?

Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination

Basic Counting RulesPigeonhole Principle

PermutationCombination

2 Basic Counting Rules

On a certain computer system a valid password is asequence of between 6 and 8 symbols. The first symbolmust be a letter (which can be lowercase or uppercase),and the remaining symbols must be either letters or digits.How many different passwords are possible?

Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination

Basic Counting RulesPigeonhole Principle

PermutationCombination

Outline

1 Basic Counting Rules

2 Pigeonhole Principle

3 Permutation

4 Combination

Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination

Basic Counting RulesPigeonhole Principle

PermutationCombination

Pigeonhole Principle

TheoremIf k + 1 or more objects are placed into k boxes, then there is atleast one box containing 2 or more of the objects.

Proof: (By contradiction) Suppose that none of the k boxescontain more than one object then the total number of objectswould be k . This is a contradiction since we have k + 1 or moreobjects.

Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination

Basic Counting RulesPigeonhole Principle

PermutationCombination

Pigeonhole Principle

TheoremIf k + 1 or more objects are placed into k boxes, then there is atleast one box containing 2 or more of the objects.

Proof: (By contradiction) Suppose that none of the k boxescontain more than one object then the total number of objectswould be k . This is a contradiction since we have k + 1 or moreobjects.

Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination

Basic Counting RulesPigeonhole Principle

PermutationCombination

Pigeonhole Principle

How many students must be in a class to guarantee that atleast 2 students receive the same score on the final exam,if the exam is graded on a scale from 0-100 points?

Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination

Basic Counting RulesPigeonhole Principle

PermutationCombination

Pigeonhole Principle

How many people must be in an organization to ensurethat at least 2 of them have the same birthday?

Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination

Basic Counting RulesPigeonhole Principle

PermutationCombination

Pigeonhole Principle

How many English words do you need to ensure that 2words start with the same letter?

Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination

Basic Counting RulesPigeonhole Principle

PermutationCombination

Generalized Pigeonhole Principle

Theorem(Generalized Pigeonhole Principle) If N objects are placedinto k boxes, then there is at least 1 box containing dN/keobjects.

Proof: (By contradiction) Suppose that none of the k boxes contains more than dN/ke − 1 objects, then the totalnumber of objects is at most k(dN/ke − 1). Note that

⌈ N

k

⌉<

N

k+ 1⌈ N

k

⌉− 1 <

N

k+ 1− 1

k(⌈ N

k

⌉)< k

( N

k+ 1− 1

)= N

This is a contradiction since there are N objects.

Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination

Basic Counting RulesPigeonhole Principle

PermutationCombination

Generalized Pigeonhole Principle

Theorem(Generalized Pigeonhole Principle) If N objects are placedinto k boxes, then there is at least 1 box containing dN/keobjects.Proof: (By contradiction) Suppose that none of the k boxes contains more than dN/ke − 1 objects, then the totalnumber of objects is at most k(dN/ke − 1). Note that

⌈ N

k

⌉<

N

k+ 1⌈ N

k

⌉− 1 <

N

k+ 1− 1

k(⌈ N

k

⌉)< k

( N

k+ 1− 1

)= N

This is a contradiction since there are N objects.

Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination

Basic Counting RulesPigeonhole Principle

PermutationCombination

Generalized Pigeonhole Principle

Among 100 people, what is the minimum number of peoplethat were born in the same month?

Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination

Basic Counting RulesPigeonhole Principle

PermutationCombination

Generalized Pigeonhole Principle

What is the minimum number of students required in aclass to be sure there are at least 6 who will receive thesame grade, if there are 5 possible grades, A, B, C, D andF?

Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination

Basic Counting RulesPigeonhole Principle

PermutationCombination

Generalized Pigeonhole Principle

What is the least number of area codes needed toguarantee that 25M phones in a state have distinct 10-digittelephone number? (Assume that telephone numbers areof the form NXX-NXX-XXXX, where the first 3 digits formthe area code, N represents a digit from 2 to 9 inclusive,and X represents any digit.)

Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination

Basic Counting RulesPigeonhole Principle

PermutationCombination

Outline

1 Basic Counting Rules

2 Pigeonhole Principle

3 Permutation

4 Combination

Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination

Basic Counting RulesPigeonhole Principle

PermutationCombination

Permutation

DefinitionSuppose there is an arrangement of k objects taken from a setof n different objects, the order of arrangement is important.Then such an arrangement is called a permutation. The totalnumber of permutations of n objects taken k at a time will bedenoted by P(n, k).

TheoremThe number of permutations of n distinct objects taken k at atime is given by

P(n, k) =n!

(n − k)!

Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination

Basic Counting RulesPigeonhole Principle

PermutationCombination

Permutation

DefinitionSuppose there is an arrangement of k objects taken from a setof n different objects, the order of arrangement is important.Then such an arrangement is called a permutation. The totalnumber of permutations of n objects taken k at a time will bedenoted by P(n, k).

TheoremThe number of permutations of n distinct objects taken k at atime is given by

P(n, k) =n!

(n − k)!

Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination

Basic Counting RulesPigeonhole Principle

PermutationCombination

Permutation

There are 4 runners in a race. How many results arepossible for first, second and third place?

Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination

Basic Counting RulesPigeonhole Principle

PermutationCombination

Permutation

In how many ways can 7 books be chosen from 18different books and arranged in 7 spaces on a bookshelf?

Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination

Basic Counting RulesPigeonhole Principle

PermutationCombination

Permutation

In how many ways can 4 boys and 4 girls be seated in arow if

1 they may sit anywhere?2 the boys and girls must alternate?3 the girls must be together?4 a particular boy B and a particular G cannot sit beside each

other?

Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination

Basic Counting RulesPigeonhole Principle

PermutationCombination

Division Rule

Definition(Division Rule) If k permutations of A all point to one event inB, then |B| = |A|/k .

In how many different ways can you place 2 identical rookson a chessboard so that they do not share a row orcolumn?

Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination

Basic Counting RulesPigeonhole Principle

PermutationCombination

Circular Permutation

TheoremThe number of ways to arrange n objects in circle is (n − 1)!.

Proof: Let A be the linear arrangement of the n objects. Let Bbe the circular arrangement of the n objects.

|B| =|A|n

=n!n

=n(n − 1)!

n= (n − 1)!

Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination

Basic Counting RulesPigeonhole Principle

PermutationCombination

Circular Permutation

In how many ways can 4 people be seated in a circle?

Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination

Basic Counting RulesPigeonhole Principle

PermutationCombination

Circular Permutation

In how many ways can 4 boys and 7 girls be seatedaround a circular table if:

1 there are no restrictions?2 the girls form a single block?3 no 2 boys are adjacent?4 a particular boy and a particular girl must not be adjacent?

Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination

Basic Counting RulesPigeonhole Principle

PermutationCombination

Identical Permutation

TheoremLet l1, . . . , lm be distinct elements. The number of sequenceswith k1 occurrences of l1, and k2 occurrences of l2, . . ., and kmoccurrences of lm is

(k1 + k2 + . . .+ km)!

k1!k2!, . . . , km!

Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination

Basic Counting RulesPigeonhole Principle

PermutationCombination

Identical Permutation

Liza has to arrange 3 red, and 2 yellow banners in a row.How many different patterns are there?

Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination

Basic Counting RulesPigeonhole Principle

PermutationCombination

Identical Permutation

Find the number of distinct permutations of the letters inthe word SITSIRITSIT?

Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination

Basic Counting RulesPigeonhole Principle

PermutationCombination

Outline

1 Basic Counting Rules

2 Pigeonhole Principle

3 Permutation

4 Combination

Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination

Basic Counting RulesPigeonhole Principle

PermutationCombination

Combination

DefinitionA combination of n objects taken k at a time is a subset of kelements selected from a set of n elements. The total numberof k -subsets of a set of n elements will be denoted by C(n, k)or

(nk

).

TheoremThe number of combinations of n distinct objects taken k at atime is given by

C(n, k) =n!

k !(n − k)!

Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination

Basic Counting RulesPigeonhole Principle

PermutationCombination

Combination

DefinitionA combination of n objects taken k at a time is a subset of kelements selected from a set of n elements. The total numberof k -subsets of a set of n elements will be denoted by C(n, k)or

(nk

).

TheoremThe number of combinations of n distinct objects taken k at atime is given by

C(n, k) =n!

k !(n − k)!

Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination

Basic Counting RulesPigeonhole Principle

PermutationCombination

Combination

A committee of 5 is to be chosen from 12 members ofCongress, 3 of whom are senators. How many ways canthis be done if at least 2 of the committee members mustbe senators?

Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination

Basic Counting RulesPigeonhole Principle

PermutationCombination

Combination

There are 20 points in a plane, no 3 of which are collinear.How many different line segments can be drawn havingthese points as endpoints?

Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination

Basic Counting RulesPigeonhole Principle

PermutationCombination

Combination

How many 5-letter “words” can be formed if exactly 2 of theletters are vowels? Assume that repetition of letters isallowed.

Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination

Basic Counting RulesPigeonhole Principle

PermutationCombination

Combination

In how many ways can you form a 4-of-a-kind from astandard deck?

Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination

Basic Counting RulesPigeonhole Principle

PermutationCombination

Combination

In how many ways can you form a full house from astandard deck?

Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination