Applications of Inclusion-Exclusion: Selected Exercises

Slides:



Advertisements
Similar presentations
Applications of Inclusion-Exclusion: Selected Exercises.
Advertisements

Inclusion-Exclusion Rosen 6.5 & 6.6
Lecture & 6.6 Inclusion-Exclusion. 6.5 Inclusion-Exclusion A AB U It’s simply a matter of not over-counting the blue area in the intersection.
7.6 Applications of Inclusion/Exclusion Problem: Find the number of elements in a set that have none of n properties P1, P2,.. Pn.
Fall 2002CMSC Discrete Structures1 Permutations How many ways are there to pick a set of 3 people from a group of 6? There are 6 choices for the.
EXAMPLE 1 Apply the distributive property
Linear Functions.
VAVLPVCTYMAUS PSABLADDERZSB EBSANTESHTICL RLDUDSKTTVSRA EDEARCENEAUOD CRFNORSASINTD TPEUUOCPTDATP UNRTMTRBEEXME MIEUSUULSNSNN USNMEMNISAIIT AESXSVPENNISI.
QPLNHTURBIOTS CADAIASOINCOS OSTPOSTLGVAGT AJRLFKLEROUEA CLARITYSOLSTB HTEAMVSRUVAHI INTERACTPELEL NAPKSOCIALIRI GSOCIOGRAMTST CONFORMITYYTY 14 WORDS ANSWERS.
Exam 2 Review 8.2, 8.5, 8.6, Thm. 1 for 2 roots, Thm. 2 for 1 root Theorem 1: Let c 1, c 2 be elements of the real numbers. Suppose r 2 -c 1.
Binomial Coefficients, Inclusion-exclusion principle
ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 4 – Counting Farinaz Koushanfar ECE Dept., Rice University Sept 3, 2009.
1 Binomial Coefficients CS 202 Epp, section ??? Aaron Bloomfield.
OPERATIONS WITH DERIVATIVES. The derivative of a constant times a function Justification.
1 Network and Computer Security (CS 475) Modular Arithmetic and the RSA Public Key Cryptosystem Jeremy R. Johnson.
1 Counting by Mapping Lecture 15: Nov 4 A B …… f.
The Product Rule: Use & Misuse. Copyright © Peter Cappello The Product Rule If a procedure has 1.A 1 st stage with s 1 outcomes 2.A 2 nd stage with.
Network and Computer Security (CS 475) Modular Arithmetic
Divide and Conquer (Part II) Multiplication of two numbers Let U = (u 2n-1 u 2n-2 … u 1 u 0 ) 2 and V = (v 2n-1 v 2n-2 …v 1 v 0 ) 2, and our goal is to.
Pigeonhole Principle. If n pigeons fly into m pigeonholes and n > m, then at least one hole must contain two or more pigeons A function from one finite.
The Fundamental Counting Principle and Permutations 18.0 Students use fundamental counting principles to compute combinations and permutations Students.
Methods in Combinatorics. Finite, Countable, Discrete. Enumerating objects which satisfy a condition. In short: Counting Stuff → Balls & Urns.
Recurrence Relations: Selected Exercises. Copyright © Peter Cappello2 Exercise 10 (a) A person deposits $1,000 in an account that yields 9% interest compounded.
EXAMPLE 1 Count permutations
L14: Permutations, Combinations and Some Review
The Pigeonhole Principle
Relations and Functions
Binomial Coefficients: Selected Exercises
Developing Your Counting Muscles
3.5 Operations on Functions
Counting by Complement and the Inclusion/Exclusion Principle
The Pigeonhole Principle
COCS DISCRETE STRUCTURES
4.6 Type 2 Exponential Equations
Generalized Permutations & Combinations: Selected Exercises
What is Probability? Quantification of uncertainty.
9. Counting and Probability 1 Summary
To Exclude Or Not To Exclude?
Randomized Algorithms
Matrix Chain Multiplication
Recursively Defined Functions
Some Rules for Expectation
Representation of Functions by Power Series
Counting I: Bijection and Choice Trees
Matrix Chain Multiplication
Randomized Algorithms
Bayes Rule for probability
Basic Counting.
Selecting Two Vouchers
Copyright © Cengage Learning. All rights reserved.
States… Associative Property Examples Non-Examples.
Basic Counting Lecture 9: Nov 5, 6.
Evaluating expressions and Properties of operations
The principle of inclusion and exclusion; inversion formulae
Continuity Alex Karassev.
Applied Discrete Mathematics Week 3: Sets
Representations of Integers
Limits Lesson 3.1.
Inclusion-Exclusion Principle
2.Derangements A derangement of {1,2,…,n} is a permutation i1i2…in of {1,2,…,n} in which no integer is in its natural position: i11,i22,…,inn. We denote.
Objectives Approximate a definite integral using the Trapezoidal Rule.
Counting Elements of Disjoint Sets: The Addition Rule
Lecture # 18 Types of Functions
Chapter 7 Advanced Counting Techniques
Discrete Math for CS CMPSC 360 LECTURE 27 Last time: Counting. Today:
The Selection Problem.
Lesson 5.3 What is a Function?
Counting I: Choice Trees and Correspondences
The Algebra of Functions
2008 Multiple Choice.
Presentation transcript:

