Inclusion- A B Exclusion 2 set proof Albert R Meyer, - - PowerPoint PPT Presentation

inclusion
SMART_READER_LITE
LIVE PREVIEW

Inclusion- A B Exclusion 2 set proof Albert R Meyer, - - PowerPoint PPT Presentation

Mathematics for Computer Science Inclusion-Exclusion MIT 6.042J/18.062J |A B| = |A|+|B|-|A B| Inclusion- A B Exclusion 2 set proof Albert R Meyer, April 24, 2013 Albert R Meyer, April 24, 2013 incexcI.1 incexcI.2


slide-1
SLIDE 1

1

Albert R Meyer, April 24, 2013

Mathematics for Computer Science

MIT 6.042J/18.062J

Inclusion- Exclusion 2 set proof

incexcI.1 Albert R Meyer, April 24, 2013

Inclusion-Exclusion

|A ∪B| =|A|+|B|-|A∩B|

A B

incexcI.2 Albert R Meyer, April 24, 2013

Inc-Exc from Sum Rule

A B

A ∪B = A∪(B−A)

disjoint

incexcI.3

proof:

Albert R Meyer, April 24, 2013

Inc-Exc from Sum Rule

A B proof:

∪ |A B| =|A|+|B−A|

by Sum Rule

incexcI.4

slide-2
SLIDE 2

2

Albert R Meyer, April 24, 2013

Inc-Exc from Sum Rule

A B

∪ |A B| =|A|+|B−A|

  • |B|

− | A∩B|

incexcI.5 Albert R Meyer, April 24, 2013

Lemma:

A B

|B | −A|=|B|−|A∩B

B = (B∩A) ∪(B−A)

disjoint

incexcI.6

proof:

Albert R Meyer, April 24, 2013

Lemma:

A B

|B−A|=|B|−|A∩B|

QED

proof:

|B|=|B∩A|+|B−A|

by Sum Rule

incexcI.7 Albert R Meyer, April 24, 2013

A B C

Inclusion-Exclusion (3 Sets)

|ABC| = |A|+|B|+|C| |AB| |AC| |BC| + |ABC|

incexcI.8

slide-3
SLIDE 3

3

Albert R Meyer, April 24, 2013

Incl-Excl (n sets)

A ∪

1 ∪A2 ∪⋯∪A n =

(−1)

S+1 ∩Ai ∅≠S⊆ 1,2,…,n

{ }

i∈ S

incexcI.10 Albert R Meyer, April 24, 2013 incexcI.13

Incl-Excl Formula: Proofs

by induction on n

  • -uninformative

by binomial counting

  • -next

by distributivity

  • -also
slide-4
SLIDE 4

MIT OpenCourseWare http://ocw.mit.edu

6.042J / 18.062J Mathematics for Computer Science

Spring 2015 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.