Inclusion and Exclusion Principle

Similar documents
Combinations and Probabilities


ENGG 2440B Discrete Mathematics for Engineers Tutorial 8

Advanced Counting Techniques. Chapter 8

Arithmetic, Algebra, Number Theory

CSCI 150 Discrete Mathematics Homework 5 Solution

The Inclusion Exclusion Principle

Math.3336: Discrete Mathematics. Combinatorics: Basics of Counting

MATH 243E Test #3 Solutions

Advanced Counting Techniques

Direction: You are required to complete this test within 50 minutes. Please make sure that you have all the 10 pages. GOOD LUCK!

Discrete Mathematics (CS503)

Sail into Summer with Math!

Some Review Problems for Exam 3: Solutions

Foundations of Computer Science Lecture 14 Advanced Counting

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

MATH c UNIVERSITY OF LEEDS Examination for the Module MATH2210 (May/June 2004) INTRODUCTION TO DISCRETE MATHEMATICS. Time allowed : 2 hours

Rational Numbers CHAPTER. 1.1 Introduction

Revision Topic 8: Solving Inequalities Inequalities that describe a set of integers or range of values

CHAPTER 1 REAL NUMBERS KEY POINTS

Executive Assessment. Executive Assessment Math Review. Section 1.0, Arithmetic, includes the following topics:

Name: Solutions Final Exam

Integers and Division

1. How many labeled trees are there on n vertices such that all odd numbered vertices are leaves?

Mathematics Arithmetic Sequences

UNIVERSITY OF NORTH CAROLINA CHARLOTTE 1996 HIGH SCHOOL MATHEMATICS CONTEST March 4, f(x, y) = (max(x, y)) min(x,y)

Counting Methods. CSE 191, Class Note 05: Counting Methods Computer Sci & Eng Dept SUNY Buffalo


Some Review Problems for Exam 3: Solutions

Homework #2 solutions Due: June 15, 2012

Indistinguishable objects in indistinguishable boxes

Further factorising, simplifying, completing the square and algebraic proof

Physical Chemistry - Problem Drill 02: Math Review for Physical Chemistry

Kansas City Area Teachers of Mathematics 2014 KCATM Math Competition NUMBER SENSE GRADE 8 NO CALCULATOR

Review problems solutions

not to be republished NCERT REAL NUMBERS CHAPTER 1 (A) Main Concepts and Results

THE LOGIC OF QUANTIFIED STATEMENTS. Predicates and Quantified Statements I. Predicates and Quantified Statements I CHAPTER 3 SECTION 3.

Contents. Introduction... 5

Introduction to Combinatorial Mathematics

Triceratopisms of Latin Squares

MATH 114 Fall 2004 Solutions to practice problems for Final Exam

Core Mathematics 3 Algebra

Math-2. Lesson 1-2 Solving Single-Unknown Linear Equations

Math 378 Spring 2011 Assignment 4 Solutions

CAHSEE on Target UC Davis, School and University Partnerships

Winter Camp 2009 Number Theory Tips and Tricks

SOME FAMOUS UNSOLVED PROBLEMS. November 18, / 5

Math 13, Spring 2013, Lecture B: Midterm

Objective. The student will be able to: solve systems of equations using elimination with multiplication. SOL: A.9

Extra Fun: The Indeterminate Forms 1, 0, and 0 0

Direct Proof MAT231. Fall Transition to Higher Mathematics. MAT231 (Transition to Higher Math) Direct Proof Fall / 24

Self-Directed Course: Transitional Math Module 4: Algebra

1. Revision Description Reflect and Review Teasers Answers Recall of Rational Numbers:

6 Permutations Very little of this section comes from PJE.

Algebraic Structures Exam File Fall 2013 Exam #1

Exercises Exercises. 2. Determine whether each of these integers is prime. a) 21. b) 29. c) 71. d) 97. e) 111. f) 143. a) 19. b) 27. c) 93.

Discrete Probability

PROBLEMS ON CONGRUENCES AND DIVISIBILITY

6 SQUARES AND SQUARE ROOTS

A-LEVEL MATHS Bridging Work 2017

Math 230 Final Exam, Spring 2009

MATH ALGEBRA AND FUNCTIONS

A group of figures, representing a number, is called a numeral. Numbers are divided into the following types.

May 6, Be sure to write your name on your bluebook. Use a separate page (or pages) for each problem. Show all of your work.

Counting in the Twilight Zone

AQA Level 2 Further mathematics Further algebra. Section 4: Proof and sequences

CSC 125 :: Final Exam December 14, 2011

Exam 2 Review Chapters 4-5

