1 Inclusion-Exclusion Supplementary Notes Prepared by Raymond Wong Presented by Raymond Wong.

Slides:



Advertisements
Similar presentations
1 Mathematical Induction. 2 Mathematical Induction: Example  Show that any postage of ≥ 8¢ can be obtained using 3¢ and 5¢ stamps.  First check for.
Advertisements

1 1 PRESENTED BY E. G. GASCON Introduction to Probability Section 7.3, 7.4, 7.5.
Inclusion-Exclusion Formula
1 The RSA Algorithm Supplementary Notes Prepared by Raymond Wong Presented by Raymond Wong.
1 Quantifiers Supplementary Notes Prepared by Raymond Wong Presented by Raymond Wong.
Lecture 14: Oct 28 Inclusion-Exclusion Principle.
1 Intro to Induction Supplementary Notes Prepared by Raymond Wong Presented by Raymond Wong.
1 Independence Supplementary Notes Prepared by Raymond Wong Presented by Raymond Wong.
1 Copyright M.R.K. Krishna Rao 2003 Chapter 5. Discrete Probability Everything you have learned about counting constitutes the basis for computing the.
Discrete Structures Chapter 2 Part B Mathematical Induction
Chapter 4: Probability (Cont.) In this handout: Total probability rule Bayes’ rule Random sampling from finite population Rule of combinations.
1 Intro to Probability Supplementary Notes Prepared by Raymond Wong Presented by Raymond Wong.
1 Inference Supplementary Notes Prepared by Raymond Wong Presented by Raymond Wong.
1 Mathematical Induction. 2 Mathematical Induction: Example  Show that any postage of ≥ 8¢ can be obtained using 3¢ and 5¢ stamps.  First check for.
CSE115/ENGR160 Discrete Mathematics 03/22/12 Ming-Hsuan Yang UC Merced 1.
1 Recursion, Recurrences and Induction Supplementary Notes Prepared by Raymond Wong Presented by Raymond Wong.
1 Random Variables Supplementary Notes Prepared by Raymond Wong Presented by Raymond Wong.
EE1J2 - Slide 1 EE1J2 – Discrete Maths Lecture 12 Number theory Mathematical induction Proof by induction Examples.
Chapter 10 Sequences, Induction, and Probability Copyright © 2014, 2010, 2007 Pearson Education, Inc Mathematical Induction.
COMP 170 L2 L15: Probability of Unions of Events l Objective: n The inclusion-exclusion principle for probability Page 1.
1 Section 3.3 Mathematical Induction. 2 Technique used extensively to prove results about large variety of discrete objects Can only be used to prove.
1 Advanced Induction Supplementary Notes Prepared by Raymond Wong Presented by Raymond Wong.
CSE115/ENGR160 Discrete Mathematics 03/29/11 Ming-Hsuan Yang UC Merced 1.
1 Strong Mathematical Induction. Principle of Strong Mathematical Induction Let P(n) be a predicate defined for integers n; a and b be fixed integers.
1 Mathematical Induction. 2 Mathematical Induction: Example  Show that any postage of ≥ 8¢ can be obtained using 3¢ and 5¢ stamps.  First check for.
Induction and Recursion by: Mohsin tahir (GL) Numan-ul-haq Waqas akram Rao arslan Ali asghar.
Copyright © 2007 Pearson Education, Inc. Slide 8-1.
ICS 253 Presents Mathematical Induction Sultan Almuhammadi muhamadi
Mathematical Maxims and Minims, 1988
Lecture 9. Arithmetic and geometric series and mathematical induction
Conditional Probability and Independence If A and B are events in sample space S and P(B) > 0, then the conditional probability of A given B is denoted.
Welcome to Probability and the Theory of Statistics This class uses nearly every type of mathematics that you have studied so far as well as some possibly.
Chapter 6 Mathematical Induction
7 Further Topics in Algebra © 2008 Pearson Addison-Wesley. All rights reserved Sections 7.4–7.7.
College Algebra Fifth Edition James Stewart Lothar Redlin Saleem Watson.
Mathematical Induction
Binomial Coefficients, Inclusion-exclusion principle
Discrete Mathematics Tutorial 11 Chin
1 Discrete Structures – CNS2300 Text Discrete Mathematics and Its Applications (5 th Edition) Kenneth H. Rosen Chapter 5 Counting.
9.4 Mathematical Induction
ENGG 2040C: Probability Models and Applications Andrej Bogdanov Spring Axioms of Probability part two.
Chapter 5 Probability 5.2 The Addition Rule; Complements.
8.4 Mathematical Induction
A Brief Summary for Exam 2 Subject Topics Number theory (sections ) –Prime numbers Definition Relative prime Fundamental theorem of arithmetic.
(CSC 102) Lecture 23 Discrete Structures. Previous Lecture Summery  Sequences  Alternating Sequence  Summation Notation  Product Notation  Properties.
Probability Rules In the following sections, we will transition from looking at the probability of one event to the probability of multiple events (compound.
Part I: Theory Ver Chapter 2: Axioms of Probability.
CS Lecture 11 To Exclude Or Not To Exclude? + -
Slide Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley.
Copyright © Cengage Learning. All rights reserved. Sequences and Series.
1 Discrete Structures - CSIS2070 Text Discrete Mathematics and Its Applications Kenneth H. Rosen Chapter 4 Counting.
Proofs, Recursion and Analysis of Algorithms Mathematical Structures for Computer Science Chapter 2 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesProofs,
Induction Practice CS1050. Prove that whenever n is a positive integer. Proof: Basis Case: Let n = 1, then.
Section 5.1. Climbing an Infinite Ladder Suppose we have an infinite ladder: 1.We can reach the first rung of the ladder. 2.If we can reach a particular.
1 Discrete Mathematical Mathematical Induction ( الاستقراء الرياضي )
Probability Distributions Section 7.6. Definitions Random Variable: values are numbers determined by the outcome of an experiment. (rolling 2 dice: rv’s.
Chapter 5 1. Chapter Summary  Mathematical Induction  Strong Induction  Recursive Definitions  Structural Induction  Recursive Algorithms.
Mathematical Induction. The Principle of Mathematical Induction Let S n be a statement involving the positive integer n. If 1.S 1 is true, and 2.the truth.
1 COMP2121 Discrete Mathematics Principle of Inclusion and Exclusion Probability Hubert Chan (Chapters 7.4, 7.5, 6) [O1 Abstract Concepts] [O3 Basic Analysis.
CSE15 Discrete Mathematics 03/22/17
Advanced Algorithms Analysis and Design
9. Counting and Probability 1 Summary
Use mathematical induction to prove that the formula is true for all natural numbers m. {image} Choose the first step of the proof from the following:
Proofs, Recursion and Analysis of Algorithms
Notes 9.5 – Mathematical Induction
Inclusion-Exclusion Principle
Advanced Analysis of Algorithms
Miniconference on the Mathematics of Computation
Mathematical Induction
Review for the Quiz.
Presentation transcript:

1 Inclusion-Exclusion Supplementary Notes Prepared by Raymond Wong Presented by Raymond Wong

2 e.g.1 (Page 3) What is the size of E, denoted by S(E)? E b c F a d e f What is the size of F, denoted by S(F)? What is the size of E U F, denoted by S(E U F)? Please express S(E U F) in terms of S(E), S(F) and S(E  F). What is the size of E  F, denoted by S(E  F)? 1 S(E U F) = S(E) + S(F) – S(E  F)

3 e.g.2 (Page 5) We know that S(E U F) = S(E) + S(F) – S(E  F) where S(E) is the size of E E b c F a d e f This principle also applies in probabilities Let E and F be two events. We have P(E U F) = P(E) + P(F) – P(E  F) where P(E) is the probability of event E

4 e.g.3 (Page 6) Consider we roll two dice. Let E be the event that the sum of the two dice is even Let F be the event that the sum of the two dice is 8 or more. E: sum is even F: sum is 8 or more What is P(E)? What is P(F)? What is P(E  F)? What is P(E U F)? What is P(E)? What is P(F)? What is P(E  F)? What is P(E U F)?

5 e.g.3 E: sum is even F: sum is 8 or more What is P(E)? What is P(F)? What is P(E  F)? What is P(E U F)? Dice 1Dice 2Sum Dice 1Dice 2Sum Dice 1Dice 2Sum We want to find P(sum is even)= 1/2 1/2

6 e.g.3 E: sum is even F: sum is 8 or more What is P(E)? What is P(F)? What is P(E  F)? What is P(E U F)? Dice 1Dice 2Sum Dice 1Dice 2Sum Dice 1Dice 2Sum We want to find P(sum is 8 or more) 1/2 P(sum is 8) P(sum is 9) P(sum is 10) P(sum is 11) P(sum is 12) = 5/36 = 4/36 = 3/36 = 2/36 = 1/36 = 5/36 + 4/36 + 3/36 + 2/36 + 1/36= 15/36 15/36

7 e.g.3 E: sum is even F: sum is 8 or more What is P(E)? What is P(F)? What is P(E  F)? What is P(E U F)? Dice 1Dice 2Sum Dice 1Dice 2Sum Dice 1Dice 2Sum We want to find P(even sum is 8 or more) 1/2 P(sum is 8) P(sum is 10) P(sum is 12) = 5/36 = 3/36 = 1/36 = 5/36 + 3/36 + 1/36= 9/36 15/36 9/36

8 e.g.3 E: sum is even F: sum is 8 or more What is P(E)? What is P(F)? What is P(E  F)? What is P(E U F)? We want to find P(E U F) 1/2 15/36 9/36 (By the Principle of Inclusion and Exclusion) P(E U F) = P(E) + P(F) – P(E  F) = 1/2 + 15/36 – 9/36 = 2/3 2/3

9 e.g.4 (Page 6) What is the size of E, denoted by S(E)? E b c F a d e f What is the size of F, denoted by S(F)? What is the size of E U F U G, denoted by S(E U F U G)? Is “S(E U F U G) = S(E) + S(F) + S(G) - S(E  F) – S(E  G) – S(F  G)”? G g h i j k What is the size of G, denoted by S(G)? 5 What is the size of E  F, denoted by S(E  F)? 2 What is the size of E  G, denoted by S(E  G)? 2 What is the size of F  G, denoted by S(F  G)? 2 What is the size of E  F  G, denoted by S(E  F  G)? 1 No RHS = – 2 – 2 – 2 = 16 – 6 = 10 LHS = 11

10 e.g.4 What is the size of E, denoted by S(E)? E b c F a d e f What is the size of F, denoted by S(F)? What is the size of E U F U G, denoted by S(E U F U G)? “S(E U F U G) = S(E) + S(F) + S(G) - S(E  F) – S(E  G) – S(F  G) + S(E  F  G)” G g h i j k What is the size of G, denoted by S(G)? 5 What is the size of E  F, denoted by S(E  F)? 2 What is the size of E  G, denoted by S(E  G)? 2 What is the size of F  G, denoted by S(F  G)? 2 What is the size of E  F  G, denoted by S(E  F  G)? 1 RHS = – 2 – 2 – = 16 – 6 + 1= 11 LHS = 11

11 e.g.5 (Page 6) We know that S(E U F U G) = S(E) + S(F) + S(G) - S(E  F) – S(E  G) – S(F  G) + S(E  F  G) where S(E) is the size of E This principle also applies in probabilities Let E, F and G be three events. We have P(E U F U G) = P(E) + P(F) + P(G) - P(E  F) – P(E  G) – P(F  G) + P(E  F  G) where P(E) is the probability of event E

12 e.g.6 (Page 10) We have seen P(E U F) = P(E) + P(F) – P(E  F) We re-write as P(E 1 U E 2 ) = P(E 1 ) + P(E 2 ) – P(E 1  E 2 ) We further re-write as

13 e.g.7 (Page 10) We have seen P(E U F U G) = P(E) + P(F) + P(G) - P(E  F) – P(E  G) – P(F  G) + P(E  F  G) We re-write as P(E 1 U E 2 U E 3 ) = P(E 1 ) + P(E 2 ) + P(E 3 ) - P(E 1  E 2 ) – P(E 1  E 3 ) – P(E 2  E 3 ) + P(E 1  E 2  E 3 ) We further re-write as

14 e.g.7 From we further re-write as

15 e.g.7

16 e.g.7 we can re-write as

17 e.g.7

18 e.g.8 (Page 13) According to we deduce a general formula as follows Prove that Why is it correct?

19 e.g.8 Prove that Let P(n) be Step 1: Prove that P(2) (i.e., the base case) is true. We want to show that (*) RHS of (*) In some slides, we know that P(E 1 U E 2 ) = P(E 1 ) + P(E 2 ) – P(E 1  E 2 ) Thus, P(2) is true.

20 e.g.8 Prove that Let P(n) be Step 2: Prove that “ P(n-1)  P(n) ” is true for all n > 2. Step 2(a): Assume that P(n-1) is true for n > 2. That is, In other words, for any sets F 1, F 2, …, F n-1, we have

21 e.g.8 Prove that Let P(n) be Step 2: Prove that “ P(n-1)  P(n) ” is true for all n > 2. Step 2(a): Assume that P(n-1) is true for n > 2. Step 2(b): According to P(n-1), we deduce that P(n) is true. In other words, for any sets F 1, F 2, …, F n-1, we have We want to show that Objective:

22 e.g.8 Prove that Let P(n) be Step 2: Prove that “ P(n-1)  P(n) ” is true for all n > 2. Step 2(a): Assume that P(n-1) is true for n > 2. Step 2(b): According to P(n-1), we deduce that P(n) is true. In other words, for any sets F 1, F 2, …, F n-1, we have Objective: Consider P(E U F) = P(E) + P(F) – P(E  F) (proved in the base case)

23 e.g.8 Let P(n) be In other words, for any sets F 1, F 2, …, F n-1, we have Objective: Consider Inductive Hypothesis:

24 e.g.8 Let P(n) be In other words, for any sets F 1, F 2, …, F n-1, we have Objective: Consider Inductive Hypothesis: (By Distributive Law) Let G i = E i  E n for i < n

25 e.g.8 Let P(n) be In other words, for any sets F 1, F 2, …, F n-1, we have Objective: Consider Inductive Hypothesis: Let G i = E i  E n for i < n

26 e.g.8 Let P(n) be In other words, for any sets F 1, F 2, …, F n-1, we have Objective: Consider Inductive Hypothesis: Let G i = E i  E n for i < n Consider

27 e.g.8 Let P(n) be In other words, for any sets F 1, F 2, …, F n-1, we have Objective: Consider Inductive Hypothesis: Let G i = E i  E n for i < n

28 e.g.8 Let P(n) be Objective: Consider

29 e.g.8 Let P(n) be Objective: Consider …………(**)

30 e.g.8 Consider

31 e.g.8 Consider (where k+1 = a)

32 e.g.8

33 e.g.8 Let P(n) be Objective: From (**), we have

34 e.g.8 Let P(n) be Objective: From (**), we have

35 e.g.8 Let P(n) be Objective: From (**), we have Thus, P(n) is true.

36 e.g.8 Let P(n) be Objective: We prove that “ P(n-1)  P(n) ” is true for all n > 2 By Mathematical Induction,  n  2,

37 e.g.9 (Page 22) We know that What is P(E 1 U E 2 U E 3 U E 4 )? P(E 1 U E 2 U E 3 U E 4 )= P(E 1 ) + P(E 2 ) + P(E 3 ) + P(E 4 ) - P(E 1  E 2 ) - P(E 1  E 3 ) - P(E 1  E 4 ) - P(E 2  E 3 ) - P(E 2  E 4 ) - P(E 3  E 4 ) + P(E 1  E 2  E 3 ) + P(E 1  E 2  E 4 ) + P(E 1  E 3  E 4 ) + P(E 2  E 3  E 4 ) - P(E 1  E 2  E 3  E 4 )

38 e.g.10 (Page 23) There are 5 students who have the same model and color of backpack. They put their backpacks randomly along the wall. Someone mixed up the backpacks so students get back “random” backpacks. Suppose that there are two students called “Raymond” and “Peter” (a) What is the probability that Raymond gets his OWN backpack back? (b) What is the probability that Raymond and Peter get their OWN backpacks back? (a) What is the probability that Raymond gets his OWN backpack back? (b) What is the probability that Raymond and Peter get their OWN backpacks back?

39 e.g.10 (a) What is the probability that Raymond gets his OWN backpack back? (b) What is the probability that Raymond and Peter get their OWN backpacks back? Raymond Peter (a) There are (5-1)! cases that Raymond gets his OWN backpack back. There are totally 5! cases P(Raymond gets his OWN backpack back) = (5-1)! 5!

40 e.g.10 (a) What is the probability that Raymond gets his OWN backpack back? (b) What is the probability that Raymond and Peter get their OWN backpacks back? Raymond Peter (b) There are (5-2)! cases that Raymond and Peter get their OWN backpacks back. There are totally 5! cases P(Raymond and Peter get their OWN backpacks back) = (5-2)! 5!

41 e.g.11 (Page 23) There are n students who have the same model and color of backpack. They put their backpacks randomly along the wall. Someone mixed up the backpacks so students get back “random” backpacks. Suppose that there are two students called “Raymond” and “Peter” (a) What is the probability 1 specified student gets his OWN backpack back? (b) What is the probability k specified students get their OWN backpacks back? (a)What is the probability 1 specified student gets his OWN backpack back? (b) What is the probability k specified students get their OWN backpacks back?

42 e.g.11 Raymond Peter … n There are (n-1)! cases that 1 specified student gets his OWN backpack back. There are totally n! cases P(1 specified student gets his OWN backpack back) = (n-1)! n! (a)What is the probability 1 specified student gets his OWN backpack back? (b) What is the probability k specified students get their OWN backpacks back? (a) = (n-1)! (n-1)!. n = 1 n 1 n

43 e.g.11 Raymond Peter … n … k There are (n-k)! cases that k specified students get their OWN backpacks back. There are totally n! cases P(k specified students their OWN backpacks back) = (n-k)! n! (a)What is the probability 1 specified student gets his OWN backpack back? (b) What is the probability k specified students get their OWN backpacks back? (b) 1 n (n-k)! n!

44 e.g.12 (Page 26) Suppose that there are 5 students (i.e., n = 5) Let E i be the event that student i gets his own backpack back. What is the probability that at least one person gets his own backpack? (a)What is the probability 1 specified student gets his OWN backpack back? (b) What is the probability k specified students get their OWN backpacks back? 1 n (n-k)! n! P(at least one person gets his own backpack) = P(E 1 U E 2 U E 3 U E 4 U E 5 )

45 e.g.12 (a)What is the probability 1 specified student gets his OWN backpack back? (b) What is the probability k specified students get their OWN backpacks back? 1 n (n-k)! n! P(at least one person gets his own backpack) = P(E 1 U E 2 U E 3 U E 4 U E 5 ) P(k specified students get their own backpacks back) Let E i be the event that student i gets his own backpack back. How many possible tuples in form of (i 1, i 2, …, i k ) where 1  i 1 < i 2 < … < i k  5? 5 k

46 e.g.12 (a)What is the probability 1 specified student gets his OWN backpack back? (b) What is the probability k specified students get their OWN backpacks back? 1 n (n-k)! n! P(at least one person gets his own backpack) Let E i be the event that student i gets his own backpack back.

47 e.g.12 (a)What is the probability 1 specified student gets his OWN backpack back? (b) What is the probability k specified students get their OWN backpacks back? 1 n (n-k)! n! P(at least one person gets his own backpack) Let E i be the event that student i gets his own backpack back. P(at least one person gets his own backpack)

48 e.g.13 (Page 28) Suppose that there are 5 students (i.e., n = 5) Let E i be the event that student i gets his own backpack back. What is the probability that nobody gets his own backpack? (a)What is the probability 1 specified student gets his OWN backpack back? (b) What is the probability k specified students get their OWN backpacks back? 1 n (n-k)! n! P(nobody gets his own backpack) = 1 – P(at least one person gets his own backpack) P(at least one person gets his own backpack)

49 e.g.14 (Page 29) Suppose that there are n students Let E i be the event that student i gets his own backpack back. What is the probability that at least one person gets his own backpack? (a)What is the probability 1 specified student gets his OWN backpack back? (b) What is the probability k specified students get their OWN backpacks back? 1 n (n-k)! n! P(at least one person gets his own backpack) = P(E 1 U E 2 U … U E n )

50 e.g.14 (a)What is the probability 1 specified student gets his OWN backpack back? (b) What is the probability k specified students get their OWN backpacks back? 1 n (n-k)! n! P(at least one person gets his own backpack) = P(E 1 U E 2 U … U E n ) P(k specified students get their own backpacks back) Let E i be the event that student i gets his own backpack back. How many possible tuples in form of (i 1, i 2, …, i k ) where 1  i 1 < i 2 < … < i k  n? n k

51 e.g.12 (a)What is the probability 1 specified student gets his OWN backpack back? (b) What is the probability k specified students get their OWN backpacks back? 1 n (n-k)! n! P(at least one person gets his own backpack) Let E i be the event that student i gets his own backpack back.

52 e.g.12 (a)What is the probability 1 specified student gets his OWN backpack back? (b) What is the probability k specified students get their OWN backpacks back? 1 n (n-k)! n! P(at least one person gets his own backpack) Let E i be the event that student i gets his own backpack back. P(at least one person gets his own backpack)

53 e.g.15 (Page 29) Suppose that there are n students Let E i be the event that student i gets his own backpack back. What is the probability that nobody gets his own backpack? (a)What is the probability 1 specified student gets his OWN backpack back? (b) What is the probability k specified students get their OWN backpacks back? 1 n (n-k)! n! P(nobody gets his own backpack) = 1 – P(at least one person gets his own backpack) P(at least one person gets his own backpack) Dearrangement Problem

54 e.g.15 P(nobody gets his own backpack) = 1 – P(at least one person gets his own backpack) Note that from calculus, we have if n is a large number

55 e.g.15 P(nobody gets his own backpack) if n is a large number

56 e.g.15 P(nobody gets his own backpack) if n is a large number n e -1 =

57 e.g.16 (Page 33) Principle of Inclusion and Exclusion for Probability Principle of Inclusion and Exclusion for Counting

58 e.g.17 (Page 33) How many functions from a 6-element set N to a 5-element set M = {y 1, y 2, …, y 5 } are there? N M 1 2 y1y1 y2y2 5 choices Total no. of functions = 5 x 5 x 5 x 5 x 5 x 5= choices y3y3 y4y4 y5y5

59 e.g.18 (Page 33) How many functions from a 6-element set N to a 5-element set M = {y 1, y 2, …, y 5 } map nothing to y 1 ? N M 1 2 y1y1 y2y2 4 choices Total no. of functions = 4 x 4 x 4 x 4 x 4 x 4= choices y3y3 y4y4 y5y5

60 e.g.19 (Page 33) How many functions from a 6-element set N to a 5-element set M = {y 1, y 2, …, y 5 } map nothing to y 1 and y 2 ? N M 1 2 y1y1 y2y2 3 choices Total no. of functions = 3 x 3 x 3 x 3 x 3 x 3= choices y3y3 y4y4 y5y5

61 e.g.20 (Page 33) How many functions from a 6-element set N to a 5-element set M = {y 1, y 2, …, y 5 } map nothing to a given set K of k elements in M (e.g., {y 1, y 2 })? N M 1 2 y1y1 y2y2 (5-k) choices Total no. of functions = (5-k) x (5-k) x (5-k) x (5-k) x (5-k) x (5-k) = (5-k) y3y3 y4y4 y5y5 (5-k) choices Total no. of functions that map nothing to a given set K of k elements in M= (5-k) 6

62 e.g.21 (Page 34) How many functions from a 6-element set N to a 5-element set M = {y 1, y 2, …, y 5 } map nothing to at least one element in M? Total no. of functions that map nothing to a given set K of k elements in M= (5-k) 6 Let E i be a set of functions which map nothing to element y i Total no. of functions that map nothing to at least one element in M = E 1 U E 2 U … U E 5 N M 1 2 y1y1 y2y y3y3 y4y4 y5y5 = Principle of Inclusion-and-Exclusion

63 e.g.21 How many functions from a 6-element set N to a 5-element set M = {y 1, y 2, …, y 5 } map nothing to at least one element in M? Total no. of functions that map nothing to a given set K of k elements in M= (5-k) 6 Let E i be a set of functions which map nothing to element y i Total no. of functions that map nothing to at least one element in M N M 1 2 y1y1 y2y y3y3 y4y4 y5y5

64 e.g.21 How many functions from a 6-element set N to a 5-element set M = {y 1, y 2, …, y 5 } map nothing to at least one element in M? Total no. of functions that map nothing to a given set K of k elements in M= (5-k) 6 Let E i be a set of functions which map nothing to element y i Total no. of functions that map nothing to at least one element in M Total no. of functions that map nothing to a given set K of k elements where K = {y i 1, y i 2, …, y i k } How many possible tuples in form of (i 1, i 2, …, i k ) where 1  i 1 < i 2 < … < i k  5? 5 k N M 1 2 y1y1 y2y y3y3 y4y4 y5y5 Total no. of functions that map nothing to at least one element in M=

65 e.g.22 (Page 37) How many onto functions from a 6-element set N to a 5-element set M = {y 1, y 2, …, y 5 } are there? Total no. of functions that map nothing to at least one element in M= N M 1 2 y1y1 y2y y3y3 y4y4 y5y5

66 e.g.22 Onto function (or surjection) N M N M Total no. of functions that map nothing to at least one element in M=

67 e.g.22 Not onto function (or not surjection) N M NS M Total no. of functions that map nothing to at least one element in M=

68 e.g.22 How many onto functions from a 6-element set N to a 5-element set M = {y 1, y 2, …, y 5 } are there? Total no. of functions that map nothing to at least one element in M= Total no. of onto functions from a 6-element set N to a 5-element set M = Total no. of functions from a 6-element set N to a 5-element set M - Total no. of functions that are NOT onto N M 1 2 y1y1 y2y y3y3 y4y4 y5y5 From “e.g.,17”, Total no. of functions from a 6-element set N to a 5-element set M = 5 6 = 5 6 -= 5 6 += (-1) 0 (5-0) = Total no. of functions from a 6-element set N to a 5-element set M - Total no. of functions that map nothing to at least one element in M =

69 e.g.22 How many onto functions from a 6-element set N to a 5-element set M = {y 1, y 2, …, y 5 } are there? Total no. of onto functions from a 6-element set N to a 5-element set M N M 1 2 y1y1 y2y y3y3 y4y4 y5y5 =

70 e.g.22 How many onto functions from a 6-element set N to a 5-element set M = {y 1, y 2, …, y 5 } are there? Total no. of onto functions from a 6-element set N to a 5-element set M N M 1 2 y1y1 y2y y3y3 y4y4 y5y5 =

71 e.g.23 (Page 37) How many onto functions from a 6-element set N to a 5-element set M = {y 1, y 2, …, y 5 } are there? Total no. of onto functions from a 6-element set N to a 5-element set M N M 1 2 y1y1 y2y y3y3 y4y4 y5y5 n m … n … ymym m = n m n m m m