1 FKT Algorithm by PlusOne
Counting perfect matchings in planar graphs With the FKT algorithm - - PowerPoint PPT Presentation
Counting perfect matchings in planar graphs With the FKT algorithm - - PowerPoint PPT Presentation
Counting perfect matchings in planar graphs With the FKT algorithm FKT Algorithm by PlusOne 1 Def Perfect Matching Z Given a graph G = (V,E), a matching M in G is a set of pairwise non-adjacent edges. M is said to be perfect if every vertex
Perfect Matching
2
Z
FKT Algorithm by PlusOne
Given a graph G = (V,E), a matching M in G is a set of pairwise non-adjacent edges. M is said to be perfect if every vertex of G is included in M.
Def
3 FKT Algorithm by PlusOne
1 2 3 4 5 6 7 8
Def Cycle Cover
4 FKT Algorithm by PlusOne
A set of disjoint cycles in G that contain all vertices of G.
1 2 3 4 5 6 7 8
Def Cycle Cover
5 FKT Algorithm by PlusOne
A cycle cover that satisfiesβ¦
- All cycles have even number of vertices.
- Every cycle has a direction (clockwise or counter-clockwise).
1 2 3 4 5 6 7
Non-even Directed Cycle Cover
1 2 3 4 5 6 7 8
Even Directed Cycle Cover
Def Even Directed Cycle Cover (EDCC)
6 FKT Algorithm by PlusOne
M1
1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8
M2
Obs
Every ordered pair of perfect matchings can be uniquely mapped to an EDCC.
<M1, M2>
1 2 3 4 5 6 7 8
7 FKT Algorithm by PlusOne
Obs
Every ordered pair of perfect matchings can be uniquely mapped to an EDCC.
Itβs easy to see that every EDCC can also be decomposed into an ordered pair of perfect matchings.
<M1, M2>
1 2 3 4 5 6 7 8
Counting Perfect Matchings
8 FKT Algorithm by PlusOne
|ππ|2 = |πΉπΈπ·π·|
The number of perfect matchings The number of even directed cycle covers
So counting perfect matchings can be converted into counting EDCCs.
9 FKT Algorithm by PlusOne
π 1 2 3 4 5 6 7 8 π(π) 6 3 4 5 2 7 8 1 Recall Discrete Mathematics II and Linear Algebra.
Tip Permutations
The parity of a permutation = the parity of # swaps from the original sequence sgn(π): sign of a permutation +1 (ππ€ππ πππ ππ£π’ππ’πππ) β1 (πππ πππ ππ£π’ππ’πππ)
10 FKT Algorithm by PlusOne
A: adjacency matrix π΅ππ =
+1 (if edge i β j) β1 (if edge j β i) 0 (if no edge between i, j)
sgn(π): sign of a permutation +1 (εΆζε)
β1 (ε₯ζε)
val π βΆ π΅π,π(π)
Def Determinant of Oriented Graph
Is the determinant of the adjacency matrix! πΈππ’ π΅ =
π
πππ π β πππ(π)
By definition,
11 FKT Algorithm by PlusOne
1 2 3 4 5 6 7 8
π 1 2 3 4 5 6 7 8 π(π) 6 3 4 5 2 7 8 1
Obs
Every Directed Cycle Cover (DCC) corresponds to a permutation.
π, π π β ππππ < π, π π >
12 FKT Algorithm by PlusOne
1 2 3 4 5 6 7 8
π 1 2 3 4 5 6 7 8 π(π) 6 3 4 5 2 7 8 1
Obs
For a permutation π, if β π, π π β πΉ, we can map π to a DCC.
π, π π β ππππ < π, π π >
1 2 3 4 5 6 7 8
π 1 2 3 4 5 6 7 8 π(π) 7 3 4 5 2 1 8 6
13 FKT Algorithm by PlusOne
Obs
For a permutation π, if β π, π π β πΉ, we can map π to a DCC.
π, π π β ππππ < π, π π >
The inverse proposition : for a permutation π , if it cannot be mapped to a DCC, then β π, π π β πΉ. β π΅π,π π = 0 β val π = 0
Det A =
π
πππ π πππ(π) =
πΈπ·π·
πππ π πππ(π)
Non-even DCCs will be cancelled out.
14 FKT Algorithm by PlusOne
You can always find another DCC with an opposite direction for the odd cycle.
π πβ²
π‘ππ π = π‘ππ(πβ²) Remember that π΅ππ = βπ΅ππ So πππ π = β1 π β πππ πβ² (k is the number of edges in the cycle) Therefore: π‘ππ π π€ππ π + π‘ππ π π€ππ πβ² = 0
Obs
Only EDCCs contribute to Det(A)
15 FKT Algorithm by PlusOne
Det A
=
π
πππ π πππ(π)
Our goal: Find an orientation that makes all π‘ππ π π€ππ π = 1 (then ππ2 = πΉπΈπ·π· = πΈππ’(π΅))
Permutations that are not DCC, val(π)=0 This depends on the orientation! β€ |πΉπΈπ·π·| This is equal when all π‘ππ(π)π€ππ(π)=1
=
πΈπ·π·
πππ π πππ(π) =
πΉπΈπ·π·
πππ π πππ(π) +
πππ’ ππ€ππ πΈπ·π·
πππ π πππ(π) =
πΉπΈπ·π·
πππ π πππ(π)
16 FKT Algorithm by PlusOne
Alg
FKT Algorithm: Finding an Orientation
ο¬Planar Graph: a graph that can be drawn in the 2D plane so that its edges intersect only at its vertices.
Not Planar Planar
FKT Algorithm by PlusOne
Alg
FKT Algorithm: Finding an Orientation
ο¬Planar Graph: a graph that can be drawn in the 2D plane so that its edges intersect only at its vertices. ο¬Face: a planar graph can be seen as a mesh of faces.
Face!
- 1. Find a spanning tree for G.
Call this tree T1.
18 FKT Algorithm by PlusOne
Alg
FKT Algorithm: Finding an Orientation
- 1. Find a spanning tree for G.
Call this tree T1.
- 2. Orient the edges arbitrarily.
- 3. Construct a second tree T2,
whose vertices are the faces of T1. Put an edge between faces that share an edge that is not in T1.
- 4. Starting with the leaves of T2,
- rient these edges of G such
that each face has an odd number of edges oriented clockwise.
19 FKT Algorithm by PlusOne
Alg
FKT Algorithm: Finding an Orientation
20 FKT Algorithm by PlusOne
Eulerβs Formula
For any cycle C, e = v + f β 1, where e is the number of edges inside C, v is the number of vertices inside C, and f is the number of faces inside C. π€ = 4 π = 5
Lemma If all faces have an odd number of clockwise edges then all cycles in an EDCC are oddly oriented.
Cycle π·, π = 8.
ππ: the number of clockwise lines on the boundary of face. π: the number of clockwise lines on Cycle (C).
Proof
- Let π· be a nice cycle, let ππ be the number of clockwise lines on
the boundary of face i in π·, and π be the number of clockwise lines on π·.
- We oriented each face to have an odd number of clockwise lines,
so ππ β‘ 1 πππ 2, so π β‘ π=1
π
ππ πππ 2.
- But also π=1
π
ππ = π + π (each interior line is counted as clockwise
- nce).
- So π β‘ π + (π€ + π β 1) πππ 2, so π β‘ (π€ β 1) πππ2.
- But π€ β‘ 0 πππ 2 ,as C is a nice cycle.
- So π·, and hence every nice cycle, is oddly oriented.
21 FKT Algorithm by PlusOne
Eulerβs Formula For any cycle C, e = v + f β 1, where e is the number of edges inside C, v is the number of vertices inside C, and f is the number of faces inside C.
1 2 3 4 5 6 7 8
= ((β1) Γ (β1))π = 1
22 FKT Algorithm by PlusOne
π‘ππ π π€ππ π
Lemma If all cycles in an EDCC are oddly oriented then π‘ππ π π€ππ π = 1 for all corresponding π.
Even cycle sgn(π): sign of a permutation +1 (εΆζε)
β1 (ε₯ζε)
val π βΆ π΅π,π(π)
= π‘ππ π·π β π€ππ π·π = π‘ππ π·π π€ππ(π·π)
C1 C2 C3
Oddly
- riented
The FKT algorithms finds a feasible
- rientation!
FKT Algorithm by PlusOne 23
Lemma If all cycles in an EDCC are oddly oriented then π‘ππ π π€ππ π = 1 for all corresponding π. Lemma If all faces have an odd number of clockwise edges then all cycles in an EDCC are oddly oriented. Det (A) = |EDCC| FKT algorithm
FKT Algorithm by PlusOne 24
Graph G Run FKT to find
- rientation G
Compute det π΅ PM = det(π΅)