Section 6.3: Further Rules for Counting Sets

Similar documents
COUNTING AND PROBABILITY

9.5 Equivalence Relations

11 Sets II Operations

CHAPTER 8. Copyright Cengage Learning. All rights reserved.

Discrete Mathematics Lecture 4. Harper Langston New York University

Discrete Structures. Fall Homework3

CSE 215: Foundations of Computer Science Recitation Exercises Set #9 Stony Brook University. Name: ID#: Section #: Score: / 4

1. Chapter 1, # 1: Prove that for all sets A, B, C, the formula

Counting. Andreas Klappenecker

CSC Discrete Math I, Spring Sets

TOPOLOGY, DR. BLOCK, FALL 2015, NOTES, PART 3.

Math 3336 Section 6.1 The Basics of Counting The Product Rule The Sum Rule The Subtraction Rule The Division Rule

Review of Sets. Review. Philippe B. Laval. Current Semester. Kennesaw State University. Philippe B. Laval (KSU) Sets Current Semester 1 / 16

AMS /672: Graph Theory Homework Problems - Week V. Problems to be handed in on Wednesday, March 2: 6, 8, 9, 11, 12.

.Math 0450 Honors intro to analysis Spring, 2009 Notes #4 corrected (as of Monday evening, 1/12) some changes on page 6, as in .

Discrete Mathematics and Probability Theory Fall 2013 Midterm #2

Topology I Test 1 Solutions October 13, 2008

[Ch 6] Set Theory. 1. Basic Concepts and Definitions. 400 lecture note #4. 1) Basics

Section Sets and Set Operations

CONNECTIVITY AND NETWORKS

2. Sets. 2.1&2.2: Sets and Subsets. Combining Sets. c Dr Oksana Shatalov, Fall

On vertex types of graphs

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

Set and Set Operations

2 Review of Set Theory

MA651 Topology. Lecture 4. Topological spaces 2

4&5 Binary Operations and Relations. The Integers. (part I)

Lecture 6: Faces, Facets

1. Suppose you are given a magic black box that somehow answers the following decision problem in polynomial time:

Lamé s Theorem. Strings. Recursively Defined Sets and Structures. Recursively Defined Sets and Structures

Discrete mathematics , Fall Instructor: prof. János Pach

Coloring. Radhika Gupta. Problem 1. What is the chromatic number of the arc graph of a polygonal disc of N sides?

The clique number of a random graph in (,1 2) Let ( ) # -subgraphs in = 2 =: ( ) We will be interested in s.t. ( )~1. To gain some intuition note ( )

The clique number of a random graph in (,1 2) Let ( ) # -subgraphs in = 2 =: ( ) 2 ( ) ( )

A GRAPH FROM THE VIEWPOINT OF ALGEBRAIC TOPOLOGY

Math Introduction to Advanced Mathematics

Fundamental Properties of Graphs

Basic Counting Principles: The Product Rule

LATIN SQUARES AND TRANSVERSAL DESIGNS

Generell Topologi. Richard Williamson. May 6, 2013

Mathematically Rigorous Software Design Review of mathematical prerequisites

Theorem 3.1 (Berge) A matching M in G is maximum if and only if there is no M- augmenting path.

CONNECTED SPACES AND HOW TO USE THEM

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

AXIOMS FOR THE INTEGERS

SFU CMPT Lecture: Week 8

3 No-Wait Job Shops with Variable Processing Times

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

Solutions to In Class Problems Week 9, Fri.

Sets MAT231. Fall Transition to Higher Mathematics. MAT231 (Transition to Higher Math) Sets Fall / 31

Hashing. Yufei Tao. Department of Computer Science and Engineering Chinese University of Hong Kong

Section 13. Basis for a Topology

Homework Set #2 Math 440 Topology Topology by J. Munkres

K 4 C 5. Figure 4.5: Some well known family of graphs

T. Background material: Topology

STUDENT NUMBER: MATH Final Exam. Lakehead University. April 13, Dr. Adam Van Tuyl

