1 / 16

CSC2110 Tutorial 11

CSC2110 Tutorial 11. More Counting Tom Chan (Room: SHB 115) 22/11/2007. T/F Question 4 (splitting into m sets). There are 132! / (4! 33 x 33!) ways to arrange a class of 132 students into groups of 4, if the groups are unnumbered

ronald
Download Presentation

CSC2110 Tutorial 11

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. CSC2110 Tutorial 11 More Counting Tom Chan (Room: SHB 115) 22/11/2007

  2. T/F Question 4 (splitting into m sets) • There are 132! / (4!33 x 33!) ways to arrange a class of 132 students into groups of 4, if the groups are unnumbered • If the groups are numbered or forms a sequence(order MATTERS), # ways = 132! / (4!33) ((ABCD) = (BCAD) = … — 4! combinations each) • But now groups are unnumbered (order DOES NOT matter), (ABCD) (EFGH) … is the same as (EFGH) (ABCD) … — 33! orderings of groups • True CSC2110 Tutorial 11: More Counting

  3. T/F Question 5 (splitting into m sets) • A sequence of 100 balls with 5 colours will have the greatest number of permutations if we have the same number of balls for each colour. • Recall # combinations for 2 coloursis the largest when • Similar for multinomial. True CSC2110 Tutorial 11: More Counting

  4. MC Question 5 (splitting into m sets) • How many ways are there to go from (0, 0, 0) to (6, 6, 6) by x-step, y-step and z-step only?(a) (18 6) (b) 18! / (6!3) (c) 63 (d) 6!3 • Map set of paths to set of sequences of 18 chars xyzzxyxyz… with exactly 6 x’s, 6 y’s and 6 z’s. Similar to the “MISSISSIPPI” problem seen before • (b) 18! / (6!3) CSC2110 Tutorial 11: More Counting

  5. Short Question 8 (binomial theorem) • Evaluate the coefficient of the term x3y7 in the expansion of (x− 3y)10. • By the binomial formula, • now we haveand set • Coefficient • Remember the +/- sign CSC2110 Tutorial 11: More Counting

  6. Short Question 10 (Combinatorial proof) • Show the Vandermonde’s Identityusing combinatorial proof. (Hint: consider a pool of m red cards and n black cards.) • # ways to choose r cards from mred cards and n black cards: • Alternatively, choose k black cards and r − kred cardsalso gives us r cards: CSC2110 Tutorial 11: More Counting

  7. Short Question 10 (con’t) • Alternatively, choose k black cards and r − k red cards also gives us r cards: • Vary k from 0 to r, we have total # ways to pick r cardsequals • So CSC2110 Tutorial 11: More Counting

  8. Short Question 12 (Inclusion-Exclusion) • Using Inclusion-Exclusion Principle, calculate the number of primes less than 100. A listing of primes will score no mark. • Define • # primes CSC2110 Tutorial 11: More Counting

  9. Short Question 12 (con’t) • By Inclusion-Exclusion principle, Sum of size of individual setsminus Sum of all two-way intersectionsplus Sum of all three-way intersectionsminus Sum of all four-way intersections. • So • Number of primes = 98 − 73 = 25 CSC2110 Tutorial 11: More Counting

  10. T/F Question 6 (Pigeonhole Principle) • It is always possible to find two subsets with equal sum from a set of 150 numbers, each with less than or equal to 43 digits. • Pigeons = # subsets: 2150≈ 1.417 × 1045 • Pigeonholes = sum of subsets: ≤ 150 x 1043 = 1.5x 1045 • # pigeons not necessarily larger than # pigeonholes • False • What if all numbers are exactly 43 digits? CSC2110 Tutorial 11: More Counting

  11. T/F Question 6 (con’t) • It is always possible to find two subsets with equal sum from a set of 150 numbers, each with exactly 43 digits. • Pigeons = # subsets: 2150≈ 1.417 x 1045 (unchanged) • Pigeonholes = sum of subsets:≤ 150 x 1043 x 0.9 = 1.35x 1045 (why 0.9?) • # pigeons larger than # pigeonholes • True CSC2110 Tutorial 11: More Counting

  12. Count the number of 8-bit strings that do not contain three consecutive ones.(a) 129 (b) 139 (c) 149 (d) 159 Count the # strings that contain three consecutive ones 111????? (A) ?111???? (B) ??111??? (C) ???111?? (D) ????111? (E) ?????111 (F) 01111110 is in (B), (C), (D) and (E) Too many repetitions! A better choice? MC Question 7 (Miscellaneous) CSC2110 Tutorial 11: More Counting

  13. Maybe this one? 111????? (A) 0111???? (B) ?0111??? (C) ??0111?? (D) ???0111? (E) ????0111 (F) Almost disjoint, except (A) and (E): 1110111? (A) and (F): 111?0111 (B) and (F): 01110111 # strings with 3 consecutive ones = 32 + 16 x 5 − 2 − 2 − 1 = 107 (c) (256 − 107 = 149) Another way of counting? Next week MC Question 7 (con’t) CSC2110 Tutorial 11: More Counting

  14. Long Question 2 (Miscellaneous) • A password used on a particular system consists of 4 characters chosen from the set {0, 1, …, 9, X, Y} • (a) How many combinations are there if no characters are allowed to repeat? • 12! / (12 − 4)! = 11880 • (b) How many combinations are there if the password must consists of exactly 3 of the characters (e.g. 0112, X1X2, etc.)? • 4! / (2! x 1! x 1!) ways to arrange “AABC” • C(3, 1) ways to choose which of the three to appear twice • C(12, 3) ways to choose 3 characters from the set • C(12, 3) x C(3, 1) x 4! / 2 = 7920 CSC2110 Tutorial 11: More Counting

  15. Long Question 2 (con’t) • (c) How many combinations are there if the password must consists of exactly 2 of the characters, each appear twice (e.g. 0011, 1010, etc.)? • 4! / (2! x 2!) ways to arrange “AABB” • C(12, 2) ways to choose 2 characters from the set • C(12, 2) x 4! / 2! / 2! = 396 • (d) With reference to answers in the previous parts, calculate the total number of passwords that no character appears more than twice. • The possible cases are those in (a), (b) and (c) and they are disjoint • 11880 + 7920 + 396 = 20196 CSC2110 Tutorial 11: More Counting

  16. Just for fun (optional) a b c balls • n balls into n bins • # combinations? • Any rules? Partition Numbers A000041 Bell / Exponential Numbers A000110 bins 1 2 3 A001700 A000312 See http://www.research.att.com/~njas/sequences for details CSC2110 Tutorial 11: More Counting

More Related