Lecture 026

Combinatorics - Basic Counting Principles

Let A be a finite set. \{A_i\}_{i \in \mathbb{I}} is called a partition iff U_{i\in \mathbb{I}} = A \land A_i \cap A_j = \emptyset \text{for} i\neq j

Rule of Sum (ROS)

For finite partition of A \mathbb{F}=\{A_1, ..., A_m\}, then |A|=\sum_{i=1}^m {|A_i|} = |A_1|+ ...+|A_m|

Rule of Product (ROP)

For finite partition of A A = A_1 \times ... \times A_n, then |A|=\prod_{i=1}^m {|A_i|} = |A_1|\times ...\times |A_m|

Rule of Product (ROP v2)

About making choice

The Pigeonhole Principle (PHP)

Story: If a lot of pigeons fly into not too many pigeonholes, then at least 1 pigeonhole will be occupied by multiple pigeons.

Let A be a finite set partitioned into A_1, ... A_k. |A|=n \implies (\exists i \in [k])(|A_1|\geq \lceil \frac{n}{k} \rceil).

Proof: give an answer, suppose not, then contradictory.

Counting in 2 Ways

Principle: if we count the size of a set in two different ways, then both expressions for the cardinality of the set must be equal.

The Handshake Lemma: \frac{(n(n-1))}{2} = \sum_{i=1}^{n-1}i

Combinatorial Methods

Combinatorial Methods:

Permutations & Arrangements (without Repetition)

k-arrangements of X: a (number of possible) injection f: [k] \hookrightarrow X with k \leq |X|

permutation of X: a (number of possible) bijection f: [|X|] \to X.

Permutations & Arrangements with Repetition

k-arrangements with repetition: a (number of possible) functions f:[k]\to X or an ordered k-tuple from X.

Selections & Combinations

selections: arrangements without order k-selection: a (number of possible) subset of X of size k with k \leq |X|.

The Binomial theorem

The Binomial theorem: Let x, y \in \mathbb{R} \land n \in \mathbb{N}, then (x+y)^n = \sum_{k=0}^n {n \choose k} x^ky^{n-k}

The Poker Problem

Poker: 52 cards, 4 suits, 13 ranks, Ace, Jack, King, Queen.

Principle of Inclusion / Exclusion

2^n = \sum_{i=0}^{n} {n \choose i}.

Selection with Repetition

| OO | OOO | O | | Flavor 1 | Flavor 2 | Flavor 3 |

Can be viewed as (00100010) and asking how many repeated way to buy 6 donuts with 3 flavors is the same as how to arrange binary strings with exactly 6 0's and 2 1's.

There are {n+k-1 \choose k-1} = {n+k-1 \choose n} ways to select n-many objects from k-many types with repetition.

The Anagram Problem

Example: anagrams of LIMITING ROP Procedure:

Table of Content