MA Discrete Mathematics

3.2 Equations that Reduce to Linear Form. Copyright Cengage Learning. All rights reserved.

Clifton High School Mathematics Summer Workbook

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics. College Algebra for STEM

a. Define your variables. b. Construct and fill in a table. c. State the Linear Programming Problem. Do Not Solve.

4.4. Closure Property. Commutative Property. Associative Property The system is associative if TABLE 10

Expressions and Equations

Math161 HW#2, DUE DATE:

Combinations. April 12, 2006

ABE Math Review Package

CS1800 Discrete Structures Spring 2018 February CS1800 Discrete Structures Midterm Version A

Math League SCASD. Meet #2. Number Theory. Self-study Packet

Math Review. for the Quantitative Reasoning measure of the GRE General Test

2010 GCE A Level H2 Maths Solution Paper 2 Section A: Pure Mathematics. 1i) x 2 6x + 34 = 0 6 ± x = 2

Simplify each numerical expression. Show all work! Only use a calculator to check. 1) x ) 25 ( x 2 3) 3) 4)

Math 319 Problem Set #2 Solution 14 February 2002

MA 524 Final Fall 2015 Solutions

Unit 4: Quadratic equations in one unknown. Quadratic equations in one unknown

Math Precalculus I University of Hawai i at Mānoa Spring

Math Lecture 3 Notes

Mathematics. Differentiation. Applying the Differentiation of Trigonometric Functions

Math Released Item Grade 5. Expressions with Same Value 4054-M03251

then the hard copy will not be correct whenever your instructor modifies the assignments.

Arithmetic. Integers: Any positive or negative whole number including zero

2009 A-level Maths Tutor All Rights Reserved

Math 103A Fall 2012 Exam 2 Solutions

Notes. Combinatorics. Combinatorics II. Notes. Notes. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Spring 2006

and LCM (a, b, c) LCM ( a, b) LCM ( b, c) LCM ( a, c)

Equations, Inequalities, and Problem Solving

Module 4 Linear Equations

Sail into Summer with Math!

1. Sample spaces, events and conditional probabilities. A sample space is a finite or countable set S together with a function. P (x) = 1.

Transcription:

Inclusion and Exclusion Principle Tutor: Zhang Qi Systems Engineering and Engineering Management qzhang@se.cuhk.edu.hk November 2014 Tutor: Zhang Qi (SEEM) Tutorial 7 November 2014 1 / 14

Review Theorem (Addition Version) S 1... S m = m i=1 S i 1 i<j m S i S j + 1 i<j<k m S i S j S k... + ( 1) m 1 S 1... S m Theorem (Subtraction Version) S 1... S m = S S 1... S m The second term of RHS can be computed by addition version. Tutor: Zhang Qi (SEEM) Tutorial 7 November 2014 2 / 14

Example 1 A total of 1232 students have taken a course in Spanish, 879 have taken a course in French, and 114 have taken a course in Russian. Further, 103 have taken courses in both Spanish and French, 23 have taken courses in both Spanish and Russian, and 14 have taken courses in both French and Russian. If 2092 students have taken at least one of those three courses, how many students have taken all three courses? Tutor: Zhang Qi (SEEM) Tutorial 7 November 2014 3 / 14

Solution: Let S, F, R be sets of students who have taken a course in Spanish, French and Russian respectively. We want to get S F R. Then S = 1232, F = 879, R = 114 As S F = 103, S R = 23, F R = 14 S F R = 2092 S F R = S + F + R S F S R F R + S F R we have 2092 = 1232 + 879 + 114 103 23 14 + S F R S F R = 7 Tutor: Zhang Qi (SEEM) Tutorial 7 November 2014 4 / 14

Example 2 How many onto functions are there from a set with six elements to a set with three elements? (Definition: a function f from set X to set Y is onto function if every element y in Y has a corresponding element x in X so that f(x)=y.) Hint: Suppose the three elements are b 1, b 2, b 3, and P 1, P 2, P 3 are properties that b 1, b 2, b 3 are not in the range of the function respectively. Note that a function is onto if and only if it has none of the properties P 1, P 2, P 3. Tutor: Zhang Qi (SEEM) Tutorial 7 November 2014 5 / 14

Solution: The number of onto functions from a set with six elements to a set with three elements is N(P 1 P 2 P 3 ). According to the inclusion-exclusion principle, N(P 1 P 2 P 3 ) = N N(P 1 P 2 P 3 ) = N [N(P 1 ) + N(P 2 ) + N(P 3 )] + [N(P 1 P 2 ) + N(P 1 P 3 ) + N(P 2 P 3 )] N(P 1 P 2 P 3 ) Tutor: Zhang Qi (SEEM) Tutorial 7 November 2014 6 / 14

