Top Banner
Algorithms for Planar Graphs Jeff Erickson University of Illinois, Urbana-Champaign CIMAT, Guanajuato, Mexico September 10, 2018
100

Algorithms for Planar Graphs

Mar 17, 2022

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Algorithms for Planar Graphs

Algorithms for Planar Graphs

Jeff Erickson University of Illinois, Urbana-Champaign

CIMAT, Guanajuato, Mexico September 10, 2018

Page 2: Algorithms for Planar Graphs

!"#$%#&$%'&()#%*+,-%.

Page 3: Algorithms for Planar Graphs
Page 4: Algorithms for Planar Graphs

Planar Graphs

‣ A graph is planar if it can be drawn in the plane without edge crossings

▹ Vertices = points

▹ Edges = simple disjoint curves

2. PLANAR GRAPHS

planar embeddingplanar graphplane graphstereographic

projectionface!of a planar

embeddingouter face

2.2 Planar Graphs 1

Embeddings 2

A planar embedding of a graph G is a continuous injective function from the topological 3

graph G> to the plane. More explicitly, a planar embedding maps the vertices of G to 4

distinct points in the plane and maps the edges of G to simple paths in the plane between 5

the images of their endpoints, such that the paths do not intersect except at common 6

endpoints. A planar graph is an abstract graph that has at least one planar embedding. 7

Somewhat confusingly, a planar embedding of a planar graph is also called a plane 8

graph. 9

w

z

x

v

u

y

w

z

x

y

v

u

A planar graph G. A planar embedding of G.

For many proofs, it is actually more natural to consider graph embeddings on the 10

sphere S2 = {(x , y, z) | x2 + y2 + z2 = 1} instead of the plane. Consider the standard 11

stereographic projection map st: S2\(0, 0, 1)! R2, where st(x , y, z) :=� x

1�z , y1�z

�. The 12

projection st(p) of any point p 2 S2 \ (0,0,1) is the intersection of the line through p 13

and the “north pole” (0, 0, 1) with the x y-plane. Given any spherical embedding, if we 14

rotate the sphere so that the embedding avoids (0,0, 1), stereographic projection gives 15

us a planar embedding; conversely, given any planar embedding, inverse stereographic 16

projection immediately gives us a spherical embedding. Thus, a graph is planar if and 17

only if it has an embedding on the sphere. 18

Stereographic projection.

The components of the complement of the image of a planar or spherical embedding 19

are called the faces of the embedding. The Jordan curve theorem implies that every 20

face of a spherical embedding of a connected graph is homeomorphic to an open disk. A 21

planar embedding of a connected graph has a single unbounded outer face, which is 22

6

Page 5: Algorithms for Planar Graphs
Page 6: Algorithms for Planar Graphs
Page 7: Algorithms for Planar Graphs

!"#$%"&'($)*+,(-*"+"&./0)&12!&3)4&12! 5)4&12!&/6)4&12! 7*%%(-&/889:

Page 8: Algorithms for Planar Graphs

!"#$%"&'($)*+,(-*"+"&./0)&12!&3)4&12! 5)4&12!&/6)4&12! 7*%%(-&/889:

Page 9: Algorithms for Planar Graphs

!"#$%"&'($)*+,(-*"+"&./0)&12!&3)4&12! 5)4&12!&/6)4&12! 7*%%(-&/889:

Page 10: Algorithms for Planar Graphs
Page 11: Algorithms for Planar Graphs
Page 12: Algorithms for Planar Graphs

.;"00*+*&/9<<:

Page 13: Algorithms for Planar Graphs

.;"00*+*&/9<<:

Page 14: Algorithms for Planar Graphs

.=">*(0&?@/3:

Page 15: Algorithms for Planar Graphs

p na vr

c

(a) (b) (c) (d) (e)

Figure 1: Main stages of our method for mesh reconstruction from scattered data.

Figure 2: The Stanford Lucy model is reconstructed as a mesh frompoint scattered data. Left: a triangle mesh approximating the Lucystatue. Right: zoomed parts of the Lucy mesh (the head and and afoot) are shown in order to demonstrate a high quality of the mesh.

Figure 3: Left: ten range scans of the Stanford bunny model arerendered as a cloud of points. Middle: a zoomed part of bunny' sear, noise is visible. Right: the same part on the mesh reconstructedby our method, noise is eliminated, small features are accuratelyreconstructed, and the mesh triangles have good aspect ratios.

Often scattered points are assigned with a certain con� dence mea-sure [Turk and Levoy 1994; Curless and Levoy 1996]. If ci ∈ [0; 1]

Figure 4: Meshing of noisy point data sampled from a model withsharp features. The model (octa-� ower implicit surface) was poly-gonized with by the marching cubes algorithm and then corruptedby random noise. Left: a triangle mesh connecting the originalpoints accurately. Right: our method reconstructs the sharp edgesand corners of the model using a much smaller number of verticesthan the original marching cubes mesh has.

indicates the con� dence of pi ∈ P , we assign the weight

wi = ci ai (2)

