Combinatorics Course Info Instructor: yinyt@nju.edu.cn, - - PowerPoint PPT Presentation
Combinatorics Course Info Instructor: yinyt@nju.edu.cn, - - PowerPoint PPT Presentation
Combinatorics Course Info Instructor: yinyt@nju.edu.cn, yitong.yin@gmail.com Office hour: 804 , Tuesday, 2pm-4pm course homepage: http://tcs.nju.edu.cn/wiki/ Textbook van Lint and Wilson,
Course Info
- Instructor:
- yinyt@nju.edu.cn, yitong.yin@gmail.com
- Office hour: 804 , Tuesday, 2pm-4pm
- course homepage:
- http://tcs.nju.edu.cn/wiki/
Textbook
van Lint and Wilson, A course in Combinatorics, 2nd Edition. Jukna, Extremal Combinatorics: with applications in computer science, 2nd Edition.
Reference Books
Graham, Knuth, and Patashnik, Concrete Mathematics: A Foundation for Computer Science Stanley, Enumerative Combinatorics, Volume 1
Alon and Spencer. The Probabilistic Method.
Reference Books
Cook, Cunningham, Pulleyblank, and Schrijver.
Combinatorial Optimization. Aigner and Ziegler. Proofs from THE BOOK.
Combinatorics
- Enumeration (counting):
- Existence:
- Extremal:
- Ramsey:
- Optimization:
- Construction (design):
How many solutions to these constraints? Does a solution exist? When a solution is sufficiently large, some structure must emerge. How large/small a solution can be to preserve/avoid certain structure? Find the optimal solution. Construct a solution.
solution: combinatorial object constraint: combinatorial structure combinatorial≈discrete finite
Tools (and prerequisites)
- Combinatorial (elementary) techniques;
- Algebra (linear & abstract);
- Probability theory;
- Analysis (calculus).
Enumeration
(counting)
- to rank n people?
- to assign m zodiac signs to n people?
- to choose m people out of n people?
- to partition n people into m groups?
- to distribute m yuan to n people?
- to partition m yuan to n parts?
- ... ...
How many ways are there:
Gian-Carlo Rota (1932-1999)
The Twelvefold Way
Stanley, Enumerative Combinatorics, Volume 1
The twelvefold way
f : N → M |N| = n, |M| = m
elements
- f N
elements
- f M
any f 1-1
- n-to
distinct distinct identical distinct distinct identical identical identical
balls per bin: unrestricted
≤ 1 ≥ 1
n distinct balls, m distinct bins n identical balls, m distinct bins n distinct balls, m identical bins n identical balls, m identical bins
Knuth’s version (in TAOCP vol.4A)
n balls are put into m bins
Counting (labeled) trees
“How many different trees can be formed from n distinct vertices?”
2 2 1 2 1 2
Arthur Cayley (1821-1895)
There are nn−2 trees on n distinct vertices.
Cayley’s formula:
Algorithmic Enumeration
“The number of different spanning trees of G(V,E).” input: undirected graph G(V, E) t(G) : for i =1,2,3,... nn-2
- utput the i-th tree;
enumeration algorithm: counting algorithm:
Graph Laplacian
1 2 3 4
Graph G(V,E) adjacency matrix A
A(i, j) = ( 1 {i, j} 2 E {i, j} 62 E D(i, j) = ( deg(i) i = j i 6= j
diagonal matrix D
D = d1 d2 ... dn
graph Laplacian L L = D − A
L = 3 −1 −1 −1 −1 2 −1 −1 −1 3 −1 −1 −1 2
Li,i : submatrix of L by removing ith row and ith collumn i i t(G) : number of spanning trees in G Kirchhoff ’s Matrix-Tree Theorem: ∀i, t(G) = det(Li,i) Gustav Kirchhoff (1824-1887)
Bipartite Perfect Matching
bipartite graph G([n],[n],E) perfect matchings permutation π of [n] (i, π(i)) ∈ E s.t.
Ai,j =
- 1
(i, j) E (i, j) E
n × n matrix A : =
- π∈Sn
- i∈[n]
Ai,π(i) # of P .M. in G
Permanent
n × n matrix A : =
- π∈Sn
- i∈[n]
Ai,π(i) perm(A) det(A) =
- π∈Sn
(−1)r(π)
i∈[n]
Ai,π(i) determinant: poly-time by Gaussian elimination #P-hard to compute
Ryser’s formula
- π∈Sn
- i∈[n]
Ai,π(i) =
- I⊆[n]
(−1)n−|I|
i∈[n]
- j∈I
Ai,j O(n!) time O(n2n) time
- I⊆S
(−1)|S|−|I| =
- 1
S = ∅
- therwise
PIE (Principle of Inclusion-Exclusion):
PIE
(Principle of Inclusion-Exclusion) |A ∪ B| = |A| + |B| −|A ∩ B| |A ∪ B ∪ C| = |A| + |B| + |C| −|A ∩ B| − |A ∩ C| − |B ∩ C| +|A ∩ B ∩ C|
Inversion
f : 2[n] → N
V: 2n-dimensional vector space of all mappings
φ : V → V
linear transformation
∀S ⊆ [n], ∀S ⊆ [n],
then its inverse:
φf(S)
- T ⊇S
T ⊆[n]
f(T) φ−1f(S) =
- T ⊇S
T ⊆[n]
(−1)|T \S|f(T)
Fibonacci number
Fn = Fn−1 + Fn−2 if n ≥ 2, 1 if n = 1 if n = 0. φ = 1 + √ 5 2 ˆ φ = 1 − √ 5 2 Fn = 1 √ 5
- φn − ˆ
φn⇥ by generating functions ...
Quicksort
Qsort(A): choose a pivot x = A[1]; partition A into L with all L[i ] < x , R with all R[i ] > x ; Qsort(L) and Qsort(R);
input: an array A of n numbers Complexity: number of comparisons worst-case: average-case:
?
Θ(n2)
Qsort(A): choose a pivot x = A[1]; partition A into L with all L[i ] < x , R with all R[i ] > x ; Qsort(L) and Qsort(R);
Tn :
average # of comparisons used by Qsort
= 1 n
n
- k=1
(n − 1 + Tk−1 + Tn−k)
Tn pivot: the k-th smallest number in A |L| = k-1 |R| = n-k
n − 1
Recursion:
T0 = T1 = 0
= 2n ln n + O(n)
generating functions
Counting with Symmetry
Rotation : Rotation & Reflection:
Symmetries
Pólya’s Theory of Counting
George Pólya (1887-1985)
a~
v : # of config. (up to symmetry) with ni many color i
pattern inventory :
FG(y1, y2, . . . , ym) = X
~ v=(n1,...,nm) n1+···+nm=n
a~
v yn1 1 yn2 2 · · · ynm m
(multi-variate) generating function
FG(y1, y2, . . . , ym) = PG m X
i=1
yi,
m
X
i=1
y2
i , . . . , m
X
i=1
yn
i
!
Pólya’s enumeration formula (1937):
π =
`1
z }| { (· · · )
`2
z }| { (· · · ) · · ·
`k
z }| { (· · · ) | {z }
k cycles
M⇡(x1, x2, . . . , xn) =
k
Y
i=1
x`i
PG(x1, x2, . . . , xn) = 1 |G| X
π∈G
Mπ(x1, x2, . . . , xn)
cycle index:
FD20(r, q, l)
Existing
- a configuration satisfying this condition?
- a counterexample for this method?
- an efficient algorithm for this problem?
- a problem which is hard to solve in this
computation model?
- ...
Does there exist:
Circuit Complexity
∧
¬
x1 x2 x3
∨ ∧ ∨
f : {0, 1}n → {0, 1}
Boolean function Boolean circuit
Claude Shannon (1916 - 2001)
Theorem (Shannon 1949) There is a boolean function f : {0, 1}n → {0, 1} which cannot be computed by any circuit with 2n
3n gates.
no constructive proof is known
Combinatorics
- Enumeration (counting):
- Existence:
- Extremal:
- Ramsey:
- Optimization:
- Construction (design):
How many solutions to these constraints? Does a solution exist? When a solution is sufficiently large, some structure must emerge. How large/small a solution can be to preserve/avoid certain structure? Find the optimal solution. Construct a solution.
solution: combinatorial object constraint: combinatorial structure combinatorial≈discrete finite