Solution Cont : Firstly,N = 3 6 as there are three choices for the value of the function at each element of the domain. As N(P i ) is the number of functions that do not have b i in their range, there are two choices for the value of the function ( ) at each element of the 3 domain. Hence N(P i ) = 2 6 and there are of terms of this kind. 1 On the other hand N(P i P j ) is the number of functions that do not have b i, b j in their range, there are only one choice for the value of the function ( ) 3 at each element of the domain. Hence N(P i P j ) = 1 6 and there are 2 of terms of this kind. Last,N(P 1 P 2 P 3 ) = 0. So N(P 1 P 2 P 3 ) = 3 6 ( ) 3 2 6 + 1 ( ) 3 1 6 = 540 2 Tutor: Zhang Qi (SEEM) Tutorial 7 November 2014 7 / 14

Example 3 How many ways are there to assign five different jobs to four different employees if every employee is assigned at least one job? Hint: Consider it as a function from the set of five jobs to the set of four employees. As every employee gets at least one job, the function is a onto function. Solution: It follows from example 2 that ( ) 4 4 5 3 5 + 1 ( ) 4 2 5 2 ( ) 4 1 5 = 240 3 Tutor: Zhang Qi (SEEM) Tutorial 7 November 2014 8 / 14

Example 4 Find the number of integers between 1 and 1000, inclusive, that are not divisible by 5,6, and 8. Hint: Let P 1, P 2, P 3 be the property that an integer is divisible by 5,6 and 8 respectively and A i be the set consisting of those integers in S(1 to 1000) with property P i. We wish to find the number of integers in A 1 A 2 A 3. Notation: For r R, we let [r] be the largest integer less than or equal to r. We use lcm{a, b, c} to stand for the least common multiple of integers. Tutor: Zhang Qi (SEEM) Tutorial 7 November 2014 9 / 14

Firstly, A 1 = [ 1000 5 ] = 200, A 2 = [ 1000 6 ] = 166, A 3 = [ 1000 8 ] = 125. Next, integers in the set A 1 A 2 are divisible by both 5 and 6, which is equivalent to divisible by lcm{5, 6} = 30, so A 1 A 2 = [ 1000 30 ] = 33. Similarly, we have lcm{5, 8} = 40, lcm{6, 8} = 24, lcm{5, 6, 8} = 120. Thus A 1 A 3 = [ 1000 40 ] = 25, A 2 A 3 = [ 1000 24 ] = 41 By inclusion and exclusion principle, A 1 A 2 A 3 = [ 1000 120 ] = 8 A 1 A 2 A 3 = 1000 (200 + 166 + 125) + (33 + 25 + 41) 8 = 600 Tutor: Zhang Qi (SEEM) Tutorial 7 November 2014 10 / 14

Example 5 How many permutations of the letters m,a,t,h,i,s,f,u,n are there such that none of the words math, is, and fun occur as consecutive letters? Hint: We let S be the set of all permutations. P 1 be the property that a permutation in S contains the word math as consecutive letters. And P 2, P 3 be the property that a permutation in S contains the word is and fun as consecutive letters respectively. Let A i be the set of those permutations in S satisfying property P i. We want to find the number of permutations in A 1 A 2 A 3. Tutor: Zhang Qi (SEEM) Tutorial 7 November 2014 11 / 14

Solutions: Firstly, S = 9! Next, we observe that the permutations in A 1 can be thought of as permutations of the following six elements: math, i, s, f, u, n where we treat math as a whole element to make sure for consecutive letters. Hence A 1 = 6! Similarly, we have A 2 = 8!, A 3 = 7! Tutor: Zhang Qi (SEEM) Tutorial 7 November 2014 12 / 14

Solutions Cont : The permutations in A 1 A 2 are permutations of five elements: math, is, f, u, n where we treat math and is as two whole elements at the same time to make sure for consecutive letters. Hence A 1 A 2 = 5! Similarly, we have A 1 A 3 = 4!, A 2 A 3 = 6! Finally,A 1 A 2 A 3 are permutations of math, is and fun A 1 A 2 A 3 = 3! Thus, A 1 A 2 A 3 = 9! 6! 8! 7! + 5! + 4! + 6! 3! = 317658 Tutor: Zhang Qi (SEEM) Tutorial 7 November 2014 13 / 14

Thank you for your time! Tutor: Zhang Qi (SEEM) Tutorial 7 November 2014 14 / 14