Lecture 9. The Principle of Inclusion/Exclusion. 9.1 Introduction: a familiar example

Similar documents
The integers. Chapter 3

5 Set Operations, Functions, and Counting

LECTURE 13. Quotient Spaces

Homework 1 2/7/2018 SOLUTIONS Exercise 1. (a) Graph the following sets (i) C = {x R x in Z} Answer:

Lecture 3: Miscellaneous Techniques

LECTURE 13. Quotient Spaces

Counting in the Twilight Zone

CISC 1100: Structures of Computer Science

Cosets and Lagrange s theorem

In N we can do addition, but in order to do subtraction we need to extend N to the integers

In N we can do addition, but in order to do subtraction we need to extend N to the integers

WHY POLYNOMIALS? PART 1

n n P} is a bounded subset Proof. Let A be a nonempty subset of Z, bounded above. Define the set

MATH 115, SUMMER 2012 LECTURE 12

CDM Combinatorial Principles

Part V. Chapter 19. Congruence of integers

ADVANCED CALCULUS - MTH433 LECTURE 4 - FINITE AND INFINITE SETS

1. SET 10/9/2013. Discrete Mathematics Fajrian Nur Adnan, M.CS

MA554 Assessment 1 Cosets and Lagrange s theorem

Math Lecture 18 Notes

11 Division Mod n, Linear Integer Equations, Random Numbers, The Fundamental Theorem of Arithmetic

Week 2: Counting with sets; The Principle of Inclusion and Exclusion (PIE) 13 & 15 September 2017

The Inclusion Exclusion Principle and Its More General Version

SET THEORY. Disproving an Alleged Set Property. Disproving an Alleged Set. Example 1 Solution CHAPTER 6

CPSC 536N: Randomized Algorithms Term 2. Lecture 9

2. Sets. 2.1&2.2: Sets and Subsets. Combining Sets. c Dr Oksana Shatalov, Spring

In this initial chapter, you will be introduced to, or more than likely be reminded of, a

a (b + c) = a b + a c

Introduction to Set Operations

MATH 115, SUMMER 2012 LECTURE 4 THURSDAY, JUNE 21ST

Sets. Introduction to Set Theory ( 2.1) Basic notations for sets. Basic properties of sets CMSC 302. Vojislav Kecman

Foundations Revision Notes

Mathematics-I Prof. S.K. Ray Department of Mathematics and Statistics Indian Institute of Technology, Kanpur. Lecture 1 Real Numbers

Math 31 Lesson Plan. Day 2: Sets; Binary Operations. Elizabeth Gillaspy. September 23, 2011

Introduction: Pythagorean Triplets

3. Abstract Boolean Algebras

Basic counting techniques. Periklis A. Papakonstantinou Rutgers Business School

Sets. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Fall 2007

Sets. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Spring 2006

Chapter 7. Inclusion-Exclusion a.k.a. The Sieve Formula

HW 4 SOLUTIONS. , x + x x 1 ) 2

6 CARDINALITY OF SETS

Background for Discrete Mathematics

An Introduction to Combinatorics

Spring 2014 Advanced Probability Overview. Lecture Notes Set 1: Course Overview, σ-fields, and Measures

Practical Algebra. A Step-by-step Approach. Brought to you by Softmath, producers of Algebrator Software

4. What is the probability that the two values differ by 4 or more in absolute value? There are only six

Math 300: Foundations of Higher Mathematics Northwestern University, Lecture Notes

Math 541 Fall 2008 Connectivity Transition from Math 453/503 to Math 541 Ross E. Staffeldt-August 2008

Statistics for Financial Engineering Session 2: Basic Set Theory March 19 th, 2006

A lower bound for X is an element z F such that

1 Chapter 1: SETS. 1.1 Describing a set

ICS141: Discrete Mathematics for Computer Science I

means is a subset of. So we say A B for sets A and B if x A we have x B holds. BY CONTRAST, a S means that a is a member of S.

CIS 2033 Lecture 5, Fall

Generating Functions

2. Introduction to commutative rings (continued)

MTHSC 3190 Section 2.9 Sets a first look

2.23 Theorem. Let A and B be sets in a metric space. If A B, then L(A) L(B).

ALGEBRAIC STRUCTURE AND DEGREE REDUCTION

Complete Induction and the Well- Ordering Principle

1. Foundations of Numerics from Advanced Mathematics. Mathematical Essentials and Notation

Discrete Mathematics and Probability Theory Fall 2018 Alistair Sinclair and Yun Song Note 6

Proof by Contradiction

Fundamentals of Probability CE 311S

