The Inclusion-Exclusion Principle

Similar documents
COMP Logic for Computer Scientists. Lecture 17

Chapter 3. Set Theory. 3.1 What is a Set?

CSE 131 Introduction to Computer Science Fall 2016 Exam I. Print clearly the following information:

Repeat or Not? That Is the Question!

Introduction to Sets and Logic (MATH 1190)

Answer Key Lesson 5: Area Problems

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

Remaining Enhanced Labs

2.2 Set Operations. Introduction DEFINITION 1. EXAMPLE 1 The union of the sets {1, 3, 5} and {1, 2, 3} is the set {1, 2, 3, 5}; that is, EXAMPLE 2

Definition. A set is a collection of objects. The objects in a set are elements.

Fall 2018 September 18, Written Homework 02

HOW TO CREATE A BOOKING USING E-DIRECT / GROUP E-DIRECT

Midterm 2 Solutions. CS70 Discrete Mathematics and Probability Theory, Spring 2009

Introduction. CS243: Discrete Structures. Combinatorics. Product Rule. Basic Counting Rules. Example 2. Example 1

Propositional Logic. Application of Propositional logic

Section 1.1. Inductive Reasoning. Copyright 2013, 2010, 2007, Pearson, Education, Inc.

1-3 Multiplying and Dividing Real Numbers

Lesson 20: Solution Sets to Equations with Two Variables

Login. Forgotten Username & Forgotten Password. Game Schedule. HorizonWebRef.com Instructions ALL USERS

Sets and Venn Diagrams Quiz 2 [101 marks]

Applied Finite Mathematics. Collection Editor: Rupinder Sekhon

Counting Product Rule

What is Set? Set Theory. Notation. Venn Diagram

Subtraction Understand Subtraction on a Number Line Using a number line let s demonstrate the subtraction process using the problem 7 5.

Chapter 1: Number and Operations

Chapter 1: Thinking Critically Lecture notes Math 1030 Section C

Math 110 FOUNDATIONS OF THE REAL NUMBER SYSTEM FOR ELEMENTARY AND MIDDLE SCHOOL TEACHERS

Simplifying Expressions

CS103 Handout 14 Winter February 8, 2013 Problem Set 5

Guide for depositing Final Bachelor's Degree Project Final Master's Degree Project- Practicum in O2, the UOC's institutional repository

XV. The Entity-Relationship Model

GARAGE SALE! Neighborhood Garage Sale. Harbor Glen HOA held their first Neighborhood Wide Garage Sale and it rained cats and dogs, as we used to say.

What Time Where Muddy City 10 min MSTLessonPlan.docx MSTWorksheets.pptx Discussion 5 min MSTLessonPlan.docx

4.4 Problems and Solutions (last update 12 February 2018)

Discrete Mathematics Introduction

Integers and Absolute Value. Unit 1 Lesson 5

Instructor: Anna Miller

CPSC 320: Intermediate Algorithm Design and Analysis. Tutorial: Week 3

CS525 Winter 2012 \ Class Assignment #2 Preparation

Linear Programming. You can model sales with the following objective function. Sales 100x 50y. x 0 and y 0. x y 40

Math Week in Review #5. A proposition, or statement, is a declarative sentence that can be classified as either true or false, but not both.

1 5 Integer Operations

Section Sets and Set Operations

CSCI 561: Foundations of Artificial Intelligence Instructor: Prof. Laurent Itti Homework 1: Uninformed Search Due on September 23rd at 11:59pm, 2015

HOMEWORK 4 SOLUTIONS. Solution: The Petersen graph contains a cycle of odd length as a subgraph. Hence,

HOMEWORK #4 SOLUTIONS - MATH 4160

Chapter 1. Math review. 1.1 Some sets

THE REAL NUMBER SYSTEM

Semantics via Syntax. f (4) = if define f (x) =2 x + 55.

Section 1.1. Inductive Reasoning. Copyright 2013, 2010, 2007, Pearson, Education, Inc.

Electronically Filed - City of St. Louis - May 27, :02 PM

Graph Theory Questions from Past Papers

Lecture 15: The subspace topology, Closed sets

Grade 7 Math LESSON 14: MORE PROBLEMS INVOLVING REAL NUMBERS TEACHING GUIDE

Adding Three Fractions. Choosing the Best Graph

Lab 2: Object-Oriented Design 12:00 PM, Jan 31, 2018

Your Turn: Explain why each of the following sets are, or are not, well defined:

Lecture Transcript While and Do While Statements in C++

Tracking Database. COL live (COL only)

Editing and Formatting Worksheets

The Size of the Cantor Set

Provide a drawing. Mark any line with three points in blue color.

Text Input and Conditionals

CS144: Intro to Computer Networks Homework 1 Scan and submit your solution online. Due Friday January 30, 4pm

