Counting perfect matchings in planar graphs With the FKT algorithm - - PowerPoint PPT Presentation

β–Ά
counting perfect matchings in planar graphs
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

1 FKT Algorithm by PlusOne

Counting perfect matchings in planar graphs

With the FKT algorithm

slide-2
SLIDE 2

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

slide-3
SLIDE 3

3 FKT Algorithm by PlusOne

1 2 3 4 5 6 7 8

Def Cycle Cover

slide-4
SLIDE 4

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

slide-5
SLIDE 5

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)

slide-6
SLIDE 6

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

slide-7
SLIDE 7

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

slide-8
SLIDE 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.

slide-9
SLIDE 9

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 (𝑝𝑒𝑒 π‘žπ‘“π‘ π‘›π‘£π‘’π‘π‘’π‘—π‘π‘œ)

slide-10
SLIDE 10

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,

slide-11
SLIDE 11

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.

𝑗, 𝜌 𝑗 ↔ 𝑓𝑒𝑕𝑓 < 𝑗, 𝜌 𝑗 >

slide-12
SLIDE 12

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

slide-13
SLIDE 13

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 =

𝜌

π‘‡π‘•π‘œ 𝜌 π‘Šπ‘π‘š(𝜌) =

𝐸𝐷𝐷

π‘‡π‘•π‘œ 𝜌 π‘Šπ‘π‘š(𝜌)

slide-14
SLIDE 14

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

slide-15
SLIDE 15

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

=

𝐸𝐷𝐷

π‘‡π‘•π‘œ 𝜌 π‘Šπ‘π‘š(𝜌) =

𝐹𝐸𝐷𝐷

π‘‡π‘•π‘œ 𝜌 π‘Šπ‘π‘š(𝜌) +

𝑂𝑝𝑒 π‘“π‘€π‘“π‘œ 𝐸𝐷𝐷

π‘‡π‘•π‘œ 𝜌 π‘Šπ‘π‘š(𝜌) =

𝐹𝐸𝐷𝐷

π‘‡π‘•π‘œ 𝜌 π‘Šπ‘π‘š(𝜌)

slide-16
SLIDE 16

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

slide-17
SLIDE 17

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!

slide-18
SLIDE 18
  • 1. Find a spanning tree for G.

Call this tree T1.

18 FKT Algorithm by PlusOne

Alg

FKT Algorithm: Finding an Orientation

slide-19
SLIDE 19
  • 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

slide-20
SLIDE 20

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).

slide-21
SLIDE 21

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.

slide-22
SLIDE 22

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
slide-23
SLIDE 23

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

slide-24
SLIDE 24

FKT Algorithm by PlusOne 24

Graph G Run FKT to find

  • rientation G

Compute det 𝐡 PM = det(𝐡)

How to count perfect matchings?