11
September1999 CMSC 203 / 0201 Fall 2002 Week #11 – 4/6/8 November 2002 Prof. Marie desJardins

September1999 CMSC 203 / 0201 Fall 2002 Week #11 – 4/6/8 November 2002 Prof. Marie desJardins

Embed Size (px)

Citation preview

Page 1: September1999 CMSC 203 / 0201 Fall 2002 Week #11 – 4/6/8 November 2002 Prof. Marie desJardins

September1999

CMSC 203 / 0201Fall 2002

Week #11 – 4/6/8 November 2002

Prof. Marie desJardins

Page 2: September1999 CMSC 203 / 0201 Fall 2002 Week #11 – 4/6/8 November 2002 Prof. Marie desJardins

September1999October 1999October 1999

TOPICS (Probability theory cont.) Generalized combinations and permutations NOTE changes to syllabus:

Shifting of material; some chapter sections dropped; graphs (7.1-7.5) instead of Boolean algebra

NOTE topics on midterm: 3.1-3.5: Proofs, induction, and program correctness 4.1-4.6: Counting 5.1, 5.3, 5.5-5.6: Recurrence relations; inclusion-

exclusion NOT chapters 6, 7, 10 (these will be on the final along

with ALL EARLIER TOPICS)

Page 3: September1999 CMSC 203 / 0201 Fall 2002 Week #11 – 4/6/8 November 2002 Prof. Marie desJardins

September1999

MON 11/4 (PROBABILITY THEORY CONT. (4.5))

…see week 9 notes

Page 4: September1999 CMSC 203 / 0201 Fall 2002 Week #11 – 4/6/8 November 2002 Prof. Marie desJardins

September1999

WED 11/6GENERALIZED PERMUTATIONS

AND COMBINATIONS (4.6)

** HOMEWORK #8 DUE **

Page 5: September1999 CMSC 203 / 0201 Fall 2002 Week #11 – 4/6/8 November 2002 Prof. Marie desJardins

September1999October 1999October 1999

Concepts / Vocabulary

Permutations and combinations with repetition “sampling with replacement” Number of r-permutations of n objects with repetition = nr

Number of r-combinations of n objects with repetition = C(n+r-1, r) [D’Alembert’s method / bars and stars]

Table 4.6.1 gives formulas

Permutations with indistinguishable objecs Theorem 3: Number of n-permutations of n objects,

where there are ni objects of type i (i=1, …, k) = n! / (n1! n2! … nk!)

Page 6: September1999 CMSC 203 / 0201 Fall 2002 Week #11 – 4/6/8 November 2002 Prof. Marie desJardins

September1999October 1999October 1999

Examples

Exercise 4.6.19: Suppose that a large family has 14 children, including two sets of identical triplets, three sets of identical twins, and two individual children. How many ways are there to seat these children in a row of chairs if the identical triplets or twins cannot be distinguished from one another?

Exercise 4.6.27: How many different strings can be made form the letters in ABRACADABRA, using all the letters?

Page 7: September1999 CMSC 203 / 0201 Fall 2002 Week #11 – 4/6/8 November 2002 Prof. Marie desJardins

September1999October 1999October 1999

Examples II

Exercise 4.6.35: How many ways are there to travel in xyz space from the origin (0,0,0) to the point (4,3,5) by taking positive unit steps in any of the three directions?

Exercise 4.6.42: A shelf holds 12 books in a row. How many ways are there to choose five books so that no two adjacent books are chosen?

Page 8: September1999 CMSC 203 / 0201 Fall 2002 Week #11 – 4/6/8 November 2002 Prof. Marie desJardins

September1999

FRI 11/8INCLUSION-EXCLUSION (5.5-5.6)

Page 9: September1999 CMSC 203 / 0201 Fall 2002 Week #11 – 4/6/8 November 2002 Prof. Marie desJardins

September1999October 1999October 1999

Concepts / Vocabulary

Inclusion-exclusion revisited… |AB| = |A| + |B| - |AB|

Inclusion-exclusion generalized… |ABC| = |A| + |B| + |C| - |AB| - |AC| - |BC| + |

ABC|

Principle of Inclusion-Exclusion |A1A2…An| = 1in|Ai| - 1i<jn|AiAj| - … +

(-1)n+1 |A1A2…An|

Proof by mathematical induction…

Page 10: September1999 CMSC 203 / 0201 Fall 2002 Week #11 – 4/6/8 November 2002 Prof. Marie desJardins

September1999October 1999October 1999

Examples

Exercise 5.5.9: How many students are enrolled in a course either in calculus, discrete math, data structures, or programming languages if there are 507, 292, 312, and 344 students in these courses, respectively; 14 in both calculus and data structures; 213 in both calculus and programming languages; 211 in both discrete math and data structures; 43 in both discrete math and programming languages; and no student may take calculus and discrete math, or data structures and programming languages, concurrently?

Page 11: September1999 CMSC 203 / 0201 Fall 2002 Week #11 – 4/6/8 November 2002 Prof. Marie desJardins

September1999October 1999October 1999

Examples II

Sieve of Eratosthenes Derangements: Example 5.6.4: If n people check

their hats at a restaurant, and the claim checks are misplaced, what is the probability that nobody receives the correct hat?