week 5: combinatorial proofs; stars and bars - ma284...

Post on 30-Jun-2020

0 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

(1/30)

MA284: Discrete MathematicsWeek 5: Combinatorial Proofs; Stars

and Barshttp://www.maths.nuigalway.ie/˜niall/MA284/

09 and 11 October, 20191 Recall...

... Binomial coefficients2 Algebraic and Combinatorial Proofs3 Stars and bars

An “Investigate” activity7 apples for 4 peopleMultisets

4 Problems with NNI solutionsInequalities

5 ExercisesThese slides are based on Section 1.5 of Oscar Levin’sDiscrete Mathematics: an open introduction.They are licensed under CC BY-SA 4.0

(2/30)Announcements

1. Results for Assignment 1 have been posted to the BlackboardGradebook. Let me know if you spot any problems.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2. ASSIGNMENT 2 is now open!To access the assignment, go tohttp://mathswork.nuigalway.ie/webwork2/1920-MA284

Your USERNAME is:Your PASSWORD is:

There are 15 questions.You may attempt each one up to 10 times.This assignment contributes 10% to your final grade for MA284.Deadline: 5pm, Friday 18 October.

Recall... ... Binomial coefficients (3/30)

Binomial Coefficients (again...)For each integer n ≥ 0, and integer k such that 0 ≤ k ≤ n, there is anumber (

nk

)read as “n choose k”

is the number of ways to select k objects from a total of n objects.We know it can be evaluated using the formula(

nk

)= n!

k!(n − k)!

It also satisfies Pascal’s Identity:(nk

)=(

n − 1k − 1

)+(

n − 1k

).

Algebraic and Combinatorial Proofs (4/30)Last week we defined some identitiesbased on Pascal’s Triangle.

(i) For all n,(

n0

)(nn

)= 1

(ii)n∑

i=0

(ni

)= 2n

(iii)(

nk

)=(

n − 1k − 1

)+(

n − 1k

).

(iv)(

nk

)=(

nn − k

)

Algebraic and Combinatorial Proofs (5/30)

Combinatorial ProofsProofs of identities involving binomial coefficients can be classified aseither

Algebraic: if they rely mainly on the formula for binomialcoefficients; orCombinatorical: if the involve counting a set in two different ways.

We finished on Wednesday with an algebraic proof of Pascal’s Identity,to complement the combinatoric proof from previous week.

Algebraic and Combinatorial Proofs (6/30)

ExampleGive two proofs of the fact that(

n0

)+(

n1

)+(

n2

)+ · · ·+

(nn

)= 2n

First, we check:

Algebraic and Combinatorial Proofs (7/30)

Algebraic proof of the fact that(n0

)+(

n1

)+(

n2

)+ · · ·+

(nn

)= 2n

Algebraic and Combinatorial Proofs (8/30)

Combinatorial proof of the fact that(n0

)+(

n1

)+(

n2

)+ · · ·+

(nn

)= 2n

Algebraic and Combinatorial Proofs (9/30)

Which are better: algebraic or combinatorial proofs?

When we first study discrete mathematics, algebraic proofs make seemeasiest: they reply only on using some standard formulae, and don’trequire any deeper insight. Also, they are more “familiar”.

However,Often algebraic proofs are quite tricky;Usually, algebraic proofs give no insight as to why a fact is true.

Example (MA284 - Semester 1 exam, 2016/2017)Give a combinatorial proof of the following fact(

n0

)2+(

n1

)2+(

n2

)2+ · · ·+

(nn

)2=(

2nn

).

Algebraic and Combinatorial Proofs (10/30)

We wish to show that(

n0

)2+(

n1

)2+(

n2

)2+ · · ·+

(nn

)2=(

2nn

).

Algebraic and Combinatorial Proofs (11/30)

What is a “combinatorial proof” really?

1. These proofs involve finding two different ways to answer the samecounting question.

2. Then we explain why the answer to the problem posed one way is A3. Next we explain why the answer to the problem posed the other way

is B.4. Since A and B are answers to the same question, we have shown it

must be that A = B.

Algebraic and Combinatorial Proofs (12/30)

ExampleUsing a combinatorial argument, or otherwise, prove that

k(

nk

)= n

(n − 1k − 1

).

Proof 1:

Algebraic and Combinatorial Proofs (13/30)

ExampleUsing a combinatorial argument, or otherwise, prove that

k(

nk

)= n

(n − 1k − 1

).

Proof 2:

Stars and bars An “Investigate” activity (14/30)

Think about the following question during this lecture...Suppose you have some number of identical Rubik’s cubes to distribute to yourfriends. Find the number of different ways you can distribute the cubes...

1. if you have 3 cubes to give to 2 people.

2. if you have 4 cubes to give to 2 people.

3. if you have 5 cubes to give to 2 people.

4. if you have 3 cubes to give to 3 people.

5. if you have 4 cubes to give to 3 people.

6. if you have 5 cubes to give to 3 people.

Make a conjecture about how many different ways you could distribute 7 cubesto 4 people. Explain.What if each person were required to get at least one cube? How would youranswers change?

Stars and bars 7 apples for 4 people (15/30)

Every day you give some apples to your lecturers.Today you have 7 apples.

How many ways can you give them to 4 lecturers you havetoday?

Stars and bars 7 apples for 4 people (16/30)

