Near-optimal Algorithms for Shortest Paths in Weighted Unit-Disk - - PowerPoint PPT Presentation

near optimal algorithms for shortest paths in weighted
SMART_READER_LITE
LIVE PREVIEW

Near-optimal Algorithms for Shortest Paths in Weighted Unit-Disk - - PowerPoint PPT Presentation

Near-optimal Algorithms for Shortest Paths in Weighted Unit-Disk Graphs Haitao Wang 1 Jie Xue 2 1 Utah State University 2 University of Minnesota, Twin Cities t u d e n S t n P o r e i t s a e n t Haitao Wang and Jie Xue 1 / 20


slide-1
SLIDE 1

Near-optimal Algorithms for Shortest Paths in Weighted Unit-Disk Graphs

Haitao Wang1 Jie Xue2

1Utah State University 2University of Minnesota, Twin Cities

S t u d e n t P r e s e n t a t i

  • n

Haitao Wang and Jie Xue 1 / 20

slide-2
SLIDE 2

Background

Geometric intersection graphs The intersection graph of a set of geometric objects

Haitao Wang and Jie Xue 2 / 20

slide-3
SLIDE 3

Background

Unit-disk graphs (UDGs) The intersection graph of unit-disks or disks of identical radii

Haitao Wang and Jie Xue 3 / 20

slide-4
SLIDE 4

Background

Single-source shortest path (SSSP) problem Given a positively weighted graph G = (V , E, w) and a source s ∈ V , compute the shortest paths from s to all the other vertices of G.

Haitao Wang and Jie Xue 4 / 20

slide-5
SLIDE 5

Background

Single-source shortest path (SSSP) problem Given a positively weighted graph G = (V , E, w) and a source s ∈ V , compute the shortest paths from s to all the other vertices of G. SSSP on UDGs?

Haitao Wang and Jie Xue 4 / 20

slide-6
SLIDE 6

Background

Single-source shortest path (SSSP) problem Given a positively weighted graph G = (V , E, w) and a source s ∈ V , compute the shortest paths from s to all the other vertices of G. SSSP on UDGs? Two ways to weight a UDG

  • 1. Edges are weighted identically (Unweighted UDGs)
  • 2. Edges are weighted using Euclidean distances between the disk

centers (Weighted UDGs)

Haitao Wang and Jie Xue 4 / 20

slide-7
SLIDE 7

Background

Classical SSSP algorithms

Dijkstra’s algorithm Johnson’s algorithm Bellman-Ford algorithm ...

Haitao Wang and Jie Xue 5 / 20

slide-8
SLIDE 8

Background

Classical SSSP algorithms

Dijkstra’s algorithm Johnson’s algorithm Bellman-Ford algorithm ...

These algorithms requires Ω(|E|) time for solving SSSP. It is a lower bound for general graphs, due to the Ω(|E|) input size.

Haitao Wang and Jie Xue 5 / 20

slide-9
SLIDE 9

Background

Classical SSSP algorithms

Dijkstra’s algorithm Johnson’s algorithm Bellman-Ford algorithm ...

These algorithms requires Ω(|E|) time for solving SSSP. It is a lower bound for general graphs, due to the Ω(|E|) input size. The input size for an n-vertex UDG is only O(n). However, |E| = Ω(n2) in an n-vertex UDG in worst case.

Haitao Wang and Jie Xue 5 / 20

slide-10
SLIDE 10

Background

Classical SSSP algorithms

Dijkstra’s algorithm Johnson’s algorithm Bellman-Ford algorithm ...

These algorithms requires Ω(|E|) time for solving SSSP. It is a lower bound for general graphs, due to the Ω(|E|) input size. The input size for an n-vertex UDG is only O(n). However, |E| = Ω(n2) in an n-vertex UDG in worst case. Maybe we can break the Ω(|E|) lower bound for UDGs?

Haitao Wang and Jie Xue 5 / 20

slide-11
SLIDE 11

Background

SSSP on unweighted UDGs

