1 / 35

Part II: Counting

Part II: Counting. Basic Counting: Principles Lists, Permutations, and Subsets Binomial Coefficients Pigeonhole Principle. L04: Basic Counting. Objectives Counting: What and Why? Basic principles of counting Reading SDB, pp. 31-38. Outline. Introduction to Counting The Sum Principle

elsieg
Télécharger la présentation

Part II: Counting

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. Part II: Counting • Basic Counting: Principles • Lists, Permutations, and Subsets • Binomial Coefficients • Pigeonhole Principle

  2. L04: Basic Counting • Objectives • Counting: What and Why? • Basic principles of counting • Reading • SDB, pp. 31-38

  3. Outline • Introduction to Counting • The Sum Principle • Principle through an example • Set-Theoretic concepts and Notations • Summing consecutive integers • The Product Principle • The principle • An application: Two-Elements subsets

  4. Outline • Introduction to Counting • The Sum Principle • Principle through an example • Set-Theoretic concepts and Notations • Summing consecutive integers • The Product Principle • The principle • An application: Two-Elements subsets

  5. Selection Sort Comparison Counting # of comparisons: n n n 2 2 2 n-1 n-1 n-1 1 1 1 3 3 3 … … … … … … i=1: n-1 i=2: n-2 ….. i=n-1: 1 Total # of comparisons = (n-1)+(n-2)+…+1

  6. Sum Principle S # of comparisons: =|S1| n n n 2 2 2 n-1 n-1 n-1 1 1 1 3 3 3 … … … … … … i=1: n-1 i=2: n-2 ….. i=n-1: 1 Total # of comparisons = (n-1)+(n-2)+…+1 =|S2| =|Sn-1|

  7. Sum Principle in Abstract S4 S2 S1 S3 Si: blocks subsets … … Abstraction: From Concrete example to General Principle

  8. Set-Theoretical Concepts in Sum Principle

  9. Outline • Introduction to Counting • The Sum Principle • Principle through an example • Set-Theoretic concepts and Notations • Summing consecutive integers • The Product Principle • The principle • An application: Two-Elements subsets

  10. {p|p an UST student who takes 91M to school}

  11. Outline • Introduction to Counting • The Sum Principle • Principle through an example • Set-Theoretic concepts and Notations • Summing consecutive integers • The Product Principle • The principle • An application: Two-Elements subsets

  12. Outline • Introduction to Counting • The Sum Principle • Principle through an example • Set-Theoretic concepts and Notations • Summing consecutive integers • The Product Principle • The principle • An application: Two-Elements subsets

  13. Matrix Multiplication

  14. Product Principle in General • Si and Sj are disjoint, |Si| = n • S = S1 U S2 U … U Sm • |S| = m |Si| = mn

  15. Outline • Introduction to Counting • The Sum Principle • Principle through an example • Set-Theoretic concepts and Notations • Summing consecutive integers • The Product Principle • The principle • An application: Two-Elements subsets

  16. First: Ordered Pairs

  17. Now: Two-Element Subsets

  18. Outline • Introduction to Counting • The Sum Principle • Principle through an example • Set-Theoretic concepts and Notations • Summing consecutive integers • The Product Principle • The principle • An application: Two-Elements subsets

More Related