Lecture 26: Binomial Coefficients and Identities Dr. Chengjiang - - PowerPoint PPT Presentation

lecture 26 binomial coefficients and identities
SMART_READER_LITE
LIVE PREVIEW

Lecture 26: Binomial Coefficients and Identities Dr. Chengjiang - - PowerPoint PPT Presentation

Lecture 26: Binomial Coefficients and Identities Dr. Chengjiang Long Computer Vision Researcher at Kitware Inc. Adjunct Professor at SUNY at Albany. Email: clong2@albany.edu Announcement Midterm Exam 2 will be taken on Nov 14 th , 2018. q


slide-1
SLIDE 1

Lecture 26: Binomial Coefficients and Identities

  • Dr. Chengjiang Long

Computer Vision Researcher at Kitware Inc. Adjunct Professor at SUNY at Albany. Email: clong2@albany.edu

slide-2
SLIDE 2
  • C. Long

Lecture 26 November 6, 2018 2 ICEN/ICSI210 Discrete Structures

Announcement

  • Midterm Exam 2 will be taken on Nov 14th, 2018.

q One-hour exam like Midterm Exam 1. q It covers Chap 3.1 – Chap 6.4, Lecture 13 – Lecture 26. q No sheet provided.

slide-3
SLIDE 3
  • C. Long

Lecture 26 November 6, 2018 3 ICEN/ICSI210 Discrete Structures

Outline

  • r-Permutations and r-Combinations
  • Binomial coefficients, combinatorial proof
  • Inclusion-exclusion principle
slide-4
SLIDE 4
  • C. Long

Lecture 26 November 6, 2018 4 ICEN/ICSI210 Discrete Structures

Outline

  • r-Permutations and r-Combinations
  • Binomial coefficients, combinatorial proof
  • Inclusion-exclusion principle
slide-5
SLIDE 5
  • C. Long

Lecture 26 November 6, 2018 5 ICEN/ICSI210 Discrete Structures

r-permutations

  • How many ways are there to select a first-prize winner, a second-prize

winner, and a third-prize winner from 100 different people who have entered a contest? Solution:

  • How many permutations of the letters ABCDEFGH contain the string ABC

? Solution: P(6,6) = 6! = 720 ABC, D, E, F, G, H

slide-6
SLIDE 6
  • C. Long

Lecture 26 November 6, 2018 6 ICEN/ICSI210 Discrete Structures

r-combination

  • An r-combination of elements of a set is an unordered selection
  • f r elements from the set. Thus, an r-combination is simply a

subset of the set with r elements.

slide-7
SLIDE 7
  • C. Long

Lecture 26 November 6, 2018 7 ICEN/ICSI210 Discrete Structures

Example

  • How many poker hands of five cards can be dealt from

a standard deck of 52 cards? Also, how many ways are there to select 47 cards from a standard deck of 52 cards?

slide-8
SLIDE 8
  • C. Long

Lecture 26 November 6, 2018 8 ICEN/ICSI210 Discrete Structures

Outline

  • r-Permutations and r-Combinations
  • Binomial coefficients, combinatorial proof
  • Inclusion-exclusion principle
slide-9
SLIDE 9
  • C. Long

Lecture 26 November 6, 2018 9 ICEN/ICSI210 Discrete Structures

We can compute the coefficients by simple counting arguments. n times Each term corresponds to selecting 1 or x from each of the n factors. ck is number of terms with exactly k x’s are selected from n factors.

Binomial Theorem

slide-10
SLIDE 10
  • C. Long

Lecture 26 November 6, 2018 10 ICEN/ICSI210 Discrete Structures

(1+X)1 = (1+X)0 = (1+X)2 = (1+X)3 = 1 1 + 1X 1 + 2X + 1X2 1 + 3X + 3X2 + 1X3 (1+X)4 = 1 + 4X + 6X2 + 4X3 + 1X4

Binomial Theorem

slide-11
SLIDE 11
  • C. Long

Lecture 26 November 6, 2018 11 ICEN/ICSI210 Discrete Structures

In general we have the following identity: When x=1, y=1, it says that When x=1, y=-1, it says that

Binomial Coefficients

slide-12
SLIDE 12
  • C. Long

