Presentation is loading. Please wait.

Presentation is loading. Please wait.

L2 Supplementary Notes Page 1 04-02-2010: Recap l Sum Principle n Applied to selection sort l Product Principle n Applied to matrix multiplication and.

Similar presentations


Presentation on theme: "L2 Supplementary Notes Page 1 04-02-2010: Recap l Sum Principle n Applied to selection sort l Product Principle n Applied to matrix multiplication and."— Presentation transcript:

1 L2 Supplementary Notes Page 1 04-02-2010: Recap l Sum Principle n Applied to selection sort l Product Principle n Applied to matrix multiplication and the next item l Two element-subsets l Set concepts and notations n Sets, mutually disjoint sets, size, union, partition n Set does not allow duplicates

2 L2 Supplementary Notes Page 2 04-02-2010 Recap: Sum Principle

3 L2 Supplementary Notes Page 3 04-02-2010 Recap: Product Principle l Si and Sj are disjoint, |Si| = n l S = S1 U S2 U … U Sm l |S| = m |Si| = mn

4 L2 Supplementary Notes Page 4 04-02-2010 Today First 3 items on Page 2 of “ More Counting”

5 L2 Supplementary Notes Page 5 More counting, Page 4 (MC 4)

6 L2 Supplementary Notes Page 6 Use of Product Principle in Entry Code Example (MC 4)

7 L2 Supplementary Notes Page 7 MC 5-9

8 L2 Supplementary Notes Page 8 Suppl 4, MC10, 11

9 L2 Supplementary Notes Page 9 Discrete Function (MC 11, 12) l S = {1, 2, 3}: domain of function f l T={Sam, Mary, Sarah}: range of function f

10 L2 Supplementary Notes Page 10 Notes (MC 11) l For each element s of S, f gives one element of T, f(s) l In general NOT: n For each element of T,… n There may be t of T, such that f(s) \= t for all s of S n Only a special kind of function has this property, onto

11 L2 Supplementary Notes Page 11 MC 14

12 L2 Supplementary Notes Page 12 Exercise on Functions (MC 15) All functions from {1, 2} ->{a, b}

13 L2 Supplementary Notes Page 13 Counting Functions (MC 16)

14 L2 Supplementary Notes Page 14 Counting Functions (MC17)

15 L2 Supplementary Notes Page 15 Injection (MC 18) f: {1, 2}  {a, b}

16 L2 Supplementary Notes Page 16 Surjection (MC 18) f: {1, 2}  {a, b}

17 L2 Supplementary Notes Page 17 Examples (MC 19)

18 L2 Supplementary Notes Page 18 Bijection (MC 20) l Domain and range have same number of elements.

19 L2 Supplementary Notes Page 19 Permutation (MC 20)

20 L2 Supplementary Notes Page 20 Bijection Principle l Counting elements in S l May be difficult directly l Find another set T that is easy to count l Define a function f: S  T l Prove that f is a bijection l Count T

21 L2 Supplementary Notes Page 21 Three Increasing Triples

22 L2 Supplementary Notes Page 22 Increasing Triples

23 L2 Supplementary Notes Page 23 3-element subsets/3-element permutations

24 L2 Supplementary Notes Page 24 K-th falling factorial

25 L2 Supplementary Notes Page 25 k-element subsets/k-elemen permutations


Download ppt "L2 Supplementary Notes Page 1 04-02-2010: Recap l Sum Principle n Applied to selection sort l Product Principle n Applied to matrix multiplication and."

Similar presentations


Ads by Google