Skip to Content

5. Cayley's Formula

2019-09-04·Combinatorics
  • Cayley's formula: There are nn−2n^{n-2} different trees on nn distinct vertices

Double Counting

  • Count: # of sequences of adding directed edges to an empty graph to form a rooted tree
    • From a Tree: Tnn(n−1)!=n!TnT_nn(n-1)!=n!T_n
    • From an empty graph: ∏k=0n−2n(n−k−1)=nn−2n!\prod_{k=0}^{n-2}n(n-k-1)=n^{n-2}n!

Prüfer code

  • encoder:
    • T1=TT_1=T
    • for i=1 to n-1
      • uiu_i: smallest leaf in TiT_i
      • (ui,vi)(u_i,v_i): edge in TiT_i
      • Ti+1=Ti\uiT_{i+1}=T_i\backslash u_i
    • return (v1,v2,⋯ ,vn−2)(v_1,v_2,\cdots,v_{n-2})
  • decoder:
    • T=∅,vn−1=nT=\emptyset,v_{n-1}=n
    • for i=1 to n-1
      • uiu_i: smallest not in {u1,⋯ ,ui−1}∪{vi,⋯ ,vn−1}\{u_1,\cdots,u_{i-1}\}\cup\{v_i,\cdots,v_{n-1}\}
      • T∪={ui,vi}T\cup=\{u_i,v_i\}
    • return TT

Kirchhoff's Matrix-Tree Theorem

  • Adjacent matrix AA: Aij=[{i,j}∈E]A_{ij}=[\{i,j\}\in E]
  • Degree matrix DD: Dij=deg(i)[i=j]D_{ij}=\text{deg}(i)[i=j]
  • incidence matrix: Bn×mB_{n\times m}
B(i,e)={1e={i,j}∧i<j−1e={i,j}∧i>j0o.w.B(i,e)=\begin{cases} 1 & e=\{i,j\}\wedge i<j\newline -1 & e=\{i,j\}\wedge i>j\newline 0 & o.w. \end{cases}
  • Laplacian matrix: L=D−AL=D-A
    • xLxT=12∑ij∈E(xi−xj)2xLx^T=\frac{1}{2}\sum_{ij\in E}(x_i-x_j)^2
    • L=BBTL=BB^T
    • Li,i=BiBiTL_{i,i}=B_iB_i^T
  • Kirchhoff's Matrix-Tree Theorem
    • Li,iL_{i,i}: submatrix of LL obtained by removing the ith row and ith collumn
    • t(G)t(G): number of spanning trees in GG
    • ∀i,t(G)=det⁡(Li,i)\forall i,t(G)=\det(L_{i,i})
  • Cauchy-Binet Theorem
    • det⁡(AB)=∑S∈C[m]ndet⁡(A[n],S)det⁡(BS,[n])\det(AB)=\sum_{S\in C_{[m]}^n}\det(A_{[n],S})\det(B_{S,[n]})
    • A[n],S{\displaystyle A_{[n],S}} and BS,[n]{\displaystyle B_{S,[n]}} denote, respectively, the n×n{\displaystyle n\times n} submatrices of AA and BB, consisting of the columns of AA, or the rows of BB, indexed by elements of SS
  • det⁡(B[n]\{i},S)=±1\det(B_{[n]\backslash\{i\},S})=\pm 1 if SS is a spanning tree of GG o.w. 00
  • det⁡(Li,i)=∑S∈([m]n−1)det⁡(C[n−1],S)2.{\displaystyle {\begin{aligned}\det(L_{i,i})&=\sum _{S\in {[m] \choose n-1}}\det(C_{[n-1],S})^{2}.\end{aligned}}}