P1 Chapter 3 :: Equations and Inequalities

0 Logical Background. 0.1 Sets

We want to show P (n) is true for all integers

WUCT121. Discrete Mathematics. Logic. Tutorial Exercises

Discrete Mathematics: Lectures 6 and 7 Sets, Relations, Functions and Counting Instructor: Arijit Bishnu Date: August 4 and 6, 2009

Section 2: Classes of Sets

Generalized Pigeonhole Properties of Graphs and Oriented Graphs

2030 LECTURES. R. Craigen. Inclusion/Exclusion and Relations

MATH 2200 Final Review

Divisibility = 16, = 9, = 2, = 5. (Negative!)

Elementary Properties of the Integers

Set theory background for probability

Markov chains. Randomness and Computation. Markov chains. Markov processes

Quadratic reciprocity and the Jacobi symbol Stephen McAdam Department of Mathematics University of Texas at Austin

Proving languages to be nonregular

CSE 20 DISCRETE MATH. Winter

Math 127 Homework. Mary Radcliffe. Due 29 March Complete the following problems. Fully justify each response.

CHAPTER 3: THE INTEGERS Z

Sets. Alice E. Fischer. CSCI 1166 Discrete Mathematics for Computing Spring, Outline Sets An Algebra on Sets Summary

However another possibility is

PRIMARY DECOMPOSITION FOR THE INTERSECTION AXIOM

1.1.1 Algebraic Operations

2. Counting and Probability

The Inclusion-Exclusion Principle

Measure and integration

1.4 Equivalence Relations and Partitions

1 Basic Combinatorics

Modular Arithmetic Instructor: Marizza Bailey Name:

Handout 2 (Correction of Handout 1 plus continued discussion/hw) Comments and Homework in Chapter 1

STA111 - Lecture 1 Welcome to STA111! 1 What is the difference between Probability and Statistics?

2 Arithmetic. 2.1 Greatest common divisors. This chapter is about properties of the integers Z = {..., 2, 1, 0, 1, 2,...}.

T (s, xa) = T (T (s, x), a). The language recognized by M, denoted L(M), is the set of strings accepted by M. That is,

Roth s Theorem on 3-term Arithmetic Progressions

Review of Linear Algebra

Lecture 2: Groups. Rajat Mittal. IIT Kanpur

Transcription:

Lecture 9 he Principle of Inclusion/Exclusion hese notes are based on a pair of lectures originally written by (Manchester s own) Prof. Nige Ray. Reading: he Principle of Inclusion/Exclusion appears in the first year module Foundations of Pure Mathematics, but it is also a standard technique in Combinatorics and so is discussed in many other books 1. he Wikipedia article, which gives a version of the proof in Section 9.2.2 below, is also a good place to start. 9.1 Introduction: a familiar example Suppose we have some finite universal set U and two subsets, 1 U and 2 U. If the subsets are disjoint then it s easy to work out the number of elements in their union: 1 \ 2 ; ) 1 [ 2 1 + 2. he case where the subsets have a non-empty intersection provides the simplest instance of the result we re going to develop today, the Principle of Inclusion/Exclusion. You may already know a similar result from Probability. Lemma 9.1 (Inclusion/Exclusion for two sets). If 1 and 2 are finite sets then 1 [ 2 1 + 2 1 \ 2. (9.1) Note that this formula, which is illustrated in Figure 9.1, works even 1 \ 2 ;, as then 1 \ 2 0. Proof. o prove this result, note that the sum 1 + 2 counts each member of the intersection 1 \ 2 twice, once as a member of 1 and then again as a member 1 See, for example, Dossey, Otto, Spence, and Vanden Eynden (2006), Discrete Mathematics or, for a short, clear account, Anderson (1974), A First Course in Combinatorial Mathematics. 9.1

U U 1 2 1 1 2 2 Figure 9.1: In the example at left 1 \ 2 ;, so 1 [ 2 1 + 2, but in the example at right 1 \ 2 6 ; and so 1 [ 2 1 + 2 1 \ 2 < 1 + 2. U 1 \ 2 1 2 2 \ 1 Figure 9.2: Here 1 \ 2 and 1 \ 2 are shown in shades of blue, while 2 \ 1 is in yellow. of 2. Subtracting 1 \ 2 corrects for this double-counting. Alternatively, for those who prefer proofs that look more like calculations, begin by defining 1 \ 2 {x 2 U x 2 1, but x/2 2 }. hen, as is illustrated in Figure 9.2, 1 ( 1 \ 2 ) [ ( 1 \ 2 ). Further, the sets 1 \ 2 and 1 \ 2 are disjoint by construction, so 1 1 \ 2 + 1 \ 2 or 1 \ 2 1 1 \ 2. (9.2) Similarly, 1 \ 2 and 2 are disjoint and 1 [ 2 ( 1 \ 2 ) [ 2 so 1 [ 2 1 \ 2 + 2 1 1 \ 2 + 2 1 + 2 1 \ 2 where, in passing from the first line to the second, we have used (9.2). he last line is the result we were trying to prove, so we are finished. 9.2 Principle and proof Before moving to the general case, let s consider one more small example, this time with three subsets 1, 2 and 3 : we can handle this case by clever use 9.2

U 1 2 1 2 3 Figure 9.3: In the diagram above all of the intersections appearing in Eqn. (9.3) are nonempty. of Lemma 9.1 from the previous section. If we regard ( 1 [ 2 )asasinglesetand 3 as a second set, then Eqn. (9.1) says ( 1 [ 2 ) [ 3 ( 1 [ 2 ) + 3 ( 1 [ 2 ) \ 3 ( 1 + 2 1 \ 2 )+ 3 ( 1 [ 2 ) \ 3 1 + 2 + 3 1 \ 2 ( 1 [ 2 ) \ 3 Focusing on the final term, we can use standard relations about unions and intersections to say ( 1 [ 2 ) \ 3 ( 1 \ 3 ) [ ( 2 \ 3 ). hen, applying Eqn. (9.1) to the pair of sets ( 1 \ 3 )and( 2 \ 3 ), we obtain ( 1 [ 2 ) \ 3 ( 1 \ 3 ) [ ( 2 \ 3 ) 1 \ 3 + 2 \ 3 ( 1 \ 3 ) \ ( 2 \ 3 ) 1 \ 3 + 2 \ 3 1 \ 2 \ 3 where, in going from the second line to the third, we have used ( 1 \ 3 ) \ ( 2 \ 3 ) 1 \ 2 \ 3. Finally, putting all these results together, we obtain the analogue of Eqn. (9.1) for three subsets: ( 1 [ 2 ) [ 3 1 + 2 + 3 1 \ 2 ( 1 [ 2 ) \ 3 1 + 2 + 3 2 \ 3 ( 1 \ 3 + 2 \ 3 ( 1 \ 2 \ 3 ) ( 1 + 2 + 3 ) ( 1 \ 2 + 1 \ 3 + 2 \ 3 ) + 1 \ 2 \ 3. (9.3) Figure 9.3 helps make sense of this formula and prompts the following observations: 9.3

Elements of 1 [ 2 [ 3 that belong to exactly one of the j are counted exactly once by the sum ( 1 + 2 + 3 ) and do not contribute to any of the terms involving intersections. Elements of 1 [ 2 [ 3 that belong to exactly two of the j are doublecounted by the sum, ( 1 + 2 + 3 ), but this double-counting is corrected by the term involving two-fold intersections. Finally, elements of 1 [ 2 [ 3 that belong to all three of the sets are triple-counted by the initial sum ( 1 + 2 + 3 ). his triple-counting is then completely cancelled by the term involving two-fold intersections. hen, finally, this cancellation is repaired by the final term, which counts each such element once. 9.2.1 he general case he Principle of Inclusion/Exclusion generalises the results in Eqns. (9.1) and (9.3) to unions of arbitrarily many subsets. heorem 9.2 (he Principle of Inclusion/Exclusion). If U is a finite set and { j } n j1 is a collection of n subsets, then n[ j 1 [ [ n j1 or, more concisely, 1 + + n 1 \ 2 n 1 \ n + 1 \ 2 \ 3 + + n 2 \ n 1 \ n +( 1) m 1.. 1applei 1 apple applei mapplen i1 \ \ im +( 1) n 1 1 \ \ n (9.4) 1 [ [ n One can prove this in at least two ways: I {1,...,n},I6;( 1) I 1 \ i2i i (9.5) by induction, with a calculation that is essentially the same as the one used to obtain the n 3case Eqn.(9.3) fromthen 2one Eqn.(9.1); by showing that each x 2 1 [ [ n contributes exactly one to the sum on the right hand side of Eqn. (9.5). he first approach is straightforward, if a bit tedious, and so is left as an exercise, but the second is more interesting and so it s the one we ll study here. 9.4

9.2.2 Proof he key idea is to think of the the elements of 1 [ [ n individually and ask what each one contributes to the sum in Eqn. (9.5). Suppose that an element x 2 1 [ [ n belongs to exactly of the subsets, with 1 apple apple n: we will prove that x makes a net contribution of 1. For the sake of concreteness, we ll say x 2 i1,..., i where i 1,...,i are distinct elements of {1,...,n}. As we ve assumed that x belongs to exactly of the subsets j, it contributes atotalof to the first row, 1 + + n, of the long sum in Eqn. (9.4). Further, x contributes a total of to the sum in the row involving two-way 2 intersections 1 \ 2 n 1 \ n. o see this, note that if x 2 j \ k then both j and k must be members of the set {i 1,...,i}. Similar arguments show that if k apple, then x contributes a total of! k k!( k)! to the sum in the row of Eqn. (9.4) that involves k-fold intersections. Finally, for k> there are no k-fold intersections that contain x and so x makes a contribution of zero to the corresponding rows in Eqn. (9.4). Putting these observations together we see that x make a net contribution of +... +( 1) 1 (9.6) 2 3 his sum can be made to look more familiar by considering the following application of the Binomial heorem: hus or 0 (1 1) ( 1) j (1) j j j0 1 + +... +( 1). 2 3 0 1 apple + 2 + 2 3 3... +( 1) 1 1.... +( 1) 1 he left hand side here is the same as the sum in Eqn. (9.6) and so we ve established that any x which belongs to exactly of the subsets j makes a net contribution of 1 to the sum on the right hand side of Eqn. (9.5). And as every x 2 1 [ [ n must belong to at least one of the j, this establishes the Principle of Inclusion/Exclusion. 9.5

9.2.3 Alternative proof Students who like proofs that look more like calculations may prefer to reformulate the arguments from the previous section in terms of characteristic functions (sometimes also called indicator functions) ofsets.ifwedefine : U! {0, 1} by 1 if s 2 (s) 0 otherwise then we can calculate for a subset U as follows: (x) x2u! (x) + x2 x/2 x2 (x)! (x) (9.7) where, in passing from the second to third lines, I have dropped the second sum because all its terms are zero. hen the Principle of Inclusion/Exclusion is equivalent to x2 1 [ [ n 1 [ [ n (x) i 1) I {1,...,n},I6;( \ I 1 i2i ( 1) I 1 I {1,...,n},I6; n x2 i2i i 0 @ i2i i (x) x2 i2i i 1 i2i (x) A i which I have obtained by using of Eqn. (9.7) to replace terms in Eqn. (9.5) with the corresponding sums of values of characteristic functions. We can then rearrange the expression on the right, first expanding the ranges of the sums over elements of k-fold intersections (this doesn t change the result since (x) 0 for x /2 ) andtheninterchangingtheorderofsummationsothat the sum over elements comes first. his calculation proves that the Principle of Inclusion/Exclusion is equivalent to the following: x2 1 [ [ n 1 [ [ n (x) n x2 1 [ [ n n 9.6 x2 1 [ [ n i2i i (x)! i2i (x) (9.8) i

Arguments similar to those in Section 9.2.2 then establish the following results, the last of which, along with Eqn. (9.8), proves heorem 9.2. Proposition 9.3. If an element x 2 1 [ [ n belongs to exactly of the sets { j } n j1 then for k apple we have i2i (x) i k! k!( k)! while if k> i2i (x) 0 i Proposition 9.4. For an element x 2 1 [ [ n we have n i2i i (x) n k 1. Lemma 9.5. he characteristic function 1 [ [ n of the set 1 [ [ n satisfies 1 [ [ n (x) 9.3 An example n i2i i (x). How many of the integers n with 1 apple n apple 150 are relatively prime to 70? his is a job for the Principle of Inclusion/Exclusion. First note that the prime factorization of 70 is 70 2 5 7. Now consider a universal set U {1,...,150} and three subsets 1, 2 and 3 consisting of multiples of 2, 5 and 7, respectively. A member of U that shares a prime factor with 70 belongs to at least one of the j and so the number we re after is U 1 [ 2 [ 3 U ( 1 + 2 + 3 ) +( 1 \ 2 + 1 \ 3 + 2 \ 3 ) 1 \ 2 \ 3. 150 (75 + 30 + 21) + (15 + 10 + 4) 2 150 126 + 29 2 51 (9.9) where I have used the numbers in able 9.1 which lists the various cardinalities that we need. 9.7

Set Description Cardinality 1 multiples of 2 75 2 multiples of 5 30 3 multiples of 7 21 1 \ 2 multiples of 10 15 1 \ 3 multiples of 14 10 2 \ 3 multiples of 35 4 1 \ 2 \ 3 multiples of 70 2 able 9.1: Eqn. (9.9). he sizes of the various intersections needed for the calculation in 9.8