Lesson 21: Comparing Linear and Exponential Functions Again

Programming in OOP/C++

Tutorial 2 Today we will have a quick introduction to ArgoUML and how to use it, as well as look at some examples of class diagrams.

MA651 Topology. Lecture 4. Topological spaces 2

CS 3L (Clancy) Solutions and grading standards for exam 1

Topology 550A Homework 3, Week 3 (Corrections: February 22, 2012)

ORB Education Quality Teaching Resources

Test Booklet. Subject: MA, Grade: 10 TAKS Grade 10 Math Student name:

Word 1 Module 2. Word 1. Module 2

1 Algorithm and Proof for Minimum Vertex Coloring

Think about the pattern you used to calculate each dependent quantity value. Problem 1 As We Make Our Final Descent

Sets 1. The things in a set are called the elements of it. If x is an element of the set S, we say

6-2 Solving Systems by Substitution

Some are more relevant to our work. Some are more for fun and to see what s available.

CHAPTER 2. Graphs. 1. Introduction to Graphs and Graph Isomorphism

Basic Counting Principles: The Product Rule

Midterm 2 Solutions. CS70 Discrete Mathematics for Computer Science, Fall 2007

Math 187 Sample Test II Questions

Instant Insanity Instructor s Guide Make-it and Take-it Kit for AMTNYS 2006

may be sent to:

24-HOUR QUIET HOURS Start on Wednesday, May 1 st at 11 pm

(Refer Slide Time: 0:19)

CSE 20 DISCRETE MATH. Fall

CMSC201 Computer Science I for Majors

CS144: Intro to Computer Networks Homework 1 Scan and submit your solution online. Due Friday January 30, 4pm

Chapter 2: Sets. Diana Pell. In the roster method: elements are listed between braces, with commas between the elements

Solution : a) C(18, 1)C(325, 1) = 5850 b) C(18, 1) + C(325, 1) = 343

Ramsey s Theorem on Graphs