1.1 - Introduction to Sets

CPSC 536N: Randomized Algorithms Term 2. Lecture 10

Solutions to Homework 10

1KOd17RMoURxjn2 CSE 20 DISCRETE MATH Fall

Algebra of Sets (Mathematics & Logic A)

Greedy Algorithms 1 {K(S) K(S) C} For large values of d, brute force search is not feasible because there are 2 d {1,..., d}.

Recursively Defined Functions

Adjacent: Two distinct vertices u, v are adjacent if there is an edge with ends u, v. In this case we let uv denote such an edge.

Computer Science 280 Fall 2002 Homework 10 Solutions

PACKING DIGRAPHS WITH DIRECTED CLOSED TRAILS

Slides for Faculty Oxford University Press All rights reserved.

CS100: DISCRETE STRUCTURES

Introduction to Sets and Logic (MATH 1190)

Ramsey s Theorem on Graphs

Module 11. Directed Graphs. Contents

Topology Homework 3. Section Section 3.3. Samuel Otten

1 Elementary number theory

Topology notes. Basic Definitions and Properties.

Probabilistic Learning Classification using Naïve Bayes

Solution: It may be helpful to list out exactly what is in each of these events:

The strong chromatic number of a graph

Cardinality Lectures

/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Approximation algorithms Date: 11/27/18

Planar graphs. Chapter 8

Greedy Algorithms 1. For large values of d, brute force search is not feasible because there are 2 d

Vertex Deletion games with Parity rules

The Structure of Bull-Free Perfect Graphs

SEVENTH EDITION and EXPANDED SEVENTH EDITION

Discrete Mathematics Course Review 3

The Intersection of Two Sets

Math 190: Quotient Topology Supplement

4. Simplicial Complexes and Simplicial Homology

1. (10 points) Draw the state diagram of the DFA that recognizes the language over Σ = {0, 1}

COUNTING THE NUMBER OF WINNING BINARY STRINGS IN THE 1-DIMENSIONAL SAME GAME. Department of Mathematics Oberlin College Oberlin OH 44074

The External Network Problem

Relational Database: The Relational Data Model; Operations on Database Relations

NON-CENTRALIZED DISTINCT L-DIVERSITY

It is important that you show your work. There are 134 points available on this test.

THREE LECTURES ON BASIC TOPOLOGY. 1. Basic notions.

2 Geometry Solutions

INDEPENDENT POSTULATES FOR THE "INFORMAL" PART OF PRINCIPIA MATHEMATICA*

MATHEMATICS 191, FALL 2004 MATHEMATICAL PROBABILITY Outline #1 (Countability and Uncountability)

LESSON 1: INTRODUCTION TO COUNTING

Combinatorics Prof. Dr. L. Sunil Chandran Department of Computer Science and Automation Indian Institute of Science, Bangalore

Transcription:

Section 6.3: Further Rules for Counting Sets Often when we are considering the probability of an event, that event is itself a union of other events. For example, suppose there is a horse race with three different horses, x, y, and z, and we want to know the probability that either x or y will win. This can also be interpreted as the probability that either x or y will win, so is in fact a combination of the two different events x wins and y wins. In this section, we consider how to determine such probabilities. As we have already noted, calculation of probabilities comes down to calculation of the size of subsets of a sample space, so our main task is to develop a method to count such sets. 1. The Addition Rule We start with a rule which will allow us to count the size of a union of disjoint sets. Following this, we shall consider the more complicated case where we may have a union of non-disjoint sets. Recall that if A is a set, then N(A) denotes its size. Theorem 1.1. Suppose a finite set A is equal to the union of k distinct mutually disjoint subsets A 1,..., A k. Then N(A) = N(A 1 ) + + N(A k ). Corollary 1.2. If S is a sample space of equally likely outcomes and E is an event which is the union of mutually disjoint events E 1,...,E k, then P(E) = P(E 1 ) + + P(E k ). We illustrate with an example. Example 1.3. How many digits from 1 through 999 have no repeated digits? What is the probability that a random chosen number from 1 to 999 has a repeated digit? We can solve this problem by breaking up the set of integers A from 1 to 999 with non-repeated entries into three mutually distinct subset - A 1 which is the set of integers with no repeated entries with 1 digit, A 2 which is the set of integers with no repeated entries with 2 digits and A 3 which is the set of integers with no repeated entries with 3 digits. We now calculate the size of each of these sets individually. N(A 1 ) = 9 since no integer with one digit can possible have a repeated digit. N(A 2 ) = 9 9 = 81, since there are 9 choices for the first digit (any of the integers 1 through 9), and 9 choices for the second digit (the remaining 8 numbers which were not chosen for the first digit and the number 0). 1