Every day you give some apples to your lecturers. Today youhave 7 apples. How many ways can you give them to the 4

lecturers you have today?

One can represent any solution by filling out 10 boxes with 7 stars and 3bars. Examples:

Stars and bars 7 apples for 4 people (17/30)

Every day you give some apples to your lecturers. Today youhave 7 apples. How many ways can you give them to the 4

lecturers you have today?

Every solution can be represented by 10 boxes, each with a star or abar.There are 7 stars and 3 bars in total.We can choose any 3 of the 10 boxes in which to place the bars, andthen put the stars in the rest.

So we have(

103

)choices for where to put the bars.

Stars and bars Multisets (18/30)

Definition (Multiset)A multiset is a set of objects, where each object can appear more thanonce. As with an ordinary set, order does not matter.

Examples:

Stars and bars Multisets (19/30)

How many multisets of size 4 can you form using numbers{1, 2, 3, 4, 5}?

Stars and bars Multisets (20/30)

How many multisets of size n can you form using the numbers{1, 2, 3, . . . , k}?

Stars and bars Multisets (21/30)

Example1. In how many ways can one distribute ten e1 coins to four students?2. In how many ways can one distribute ten e1 coins to four students

so that each student receives at least e1?

Problems with NNI solutions (22/30)

All the examples we have looked at so far this week are examples of abroader class of non-negative integer (NNI) problems. When wecalculate the number of ways of giving 7 apples to 4 lecturers, we arecomputing the number of solutions to

x1 + x2 + x3 + x4 = 7.

Problems with NNI solutions (23/30)

A non-negative integer (NNI) problemHow many non-negative integer solutions are there to the problem

x1 + x2 + · · ·+ xk = n?

This is the same as...How many ways are there to distribute n identical objects among kindividuals.

The answer is(

n + k − 1k − 1

)= (n + k − 1)!

n!(k − 1)!

Problems with NNI solutions Inequalities (24/30)

Example (Part 1)1. How many non-negative integer solutions are there to

x1 + x2 + x3 = 3?

Problems with NNI solutions Inequalities (25/30)

Example (Part 2)2. How many non-negative integer solutions are there to x1 + x2 ≤ 3?

Problems with NNI solutions Inequalities (26/30)

Looking at this example, it seems that

The number of non-negative integer solutions to

(1) x1 + x2 + x3 + · · ·+ xk + xk+1 = n.

is the same as the number of non-negative integer solutions to

(2) x1 + x2 + x3 + · · ·+ xk ≤ n,

which is the same as the number of non-negative integer solutions to

(3) x1 + x2 + x3 + · · ·+ xk < n + 1,

Why is that?

Problems with NNI solutions Inequalities (27/30)

Example (MA284, Semester 1 Exam, 2015/16, Q5(b))(i) How many non-negative integer solutions are there of the equation

x1 + x2 + x3 + x4 + x5 = 13

(ii) How many non-negative integer solutions are there of the inequality

x1 + x2 + x3 + x4 + x5 ≤ 13

Exercises (28/30)

Unless indicated otherwise, these questions identical to, or variants on, Sections1.4, 1.5 and 1.6 of Levin’s Discrete Mathematics. Solutions are also availablefrom that book.

Q1. Give a combinatorial proof of the fact that(x+y

2

)−(x

2

)−(y

2

)= xy

Q2. Give a combinatorial proof of the identity(n

2

)(n−2k−2

)=(n

k

)(k2

).

Q3. Consider the bit strings in B62 (bit strings of length 6 and weight 2).

(a) How many of those bit strings start with 01?(b) How many of those bit strings start with 001?(c) Are there any other strings we have not counted yet? Which ones,

and how many are there?(d) How many bit strings are there total in B6

2?(e) What binomial identity have you just given a combinatorial proof for?

Q4. Establish the identity below using a combinatorial proof.(22

)(n2

)+(

32

)(n − 1

2

)+(

42

)(n − 2

2

)+ · · ·+

(n2

)(22

)=(

n + 35

).

Exercises (29/30)Q5. (MA284 – Semester 1 exam, 2017/2018) combinatorial argument, or

otherwise, prove the following statement.(n5

)=(

22

)(n − 3

2

)+(

32

)(n − 4

2

)+(

42

)(n − 2

2

)+· · ·+

(n − 3

2

)(22

).

Q6. A multiset is a collection of objects, just like a set, but can contain anobject more than once (the order of the elements still doesn’t matter). Forexample, {1, 1, 2, 5, 5, 7} is a multiset of size 6.

(a) How many sets of size 5 can be made using the 10 digits: 0, 1, . . . 9?(b) How many multisets of size 5 can be made using the 10 digits: 0, 1,

. . . 9?

Q7. Each of the counting problems below can be solved with stars and bars.For each, say what outcome the diagram ∗ ∗ ∗| ∗ || ∗ ∗| represents, if thereare the correct number of stars and bars for the problem. Otherwise, saywhy the diagram does not represent any outcome, and what a correctdiagram would look like.

(a) How many ways are there to select a handful of 6 jellybeans from ajar that contains 5 different flavors?

Exercises (30/30)(b) How many ways can you distribute 5 identical lollipops to 6 kids?(c) How many solutions are there to the equation x1 + x2 + x3 + x4 = 6.

top related