O(n log n) time and O(n) space by [Cabello and Jejˇ ciˇ c 2015] O(n) time and O(n) space after presorting by [Chan and Skrepetos 2016]

Haitao Wang and Jie Xue 6 / 20

slide-12
SLIDE 12

Background

SSSP on unweighted UDGs

O(n log n) time and O(n) space by [Cabello and Jejˇ ciˇ c 2015] O(n) time and O(n) space after presorting by [Chan and Skrepetos 2016]

SSSP on weighted UDGs

O(n1+δ) time and O(n1+δ) space for any δ > 0 by [Cabello and Jejˇ ciˇ c 2015] O(n log12+o(1) n) expected time and O(n log3 n) space (randomized) by [Kaplan et al. 2017] O(n log n/ε2) time and O(n/ε2) space for (1 + ε)-approximation by [Chan and Skrepetos 2016]

Haitao Wang and Jie Xue 6 / 20

slide-13
SLIDE 13

Our results

The subject of this work: SSSP on weighted UDGs

Haitao Wang and Jie Xue 7 / 20

slide-14
SLIDE 14

Our results

The subject of this work: SSSP on weighted UDGs

Theorem (Exact algorithm)

There is an SSSP algorithm on weighted UDGs using O(n log2 n) time and O(n) space, where n is the input size.

Haitao Wang and Jie Xue 7 / 20

slide-15
SLIDE 15

Our results

The subject of this work: SSSP on weighted UDGs

Theorem (Exact algorithm)

There is an SSSP algorithm on weighted UDGs using O(n log2 n) time and O(n) space, where n is the input size.

Theorem (Approximation algorithm)

There is a (1 + ε)-approximate SSSP algorithm on weighted UDGs using O(n log n + n log2(1/ε)) time and O(n) space, where n is the input size.

Haitao Wang and Jie Xue 7 / 20

slide-16
SLIDE 16

Our results

Our results are achieved by relating SSSP on weighted UDGs to the

  • ffline insertion-only weighted nearest-neighbor (OIWNN) problem.

Haitao Wang and Jie Xue 8 / 20

slide-17
SLIDE 17

Our results

Our results are achieved by relating SSSP on weighted UDGs to the

  • ffline insertion-only weighted nearest-neighbor (OIWNN) problem.

The OIWNN problem in R2 [Input] a sequence of n operations each of which is one of Insert(s) - insert a new weighted site s ∈ R2 Query(q) - query the WNN of q ∈ R2 among the current sites

Haitao Wang and Jie Xue 8 / 20

slide-18
SLIDE 18

Our results

Our results are achieved by relating SSSP on weighted UDGs to the

  • ffline insertion-only weighted nearest-neighbor (OIWNN) problem.

The OIWNN problem in R2 [Input] a sequence of n operations each of which is one of Insert(s) - insert a new weighted site s ∈ R2 Query(q) - query the WNN of q ∈ R2 among the current sites [Goal] answer all queries

Haitao Wang and Jie Xue 8 / 20

slide-19
SLIDE 19

Our results

Our results are achieved by relating SSSP on weighted UDGs to the

  • ffline insertion-only weighted nearest-neighbor (OIWNN) problem.

The OIWNN problem in R2 [Input] a sequence of n operations each of which is one of Insert(s) - insert a new weighted site s ∈ R2 Query(q) - query the WNN of q ∈ R2 among the current sites [Goal] answer all queries We reduce SSSP on weighted UDGs to the OIWNN problem in R2.

Haitao Wang and Jie Xue 8 / 20

slide-20
SLIDE 20

Our results

Theorem (Exact)

If the OIWNN problem with n operations can be solved in f (n) time, then SSSP on weighted UDGs can be solved in O(n log n + f (n)) time.

Haitao Wang and Jie Xue 9 / 20

slide-21
SLIDE 21

Our results

Theorem (Exact)

If the OIWNN problem with n operations can be solved in f (n) time, then SSSP on weighted UDGs can be solved in O(n log n + f (n)) time. We show that f (n) = O(n log2 n) (D&C + WVD). This is the bottleneck of our algorithm.

Haitao Wang and Jie Xue 9 / 20