Composition I, English Tuesday & Thursday 9:30-10:45, Simpkins 315 (Professor Erika Wurth, office # 109)

MNU 3-08a - Proportion

Math 1: Solutions to Written Homework 1 Due Friday, October 3, 2008

CS 135 Lab Assignments Week 1

Graded Project. Microsoft Word 2016

Introduction to Graphs

h b LEVEL 4 GEOMETRY

Complete Assignment #1 listed below on WK #1 in packet. Textbook required!!!

Transcription:

The Inclusion-Exclusion Principle Table of Contents 1 Order of a Set 1 2 The Inclusion-Exclusion Principle 1 3 Examples 2 4 Homework Problems 5 4.1 Instructions...................................... 5 4.2 Problems........................................ 5 5 Document License (CC BY-ND 4.0) 7 5.1 License Links..................................... 7 1 Order of a Set Sometimes, we only know the number of elements in a set. For instance, we might know the number of people who live in a distant city without knowing a single person who lives in the city. Definition: If A is a finite set (meaning A is not infinite), then the order of A, denoted A is the number of elements in A. Example: Determine A if A = {0, 1, 2, 3, 4, 5}. A contains 6 elements, so A = 6. It is important to notice the difference between a set and its order. In the above example, A is a set which contains 6 different elements, while A is the number 6 which is not a set. Writing A = 6 is incorrect. 2 The Inclusion-Exclusion Principle Example: Let A = {a, b, c, d, e} and B = {c, d, e, f, g, h}. It follows that A B = {c, d, e}. Suppose we wish to determine A B without first finding A B. We see the A has 5 elements and B has 6 elements, so we could start with 5 + 6 = 11. However, this means that we have counted each element of A B (c, d, and e) twice. We still need to subtract one from the 1

previous total for each element in A B. Hence A B = 5 + 6 3 = 8. We see that this is correct since A B = {a, b, c, d, e, f, g, h}. The following diagram illustrates the situation. The above example illustrates how what is called the inclusion-exclusion principle works. Inclusion-Exclusion Principle: If A and B are finite sets, then A B = A + B A B. Proof: Let A and B be finite sets. The number of elements that are only in A is A A B. The number of elements that are only in B is B A B. An element in A B is either only in A, only in B, or in both A and B (in A B). This means the following: A B = A A B + B A B + A B = A + B A B 3 Examples 1. Find A B if A = 10, B = 22, and A B = 8. A B = A + B A B = 10 + 22 8 = 24 2. Find A B if A = 16, B = 33, and A B = 35. 2

A B = A + B A B 35 = 16 + 33 A B 35 = 49 A B A B = 14 3. Find A if A B = 92, B = 51, and A B = 30. A B = A + B A B 92 = A + 51 30 92 = A + 21 A = 71 4. Course A has 30 students, course B has 28 students, and 7 students are taking both courses. How many students are taking course A or course B or both courses? The last sentence of the problem is asking us to find the total number of students. The total number of students is the number of students in the set A B. This means we need to determine A B. Since course A has 30 students, then A = 30. Similarly, B = 28. Students taking both courses are students in A B, so A B = 7. Now we may use the inclusion-exclusion principle. A B = A + B A B = 30 + 28 7 = 51 5A. A group contains 45 people who own a cat, a dog, or both. If 36 of the people own a dog and 18 of the people own both a dog and a cat, then how many of the people own a cat? This problem has two categories of pet owners. This suggests that we could let D designate the set of dog owners and C designate the set of cat owners. The problem gives us the following information: D C = 45 D = 36 D C = 18 Since the problem asks us to determine the number of people in the group who own a cat, we need to find C. We may use the inclusion-exclusion principle to find this quantity. 3

D C = D + C D C 45 = 36 + C 18 45 = 18 + C C = 27 5B. How many people in the group do not own a cat? Since the total number of people in the group is 45 and 27 of the people own a cat, then the number of people who don t own a cat is 45 27 = 18. There is another way to think about this example. We may consider the universal set U (the set containing every element involved in the discussion) to be D C. Since C is the set of cat owners, then C (the complement of C) is the set containing all the people who don t own a cat. We need to find C. Clearly C + C = U which means that C = U C = 45 27 = 18. Notice that the inclusion-exclusion principle was not used to solve this part of the example. 5C. How many people in the group own a cat but not a dog? There are C = 27 people in the group who own a cat, and there are D C = 18 people in the group who own both a cat and a dog. The number of people in the group who own a cat but not a dog is C D C = 27 18 = 9. Notice that the inclusion-exclusion principle was not used to solve this part of the example. 4

4 Homework Problems 4.1 Instructions Work through the homework problems referring to your notes and the lesson notes when necessary. Use the homework problem solutions only when you get completely stuck. Redo the homework problems before a quiz without referring to any other materials. It is best to do this more than once. 4.2 Problems 1. Find A B if A = 54, B = 39, and A B = 17. 2. Find A B if A = 340, B = 68, and A B = 372. 3. Find B if A B = 173, A B = 23, and A = 95. 4. A city neighborhood has 45 houses that are white, 67 houses that have two stories, and 16 houses which are white and have two stories. Use the inclusion-exclusion principle to determine the number of houses in the neighborhood that are either white or have two stories or both. 5. A car dealer has a group of 36 cars which are either blue or have cruise control or both. There are 25 blue cars and 27 cars which have cruise control. Use the inclusion-exclusion principle to determine how many of these cars are blue and have cruise control. 6. A gamers club has 123 members who play Slackers of Doom or Library Adventure or both games. If 87 of the gamers play Library Adventure and 45 of the gamers play both games, how many play Slackers of Doom? 7. Professor X has a class which has 35 students who can attend a tutoring session at either 1 pm on Saturday or 2 pm on Saturday or during both times. The tutoring session will be scheduled for the time during which the most students can attend. If 17 students can attend the 1 pm session and 13 students can attend both sessions, during which time will the tutoring session be scheduled? 8. A hotel has 100 rooms. There are 74 rooms which have a refrigerator, 60 rooms which have a microwave oven, and 47 rooms which have both a refrigerator and a microwave oven. A. Use the inclusion-exclusion principle to determine the number of rooms which have a refrigerator or a microwave oven or both. B. How many rooms have neither a refrigerator nor a microwave oven? C. How many rooms have a refrigerator but not a microwave oven? 5

9. During the month of May in city Z, it rained during 15 days, it was windy during 13 days, and it neither rained nor was it windy during 10 days. A. Determine the number of days in May during which it either rained or was windy or both in Z. B. Use the inclusion-exclusion principle to determine the number of days in May during which it both rained and was windy in Z. C. Determine the number of days in May during which it rained but was not windy in Z. 10. Assume U = A B. Use the inclusion-exclusion principle to find A if B = 52, A B = 93, and A B = 29. 11. A small library has 70 titles that are either science fiction or fantasy or both. Of these, 17 titles are both science fiction and fantasy and 30 titles are not science fiction. Use the inclusion-exclusion principle to determine how many titles are fantasy. 12. Assume U = A B. Use the inclusion-exclusion principle to find A B if A = 50, B = 30, and A B = 60. 6

5 Document License (CC BY-ND 4.0) Copyright 2016 2017 Scott P. Randby This work is licensed under a Creative Commons Attribution-NoDerivatives 4.0 International (CC BY-ND 4.0) or later version license. License legal code 5.1 License Links License summary: https://creativecommons.org/licenses/by-nd/4.0/ License legal code: https://creativecommons.org/licenses/by-nd/4.0/legalcode 7