Lecture 26 November 6, 2018 12 ICEN/ICSI210 Discrete Structures

Direct proof: Combinatorial proof: Number of ways to choose k items from n items = number of ways to choose n-k items from n items

Proving Identities

slide-13
SLIDE 13
  • C. Long

Lecture 26 November 6, 2018 13 ICEN/ICSI210 Discrete Structures

A combinatorial proof is an argument that establishes an algebraic fact by relying on counting principles. Many such proofs follow the same basic outline:

  • 1. Define a set S.
  • 2. Show that |S| = n by counting one way.
  • 3. Show that |S| = m by counting another way.
  • 4. Conclude that n = m.

Double counting

Finding a Combinatorial Proof

slide-14
SLIDE 14
  • C. Long

Lecture 26 November 6, 2018 14 ICEN/ICSI210 Discrete Structures

Pascal’s Formula Direct proof: Direct proof:

Proving Identities

slide-15
SLIDE 15
  • C. Long

Lecture 26 November 6, 2018 15 ICEN/ICSI210 Discrete Structures

Pascal’s Formula Combinatorial proof:

  • The LHS is number of ways to choose k elements from n+1 elements.
  • Let the first element be x.
  • If we choose x, then we need to choose k-1 elements

from the remaining n elements, and number of ways to do so is

  • If we don’t choose x, then we need to choose k elements

from the remaining n elements, and number of ways to do so is

  • This partitions the ways to choose k elements from n+1 elements,

therefore

Proving Identities

slide-16
SLIDE 16
  • C. Long

Lecture 26 November 6, 2018 16 ICEN/ICSI210 Discrete Structures

Pascal’s Triangle

slide-17
SLIDE 17
  • C. Long

Lecture 26 November 6, 2018 17 ICEN/ICSI210 Discrete Structures

Consider we have 2n balls, n of them are red, and n of them are blue. The RHS is number of ways to choose n balls from the 2n balls. To choose n balls, we can

  • choose 0 red ball and n blue balls, number of ways =
  • choose 1 red ball and n-1 blue balls, number of ways =
  • choose i red balls and n-i blue balls, number of ways =
  • choose n red balls and 0 blue ball, number of ways =

Hence number of ways to choose n balls is also equal to

Combinatorial Proof

slide-18
SLIDE 18
  • C. Long

Lecture 26 November 6, 2018 18 ICEN/ICSI210 Discrete Structures

We can also prove the identity by comparing a coefficient of two polynomials. Consider the identity Consider the coefficient of xn in these two polynomials. Clearly the coefficient of xn in (1+x)2n is equal to the RHS. So the coefficient of xn in (1+x)n(1+x)n is equal to the LHS.

Another Way to Combinatorial Proof (Optional)

slide-19
SLIDE 19
  • C. Long

Lecture 26 November 6, 2018 19 ICEN/ICSI210 Discrete Structures

Let S be all n-card hands that can be dealt from a deck containing n red cards (numbered 1, . . . , n) and 2n black cards (numbered 1, . . . , 2n). The right hand side = # of ways to choose n cards from these 3n cards. The left hand side = # of ways to choose r cards from red cards x # of ways to choose n-r cards from black cards = # of ways to choose n cards from these 3n cards = the right hand side.

More Combinatorial Proof

slide-20
SLIDE 20
  • C. Long

Lecture 26 November 6, 2018 20 ICEN/ICSI210 Discrete Structures

Give a combinatorial proof of the following identify. Can you give a direct proof of it? Prove that

Exercises

slide-21
SLIDE 21
  • C. Long

Lecture 26 November 6, 2018 21 ICEN/ICSI210 Discrete Structures

We have studied how to determine the size of a set directly. The basic rules are the sum rule, product rule, and the generalized product rule. We apply these rules in counting permutations and combinations, which are then used to count other objects like poker hands. Then we prove the binomial theorem and study combinatorial proofs of identities. Finally we learn the inclusion-exclusion principle and see some applications. Later we will learn how to count “indirectly” by “mapping”.

Quick Summary

slide-22
SLIDE 22
  • C. Long

Lecture 26 November 6, 2018 22 ICEN/ICSI210 Discrete Structures

Outline

  • r-Permutations and r-Combinations
  • Binomial coefficients, combinatorial proof
  • Inclusion-exclusion principle