2 N(A 3 ) = 9 9 8 = 648 since there are 9 choices for the first digit (any of the integers 1 through 9), 9 choices for the second digit (the remaining 8 numbers which were not chosen for the first digit and the number 0) and 8 choices for the last digit (any of the numbers 0 through 9 which did not appear in the first two digits). Thus N(A) = N(A 1 )+N(A 2 )+N(A 3 ) = 9+81+648 = 738. It follows that there are 261 digits with at least one repeated entry. Thus the probability that a random number from 1 to 999 has a repeated digit is P = 261 999 = 0.26. 2. The Difference Rule Next we consider a rule which will allow us to calculate the size of a difference of sets assuming that one set is contained in the other. Though the rule is fairly obvious, we shall prove it using our previous observations. Theorem 2.1. Suppose a finite set A and B are sets and B A. Then N(A B) = N(A) N(B) Consequently, if S is a sample space of equally likely outcomes and A and B are events with B A, then the probability of A occurring but not B is P(A B) = P(A) P(B). Proof. Note that the sets A B and B will be mutually disjoint and (A B) B = A since B A. Therefore, using the addition rule, N(A B) + N(B) = N(A) or N(A B) = N(A) N(B) The following result which specifies how to calculate the probability of a given event not occurring is a corollary of this theorem. Corollary 2.2. If S is a sample space of equally likely outcomes and E is an event then P(E c ) = 1 P(E). Proof. Using the difference formula since E c and E are disjoint, we have N(U E) = N(E c ) = N(U) N(E). Then we have P(E c N(U) N(E) ) = = 1 P(E). N(U)

We illustrate with some examples, the first of which is similar to the previous example. Example 2.3. How many numbers between 1 and 999 have repeated digits? Let A be the set of numbers without repeated digits. Then the set of numbers with repeated digits is A c. We know from our previous example that the number of numbers from 1 to 999 without repeated digits is equal to 738. Therefore, if B is the set of numbers from 1 to 999 with repeated digits, we have N(B) = N(A c ) = N(U) N(A) = 999 738 = 261. Example 2.4. How many seven digit telephone numbers are there without any repeated digits? How many with at least one repeated digit? What is the probability that a randomly chosen seven digit number will have no repeated digits? Let U be the set of all seven digit numbers, let A be the subset of numbers with no repeated digits and let B = A c be the subset of numbers with repeated digits. We can calculate N(A) using the multiplication rule. Specifically, we have 10 choices for the first digit, 9 for the second and so on. Thus N(A) = 10 9 8 7 6 5 4 = 604, 800. Since N(U) = 10 7, we have N(B) = N(A c ) = 10 7 604, 800 = 9, 395, 200. Finally, the probability that no digits will be repeated in a seven digit number is 604, 800 P(A) = = 0.061. 10 7 3. The Inclusion/Exclusion Rule Finally we consider a rule which will allow us to calculate the size of a union of sets in general without any assumptions of intersections. In order to prove the formula we get, we shall use the results we have already considered. Theorem 3.1. (The Inclusion/Exclusion Rule) Suppose a finite set A and B are sets. Then N(A B) = N(A) + N(B) N(A B) Consequently, if S is a sample space of equally likely outcomes and A and B are events then the probability of either A or B occurring is P(A B) = P(A) + P(B) P(A B). Proof. Note that the set A B is the union of disjoint sets A B and B. Therefore, using the addition rule, we have N(A B) = N(A B) + N(B). 3

