{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

09in-exclusion-pig_10_v2

09in-exclusion-pig_10_v2 - CSIS1121 Discrete Mathematics...

Info icon This preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
CSIS1121 iscrete Mathematics Discrete Mathematics clusion and Exclusion Inclusion and Exclusion igeon igeon- ole Principle Pigeon Pigeon Hole Principle Hole Principle Prof. Francis Chin, Dr SM Yiu , October 14/15, 2010 (Chapter 5.2, 5.5, 7.5, 7.6) 1
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
CSIS1121 Discrete Maths ver Counting Over Counting How many bit strings of length 8 that either start with a 1 bit 1xxxxxxx or end with the two bits 00? xxxxxx00 Number of bit strings starting with 1 = 2 7 = 128. Number of bit strings ending with 00 = 2 6 = 64. Hence, the answer is 128 + 64 = 192. o! What’s wrong? No! What s wrong? he bit strings 11110000, 10111000, …have been 2 The bit strings 11110000, 10111000, …have been counted twice!
Image of page 2
CSIS1121 Discrete Maths he clusion xclusion rinciple The The Inclusion Inclusion Exclusion Exclusion Principle Principle Let A be the set of ways to do task T and 1 1 A 2 be the set of ways to do task T 2 . A 1 A 2 ¾ The sets A 1 and A 2 may overlap. ¾ Then, the number of ways to do task T 1 or T 2 is A =|A +|A A | A 1 A 2 | | A 1 | | A 2 | | A 1 A 2 | ¾ Note that if the tasks T 1 and T 2 cannot be done in the same way, the above formula is reduced to the Sum Rule. Hence the number of bit strings of length 8 that either start ith a 1 bit or end with the two bits 00 is 2 7 + 2 6 5 3 with a 1 bit or end with the two bits 00 is 2 2 2 = 128 + 64 – 32 = 160 (1xxxxx00)
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
CSIS1121 Discrete Maths ore examples More examples What is the total number of positive integers that is 100 nd is either divisible by 4 or 5? and is either divisible by 4 or 5? Ans = 100/4 + 100/5 – 100/20 = 40 . Consider all length-4 positive integers which contain only digits 3, 4, 5. How many of them contains at least one 3 and one 5? e.g. 3344 is not included, 4355 is included Total number of length-4 digits containing only 3,4,5 = 3 4 = 81 3 81. Total number of length-4 digits containing no 3 or no 5 = 2 4 + 2 4 –1±=±31 (4554, 3433, 4444) 4 Ans = 81 – 31 = 50
Image of page 4
CSIS1121 Discrete Maths What is the total number of positive integers that is 100 and is either divisible by 4 or 5 or 3 ? A B A B |A| + |B| + |C|: ouble counted Double counted Triple counted C |A B| = |A| + |B| - |A B| . |A| + |B| + |C| - |A B| - |B C| - |A C| + |A B C| Ans: 100/4 + 100/5 + 100/3 - 100/20 100/15 00/12 + 00/60 100/12 100/60 Do you know how to generalize the principle of clusion xclusion to n finite sets? 5 inclusion-exclusion to n finite sets?
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
CSIS1121 Discrete Maths Suppose a student wants to make up a schedule for a 7-day period during which she will study one subject each day. She is taking 4 ubject: mathematics, physics, chemistry, and economics. What is subject: mathematics, physics, chemistry, and economics. What is the number of possible schedules that devote at least one day to each subject? et A1 be the no of schedules that do not contain math (P1) Let A1 be the no. of schedules that do not contain math (P1).
Image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern