voronoi diagrams on planar graphs and computing the ...oren/publications/diameterslides.pdfa fresh...

51
Voronoi Diagrams on Planar Graphs and Computing the Diameter in Deterministic Õ(n 5/3 ) time Pawel Gawrychowski, Haim Kaplan, Shay Mozes, Micha Sharir and Oren Weimann

Upload: others

Post on 04-Jul-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

Voronoi Diagrams on Planar Graphs and Computing the

Diameter in Deterministic Õ(n5/3) time

Pawel Gawrychowski, Haim Kaplan, Shay Mozes, Micha Sharir and Oren Weimann

Page 2: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

Voronoi diagrams

Voronoi1908

Descartes1644

Dirichlet1850

Page 3: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

Voronoi diagrams on planar graphs

Page 4: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

Voronoi diagrams on planar graphs

Page 5: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

Voronoi diagrams on planar graphs

Page 6: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

Voronoi diagrams on planar graphs

Page 7: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

A fresh idea in algorithms for planar graph

• Cabello’s breakthrough (best paper in SODA 2017) - • can quickly construct Voronoi diagrams on planar

graphs (using randomized incremental construction of abstract Voronoi diagrams)

• can use Voronoi diagrams to compute the diameter in sub-quadratic Õ(n11/6) randomized time

• Led to exciting developments in distance oracles for planar graphs [Cohen-Addad et al. FOCS17, next talk]

Page 8: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

This work

• construction of Voronoi diagrams on planar graphs - faster, deterministic, more general

• leads to a faster O(n5/3)-time algorithm for diameter

Page 9: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

Voronoi diagrams on planar graphs

Page 10: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

Additively weighted Voronoi diagram

wg

wb

wr

wy

Page 11: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

• compute an r-division: O(n/r) pieces, each with O(r) vertices and O(r1/2) boundary vertices

• there are three types of distances:• between a vertex and a boundary vertex• between two vertices in the same piece• between two vertices in different pieces

High-level approach for diameter

Page 12: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

High-level approach for diameter

• compute an r-division: O(n/r) pieces, each with O(r) vertices and O(r1/2) boundary vertices

• there are three types of distances:• between a vertex and a boundary vertex• between two vertices in the same piece• between two vertices in different pieces

w

Page 13: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

• compute an r-division: O(n/r) pieces, each with O(r) vertices and O(r1/2) boundary vertices

• there are three types of distances:• between a vertex and a boundary vertex• between two vertices in the same piece• between two vertices in different pieces

w

High-level approach for diameter

Page 14: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

• compute an r-division: O(n/r) pieces, each with O(r) vertices and O(r1/2) boundary vertices

• there are three types of distances:• between a vertex and a boundary vertex• between two vertices in the same piece• between two vertices in different pieces

w

High-level approach for diameter

Page 15: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

Dist. between vertices in different pieces

• already computed distances from v to boundary nodes of the other piece

• compute additively weighted Voronoi diagram for the other piece in Õ(r1/2) time

• use Voronoi diagram to return the node furthest from each boundary site in Õ(1) amortized time per site

• total Õ(n·n/r·r1/2) = Õ(n2/r1/2)

• requires Õ(n/r·r2) = O(nr) preprocessing

wg

wb

wr

wy

# vertices # pieces

Page 16: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

• compute an r-division• three types of distance:

• between a vertex and a boundary vertex O(n2/r1/2) time• between two vertices inside the same piece O(nr) time• between two vertices in different pieces Õ(nr + n2/r1/2) time

• setting r = n2/3 yields total running time of Õ(n5/3)

High-level approach for diameter

Page 17: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

Remainder of the talk: constructing Voronoi diagrams

Page 18: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

Voronoi vertices - adjacent to three different Voronoi cells

Page 19: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

Voronoi vertices - adjacent to three different Voronoi cells (= trichromatic faces)

Page 20: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

Voronoi diagram with b sites has b cells, O(b) Voronoi vertices, and O(b) Voronoi edges (by Euler’s formula).

Page 21: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

Bisectors - Voronoi diagram with just two sites

Page 22: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

Every Voronoi edge is a subpath of a bisector

Page 23: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

• Every Voronoi edge is a subpath of a bisector

• Every Voronoi vertex is the intersection of two bisectors

Strategy:

Page 24: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

• Every Voronoi edge is a subpath of a bisector

• Every Voronoi vertex is the intersection of two bisectors

• Precompute and store all possible bisectors (for all pairs of sites and all possible weights…)

Strategy:

Page 25: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

• Every Voronoi edge is a subpath of a bisector

• Every Voronoi vertex is the intersection of two bisectors

• Precompute and store all possible bisectors (for all pairs of sites and all possible weights…)

• Represent Voronoi edges as subpaths of bisectors

Strategy:

Page 26: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

• Every Voronoi edge is a subpath of a bisector

• Every Voronoi vertex is the intersection of two bisectors

• Precompute and store all possible bisectors (for all pairs of sites and all possible weights…)

• Represent Voronoi edges as subpaths of bisectors• Construct Voronoi diagram with b sites in Õ(b) time

using divide and conquer by intersecting bisectors