slide-23
SLIDE 23
  • C. Long

Lecture 26 November 6, 2018 23 ICEN/ICSI210 Discrete Structures

If sets A and B are disjoint, then |A È B| = |A| + |B| A B What if A and B are not disjoint?

Sum Rule

slide-24
SLIDE 24
  • C. Long

Lecture 26 November 6, 2018 24 ICEN/ICSI210 Discrete Structures

For two arbitrary sets A and B

| | | | | | | | B A B A B A Ç

  • +

= È

A B

Inclusion-Exclusion (2 Sets)

slide-25
SLIDE 25
  • C. Long

Lecture 26 November 6, 2018 25 ICEN/ICSI210 Discrete Structures

Let S be the set of integers from 1 through 1000 that are multiples of 3 or multiples of 5. Let A be the set of integers from 1 to 1000 that are multiples of 3. Let B be the set of integers from 1 to 1000 that are multiples of 5.

A B

It is clear that S is the union of A and B, but notice that A and B are not disjoint. |A| = 1000/3 = 333 |B| = 1000/5 = 200 A ∩ B is the set of integers that are multiples of 15, and so |A ∩ B| = 1000/15 = 66 So, by the inclusion-exclusion principle, we have |S| = |A| + |B| - |A ∩ B| = 467.

Inclusion-Exclusion (2 Sets)

slide-26
SLIDE 26
  • C. Long

Lecture 26 November 6, 2018 26 ICEN/ICSI210 Discrete Structures

A B C |A ∪ B ∪ C| = |A| + |B| + |C| – |A ∩ B| – |A ∩ C| – |B ∩ C| + |A ∩ B ∩ C|

Inclusion-Exclusion (3 Sets)

slide-27
SLIDE 27
  • C. Long

Lecture 26 November 6, 2018 27 ICEN/ICSI210 Discrete Structures

From a total of 50 students: 30 know Java 18 know C++ 26 know C# 9 know both Java and C++ 16 know both Java and C# 8 know both C++ and C# 47 know at least one language. How many know none? How many know all? |A ∪ B ∪ C| = |A| + |B| + |C| – |A ∩ B| – |A ∩ C| – |B ∩ C| + |A ∩ B ∩ C| |A| |B| |C| |A ∩ B| |A ∩ C| |B ∩ C| |A ∪ B ∪ C| |A ∩ B ∩ C| 47 = 30 + 18 + 26 – 9 – 16 – 8 + |A ∩ B ∩ C| |A ∩ B ∩ C| = 6

Inclusion-Exclusion (3 Sets)

slide-28
SLIDE 28
  • C. Long

Lecture 26 November 6, 2018 28 ICEN/ICSI210 Discrete Structures

A B C

|A ∪ B ∪ C ∪ D| = |A| + |B| + |C| + |D| – |A ∩ B| – |A ∩ C| – |A ∩ D| – |B ∩ C| – |B ∩ D| – |C ∩ D| + |A ∩ B ∩ C| + |A ∩ B ∩ D| + |A ∩ C ∩ D| + |B ∩ C ∩ D| – |A ∩ B ∩ C ∩ D |

D

Inclusion-Exclusion (4 Sets)

slide-29
SLIDE 29
  • C. Long

Lecture 26 November 6, 2018 29 ICEN/ICSI210 Discrete Structures

What is the inclusion-exclusion formula for the union of n sets?

Inclusion-Exclusion (n Sets)

slide-30
SLIDE 30
  • C. Long

Lecture 26 November 6, 2018 30 ICEN/ICSI210 Discrete Structures

sum of sizes of all single sets – sum of sizes of all 2-set intersections + sum of sizes of all 3-set intersections – sum of sizes of all 4-set intersections … + (–1)n+1 sum of sizes of intersections of all n sets 1 2 n

A A A È È È =

{ }

1 1,2, , 1

( 1)

n k i S n k i S S k

A

+ Í = Î =

=

  • å

å

Inclusion-Exclusion (n Sets)

slide-31
SLIDE 31
  • C. Long

Lecture 26 November 6, 2018 31 ICEN/ICSI210 Discrete Structures

Next class

  • Topic: Inclusion-exclusion Principle
  • Pre-class reading: Chap 6.4