slide-22
SLIDE 22

Our results

Theorem (Exact)

If the OIWNN problem with n operations can be solved in f (n) time, then SSSP on weighted UDGs can be solved in O(n log n + f (n)) time. We show that f (n) = O(n log2 n) (D&C + WVD). This is the bottleneck of our algorithm.

Theorem (Approximation)

If the OIWNN problem with n operations in which at most k operations are insertions can be solved in f (n, k) time, then (1 + ε)-approximate SSSP on weighted UDGs can be solved in O(n log n + f (n, 1/ε)) time.

Haitao Wang and Jie Xue 9 / 20

slide-23
SLIDE 23

Our results

Theorem (Exact)

If the OIWNN problem with n operations can be solved in f (n) time, then SSSP on weighted UDGs can be solved in O(n log n + f (n)) time. We show that f (n) = O(n log2 n) (D&C + WVD). This is the bottleneck of our algorithm.

Theorem (Approximation)

If the OIWNN problem with n operations in which at most k operations are insertions can be solved in f (n, k) time, then (1 + ε)-approximate SSSP on weighted UDGs can be solved in O(n log n + f (n, 1/ε)) time. We show that f (n, k) = O(n log2 k) (D&C + WVD).

Haitao Wang and Jie Xue 9 / 20

slide-24
SLIDE 24

The exact SSSP algorithm

For convenience, assume UDG is defined by disks of radii 1

2.

Haitao Wang and Jie Xue 10 / 20

slide-25
SLIDE 25

The exact SSSP algorithm

For convenience, assume UDG is defined by disks of radii 1

2.

Given n disks of radii 1

2, let S be the set of the disk centers.

Haitao Wang and Jie Xue 10 / 20

slide-26
SLIDE 26

The exact SSSP algorithm

For convenience, assume UDG is defined by disks of radii 1

2.

Given n disks of radii 1

2, let S be the set of the disk centers.

Two points a, b ∈ S are connected by an edge iff a − b ≤ 1. (The edge is weighted by a − b.)

Haitao Wang and Jie Xue 10 / 20

slide-27
SLIDE 27

The exact SSSP algorithm

For convenience, assume UDG is defined by disks of radii 1

2.

Given n disks of radii 1

2, let S be the set of the disk centers.

Two points a, b ∈ S are connected by an edge iff a − b ≤ 1. (The edge is weighted by a − b.) Let s ∈ S be a given source. Our goal is to compute a table dist[·], where dist[a] stores the length

  • f the shortest path from s to a, for all a ∈ S.

Haitao Wang and Jie Xue 10 / 20

slide-28
SLIDE 28

The exact SSSP algorithm

Dijkstra’s algorithm [Input] G = (V , E, w) and s ∈ V

Haitao Wang and Jie Xue 11 / 20

slide-29
SLIDE 29

The exact SSSP algorithm

Dijkstra’s algorithm [Input] G = (V , E, w) and s ∈ V

1 dist[s] ← 0, dist[a] ← ∞ for all a ∈ V \{s}, A ← V 2 Pick c ∈ A with the smallest dist[c] 3 For all neighbors b ∈ A of c, dist[b] ← min{dist[b], dist[c] + w(b, c)} 4 A ← A\{c}, go to Step 2 if A = ∅ Haitao Wang and Jie Xue 11 / 20

slide-30
SLIDE 30

The exact SSSP algorithm

Dijkstra’s algorithm [Input] G = (V , E, w) and s ∈ V

1 dist[s] ← 0, dist[a] ← ∞ for all a ∈ V \{s}, A ← V 2 Pick c ∈ A with the smallest dist[c] 3 For all neighbors b ∈ A of c, dist[b] ← min{dist[b], dist[c] + w(b, c)} 4 A ← A\{c}, go to Step 2 if A = ∅

The previous works [Cabello and Jejˇ ciˇ c 2015] and [Kaplan et al. 2017] use Dijkstra’s algorithm + dynamic bichromatic closest pair

Haitao Wang and Jie Xue 11 / 20

