CSE390D Notes for Friday, 11/8/24

We are going to fill in a table with four possibilities for picking m items from a set of n items...seen 2 possibilities so far: w/o repetition with repetition ordered P(n, m) ?? unordered C(n, m) ?? Review of those: 38 students in a class how many ways to seat them in 38 chairs? 38! how many ways to fill front row of 5 chairs? P(38, 5) = 38!/33! how many ways to pick 6 winners of a candy bar? C(38, 6) = 38!/(6! * 32!) how many ways to pick 32 losers of a candy bar? C(38, 32) = 38!/(32! * 6!) ------------------------------------------------------------------------------- this example includes idea of choosing positions and is good lead-in to binomial coefficients: How many paths are there from (0, 0) to (x, y) (x/y in N), if paths involve either moving up 1 or right 1? e.g., get to (3, 2): some paths: RRRUU, UURRR, RURUR answer: choose positions of either U's or R's, so C(x + y, x) or C(x + y, y) ------------------------------------------------------------------------------- binomial coefficients (x + y) ^ n coefficient of x^m y^(n-m) is C(n, m) = C(n, n - m) = (n choose m) a counting intuition: (x + y)^3 = (x + y)(x + y)(x + y) = (xx + xy + yx + yy)(x + y) = (xxx + xxy + xyx + xyy + yxx + xyx + yyx + yyy) how many x^2y? three: xxy, xyx, yxx why? given 2x's & 1 y, there are 3 possible sequences in general, given a sequence of length n with m x's, how many sequences? (n choose m) -- pick the m positions of the x's notice that sum(k = 0 to n) C(n, k) = 2^n because 2^n = (1 + 1)^n Pascal's triangle: 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 Pascal's triangle rule: (n choose m) = (n-1 choose m-1) + (n-1 choose m) why?...think about Joe (choose m winners, Joe is either a winner or not) ------------------------------------------------------------------------------- Back to the table: w/o repetition with repetition ordered P(n, m) ?? unordered C(n, m) ?? ordered with repetition: r^n list "employee of the month" for a company of 35 employees how many outcomes for 12 months? 35^12 unordered with repetition: stars & bars 8 contest winners can pick any of three prizes (a, b, c) how many prize orders are possible (# of a, b, c)? a...a|b...b|c...c stars & bars, (8+2 choose 2) In general (picking m items from a set of n items) w/o repetition with repetition ordered P(n, m) n^m unordered C(n, m) P(m+n-1, n-1)
Stuart Reges
Last modified: Fri Nov 8 12:56:15 PST 2024