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, A course in Combinatorics, 2nd Edition . Jukna, Extremal Combinatorics: with applications in computer science, 2nd Edition .
Reference Books Stanley, Enumerative Combinatorics, Volume 1 Graham, Knuth, and Patashnik, Concrete Mathematics: A Foundation for Computer Science
Reference Books Aigner and Ziegler. Proofs from THE BOOK. Alon and Spencer. The Probabilistic Method. Cook, Cunningham, Pulleyblank, and Schrijver. Combinatorial Optimization.
Combinatorics combinatorial ≈ discrete solution: combinatorial object finite constraint: combinatorial structure • Enumeration (counting): How many solutions to these constraints? • Existence: Does a solution exist? • Extremal: How large/small a solution can be to preserve/avoid certain structure? • Ramsey: When a solution is sufficiently large, some structure must emerge. • Optimization: Find the optimal solution. • Construction (design): Construct a solution.
Tools (and prerequisites) • Combinatorial (elementary) techniques; • Algebra (linear & abstract); • Probability theory; • Analysis (calculus).
Enumeration (counting) How many ways are there: • 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? • ... ...
The Twelvefold Way Stanley, Gian-Carlo Rota Enumerative Combinatorics, (1932-1999) Volume 1
The twelvefold way | N | = n, | M | = m f : N → M elements elements any f on-to 1-1 of N of M distinct distinct identical distinct distinct identical identical identical
Knuth’s version (in TAOCP vol.4A) n balls are put into m bins ≤ 1 ≥ 1 balls per bin: unrestricted n distinct balls, m distinct bins n identical balls, m distinct bins n distinct balls, m identical bins n identical balls, m identical bins
Counting (labeled) trees “ How many different trees can be formed from n distinct vertices ?”
Cayley’s formula: There are n n − 2 trees on n distinct vertices. 2 2 1 2 1 2 Arthur Cayley (1821-1895)
Algorithmic Enumeration enumeration algorithm: for i =1,2,3,... n n -2 output the i -th tree; counting algorithm: input : undirected graph G ( V , E ) “ The number of different t ( G ) : spanning trees of G ( V , E ) .”
Graph Laplacian 1 2 Graph G ( V , E ) adjacency matrix A ( 1 { i, j } 2 E A ( i, j ) = 4 3 0 { i, j } 62 E diagonal matrix D d 1 0 d 2 ( deg( i ) i = j D = D ( i, j ) = ... 0 0 i 6 = j d n graph Laplacian L 3 − 1 − 1 − 1 − 1 2 − 1 0 L = D − A L = − 1 − 1 3 − 1 − 1 0 − 1 2
L i,i : submatrix of L by removing i th row and i th collumn i i Gustav Kirchhoff (1824-1887) t ( G ) : number of spanning trees in G Kirchhoff ’s Matrix-Tree Theorem: t ( G ) = det( L i,i ) ∀ i,
Bipartite Perfect Matching bipartite graph perfect matchings G ([ n ],[ n ], E ) s.t. permutation π of [ n ] ( i, π ( i )) ∈ E n × n matrix A : # of P .M. in G � 1 ( i, j ) � E � � A i, π ( i ) A i,j = = 0 ( i, j ) �� E π ∈ S n i ∈ [ n ]
Permanent n × n matrix A : � � perm( A ) A i, π ( i ) = π ∈ S n i ∈ [ n ] #P-hard to compute determinant: � ( − 1) r ( π ) � det( A ) = A i, π ( i ) π ∈ S n i ∈ [ n ] poly-time by Gaussian elimination
Ryser’s formula � � � ( − 1) n − | I | � � A i, π ( i ) = A i,j π ∈ S n j ∈ I i ∈ [ n ] I ⊆ [ n ] i ∈ [ n ] O( n !) time O( n 2 n ) time PIE (Principle of Inclusion-Exclusion): � S = ∅ 1 ( − 1) | S | − | I | = � 0 otherwise I ⊆ S
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 V : 2 n -dimensional vector space of all mappings f : 2 [ n ] → N linear transformation φ : V → V � φ f ( S ) � f ( T ) ∀ S ⊆ [ n ] , T ⊇ S T ⊆ [ n ] then its inverse: � φ − 1 f ( S ) = ( − 1) | T \ S | f ( T ) ∀ S ⊆ [ n ] , T ⊇ S T ⊆ [ n ]
Fibonacci number F n − 1 + F n − 2 if n ≥ 2 , F n = 1 if n = 1 0 if n = 0 . 1 � φ n ⇥ φ n − ˆ F n = √ 5 √ √ φ = 1 + 5 φ = 1 − 5 ˆ 2 2 by generating functions ...
Quicksort input : an array A of n numbers 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 ); Complexity: number of comparisons worst-case: Θ ( n 2 ) average-case: ?
T n : Qsort( A ): choose a pivot x = A [1] ; average # of comparisons used by Qsort partition A into L with all L [ i ] < x , R with all R [ i ] > x ; Qsort( L ) and Qsort( R ); pivot: the k -th smallest number in A | L | = k -1 | R | = n - k Recursion: n = 1 � ( n − 1 + T k − 1 + T n − k ) T n n − 1 = 2 n ln n + O ( n ) n k =1 generating T 0 = T 1 = 0 functions
Counting with Symmetry Rotation : Rotation & Reflection :
Symmetries
Pólya’s Theory of Counting George Pólya (1887-1985)
pattern inventory : (multi-variate) generating function X v y n 1 1 y n 2 2 · · · y n m F G ( y 1 , y 2 , . . . , y m ) = a ~ m ~ v =( n 1 ,...,nm ) n 1+ ··· + nm = n v : # of config. (up to symmetry) with n i many color i a ~ Pólya’s enumeration formula (1937): m m m ! X X X y n y 2 F G ( y 1 , y 2 , . . . , y m ) = P G y i , i , . . . , i i =1 i =1 i =1 ` 1 ` 2 ` k k z }| { z }| { z }| { Y M ⇡ ( x 1 , x 2 , . . . , x n ) = π = ( · · · ) ( · · · ) · · · ( · · · ) x ` i | {z } i =1 k cycles 1 cycle index: X P G ( x 1 , x 2 , . . . , x n ) = M π ( x 1 , x 2 , . . . , x n ) | G | π ∈ G
F D 20 ( r, q, l )
Existing Does there exist: • 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? • ...
Circuit Complexity Boolean function f : { 0 , 1 } n → { 0 , 1 } ∨ Boolean ¬ ∧ circuit ∧ ∨ x 1 x 2 x 3
Theorem ( Shannon 1949 ) There is a boolean function f : { 0 , 1 } n → { 0 , 1 } which cannot be computed by any circuit with 2 n 3 n gates. Claude Shannon (1916 - 2001) no constructive proof is known
Combinatorics combinatorial ≈ discrete solution: combinatorial object finite constraint: combinatorial structure • Enumeration (counting): How many solutions to these constraints? • Existence: Does a solution exist? • Extremal: How large/small a solution can be to preserve/avoid certain structure? • Ramsey: When a solution is sufficiently large, some structure must emerge. • Optimization: Find the optimal solution. • Construction (design): Construct a solution.
Recommend
More recommend