slide-31
SLIDE 31

The exact SSSP algorithm

Dijkstra’s algorithm [Input] G = (V , E, w) and s ∈ V

1 dist[s] ← 0, dist[a] ← ∞ for all a ∈ V \{s}, A ← V 2 Pick c ∈ A with the smallest dist[c] 3 For all neighbors b ∈ A of c, dist[b] ← min{dist[b], dist[c] + w(b, c)} 4 A ← A\{c}, go to Step 2 if A = ∅

The previous works [Cabello and Jejˇ ciˇ c 2015] and [Kaplan et al. 2017] use Dijkstra’s algorithm + dynamic bichromatic closest pair The framework of our SSSP algorithm is different from Dijkstra’s, but it exploits the basic intuition of Dijkstra’s.

Haitao Wang and Jie Xue 11 / 20

slide-32
SLIDE 32

The exact SSSP algorithm

Define an operation Update as follows.

Haitao Wang and Jie Xue 12 / 20

slide-33
SLIDE 33

The exact SSSP algorithm

Define an operation Update as follows. Update(U, V ) for U, V ⊆ S

1

dist′[u] ← dist[u] for all u ∈ U

2

For each v ∈ V , find the neighbor uv ∈ U of v that minimizes dist′[uv] + uv − v

3

dist[v] ← min{dist[v], dist′[uv] + uv − v} for all v ∈ V

Haitao Wang and Jie Xue 12 / 20

slide-34
SLIDE 34

The exact SSSP algorithm

Define an operation Update as follows. Update(U, V ) for U, V ⊆ S

1

dist′[u] ← dist[u] for all u ∈ U

2

For each v ∈ V , find the neighbor uv ∈ U of v that minimizes dist′[uv] + uv − v

3

dist[v] ← min{dist[v], dist′[uv] + uv − v} for all v ∈ V

Roughly speaking, Update(U, V ) uses the shortest-path information

  • f U to update the shortest-path information of V .

Haitao Wang and Jie Xue 12 / 20

slide-35
SLIDE 35

The exact SSSP algorithm

Define an operation Update as follows. Update(U, V ) for U, V ⊆ S

1

dist′[u] ← dist[u] for all u ∈ U

2

For each v ∈ V , find the neighbor uv ∈ U of v that minimizes dist′[uv] + uv − v

3

dist[v] ← min{dist[v], dist′[uv] + uv − v} for all v ∈ V

Roughly speaking, Update(U, V ) uses the shortest-path information

  • f U to update the shortest-path information of V .

The table dist′ is used for lazy update in case U ∩ V = ∅.

Haitao Wang and Jie Xue 12 / 20

slide-36
SLIDE 36

The exact SSSP algorithm

First step: build a grid Γ of width 1

2 on the plane

Haitao Wang and Jie Xue 13 / 20

slide-37
SLIDE 37

The exact SSSP algorithm

First step: build a grid Γ of width 1

2 on the plane

a = the cell of Γ containing a ⊞a = the 5 × 5 patch centered at a

a

a

a

⊞a

Haitao Wang and Jie Xue 13 / 20

slide-38
SLIDE 38

The exact SSSP algorithm

First step: build a grid Γ of width 1

2 on the plane

a = the cell of Γ containing a ⊞a = the 5 × 5 patch centered at a

a

a

a

⊞a

All points in S ∩ a are neighbors of a. All neighbors of a are in S ∩ ⊞a.

Haitao Wang and Jie Xue 13 / 20

slide-39
SLIDE 39

The exact SSSP algorithm

Our SSSP algorithm

1

dist[s] ← 0, dist[a] ← ∞ for all a ∈ V \{s}, A ← V

2

Pick c ∈ A with the smallest dist[c]

3

Update(A ∩ ⊞c, A ∩ c)

4

Update(A ∩ c, A ∩ ⊞c)

5

A ← A\c, go to Step 2 if A = ∅

Haitao Wang and Jie Xue 14 / 20

slide-40
SLIDE 40

The exact SSSP algorithm

Our SSSP algorithm

1