4 It is easy to prove that A B = A (A B) and we also have A A B. Therefore, using the difference rule, we have N(A B) = N(A B) + N(B) = N(A A B) + N(B) = N(A) N(A B) + N(B) = N(A) + N(B) N(A B). In fact, the inclusion/exclusion rule holds more generally for the union of any number of sets. We state the rule for three sets below, and it should be clear how this generalizes for more sets (which can be proved using induction). Corollary 3.2. (The Inclusion/Exclusion Rule) Suppose a finite set A, B, and C are sets. Then N(A B C) = N(A)+N(B)+N(C) N(A B) N(A C) N(B C)+N(A B C) We illustrate with some examples. Example 3.3. How many integers from 1 through 1000 are multiples of 4 or 7? Determine the probability that a randomly chosen integer between 1 and 1000 is a multiple of 4 or 7. Let A denote the set of integers between 1 and 1000 which are multiples of 4 and B the set of integers between 1 and 1000 which are multiples of 7. We shall calculate N(A) and N(B) using the counting methods we previoulsy considered. First, lining up the integers from 1 to 1000, and the corresponding multiples of 4, we have the following: 1 2 3 4 5 6 7 8 9 997 998 999 1000 4 1 4 2 4 250 Therefore, there are 250 1 + 1 = 250 integers which are multiples of 4. Likewise, for 7, we have 1 2 3 4 5 6 7 994 995 996 997 998 999 1000 7 1 7 142 Therefore, there are 142 1 + 1 = 142 integers which are multiples of 7. The set of integers which are either multiples of 4 or 7 is the set A B. Since A B is not empty, we cannot apply the addition rule and must use the inclusion/exclusion principle. In particular, to calculate N(A B), we need to determine N(A B). Note that A B is the set of all integers divisible by both 4 and 7, so will be the set of integers divisible by 28 = 4 7. We calculate the size of this set in the usual manner:

5 1 27 28 29 979 980 981 999 1000 1 28 35 28 Therefore, there are 35 1+1 = 35 integers which are multiples of 28. Therefore, using inclusion/exclusion, we have N(A B) = N(A) + N(B) N(A B) = 250 + 142 28 = 364 Thus there are 364 integers between 1 and 1000 which are divisible by either 4 or 7. This means that the probability of a randomly chosen integer between 1 and 1000 being divisible by 4 or 7 is P(A B) = 364 1000 = 0.364. Example 3.4. (The Birthday Problem) Assuming all years have 365 days, and every day is an equally likely birthday, how large must n be so that in any randomly chosen group of n people, the probability that two or more have the same birthday is at least 1/2. If there are a total of n people in a room, we can form a row of length n which contains each persons birthday. With this in mind, we let the sample space S be the set of all rows of length n of all possible birthdays. Since there are 365 days in the year, the size of this sample space will be 365 n. Next we shall calculate the total number of rows which do not have any repeated entries. Since the row has length n, there will be 365 choices for the first, 364 choices for the second (since it cannot be the same as the first). In particular, of the 365 n total rows, 365! 365 364 (365 n + 1) = (365 n)! will have no repeated entries. This means the number of rows with at least one repeated entry will be 365 n 365! (365 n)!. Therefore, the probability of at least two people having the same birthday will be 365! P = 1 (365 n)! 365 n Setting P > 1/2, we get 1 365! (365 n)! 365 n > 1 2 or 1 2 > 365! (365 n)! 365 n These numbers are too big to solve by hand, but using a calculator, we get n > 22. This means that if a room contains at least 23 people, there is over a fifty percent chance that two of them have the same birthday!

6 Homework (i) From the book, pages 330-333: Questions: 1, 5, 6, 10, 11, 17, 18, 22, 24, 27, 30