Discrete Mathematics: Lectures 8 and 9 Principle of Inclusion and Exclusion Instructor: Arijit Bishnu Date: August 11 and 13, 2009

Similar documents
Binomial transform of products

distinct distinct n k n k n! n n k k n 1 if k n, identical identical p j (k) p 0 if k > n n (k)

6.4 Binomial Coefficients

COMP 2804 Solutions Assignment 1

Double Derangement Permutations

Math 4707 Spring 2018 (Darij Grinberg): midterm 2 page 1. Math 4707 Spring 2018 (Darij Grinberg): midterm 2 with solutions [preliminary version]

1.2 AXIOMATIC APPROACH TO PROBABILITY AND PROPERTIES OF PROBABILITY MEASURE 1.2 AXIOMATIC APPROACH TO PROBABILITY AND

Math 155 (Lecture 3)

ECE 901 Lecture 4: Estimation of Lipschitz smooth functions

CS 70 Second Midterm 7 April NAME (1 pt): SID (1 pt): TA (1 pt): Name of Neighbor to your left (1 pt): Name of Neighbor to your right (1 pt):

Bertrand s postulate Chapter 2

Lecture Overview. 2 Permutations and Combinations. n(n 1) (n (k 1)) = n(n 1) (n k + 1) =

Bernoulli Polynomials Talks given at LSBU, October and November 2015 Tony Forbes

The Hypergeometric Coupon Collection Problem and its Dual

MATH10040 Chapter 4: Sets, Functions and Counting

Random Models. Tusheng Zhang. February 14, 2013

18.S34 (FALL, 2007) GREATEST INTEGER PROBLEMS. n + n + 1 = 4n + 2.

Infinite Sequences and Series

The Random Walk For Dummies

Sequence A sequence is a function whose domain of definition is the set of natural numbers.

Problem. Consider the sequence a j for j N defined by the recurrence a j+1 = 2a j + j for j > 0

Lecture Notes for CS 313H, Fall 2011

Bertrand s Postulate

A Stirling Encounter with Harmonic Numbers

Solutions. tan 2 θ(tan 2 θ + 1) = cot6 θ,

Topic 5: Basics of Probability

1 (12 points) Red-Black trees and Red-Purple trees

Assignment 5: Solutions

Lecture Notes for Analysis Class

Homework Set #3 - Solutions

Lecture 12: November 13, 2018

THE ASYMPTOTIC COMPLEXITY OF MATRIX REDUCTION OVER FINITE FIELDS

Two Topics in Number Theory: Sum of Divisors of the Factorial and a Formula for Primes

(A sequence also can be thought of as the list of function values attained for a function f :ℵ X, where f (n) = x n for n 1.) x 1 x N +k x N +4 x 3

ROSE WONG. f(1) f(n) where L the average value of f(n). In this paper, we will examine averages of several different arithmetic functions.

Product measures, Tonelli s and Fubini s theorems For use in MAT3400/4400, autumn 2014 Nadia S. Larsen. Version of 13 October 2014.

Optimally Sparse SVMs

Name Period ALGEBRA II Chapter 1B and 2A Notes Solving Inequalities and Absolute Value / Numbers and Functions

Math 61CM - Solutions to homework 3

6.3 Testing Series With Positive Terms

Lecture 2: April 3, 2013

Chapter 0. Review of set theory. 0.1 Sets

Recurrence Relations

Different kinds of Mathematical Induction

(s)h(s) = K( s + 8 ) = 5 and one finite zero is located at z 1

Largest families without an r-fork

2.4 Sequences, Sequences of Sets

Automated Proofs for Some Stirling Number Identities

On forward improvement iteration for stopping problems

Chapter 2. Asymptotic Notation

Integrals of Functions of Several Variables

Complex Numbers Solutions

Injections, Surjections, and the Pigeonhole Principle

Mathematical Induction

Table 12.1: Contingency table. Feature b. 1 N 11 N 12 N 1b 2 N 21 N 22 N 2b. ... a N a1 N a2 N ab

Math 220A Fall 2007 Homework #2. Will Garner A

Ma 530 Infinite Series I

University of Colorado Denver Dept. Math. & Stat. Sciences Applied Analysis Preliminary Exam 13 January 2012, 10:00 am 2:00 pm. Good luck!