dist[s] ← 0, dist[a] ← ∞ for all a ∈ V \{s}, A ← V

2

Pick c ∈ A with the smallest dist[c]

3

Update(A ∩ ⊞c, A ∩ c)

4

Update(A ∩ c, A ∩ ⊞c)

5

A ← A\c, go to Step 2 if A = ∅

Convert our algorithm to Dijkstra’s algorithm? Remove Step 3 and replace c with {c}

Haitao Wang and Jie Xue 14 / 20

slide-41
SLIDE 41

The exact SSSP algorithm

Our SSSP algorithm

1

dist[s] ← 0, dist[a] ← ∞ for all a ∈ V \{s}, A ← V

2

Pick c ∈ A with the smallest dist[c]

3

Update(A ∩ ⊞c, A ∩ c)

4

Update(A ∩ c, A ∩ ⊞c)

5

A ← A\c, go to Step 2 if A = ∅

Convert our algorithm to Dijkstra’s algorithm? Remove Step 3 and replace c with {c} If we forget Step 3, the main difference between Dijkstra’s and ours is

  • Dijkstra’s considers the single point c in each iteration.
  • Ours considers all points in c in each iteration.

Haitao Wang and Jie Xue 14 / 20

slide-42
SLIDE 42

The exact SSSP algorithm

Why do we need Step 3?

Haitao Wang and Jie Xue 15 / 20

slide-43
SLIDE 43

The exact SSSP algorithm

Why do we need Step 3? In Dijkstra’s algorithm, when c is chosen, dist[c] is correct. So after using c to update its neighbors, removing c from A is safe.

Haitao Wang and Jie Xue 15 / 20

slide-44
SLIDE 44

The exact SSSP algorithm

Why do we need Step 3? In Dijkstra’s algorithm, when c is chosen, dist[c] is correct. So after using c to update its neighbors, removing c from A is safe. In our algorithm, when c is chosen, we cannot guarantee that dist[a] is correct for all a ∈ A ∩ c. But we need the correctness to do Step 4 and Step 5 safely.

Haitao Wang and Jie Xue 15 / 20

slide-45
SLIDE 45

The exact SSSP algorithm

Why do we need Step 3? In Dijkstra’s algorithm, when c is chosen, dist[c] is correct. So after using c to update its neighbors, removing c from A is safe. In our algorithm, when c is chosen, we cannot guarantee that dist[a] is correct for all a ∈ A ∩ c. But we need the correctness to do Step 4 and Step 5 safely. Step 3 is used to make dist[a] correct for all a ∈ A ∩ c.

Haitao Wang and Jie Xue 15 / 20

slide-46
SLIDE 46

The exact SSSP algorithm

Why do we need Step 3? In Dijkstra’s algorithm, when c is chosen, dist[c] is correct. So after using c to update its neighbors, removing c from A is safe. In our algorithm, when c is chosen, we cannot guarantee that dist[a] is correct for all a ∈ A ∩ c. But we need the correctness to do Step 4 and Step 5 safely. Step 3 is used to make dist[a] correct for all a ∈ A ∩ c.

Lemma

After Step 3 of our algorithm, dist[a] equals to the length of the shortest path from s to a for all a ∈ A ∩ c.

Haitao Wang and Jie Xue 15 / 20

slide-47
SLIDE 47

The exact SSSP algorithm

How to efficiently implement our algorithm?

Haitao Wang and Jie Xue 16 / 20

slide-48
SLIDE 48

The exact SSSP algorithm

How to efficiently implement our algorithm? The critical steps: Step 3 and Step 4

Haitao Wang and Jie Xue 16 / 20

slide-49
SLIDE 49

The exact SSSP algorithm

How to efficiently implement our algorithm? The critical steps: Step 3 and Step 4 Step 3. Update(A ∩ ⊞c, A ∩ c)

1

dist′[u] ← dist[u] for all u ∈ A ∩ ⊞c

2

For each v ∈ A ∩ c, find its neighbor uv ∈ A ∩ ⊞c that minimizes dist′[uv] + uv − v

3

