1 / 12

CMSC 203 / 0201 Fall 2002

CMSC 203 / 0201 Fall 2002. Week #8 – 14/16 October 2002 Prof. Marie desJardins. TOPICS. Counting Inclusion-exclusion Tree diagrams Pigeonhole principle. MON 10/14 COUNTING BASICS (4.1). Concepts/Vocabulary. Counting Sum rule |A 1  A 2  …  A m | = |A 1 | + … + |A m | for disjoint A i

vaguirre
Download Presentation

CMSC 203 / 0201 Fall 2002

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CMSC 203 / 0201Fall 2002 Week #8 – 14/16 October 2002 Prof. Marie desJardins

  2. TOPICS • Counting • Inclusion-exclusion • Tree diagrams • Pigeonhole principle

  3. MON 10/14COUNTING BASICS (4.1)

  4. Concepts/Vocabulary • Counting • Sum rule |A1 A2  …  Am| = |A1| + … + |Am| for disjoint Ai • Product rule |A1x A2 x … x Am| = |A1|  |A2| …  |Am| • Inclusion-exclusion |A1  A2| = |A1| + |A2| - |A1  A2| • Tree diagrams

  5. Examples • Exercise 4.1.3: A multiple-choice test contains 10 questions. There are four possible answers for each question. • (a) How many ways can a student answer the questions on the test if every question is answered? • (b) How many ways can a student answer the questions on the test if the student can leave answers blank?

  6. Examples II • How many bit strings of length 8 are there? • How many bit strings of length 8 or less are there? • How many bit strings of length 8 or more are there? ☺ • Exercise 4.1.13: How many bit strings with length not exceeding n, where n is a positive integer? • How many such strings consisting entirely of 1s? • How many functions are there from A  B where |A| = m and |B| = n? • How many 1-to-1 functions are there?

  7. Examples III • In how many ways can six elements a1…a6 be placed into an array if: • (a) a1 and a2 must be in adjacent positions (not necessarily in that order) • (b) a1 and a2 must not be in adjacent positions • (c) a1 must have a lower index than a6 • (Analogous to Exercise 4.1.39.) • Exercise 4.1.50: Use a tree diagram to find the number of ways that the World Series can occur (four games out of seven wins the series)

  8. WED 10/16PIGEONHOLE PRINCIPLE (3.5) ** HOMEWORK #5 DUE **

  9. Concepts / Vocabulary • Pigeonhole Principle • If k+1 or more objects are in k boxes, at least one box has two or more objects • Generalized pigeonhole principle • If N objects are in k boxes, one box has at least N/k objects

  10. Examples • Exercise 4.2.4: A bowl contains 10 red balls and 10 blue balls. A woman selects balls at random without looking at them. • (a) How many balls must she select to be sure of having at least three balls of the same color? • (b) How many balls must she select to be sure of having at lets three blue balls? • Exercise 4.2.9: How many students, each of whom comes from one of the 50 states, must be enrolled in a university to guarantee that there are at lets 100 who come from the same state?

  11. Examples II • Example 4.2.10 (page 248): Assume that in a group of six people, each pair of individuals consists of two friends or two enemies. Show that there are either three mutual friends or three mutual enemies in the group. • Exercise 4.2.29: A computer network consists of six computers. Each computer is directly connected to zero or more of the other computers. Show that there are at least two computers in the network that are directly connected to the same number of other computers.

  12. FRI 10/11** NO CLASS **

More Related