The picture in figure 1.1 helps us to see that the area represents the distance traveled. Figure 1: Area represents distance travelled

Sequences, Mathematical Induction, and Recursion. CSE 2353 Discrete Computational Structures Spring 2018

Randomized Algorithms I, Spring 2018, Department of Computer Science, University of Helsinki Homework 1: Solutions (Discussed January 25, 2018)

19.1 The dictionary problem

f(1), and so, if f is continuous, f(x) = f(1)x.

Generalized Fibonacci-Like Sequence and. Fibonacci Sequence

Complete Solutions to Supplementary Exercises on Infinite Series

Math 475, Problem Set #12: Answers

REAL ANALYSIS II: PROBLEM SET 1 - SOLUTIONS

A PROBABILITY PROBLEM

HOMEWORK 2 SOLUTIONS

Math 105 TOPICS IN MATHEMATICS REVIEW OF LECTURES VII. 7. Binomial formula. Three lectures ago ( in Review of Lectuires IV ), we have covered

A GENERALIZED BERNSTEIN APPROXIMATION THEOREM

DISTANCE BETWEEN UNCERTAIN RANDOM VARIABLES

A Pair of Operator Summation Formulas and Their Applications

Problem 4: Evaluate ( k ) by negating (actually un-negating) its upper index. Binomial coefficient