Strategy:

Page 27: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

Computing bisectors

Page 28: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

Computing bisectors• only depends on the

difference wb-wg

reminiscent of MSSP[Cabello, Chambers, Erickson]

wg

wb

Page 29: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

• only depends on the difference wb-wg

• as we increase wb-wg the bisector sweeps the graph

• changes occur at discrete critical values, where blue vertices become green

Computing bisectors

wg

wb

reminiscent of MSSP[Cabello, Chambers, Erickson]

Page 30: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

Computing bisectors

wg

wb• only depends on the

difference wb-wg • as we increase wb-wg the

bisector sweeps the graph• changes occur at discrete

critical values, where blue vertices become green reminiscent of MSSP

[Cabello, Chambers, Erickson]

Page 31: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

Computing bisectors

wg

wb• only depends on the

difference wb-wg • as we increase wb-wg the

bisector sweeps the graph• changes occur at discrete

critical values, where blue vertices become green reminiscent of MSSP

[Cabello, Chambers, Erickson]

Page 32: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

Computing bisectors

wg

wb• only depends on the

difference wb-wg • as we increase wb-wg the

bisector sweeps the graph• changes occur at discrete

critical values, where blue vertices become green reminiscent of MSSP

[Cabello, Chambers, Erickson]

Page 33: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

Computing bisectors

wg

wb• only depends on the

difference wb-wg • as we increase wb-wg the

bisector sweeps the graph• changes occur at discrete

critical values, where blue vertices become green reminiscent of MSSP

[Cabello, Chambers, Erickson]

Page 34: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

• as we increase wb-wg the bisector sweeps the graph

• changes occur at discrete critical values, where blue vertices become green

➡ In a graph with O(r) vertices there are only O(r) bisectors (for each pair of sites). can be computed in Õ(r) time

• for each pair of sites, all bisectors stored in Õ(r) space and time using persistent binary search trees

• for r1/2 sites total preprocessing Õ(r2) time and space

Computing bisectors

wg

wb

• compared to Õ(r3) time and space in Cabello’s

Page 35: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

Intersecting bisectors = finding trichromatic faces

• three sites with weights wb, wg, wg.

• want to find a face with one vertex in each of the Voronoi cells.

wg

wb

wr

wg

wb

wr

Page 36: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

Dynamics of trichromatic faces

wg

wb

wr=∞

• fix wb and wg, and gradually decrease wg.

Page 37: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

wg

wb

• fix wb and wg, and gradually decrease wg.

wr

Dynamics of trichromatic faces

Page 38: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

wg

wb

wr

wg

wb

wr

• fix wb and wg, and gradually decrease wg.

• as we decrease wr, the trichromatic face moves monotonically along the (g,b)-bisector.

Dynamics of trichromatic faces

Page 39: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

• fix wb and wg, and gradually decrease wg.

• as we decrease wr, the trichromatic face moves monotonically along the (g,b)-bisector.

wg

wb

wr

wg

wb

wr

Dynamics of trichromatic faces

Page 40: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

• fix wb and wg, and gradually decrease wg.

• as we decrease wr, the trichromatic face moves monotonically along the (g,b)-bisector.

wg

wb

wr

wg

wb

wr

Dynamics of trichromatic faces

Page 41: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

Finding trichromatic faces• as we decrease wr, the

trichromatic face moves monotonically along the (g,b)-bisector.

wg

wb

wr

wg

wb

wr

• given wb, wg, wr can determine in constant timewhether an edge has a red endpoint.

• binary search for the last edge on the (g,b)-bisector that has a red endpoint

• takes Õ(1) time• need to extend to groups of sites. Becomes much

more complicated

Page 42: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

• we have precomputed bisectors in Õ(r2) • we know how to find a trichromatic face in Õ(1)

time • we compute the weighted Voronoi diagram of r1/2

sites in Õ(r1/2) time using divide and conquer.

Constructing a Voronoi diagram

Page 43: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

Constructing diagram via divide and conquer

Page 44: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

Constructing diagram via divide and conquer

Page 45: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

Constructing diagram via divide and conquer

Page 46: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

rg

Page 47: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

rg g

b

r

b

Page 48: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

Combined diagram

Page 49: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

• since we can compute trichromatic vertices in Õ(1) time, we can merge two Voronoi diagrams with b1 and b2 sites in Õ(b1 + b2) time

• so constructing a Voronoi diagram with r1/2 sites takes Õ(r1/2) time

Constructing a Voronoi diagram

Page 50: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

• handling sites on more than one face (holes)

• mechanism for finding furthest vertex in a Voronoi cell (similar to Cabello’s)

Things I swept under the rug

Page 51: Voronoi Diagrams on Planar Graphs and Computing the ...oren/Publications/diameterSlides.pdfA fresh idea in algorithms for planar graph • Cabello’s breakthrough (best paper in SODA

Conclusion• efficient deterministic construction of Voronoi diagrams on

planar graphs • diameter of a planar graph in deterministic Õ(n5/3) time

• can we get below for Õ(n5/3) time diameter?• nearly linear time / (conditional) lower bounds? • what other problems can benefit from these techniques?