to point pi, i = 1; : : : ; N. We set ci = 1 if no con� dence measure isattributed to point pi.To approximate P by a mesh we need to estimate unit normalsN = f n1 ; ¢ ¢ ¢ ; nN g at the points of P . Often scattered points arealready equipped with unit normals which are directly estimatedfrom range scans. If normals N are not provided, we estimatethem using a standard covariance-based technique [Gumhold et al.2001]. In our approach, the normals need not to be consistent withthe surface orientations.

3 Adaptive Spherical Cover and Mesh Gen-eration

In this section, we explain the core part of our method: creating anadaptive spherical cover ofP and generating a meshM approxi-mating scattered pointsP .

3.1 Control for Overlapping

To build an adaptive spherical cover ofP we use a simpli� ed ver-sion of the approach proposed Wu and Kobbelt [Wu and Kobbelt2004] for generating an approximately minimal set of splats cover-ing the whole surface. Our spherical cover consists of spheres cen-tered at f c1 ; : : : ; cM g ⊂ P and the radii of the spheres f r1 ; : : : ; rM gare chosen adaptively.

Step 1. Set all points inP as uncovered.

62

.A4)"B(C&D(%E"(>C&F(*G(%&?@@3:

Page 16: Algorithms for Planar Graphs
Page 17: Algorithms for Planar Graphs

Planar embedding

‣ Vertices = points

‣ Edges = simple interior-disjoint curves

w

z

x

v

u

y

w

z

x

y

v

u w

z

x

y

v

u

Page 18: Algorithms for Planar Graphs

Incidence list

‣ Each edge represented by two directed edges or darts

‣ Each vertex v stores the list of darts into v

‣ Each dart stores successor, reversal, and tail vertex

w

z

x

v

u

y

v yz w

x u

u z x z

v y w

z u x

u z wyw z

u

v

w

x

y

z

Page 19: Algorithms for Planar Graphs

wz

x

y

v

u w

z

x

y

v

u

Rotation system

‣ Counterclockwise order of edges incident to each vertex

‣ Specifies the embedding of G on the sphere, up to (ambient) isotopy

[Hamilton 1856] [Kirkman 1856] [Cayley 1857] [Heffter 1891] [Brückner 1900]....

Page 20: Algorithms for Planar Graphs

wz

x

y

v

u w

z

x

y

v

u

Rotation system

‣ Counterclockwise order of edges incident to each vertex

‣ Specifies the embedding of G on the sphere, up to (ambient) isotopy

[Hamilton 1856] [Kirkman 1856] [Cayley 1857] [Heffter 1891] [Brückner 1900]....

Page 21: Algorithms for Planar Graphs

Ordered incidence list

‣ Record the rotation system in the incidence list

w yz v

u x

u x z z

v y w

x u z

z y wwu z

u

v

w

x

y

z

wz

x

y

v

u w

z

x

y

v

u

Page 22: Algorithms for Planar Graphs

:;."&'8

%."&0$:25,"$;&5:8$*$85*$5$,5/@&52$&C#"$:25,"$;&5:8$*DP! ."&/'("*$+#$*D$K$#5("*$+#$*! "H;"*$+#$*D$K$"H;"*$+#$*! #5("*$+#$*D$K$."&/'("*$+#$*

u*

v*

f* g*f g

u

v

Page 23: Algorithms for Planar Graphs

:;."&'8

%."&0$:25,"$;&5:8$*$85*$5$,5/@&52$&C#"$:25,"$;&5:8$*DP! ."&/'("*$+#$*D$K$#5("*$+#$*! "H;"*$+#$*D$K$"H;"*$+#$*! #5("*$+#$*D$K$."&/'("*$+#$*

u*

v*

f* g* f g

u

v

Page 24: Algorithms for Planar Graphs

! >8"$*59"$+&H"&"H$',('H",("$2'*/$",(+H"*$E/'F0*05,H0*DQ

<$+/2=+4.'.+*'%;6';%2

(C@@RM&N$K$%:)M(C@@M&NN

head(d)

d

succ(d)

d

right(d)

succ⇤ (d)

d

succ⇤(d)head⇤(d)

Page 25: Algorithms for Planar Graphs

>$/'%.6'&$/+⇔+:2"2'&$/

! G:":'.$H$5,$"H;"$9"&;"*$/8"$<#@:($+,$4+/8$(.&:(

! 8/$'%#@'.$H$5,$"H;"$9"&;"*$/8"$):%'.@:($5/$4+/8$:$&(

Page 26: Algorithms for Planar Graphs

>$/'%.6'&$/+⇔+:2"2'&$/

! G:":'.$H$5,$"H;"$9"&;"*$/8"$<#@:($+,$4+/8$(.&:(

! 8/$'%#@'.$H$5,$"H;"$9"&;"*$/8"$):%'.@:($5/$4+/8$:$&(

Page 27: Algorithms for Planar Graphs

>86"2*+⇔+>;'*

! =$@C'$*":5&5/"*$/8"$):%'.@:($+,$+,"$*'H"$#&+9$/8"$+/8"&$

! =$@9@":$*":5&5/"*$/8"$<#@:($+,$+,"$*'H"$#&+9$/8"$+/8"&$" S40$/8"$!+&H5,$(@&."$/8"+&"9

s*t*

st

+IF.'$:901=JK5

Page 28: Algorithms for Planar Graphs

?%22@6$'%22+426$)1$*&'&$/

! T"/$L$4"$5,$5&4'/&5&0$*:5,,',;$/&""$+#$*Q$

! >8",$8R K$M*0U$LNR$'*$5$*:5,,',;$/&""$+#$*RQ$" L$'*$(+,,"(/"H$! 8R$'*$5(0(2'($

" L$'*$5(0(2'($! 8R$'*$(+,,"(/"H

+M/$0N'#C&'012O;5

Page 29: Algorithms for Planar Graphs

?%22@6$'%22+426$)1$*&'&$/

! T"/$8R$4"$5,$5&4'/&5&0$*:5,,',;$/&""$+#$*RQ$

! >8",$L$K$M*R U$8RNR$'*$5$*:5,,',;$/&""$+#$*Q$" 8R$'*$(+,,"(/"H$! L0'*$5(0(2'($

" 8R$'*$5(0(2'($! L0'*$(+,,"(/"H

+M/$0N'#C&'012O;5

Page 30: Algorithms for Planar Graphs

A;"2%B*+C$%);".

! V+&$"."&0$:25,5&$;&5:8$I'/8$M$."&/'("*3$P$"H;"*3$5,H$Q$#5("*PV+&$"."&0$:25,5&$;&5:8$I'/8$M$."&/'("*3$M$."&/'("*3$M P$"H;"*3$5,H$P$"H;"*3$5,H$P

&&/&!&0&"&1&# $%%

Page 31: Algorithms for Planar Graphs

A;"2%B*+C$%);".

! V+&$"."&0$:25,5&$;&5:8$I'/8$M$."&/'("*3$P$"H;"*3$5,H$Q$#5("*PV+&$"."&0$:25,5&$;&5:8$I'/8$M$."&/'("*3$M$."&/'("*3$M P$"H;"*3$5,H$P$"H;"*3$5,H$P

&&/&!&0&"&1&# $%%

-%$$,D

! V'B$5$/&""6(+/&""$H"(+9:+*'/'+,$ML3$8NQ$

! L 85* MWD$"H;"*Q$! 8R$85*$QWD$"H;"*Q$! >8@*3$P$K$MMWDN$X$MQWDNQ

+M/$0N'#C&'012O;5

Page 32: Algorithms for Planar Graphs

Easy Consequences

‣ For any planar triangulation, E = 3V–6 and F = 2V–4 ▹ Every face has exactly three sides

‣ For any simple planar graph, E ≤ 3V–6 and F ≤ 2V–4 ▹ No loops or parallel edges ▹ Subgraph of a triangulation

‣ Every simple planar graph has a vertex of degree ≤ 5 ▹ ... at least 4 vertices of degree ≤ 5 ▹ ... either a vertex of degree ≤ 3 or a face of degree ≤ 3

Page 33: Algorithms for Planar Graphs

!"#$%#&$%'&()#%*+,-%.

Page 34: Algorithms for Planar Graphs

G&/&);)+*1.//&/#+'%22*

Page 35: Algorithms for Planar Graphs

Tarjan’s red-blue rule

‣ For each cycle in G, color the heaviest edge red.

‣ For each cut in G, color the lightest edge blue.

‣ Every edge of G is either red or blue but not both.

‣ The blue edges define the minimum spanning tree of G.

[Tarjan 1983]

Page 36: Algorithms for Planar Graphs

Tarjan’s red-blue algorithm

‣While G has at least one edge, either delete any red edge or contract any blue edge.

‣ Contracted edges = minimum spanning tree of G.

[Tarjan 1983]

Page 37: Algorithms for Planar Graphs

Textbook MST algorithms

‣ Borůvka: Contract lightest edge incident to each vertex, delete heavy parallel edges, and (if any edges left) recurse.

‣ Jarník/Prim: Fix a vertex v. Contract lightest edge incident to v, delete heavy parallel edges, and (if edges left) recurse.

‣ Kruskal: For all edges in increasing weight order: If the current edge is a loop, delete it; otherwise, contract it.

[Tarjan 1983]

Page 38: Algorithms for Planar Graphs

...in planar graphs

‣ For each cycle in G, color the heaviest edge red.

‣ For each cut in G, color the lightest edge blue.

‣ The blue edges define the minimum spanning tree of G.

‣ For each cut in G*, the heaviest edge is red.

‣ For each cycle in G*, the lightest edge is blue.

‣ The red edges define the maximum spanning tree of G*.

Page 39: Algorithms for Planar Graphs

Tarjan’s red-blue algorithm

‣While G has at least one edge, either delete any red edge or contract any blue edge.

‣ Contracted edges = minimum spanning tree of G.

‣ Deleted edges = maximum spanning tree of G*.

Page 40: Algorithms for Planar Graphs

Borůvka’s algorithm

‣While G has at least one edge ▹ For each vertex v

• Contract the lightest edge incident to v (which must be blue) ▹ Delete any heavy parallel edges (which must be red)

‣ All contractions in the first iteration take O(E) = O(V) time

‣ All deletions in the first iteration take O(E) = O(V) time

‣ Each iteration removes at least half the vertices.

‣ So overall running time is O(V)

[Borůvka 1928]

Page 41: Algorithms for Planar Graphs

G.%2PB*+."#$%&'()

!`8'2"$?$85*$5/$2"5*/$+,"$"H;"$" d'()$5,0$."&/"B$)0I'/8$H";&""$5/$9+*/$_$" 8/$'%#@'$/8"$2';8/"*/$"H;"$',('H",/$/+$)$MI8'(8$9@*/$4"$E"C:N$" G:":':$5,0$8"5.0$:5&522"2$"H;"*$MI8'(8$9@*/$4"$%:&N$

! %5(8$'/"&5/'+,$/5)"*$cMDN$/'9"3$*+$/+/52$&@,,',;$/'9"$'*$cMMNQ

I'/8$H";&""$5/$9+*/$_$

=,0$(+,*/5,/$I'22$I+&)$8"&"

+U#%:V0KAA45

Page 42: Algorithms for Planar Graphs

Matsui’s algorithm

‣While G has at least one edge

▹ If G has a vertex v of degree at most 3 • If v is incident to a loop, delete the loop • Else contract the lightest edge incident to v

▹ If G has a face f with degree at most 3 • If f is incident to a bridge, contract the bridge • Else delete the heaviest edge incident to f

‣ Each iteration takes O(1) time, so total running time is O(V).

[Matsui 1995]

Page 43: Algorithms for Planar Graphs

!"#$%#&$%'&()#%*+,-%.

Page 44: Algorithms for Planar Graphs

Straight-line embedding

‣ Every planar embedding of a simple planar graph G is equivalent to an embedding where every edge is a straight line segment.[Steinitz 1916, Wagner 1936, Fáry 1948, Stein 1951, Stojaković 1959]

Page 45: Algorithms for Planar Graphs

Straight-line embedding

‣ Suppose G is a triangulation.

‣ Delete any vertex of degree ≤ 5 and retriangulate the hole

‣ Recursively embed the remaining graph ▹ Base case: Embed 3-cycle as a triangle

‣ Reinsert vertex in resulting polygonal hole

Page 46: Algorithms for Planar Graphs

Straight-line embedding

‣ Suppose G is a triangulation.

‣ Delete any vertex of degree ≤ 5 and retriangulate the hole

‣ Recursively embed the remaining graph ▹ Base case: Embed 3-cycle as a triangle

‣ Reinsert vertex in resulting polygonal hole

Page 47: Algorithms for Planar Graphs

Straight-line embedding

‣ Suppose G is a triangulation.

‣ Delete any vertex of degree ≤ 5 and retriangulate the hole

‣ Recursively embed the remaining graph ▹ Base case: Embed 3-cycle as a triangle

‣ Reinsert vertex in resulting polygonal hole

Page 48: Algorithms for Planar Graphs

Straight-line embedding

‣ Suppose G is a triangulation.

‣ Delete any vertex of degree ≤ 5 and retriangulate the hole

‣ Recursively embed the remaining graph ▹ Base case: Embed 3-cycle as a triangle

‣ Reinsert vertex in resulting polygonal hole

Page 49: Algorithms for Planar Graphs

Schnyder wood

‣WLOG suppose G is a triangulation

‣ Color the outer vertices red, green, and blue

‣ Direct and color the interior edges as follows:

1

4 9

11

7

2

8

6

10

5

3

[Schnyder 1990]

Page 50: Algorithms for Planar Graphs

Schnyder wood

‣ Recursive construction:

[Schnyder 1990]

Page 51: Algorithms for Planar Graphs

Schnyder wood

‣ The edges of each color induce a directed spanning tree of the interior vertices, rooted at the outer vertex of that color.

1

4 9

11

7

2

8

6

10

5

3

[Schnyder 1990]

Page 52: Algorithms for Planar Graphs

Schnyder wood

‣ The edges of each color induce a directed spanning tree of the interior vertices, rooted at the outer vertex of that color.

▹ Each tree has V–2 vertices and V–3 edges

▹ So G has 3(V–3) + 3 = 3V–6 edges

▹ We just proved Euler’s formula again! 1

4 9

11

7

2

8

6

10

5

3

[Schnyder 1990]

Page 53: Algorithms for Planar Graphs

K6(/842%+6$$%4&/.'2*

! f'&"(/"H$:5/8*$#&+9$"5(8$."&/"B$:5&/'/'+,$/8"$#5("*$+#$?

QRS+TUS+VW

+N@F$9&:%01==A5

Page 54: Algorithms for Planar Graphs

! 1,/"&:&"/',;$#5("$(+@,/*$5*$45&0(",/&'($(++&H',5/"*$;'."*$@*$5$*/&5';8/62',"$"94"HH',;$+#$*$+,$5$MF$W\NhMF$W\N$;&'HQ

0%&4+2)3244&/#

22

21

20

19

18

17

16

15

14

13

12

11

10

9

8

7

6

5

4

3

2

1

2221

2019

1817

1615

1413

1211

109

87

65

43

21

22212019181716151413121110987654321

1110

1

4

97

2

8

6

5

3

+N@F$9&:%01==A5

Page 55: Algorithms for Planar Graphs

! -*',;$5$*'9'25&$:5&/'/'+,',;$+#$/8"$."&/'("*3$I"$(5,$"94"H$*+,$5,$M$WDNhM$WDN$;&'HQ

0%&4+2)3244&/#

121110987654321

1211

109

87

65

43

21

12

11

10

9

8

7

6

5

4

3

2

111

10

1

4

9

7

2

8

6

5

3

+N@F$9&:%01==A5

Page 56: Algorithms for Planar Graphs

!"#$%#&$%'&()#%*+,-%.

Page 57: Algorithms for Planar Graphs

Separators

‣ A separator of an n-vertex graph G is a subset S of vertices where each component of G\S has at most 2n/3 vertices.

‣ Used in lots of divide-and-conquer algorithms

T(n) ≤ T(n/3) + T(2n/3) + f(n)

⟹ T(n) =O(n) if f(n) = O(n1−ε)O(n log n) if f(n) = Θ(n)O( f(n)) if f(n) = Ω(n1+ε)

Page 58: Algorithms for Planar Graphs

Easy separators

‣ Paths: One vertex

Page 59: Algorithms for Planar Graphs

Easy separators

‣ Paths: One vertex

‣ Cycles: Two vertices

Page 60: Algorithms for Planar Graphs

Easy separators

‣ Paths: One vertex

‣ Cycles: Two vertices

‣ Trees: One vertex [Jordan 1869]

Page 61: Algorithms for Planar Graphs

Easy separators

‣ Paths: One vertex

‣ Cycles: Two vertices

‣ Trees: One vertex [Jordan 1869]

‣ Outer-planar graphs: Two vertices

Page 62: Algorithms for Planar Graphs

Easy separators

‣ Paths: One vertex

‣ Cycles: Two vertices

‣ Trees: One vertex [Jordan 1869]

‣ Outer-planar graphs: Two vertices

‣ √n×√n grid: √n vertices

Page 63: Algorithms for Planar Graphs

Easy separators

‣ Paths: One vertex

‣ Cycles: Two vertices

‣ Trees: One vertex [Jordan 1869]

‣ Outer-planar graphs: Two vertices

‣ √n×√n grid: √n vertices

Page 64: Algorithms for Planar Graphs

G24&./+MCK+"2O2"

! T"/$L$4"$5$4&"5H/86L&*/$*"5&(8$/&""$&++/"H$5/$5,0$."&/"BQ$! T"/$M&$4"$/8"$*"/$+#$."&/'("*$I'/8$H":/8$&Q$! T"/$Mk&$4"$/8"$*"/$+#$."&/'("*$I'/8$H":/8$2"**$/85,$&Q$

! T"/$&$4"$/8"$25&;"*/$',/";"&$*@(8$/85/$lMk&l$k01iFQ$

! >8",$M&$'*$5$*":5&5/+&Q$

! -,#+&/@,5/"203$M&$950$4"$."&0$25&;"Qk$iF

k$iF

&

Page 65: Algorithms for Planar Graphs

Fundamental cycle separator

‣ Suppose G is a planar triangulation.

Page 66: Algorithms for Planar Graphs

Fundamental cycle separator

‣ Suppose G is a planar triangulation.

‣ Let (T, C) be an arbitrary tree-cotree decomposition.

Page 67: Algorithms for Planar Graphs

Fundamental cycle separator

‣ Suppose G is a planar triangulation.

‣ Let (T, C) be an arbitrary tree-cotree decomposition.

‣ Each vertex in C* has degree ≤ 3.

Page 68: Algorithms for Planar Graphs

Fundamental cycle separator

‣ Suppose G is a planar triangulation.

‣ Let (T, C) be an arbitrary tree-cotree decomposition.

‣ Each vertex in C* has degree ≤ 3.

Page 69: Algorithms for Planar Graphs

Fundamental cycle separator

‣ Suppose G is a planar triangulation.

‣ Let (T, C) be an arbitrary tree-cotree decomposition.

‣ Each vertex in C* has degree ≤ 3.

‣ There is an edge e such that each component of C*\e* has at most 2F/3 dual vertices.

Page 70: Algorithms for Planar Graphs

Fundamental cycle separator

‣ Suppose G is a planar triangulation.

‣ Let (T, C) be an arbitrary tree-cotree decomposition.

‣ Each vertex in C* has degree ≤ 3.

‣ There is an edge e such that each component of C*\e* has at most 2F/3 dual vertices.

‣ Then cycle(T,e) is a (dual) separator of size ≤ 2 depth(T) + 1.

Page 71: Algorithms for Planar Graphs

Fundamental cycle separator

‣ Suppose G is a planar triangulation.

‣ Let (T, C) be an arbitrary tree-cotree decomposition.

‣ Each vertex in C* has degree ≤ 3.

‣ There is an edge e such that each component of C*\e* has at most 2F/3 dual vertices.

‣ Then cycle(T,e) is a (dual) separator of size ≤ 2 depth(T) + 1.

Page 72: Algorithms for Planar Graphs

Fundamental cycle separator

‣ Suppose G is a planar triangulation.

‣ Let (T, C) be an arbitrary tree-cotree decomposition.

‣ Each vertex in C* has degree ≤ 3.

‣ There is an edge e such that each component of C*\e* has at most 2F/3 dual vertices.

‣ Then cycle(T,e) is a (dual) separator of size ≤ 2 depth(T) + 1.

Page 73: Algorithms for Planar Graphs

-"./.%+*21.%.'$%*

! C@::+*"$*$'*$5$:25,5&$/&'5,;@25/'+,a$2"/$L$4"$5$gVC$/&""Q$

! V',H$9"H'5,$2"."2$RQ

R

k$iF

]$iF

+^.!'/$0L#%R#$0_;;5

Page 74: Algorithms for Planar Graphs

^Fj$

-"./.%+*21.%.'$%*

! C@::+*"$*$'*$5$:25,5&$/&'5,;@25/'+,a$2"/$L$4"$5$gVC$/&""Q$

! V',H$9"H'5,$2"."2$RQ$

! V',H$2"."2*$M.$5,H$M7$I'/8$^j$$,+H"*$I8"&"$RWj$0^$.0k$R0k$70^$RXj$Q

k$iF

]$iF

R

.

7

^j$

^j$

+^.!'/$0L#%R#$0_;;5

Page 75: Algorithms for Planar Graphs

^Fj$

-"./.%+*21.%.'$%*

! C@::+*"$*$'*$5$:25,5&$/&'5,;@25/'+,a$2"/$L$4"$5$gVC$/&""Q$

! V',H$9"H'5,$2"."2$RQ

! V',H$2"."2*$M.$5,H$M7$I'/8$^j$$,+H"*$I8"&"$RWj$0^$.0k$R0k$70^$RXj$Q$

! 8/$'%#@'$2"."2*$k.$5,H$&:":':$2"."2*$n7$/+$+4/5',$*M.3$7oQ$

! N$K$#@,HQ$(0(2"$*":5&5/+&$+#$*M.3$7oQ$

! N!M.!M7$'*$5$*":5&5/+&$+#$*'m"$cMj$NQ

+^.!'/$0L#%R#$0_;;5

Page 76: Algorithms for Planar Graphs

-"./.%+*21.%.'$%*

! C@::+*"$*$'*$5$:25,5&$/&'5,;@25/'+,a$2"/$L$4"$5$gVC$/&""Q$

! V',H$9"H'5,$2"."2$RQ

! V',H$2"."2*$M.$5,H$M7$I'/8$^j$$,+H"*$I8"&"$RWj$0^$.0k$R0k$70^$RXj$Q$

! 8/$'%#@'$2"."2*$k.$5,H$&:":':$2"."2*$n7$/+$+4/5',$*M.3$7oQ$

! N$K$#@,HQ$(0(2"$*":5&5/+&$+#$*M.3$7oQ$

! N!M.!M7$'*$5$*":5&5/+&$+#$*'m"$cMj$NQ

^Fj$

^j$

^j$

+^.!'/$0L#%R#$0_;;5

Page 77: Algorithms for Planar Graphs

Extensions

‣ Planar triangulations have cycle separators of size O(√n).[Miller ’84 ’86]

Page 78: Algorithms for Planar Graphs

Extensions

‣ Planar triangulations have cycle separators of size O(√n).[Miller ’84 ’86]

‣ Separator hierarchy: Recursively separate both components

Page 79: Algorithms for Planar Graphs

Extensions

‣ Planar triangulations have cycle separators of size O(√n).[Miller ’84 ’86]

‣ Separator hierarchy: Recursively separate both components

▹ Cutting across the hierarchy gives us an r-division: n/r pieces, each with O(r) vertices and adjacent to O(√r) shallower separator vertices[Frederickson ’87]

Page 80: Algorithms for Planar Graphs

Extensions

‣ Planar triangulations have cycle separators of size O(√n).[Miller ’84 ’86]

‣ Separator hierarchy: Recursively separate both components

▹ Cutting across the hierarchy gives us an r-division: n/r pieces, each with O(r) vertices and adjacent to O(√r) shallower separator vertices[Frederickson ’87]

▹ For cycle separator hierarchies: Each piece is a disk with O(1) holes.[Klein Subramanian ’08]

Page 81: Algorithms for Planar Graphs

Extensions

‣ Planar triangulations have cycle separators of size O(√n).[Miller ’84 ’86]

‣ Separator hierarchy: Recursively separate both components

▹ Cutting across the hierarchy gives us an r-division: n/r pieces, each with O(r) vertices and adjacent to O(√r) shallower separator vertices[Frederickson ’87]

▹ For cycle separator hierarchies: Each piece is a disk with O(1) holes.[Klein Subramanian ’08]

▹ The entire hierarchy can be computed in O(n) time.[Klein Mozes Sommer ’13]

Page 82: Algorithms for Planar Graphs

!"#$%#&$%'&()#%*+,-%.

Page 83: Algorithms for Planar Graphs

K($%'2*'+1.'(*+=&'(+.%3&'%.%8+=2&#('*

! 1#$5,0$"H;"*$85."$,";5/'."$I"';8/3$f'A)*/&5p*$52;+&'/89$,+$2+,;"&$I+&)*$M5/$2"5*/$,+/$e@'()20N$

! g@/$>:""-#$`Q/%&$52I50*$I+&)*$',$cMMPN$/'9"P

2+,;"&$I+&)*$M5/$2"5*/$,+/$e@'()20N$

>:""-#$`Q/%&$52I50*$I+&)*$',$cM>:""-#$`Q/%&$52I50*$I+&)*$',$cM>:""-#$`Q/%& MPN$/'9"PMPN$/'9"PMP

H'*/M*N$" E$#+&$522$."&/'("*$.$q$*$

H'*/M.N$" r$

&":"5/$J$/'9"*$#+&$"5(8$"H;"$@#.$

'#$H'*/M.N$n$H'*/M@N$X$IM@#.N$H'*/M.N$" H'*/M@N$X$IM@#.N$$

+NF.-E:"0_3OX0Q/%&0_34X0U//%:0_3;X0I//&EC%90G#$'W.H0_3;X0>:""-#$0_32X0U.$'90_325

Page 84: Algorithms for Planar Graphs

K($%'2*'+1.'(*+=&'(+/2#.'&O2+24#2*

! C@::+*"$I"$I5,/$/+$(+9:@/"$&.('*M/3*N$K$H'*/5,("*$',$*#&+9$."&/"B$/$/+$522$."&/'("*$',$*Q

Go

+U:F"F/%$0N@F-.&'0_2J5

Page 85: Algorithms for Planar Graphs

K($%'2*'+1.'(*+=&'(+/2#.'&O2+24#2*

! C@::+*"$I"$I5,/$/+$(+9:@/"$&.('*M/3*N$K$H'*/5,("*$',$*#&+9$."&/"B$/$/+$522$."&/'("*$',$*Q

! V',H$5$*":5&5/+&$NX0*:2'//',;$* ',/+ ^ 5,H aQ$$d'()$,"I$*+@&("$."&/"B$($',$NQ

S

Go

+U:F"F/%$0N@F-.&'0_2J5

Page 86: Algorithms for Planar Graphs

K($%'2*'+1.'(*+=&'(+/2#.'&O2+24#2*

! C@::+*"$I"$I5,/$/+$(+9:@/"$&.('*M/3*N$K$H'*/5,("*$',$*#&+9$."&/"B$/$/+$522$."&/'("*$',$*Q

! V',H$5$*":5&5/+&$NX0*:2'//',;$* ',/+ ^ 5,H aQ$$d'()$,"I$*+@&("$."&/"B$($',$NQ

S S

L Rs s

o

+U:F"F/%$0N@F-.&'0_2J5

Page 87: Algorithms for Planar Graphs

S S

L Rs s

o

K($%'2*'+1.'(*+=&'(+/2#.'&O2+24#2*

! O"(@&*'."20$(+9:@/" &.('^M(3^N$5,H$&.('aM(3aNQ

+U:F"F/%$0N@F-.&'0_2J5

Page 88: Algorithms for Planar Graphs

K($%'2*'+1.'(*+=&'(+/2#.'&O2+24#2*

! O"(@&*'."20$(+9:@/" &.('^M(3^N$5,H$&.('aM(3aNQ

! O"I"';8/$^$5,H$a$*+$"H;"*$5&"$,+,6,";5/'."3$5,H$(+9:@/"$&.('^MN3^N$5,H$&.('aMN3aN$.'5$f'A)*/&5Q$! cM$ZiF$2+;$$N$/'9"

S S

L Rs s

o

+U:F"F/%$0N@F-.&'0_2J5

Page 89: Algorithms for Planar Graphs

K($%'2*'+1.'(*+=&'(+/2#.'&O2+24#2*

! 7+9:@/"$&.('*M(3NN$#&+9$&.('^MN3NN$5,H$&.('aMN3NN$.'5$g"2295,6V+&HQ$

" 7+9:2"/"$;&5:8$+,$cMj$N$."&/'("*$! cM$ZiFN$/'9"

S

Gs

o

GGGGGGGGGGGGGGS

s

+U:F"F/%$0N@F-.&'0_2J5

Page 90: Algorithms for Planar Graphs

S

Gs

o

v

K($%'2*'+1.'(*+=&'(+/2#.'&O2+24#2*

! 7+9:@/"$&.('*M(3*N$40$4&@/"$#+&(" ! cM$ZiFN$/'9"$" 1#$)"^3$/8",$&.('*M(3)N$K$9','"N &.('*M(3'N$X$&.('^M'3)NQ$

" 1#$)"a3$/8",$&.('*M(3)N$K$9','"N &.('*M(3'N$X$&.('aM'3)NQ

+U:F"F/%$0N@F-.&'0_2J5

Page 91: Algorithms for Planar Graphs

Gs

o

K($%'2*'+1.'(*+=&'(+/2#.'&O2+24#2*

! 7+9:@/"$&.('*M(3*N$40$4&@/"$#+&(" ! cM$ZiFN$/'9"$" 1#$)"^3$/8",$&.('*M(3)N$K$9','"N &.('*M(3'N$X$&.('^M'3)NQ$

" 1#$)"a3$/8",$&.('*M(3)N$K$9','"N &.('*M(3'N$X$&.('aM'3)NQ

+U:F"F/%$0N@F-.&'0_2J5

Page 92: Algorithms for Planar Graphs

Gs

o

K($%'2*'+1.'(*+=&'(+/2#.'&O2+24#2*

! V',52203$&"I"';8/$*$*+$"H;"*$5&"$,+,6,";5/'."3$5,H$(+9:@/"$&.('*M/3*N$.'5$f'A)*/&5Q

+U:F"F/%$0N@F-.&'0_2J5

Page 93: Algorithms for Planar Graphs

K($%'2*'+1.'(*+=&'(+/2#.'&O2+24#2*

! V',52203$&"I"';8/$*$*+$"H;"*$5&"$,+,6,";5/'."3$5,H$(+9:@/"$&.('*M/3*N$.'5$f'A)*/&5Q

Go

+U:F"F/%$0N@F-.&'0_2J5

Page 94: Algorithms for Planar Graphs

K($%'2*'+1.'(*+=&'(+/2#.'&O2+24#2*

! V',52203$&"I"';8/$*$*+$"H;"*$5&"$,+,6,";5/'."3$5,H$(+9:@/"$&.('*M/3*N$.'5$f'A)*/&5Q

Go

! ?$'."D LM$N$^$LM$iZN$X$LMF$iZN$X$cM$ZiF$2+;$$N$K$;<-=>$%2.7%-?

+U:F"F/%$0N@F-.&'0_2J5

Page 95: Algorithms for Planar Graphs

Further tricks

‣Multiple-source shortest paths: We can (implicitly) compute distL(S,L) and distR(S,R) in only O(n log n) time.

▹ Yes, even though there are O(n3/2) distances to compute!

▹ More details tomorrow!

[Klein ’05]

Page 96: Algorithms for Planar Graphs

C;%'(2%+'%&6J*

!<@2/':2"6*+@&("$*8+&/"*/$:5/8*P$`"$(5,$M'9:2'('/20N$(+9:@/"$&.('^MN3^N$5,H$&.('aMN3aN$',$+,20$cM$02+;$$N$/'9"Q$

" s"*3$".",$/8+@;8$/8"&"$5&"$cM$ZiFN$H'*/5,("*$/+$(+9:@/"t$

" <+&"$H"/5'2*$/+9+&&+It

S S

L Rs s

o

+6":.$0_A35

Page 97: Algorithms for Planar Graphs

C;%'(2%+'%&6J*

!U/$H:$:&+:"&/0P$g+@,H5&06/+64+@,H5&0$:5/8*$',$:25,5&$;&5:8*$5&"$*8+&/"&$I8",$/8"0$H+,p/$(&+**Q$

!`"$(5,$@*"$/8'*$:&+:"&/0$/+$*:""H$@:$g"2295,6V+&H$*/5;"$#&+9$cM$ZiFN$/'9"$/+$cM$$2+;$$N$/'9"

+Q#7@F#%/:$!F/"0a#/0_A45

S

Gs

o

+U/$H:01;215 +NUbI60_2;50

D.6. The SMAWK algorithm

If M[t, S[t]] < M[t, k], then M[t, k] and everything above it is dead, so we cansafely push column k onto the stack (unless we already have t = n, in which case everyentry in column k is dead) and then increment k.

S[1]S[2]S[3] S[4]S[5] S[6] S[7] k

⇤ ⇤

On the other hand, if M[t,S[t]]> M[t, k], then we know that M[t, S[t]] and everythingbelow it is dead. But by the inductive hypothesis, every entry above M[t,S[t]] is alreadydead. Thus, the entire column S[t] is dead, so we can safely pop it o� the stack.

S[1]S[2]S[3] S[4]S[5] k

⇤ > ⇤

In both cases, all invariants are maintained.Immediately after every comparison M[t, S[t]]� M[t, k]? in the R����� algorithm,

we either increment the column index k or declare a column to be dead; each of theseevents can happen at most once per column. It follows that R����� performs at most 2n

comparisons and thus runs in O(n) time overall.Moreover, when R����� ends, every column whose index is not on the stack is

completely dead. Thus, to compute the leftmost minimum element in every row of M , itsu�ces to examine only the t < m columns with indices in the output array S[1 .. t].

Finally, the main SMAWK algorithm first R�����s the input array (if it has fewerrows than columns), then recursively computes the leftmost row minima in every other,and finally fills in the rest of the row minima in O(m+ n) additional time. The argument

��

Page 98: Algorithms for Planar Graphs

Shortest paths with negative edges

‣ Using several more advanced tricks, we can compute shortest paths in planar graphs with arbitrary edge weights in O(n log2 n / log log n) time.[Klein Mozes Weimann ’10, Mozes Wulff-Nilsen ’10]

▹ Multiple-source shortest paths [Klein ’05]

▹ Structured r-divisions instead of single separators[Klein Mozes Sommer ’13]

▹ Exploit Monge property in Bellman-Ford [Fakcharoenphol Rao ’06]

▹ Careful parameter balancing (r = n·α(n)/log n)

Page 99: Algorithms for Planar Graphs

!"#$%#&$%'&()#%*+,-%.

Page 100: Algorithms for Planar Graphs

?(./J+8$;X++K22+8$;+'$)$%%$=X