Jacobi symbols. p 1. Note: The Jacobi symbol does not necessarily distinguish between quadratic residues and nonresidues. That is, we could have ( a

Linear Regression Demystified

(ii) Two-permutations of {a, b, c}. Answer. (B) P (3, 3) = 3! (C) 3! = 6, and there are 6 items in (A). ... Answer.

x !1! + 1!2!

q-fibonacci polynomials and q-catalan numbers Johann Cigler [ ] (4) I don t know who has observed this well-known fact for the first time.

Books Recommended for Further Reading

A symmetrical Eulerian identity

GROUPOID CARDINALITY AND EGYPTIAN FRACTIONS

Chapter 6. Advanced Counting Techniques

Math 2784 (or 2794W) University of Connecticut

NICK DUFRESNE. 1 1 p(x). To determine some formulas for the generating function of the Schröder numbers, r(x) = a(x) =

Let us consider the following problem to warm up towards a more general statement.

Rademacher Complexity

Homework 9. (n + 1)! = 1 1

Chapter 4. Fourier Series

4. Partial Sums and the Central Limit Theorem

SOLVED EXAMPLES

Commutativity in Permutation Groups

A new sequence convergent to Euler Mascheroni constant

On Order of a Function of Several Complex Variables Analytic in the Unit Polydisc

Define a Markov chain on {1,..., 6} with transition probability matrix P =

Advanced Stochastic Processes.

Problem Cosider the curve give parametrically as x = si t ad y = + cos t for» t» ß: (a) Describe the path this traverses: Where does it start (whe t =

If a subset E of R contains no open interval, is it of zero measure? For instance, is the set of irrationals in [0, 1] is of measure zero?

Zeros of Polynomials

Introduction to Extreme Value Theory Laurens de Haan, ISM Japan, Erasmus University Rotterdam, NL University of Lisbon, PT

Transcription:

Discrete Matheatics: Lectures 8 ad 9 Priciple of Iclusio ad Exclusio Istructor: Arijit Bishu Date: August ad 3, 009 As you ca observe by ow, we ca cout i various ways. Oe such ethod is the age-old priciple of iclusio ad exclusio that you have bee dealig with possibly fro your high school days. But agai, have you ever ased as to why the cubersoe forula of priciple of iclusio ad exclusio is correct? We will loo ito it ad also ito soe applicatios of the priciple. The forula for priciple of iclusio ad exclusio Priciple of iclusio ad exclusio deals with the cardiality of fiite sets. Let A ad A be two fiite sets. The, we ca easily show that A A = A + A A A. This is true because we first add up all the eleets i the set A ad A ; i doig so we have over couted those eleets that were both i A ad A. So, we subtract oce those eleets to get the above forula. Taig this forula as the basis ( = ad usig the distributive law that states for fiite sets X, Y ad Z, we have X (Y Z = (X Y (X Z, ca you prove by iductio the forula for the cardiality of the uio of fiite sets A, A,..., A? Exercise Let A, A,..., A be fiite sets. Prove the followig forula usig iductio. A A... A = A i i= + i<j i<j<... A i A j [Hits: The iductio would be o, the uber of sets.] A i A j A +( A A... A. ( We ca have a series of iequalities correspodig to the above forula of priciple of iclusio ad exclusio. A A... A A i ( i= A A... A A i i= A i A j (3 i<j

We ca have a series of such iequalities boudig A A... A fro above ad below till we iclude the last ter A A... A. These iequalities are useful whe we have partial iforatio about the sets ad their itersectios. A alterative proof for priciple of iclusio ad exclusio We loo at a proof for the priciple of iclusio ad exclusio by coutig. For this proof, we loo at a otatio that is differet fro Equatio. Observatio As earlier, let A, A,..., A be fiite sets. The, A i = ( j A i. (4 i= j= I ( {,,...,} j i I Proof: Cosider a arbitrary eleet a i= A i. a cotributes exactly to the left had side of Equatio 4. Let us ow loo ito how uch a cotributes to the expressio i the right had side of Equatio 4. Let a occur i exactly ( of the sets aog the sets A, A,..., A. Let the sets be A i, A i,..., A i where i < i <... < i. The eleet a ow appears i every j-tuple ( j of the sets aog A i, A i,..., A i ad i o other itersectios. Varyig j fro to, we loo at how ay ties the occurrece of a has bee added. Whe j =, the occurrece of a has bee added ( ties with a positive sig as ( = +. Whe j =, the occurrece of a has bee added ( ties with a egative sig as ( =. Whe j = 3, the occurrece of a has bee added ( 3 ties with a positive sig as ( 3 = +. Cotiuig thus, whe j =, the occurrece of a has bee added ( ties with a sig equal to ( = +. So, a cotributes the followig su to the right had side of the Equatio 4 ( ( + ( 3... + ( ( We ow fro bioial theore, that for ay o-egative iteger, we have ( + x = j=0 (5 ( x j (6 j Substitutig x = i Equatio 6, we have ( ( ( ( ( + +... + ( 0 3 ( ( ( + 3 = 0 +... upto ters = ( = ( 0 (7

Thus, the Expressio 5 cotributes to the right had side of Equatio 4. So, the cotributio of ay eleet a i= A i is to both sides of Equatio 4 ad hece, the forula holds. I the reaiig part, we loo ito several iterestig applicatios of the priciple of iclusio ad exclusio. 3 Coutig the uber of oto fuctios Let A ad B be two sets with A = ad B = with. We wat to cout the uber of oto fuctios fro A to B. Cosider the eleets of set A to be differet balls ad the eleets of set B to be differet boxes. The proble of fidig the uber of oto fuctios fro A to B is othig but fidig the uber of ways that differet balls ca be distributed aog differet boxes with o box epty of balls. This coditio of havig o boxes epty basically eforces the oto fuctio coditio that for each b B there exists a A satisfyig f(a = b, i.e. for each box there is at least oe ball. The uber of ways i which the differet balls ca be distributed aog the differet boxes with o restrictio is othig but the uber of fuctios fro A to B as each ball has to go ito a box. So, the uber of ways is B A =. Fro this, if we wat to fid the uber of ways i which differet balls ca be distributed aog differet boxes with o box epty of balls, the we eed to subtract the cases where ay box i, i, is epty; but i doig so we have subtracted the cases where two boxes ca be epty. If we add the cases where two boxes ca be epty, the we have added the cases where three boxes ca be epty. This ature of the proble idicates that the coutig ca be doe usig priciple of iclusio ad exclusio. Let A i be the subset of the distributios that has the box i ( i epty; i.e. the set of fuctios that do ot ap to the eleet i B. So, we eed to cout the uber of fuctios f : A B \{i}, which is (. There are ( choices of i; so i all the uber of such fuctios that do ot ap to a eleet i or the subset of the distributios that has the box i ( i epty is i A i = ( (. I coutig i A i, we icluded the case where we had two boxes epty. So, we eed to copute j<i A i A j. This is the uber of fuctios f : A B \ {i, j}, which is ( ; coupled with ( choices of i ad j, we have j<i A i A j = ( (. Cotiuig this way, we have the case where all the boxes are epty as A i A i... A i = ( (. So, to fid the total uber of oto fuctios, we have to subtract the su total of the cases where at least oe box was epty ( A i fro the total uber of fuctios (. Thus, the total uber of oto fuctios is (( ( ( A i = ( ( +... + ( ( 3

= ( ( j ( j (8 j j=0 (9 4 Derageet Figure : Distributio of balls ito boxes. O a raiy day, people, each with a ubrella, get ito a pub to have a health dri. As the pub ower would ot allow the soaed ubrellas to be tae iside, each perso deposits his or her ubrella at the couter. While goig out, the a at the couter returs the ubrellas at rado. What is the probability that oe of the persos gets bac his or her ow ubrella? We ca have a siilar proble with letters ad evelopes where each letter has its desigated evelope. Agai, what is the probability that oe of the letters goes ito its desigated evelope? This proble is also ow as the hatchec proble where ubrellas are replaced with hats! This class of probles where o ite is goig ito its correct place is ow as derageet. To fix the probability, we eed to ow the favourable cases. The possible uber of cases is!, i.e. all perutatios. 4. Coutig derageets To calculate the uber of favourable cases, we eed to fid out the uber of perutatios where oe of the i ites is goig ito the i-th positio. For this, we itroduce the cocept of a fixed poit of a perutatio. Let Π deote a perutatio, ad Π(i deote the positio of i i the perutatio. Let {4,,, 3} be a perutatio of {,, 3, 4}. Here, Π( = 3, Π( =, Π(3 = 4 ad Π(4 =. We defie a fixed poit of a perutatio as a idex i for which Π(i = i. So, to cout the uber of derageets we have to fid out those perutatios Π for which Π(i i holds i {,,..., }. Now, if we ca cout the uber of perutatios that are bad for derageet the we ca subtract it fro!. A perutatio is bad for derageet if it has at least oe fixed poit. Let Π deote the set of all 4

perutatios of {,,..., } ad for i =,,...,, we defie a set A i as the set of all perutatios that has the idex i as the fixed poit, i.e. A i = {Π Π Π(i = i}. The bad perutatios for derageet are those perutatios that belog to i A i. We have to ow fix ters lie i A i, j<i A i A j, <j<i A i A j A,..., A A... A. Each A i is of size (! ad there are ( of the. Each A i A j is of size (! ad there are ( of the. Thus, we have ( ( ( i=a i = (! (! +... + ( (! ( = ( (! (0 = Thus, the uber of derageets D( is D( =! i=a i ( =!! +!... + (! ( So, the probability of a derageet is D(!. Notice that, as, this probability coverges to e, i.e. asyptotically the probability is idepedet of. 4. Coutig derageets i aother way As we have soe idea about coutig i ters of subprobles, let us see if we ca apply it to derageet. Say, while coputig D(, we ow D( ad D(. Ca we express D( i ters of D( ad D(? Suppose, as earlier, we have eleets {,,..., }. We have choices for the eleet i which appears i the first spot. For each of these, we either choose a arrageet with i the i-th spot which we ca do i D( ways or choose a arrageet with ot i the i-th spot i D( ways. Choosig a arrageet with ot i the i-th spot is equivalet to fixig i at the positio ad as caot go to the i-th spot, we set the fixed poit of as i. Thus, we get D( ways. See Figure. Thus, with choices of i, we fially have the recurrece for D( as follows D( = ( (D( + D(, 3 =, = = 0, = ( Refereces [] Fred S. Roberts ad Barry Tesa, Applied Cobiatorics, d editio, Pearso, Pretice Hall, 005, USA. 5

i {, 3,...,} i the first place, so choices appears i the i-th spot does ot appear i the i-th spot Positios ad i are fixed, derage the rest ites i D( ways So, fix at the i-th spot ad ad derage {, 3,...,} i D( ways Figure : Explaatio of the derageet recurrece. [] J. Matouše ad J. Nešetřil, Ivitatio to Discrete Matheatics, Oxford Uiversity Press, New Yor, 998. [3] C. L. Liu, Eleets of Discrete Matheatics, Tata McGraw Hill, New Delhi, 000. [4] Roald L. Graha, Doald E. Kuth ad O. Patashi, Cocrete Matheatics, Pearso Educatio, 6