dist[v] ← min{dist[v], dist′[uv] + uv − v} for all v ∈ A ∩ c

Haitao Wang and Jie Xue 16 / 20

slide-50
SLIDE 50

The exact SSSP algorithm

How to efficiently implement our algorithm? The critical steps: Step 3 and Step 4 Step 3. Update(A ∩ ⊞c, A ∩ c)

1

dist′[u] ← dist[u] for all u ∈ A ∩ ⊞c

2

For each v ∈ A ∩ c, find its neighbor uv ∈ A ∩ ⊞c that minimizes dist′[uv] + uv − v

3

dist[v] ← min{dist[v], dist′[uv] + uv − v} for all v ∈ A ∩ c

What if we remove the constraint that uv is a neighbor of v?

Haitao Wang and Jie Xue 16 / 20

slide-51
SLIDE 51

The exact SSSP algorithm

How to efficiently implement our algorithm? The critical steps: Step 3 and Step 4 Step 3. Update(A ∩ ⊞c, A ∩ c)

1

dist′[u] ← dist[u] for all u ∈ A ∩ ⊞c

2

For each v ∈ A ∩ c, find its neighbor uv ∈ A ∩ ⊞c that minimizes dist′[uv] + uv − v

3

dist[v] ← min{dist[v], dist′[uv] + uv − v} for all v ∈ A ∩ c

What if we remove the constraint that uv is a neighbor of v? Then uv is exactly the weighted nearest neighbor of v in A ∩ ⊞c (each u ∈ A ∩ ⊞c is assigned the weight dist′[u]). In this case, the problem can be solved by building a WVD on A ∩ ⊞c.

Haitao Wang and Jie Xue 16 / 20

slide-52
SLIDE 52

The exact SSSP algorithm

Lemma

Even if we remove the neighborhood constraint, the point uv we find is still a neighbor of v.

Haitao Wang and Jie Xue 17 / 20

slide-53
SLIDE 53

The exact SSSP algorithm

Lemma

Even if we remove the neighborhood constraint, the point uv we find is still a neighbor of v.

v c u

dist′[u] ≥ dist′[c] u − v > 1 ≥ c − v = ⇒ dist′[u] + u − v > dist′[c] + c − v = ⇒ u = uv

Haitao Wang and Jie Xue 17 / 20

slide-54
SLIDE 54

The exact SSSP algorithm

Step 3 can be done in O(m log m) time where m = |A ∩ ⊞c|.

Haitao Wang and Jie Xue 18 / 20

slide-55
SLIDE 55

The exact SSSP algorithm

Step 3 can be done in O(m log m) time where m = |A ∩ ⊞c|. How to implement Step 4?

Haitao Wang and Jie Xue 18 / 20

slide-56
SLIDE 56

The exact SSSP algorithm

Step 3 can be done in O(m log m) time where m = |A ∩ ⊞c|. How to implement Step 4? Basic idea: reducing to the OIWNN problem Step 4 can be done in O(m log m + f (m)) time where m = |A ∩ ⊞c| and f (m) is the time for solving an m-operation OIWNN instance.

Haitao Wang and Jie Xue 18 / 20

slide-57
SLIDE 57

The exact SSSP algorithm

Step 3 can be done in O(m log m) time where m = |A ∩ ⊞c|. How to implement Step 4? Basic idea: reducing to the OIWNN problem Step 4 can be done in O(m log m + f (m)) time where m = |A ∩ ⊞c| and f (m) is the time for solving an m-operation OIWNN instance. By showing f (m) = O(m log2 m), we conclude the following.

Theorem

There is an SSSP algorithm on weighted UDGs using O(n log2 n) time and O(n) space, where n is the input size.

Haitao Wang and Jie Xue 18 / 20

slide-58
SLIDE 58

Open questions

Improve the running time to O(n log n)? APSP in weighted UDGs in o(n log2 n) time? Can our approach be used to solve other problems in UDGs?

Haitao Wang and Jie Xue 19 / 20

slide-59
SLIDE 59

Thank you! Q & A

Haitao Wang and Jie Xue 20 / 20