Applications of Inclusion-Exclusion: Selected Exercises

8 How many onto functions are there from a set with 7 elements to a set with 5 elements? Equivalently, how many ways are there to assign 7 distinct tasks to 5 distinct computers such that each computer gets ≥ 1 task?

8 Solution Let the domain D = { a, b, c, d, e, f, g }. Let the co-domain C = {1, 2, 3, 4, 5 }. Let a function f: D  C have property P1 when element f(x) = 1, for some x  D. P2 when element f(x) = 2, for some x  D. P3 when element f(x) = 3, for some x  D. P4 when element f(x) = 4, for some x  D. P5 when element f(x) = 5, for some x  D. We count all functions that have P1, P2, …, and P5.

8 Solution continued Let A1 be the set of functions that do not have P1. A2 be the set of functions that do not have P2. A3 be the set of functions that do not have P3. A4 be the set of functions that do not have P4. A5 be the set of functions that do not have P5. The set of desired functions is A1  A2  A3  A4  A5 = U – (A1  A2  A3  A4  A5).

8 Solution continued |U| = 57. |Ai| = 47, for 1  i  5. |Ai  Aj | = 37, for 1  i < j  5. |Ai  Aj  Ak | = 27, for 1  i < j < k  5. |Ai  Aj  Ak  Al | = 17, for 1  i < j < k < l  5. The overall answer is 57 – C(5,1)47 + C(5,2)37 - C(5,3)27 + C(5,4)17.

10 In how many ways can 8 distinct balls be distributed into 3 distinct urns if each urn must contain ≥ 1 ball?

10 Solution Let property: Let set: P1 be a distribution of the balls such that urn 1 has ≥ 1 ball. P2 be a distribution of the balls such that urn 2 has ≥ 1 ball. P3 be a distribution of the balls such that urn 3 has ≥ 1 ball. Let set: A1 be the set of distributions that do not have P1. A2 be the set of distributions that do not have P2. A3 be the set of distributions that do not have P3. Then, we want | A1  A2  A3 | = | A1  A2  A3 | = |U| - | A1  A2  A3 | = |U| - | A1| - | A2| - | A3| + | A1  A2 | + | A1  A3 | + | A2  A3 | - | A1  A2  A3 |.

10 Solution continue |U| = the # of distributions of the 8 distinct balls into the 3 distinct urns = 38. (Each ball can go into 3 possible urns.) | A1 | = | A2 | = | A3 | = 28. | A1  A2 | = | A1  A3 | = | A2  A3 | = 18. | A1  A2  A3 | = 08. The answer is 38 - 3x28 + 3x1.

*18 Use a combinatorial argument to show that Dn, the # of derangements of n objects, satisfies the recurrence Dn = (n – 1)(Dn-1 + Dn-2 ), for n ≥ 2. Hint: There are n – 1 choices for the 1st element k of a derangement. Consider separately the derangements that start with k that do and do not have 1 in the kth position.

*18 Solution Use the Product Rule to count the derangements in 2 stages: In stage 1, we choose the 1st number in the derangement: There are n – 1 ways to do that. In stage 2, we complete the derangement. Let the 1st number in the derangement be i  1. Use the Sum Rule to partition this set of derangements into: Those with the ith element = 1: There are Dn-2 ways to complete the derangement. Those with the ith element  1: Think of element 1 temporarily renamed i. The elements 2, 3, …, n are to be deranged (1 cannot go in position i) There are Dn-1 ways to derange them. Thus, Dn = (n – 1)(Dn-2 + Dn-1 ), where D0 = D1 = 0.