with removable obstacles computing shortest paths in the...

92
Computing Shortest Paths in the Plane Pankaj K. Agarwal, Neeraj Kumar, Stavros Sintos and Subhash Suri with Removable Obstacles s t Duke University and UC Santa Barabara

Upload: others

Post on 14-Aug-2020

20 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Computing Shortest Paths in the Plane

Pankaj K. Agarwal, Neeraj Kumar, Stavros Sintos and Subhash Suri

with Removable Obstacles

s

t

Duke University and UC Santa Barabara

Page 2: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

s

t

Problem Description

Input: h polygonal obstacles with n vertices, source s and target t

Page 3: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

s

t

Problem Description

Input: h polygonal obstacles with n vertices, source s and target t

An obstacle Pi can be removed by paying cost ci

Page 4: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

s

t

Problem Description

Input: h polygonal obstacles with n vertices, source s and target t

An obstacle Pi can be removed by paying cost ci

Assumption: Obstacles are mutually disjoint and convex

Page 5: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

s

t

Problem Description

Input: h polygonal obstacles with n vertices, source s and target t

Given a cost budget C , which obstacles should we remove

An obstacle Pi can be removed by paying cost ci

so that length of path from s to t is minimized?

Assumption: Obstacles are mutually disjoint and convex

Page 6: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Motivation

Classically, we deal with �nding shortest path in a �xed network

5/17

Page 7: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Motivation

Classically, we deal with �nding shortest path in a �xed network

But what if shortest paths are not good enough!

5/17

Page 8: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Motivation

Classically, we deal with �nding shortest path in a �xed network

What if we are allowed to modify the environment

What changes should we make?

Desire paths

But what if shortest paths are not good enough!

5/17

Page 9: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Motivation

Classically, we deal with �nding shortest path in a �xed network

What if we are allowed to modify the environment

What changes should we make?

Applications

But what if shortest paths are not good enough!

Urban PlanningAdding ‘shortcuts” to ease congestion

5/17

Page 10: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Motivation

Classically, we deal with �nding shortest path in a �xed network

What if we are allowed to modify the environment

What changes should we make?

Applications

Recon�guring road networks– such as by adding �yovers

But what if shortest paths are not good enough!

5/17

Page 11: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Motivation

Classically, we deal with �nding shortest path in a �xed network

What if we are allowed to modify the environment

What changes should we make?

Applications

Re-organize Warehouse Layout– Shorten frequent paths for robot

But what if shortest paths are not good enough!

5/17

Page 12: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Path Planning Under Uncertainity

Obstacle Pi is present in input with independent probability βi ,

not present with probability (1 − βi)

Probability of existence = βi

Page 13: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Path Planning Under Uncertainity

Obstacle Pi is present in input with independent probability βi ,

not present with probability (1 − βi)

Probability of existence = βi

π1

π2

Path π1 has probability 1

Path π2 has probability (1 − βi)

Page 14: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Path Planning Under Uncertainity

Obstacle Pi is present in input with independent probability βi ,

not present with probability (1 − βi)

Probability of existence = βi

π1

π2

Path π1 has probability 1

Path π2 has probability (1 − βi)

What is the shortest s–t path that has probability at least β?

Page 15: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Path Planning Under Uncertainity

Obstacle Pi is present in input with independent probability βi ,

not present with probability (1 − βi)

Probability of existence = βi

π1

π2

Path π1 has probability 1

Path π2 has probability (1 − βi)

What is the shortest s–t path that has probability at least β?

What is the most likely s–t path with length at most L?(one that has highest probability)

Page 16: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Path Planning Under Uncertainity

Obstacle Pi is present in input with independent probability βi ,

not present with probability (1 − βi)

Probability of existence = βi

π1

π2

Path π1 has probability 1

Path π2 has probability (1 − βi)

What is the shortest s–t path that has probability at least β?

What is the most likely s–t path with length at most L?(one that has highest probability)

Can reduce to the earlier cost-based model by taking negative logarithms

Page 17: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Related Work

Computes shortest s–t path in the plane that removes at most k obstacles

O(k2n logn) algorithm using Continuous Dijkstra

[HKS’17] Shortest Paths in the Plane with Obstacle Violations

Page 18: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Related Work

Computes shortest s–t path in the plane that removes at most k obstacles

O(k2n logn) algorithm using Continuous Dijkstra

[HKS’17] Shortest Paths in the Plane with Obstacle Violations

Cardinality ModelObstacles have unit cost of removal, budget = k

Page 19: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Related Work

Computes shortest s–t path in the plane that removes at most k obstacles

O(k2n logn) algorithm using Continuous Dijkstra

[HKS’17] Shortest Paths in the Plane with Obstacle Violations

Cardinality ModelObstacles have unit cost of removal, budget = k

We study the more general cost-based model of obstacle removal

Page 20: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Our Results

Problem of computing a path of length at most L and cost at most C is

NP-HARD even for vertical segment obstacles.

Page 21: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Our Results

Problem of computing a path of length at most L and cost at most C is

NP-HARD even for vertical segment obstacles.

An FPTAS inspired from [HKS’17] running in worst case O(n2h/ϵ) time

Minimum Path length with cost at most (1 + ϵ)C

Page 22: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Our Results

Problem of computing a path of length at most L and cost at most C is

NP-HARD even for vertical segment obstacles.

An FPTAS inspired from [HKS’17] running in worst case O(n2h/ϵ) time

A faster FPTAS running in worst case O(nh/ϵ2) time

Minimum Path length with cost at most (1 + ϵ)C

Length (1 + ϵ) times optimal, cost at most (1 + ϵ)C

Page 23: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Our Results

Problem of computing a path of length at most L and cost at most C is

NP-HARD even for vertical segment obstacles.

An FPTAS inspired from [HKS’17] running in worst case O(n2h/ϵ) time

A faster FPTAS running in worst case O(nh/ϵ2) time

Minimum Path length with cost at most (1 + ϵ)C

Length (1 + ϵ) times optimal, cost at most (1 + ϵ)C

Data structures for �xed source approximate shortest path queries in

O(log2 n/ϵ) time, two-point queries in O(log2 n/ϵ2) time

Page 24: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Our Results

Problem of computing a path of length at most L and cost at most C is

NP-HARD even for vertical segment obstacles.

An FPTAS inspired from [HKS’17] running in worst case O(n2h/ϵ) time

A faster FPTAS running in worst case O(nh/ϵ2) time

Minimum Path length with cost at most (1 + ϵ)C

Length (1 + ϵ) times optimal, cost at most (1 + ϵ)C

Data structures for �xed source approximate shortest path queries in

O(log2 n/ϵ) time, two-point queries in O(log2 n/ϵ2) time

Simple reduction from Partition

Page 25: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Our Results

Problem of computing a path of length at most L and cost at most C is

NP-HARD even for vertical segment obstacles.

An FPTAS inspired from [HKS’17] running in worst case O(n2h/ϵ) time

A faster FPTAS running in worst case O(nh/ϵ2) time

Minimum Path length with cost at most (1 + ϵ)C

Length (1 + ϵ) times optimal, cost at most (1 + ϵ)C

Data structures for �xed source approximate shortest path queries in

O(log2 n/ϵ) time, two-point queries in O(log2 n/ϵ2) time

Simple reduction from Partition

Rest of the talk

Page 26: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

A Simple FPTAS

s

t

Observations

Page 27: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

A Simple FPTAS

s

t

Observations

The desired path π must ‘cross’ all the obstacles that were removed

Since π has minimum length, it must only turn at obstacle vertices

Page 28: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

A Simple FPTAS

s

t

Observations

The desired path π must ‘cross’ all the obstacles that were removed

Since π has minimum length, it must only turn at obstacle vertices

De�ne cost(π) = sum of costs of all obstacles crossed

Page 29: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

A Simple FPTAS

s

t

Observations

The desired path π must ‘cross’ all the obstacles that were removed

Since π has minimum length, it must only turn at obstacle vertices

De�ne cost(π) = sum of costs of all obstacles crossed

What is the shortest s–t path that has cost at mostC?

Page 30: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

A Simple FPTAS

Scale all costs such that budget C = h, the number of obstacles

9/17

Page 31: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

A Simple FPTAS

Scale all costs such that budget C = h, the number of obstacles

Model as a graph problem:

– Nodes : s , t , obstacle vertices

9/17

Page 32: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

A Simple FPTAS

Scale all costs such that budget C = h, the number of obstacles

Model as a graph problem:

– Nodes : s , t , obstacle vertices

– Edges : between any pair of vertices (u,v)such that cost(uv) is at most C

c1

9/17

c2

c3

Cost of red edge is c1 + c2 + c3

Page 33: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

A Simple FPTAS

Scale all costs such that budget C = h, the number of obstacles

Model as a graph problem:

– Nodes : s , t , obstacle vertices

– Edges : between any pair of vertices (u,v)such that cost(uv) is at most C

An edge e has two parameters:

Euclidean length `e and cost of the edge ce

c1

9/17

c2

c3

Page 34: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

A Simple FPTAS

Scale all costs such that budget C = h, the number of obstacles

Model as a graph problem:

– Nodes : s , t , obstacle vertices

– Edges : between any pair of vertices (u,v)such that cost(uv) is at most C

An edge e has two parameters:

Euclidean length `e and cost of the edge ce

c1

Mimics the notion of visibility graphs, we call it a viability graph

9/17

c2

c3

Page 35: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

A Simple FPTAS

Scale all costs such that budget C = h, the number of obstacles

Model as a graph problem:

– Nodes : s , t , obstacle vertices

– Edges : between any pair of vertices (u,v)such that cost(uv) is at most C

An edge e has two parameters:

Euclidean length `e and cost of the edge ce

Find shortest s–t path in this graph such that the cost of the path is at most C

c1

Mimics the notion of visibility graphs, we call it a viability graph

9/17

c2

c3

Page 36: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

A Simple FPTAS

Scale all costs such that budget C = h, the number of obstacles

Model as a graph problem:

– Nodes : s , t , obstacle vertices

– Edges : between any pair of vertices (u,v)such that cost(uv) is at most C

An edge e has two parameters:

Euclidean length `e and cost of the edge ce

Find shortest s–t path in this graph such that the cost of the path is at most C

c1

Mimics the notion of visibility graphs, we call it a viability graph

(1 + ϵ)-approximation using Dijkstra’s algorithm in O( n2hϵ ) time by creating O( hϵ ) copies of vertices and edges

9/17

c2

c3

Page 37: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

A Faster FPTAS

Key idea is to construct a sparse Viability Graph

Page 38: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

A Faster FPTAS

Key idea is to construct a sparse Viability Graph

Roadmap

– trade a factor (1 + ϵ) in path length for e�ciency

Page 39: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

A Faster FPTAS

Key idea is to construct a sparse Viability Graph

Roadmap

– Construct an O(n logn) size viability graph VG1 preserving L1 distances

– trade a factor (1 + ϵ) in path length for e�ciency

Page 40: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

A Faster FPTAS

Key idea is to construct a sparse Viability Graph

Roadmap

– Construct an O(n logn) size viability graph VG1 preserving L1 distances

– Create O( 1ϵ ) copies of VG1, one per direction and combine them to obtain VGϵ

– trade a factor (1 + ϵ) in path length for e�ciency

Preserves pairwise distances within a factor of (1 + ϵ)

Page 41: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

A Faster FPTAS

Key idea is to construct a sparse Viability Graph

Roadmap

– Construct an O(n logn) size viability graph VG1 preserving L1 distances

– Create O( 1ϵ ) copies of VG1, one per direction and combine them to obtain VGϵ

– trade a factor (1 + ϵ) in path length for e�ciency

Preserves pairwise distances within a factor of (1 + ϵ)

– Run the modi�ed Dijkstra on O(nϵ logn) size viability graph VGϵ

Page 42: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

A Faster FPTAS

Key idea is to construct a sparse Viability Graph

Roadmap

– Construct an O(n logn) size viability graph VG1 preserving L1 distances

– Create O( 1ϵ ) copies of VG1, one per direction and combine them to obtain VGϵ

– trade a factor (1 + ϵ) in path length for e�ciency

Preserves pairwise distances within a factor of (1 + ϵ)

– Run the modi�ed Dijkstra on O(nϵ logn) size viability graph VGϵ

Primary challenge is to construct the graph VG1

Page 43: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

A Sparse Viability Graph

Inspiration: L1 Visibility Graphs : [Clarkson-Kapoor-Vaidya’87]

Page 44: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

A Sparse Viability Graph

Inspiration: L1 Visibility Graphs : [Clarkson-Kapoor-Vaidya’87]

Main Idea:

u

Do not need all O(n) edges adjacent to u

Page 45: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

A Sparse Viability Graph

Inspiration: L1 Visibility Graphs : [Clarkson-Kapoor-Vaidya’87]

Main Idea:

u

v

Do not need all O(n) edges adjacent to u

Page 46: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

A Sparse Viability Graph

Inspiration: L1 Visibility Graphs : [Clarkson-Kapoor-Vaidya’87]

Main Idea:

u

v

Do not need all O(n) edges adjacent to u

Take projections on a ‘split line’ `

Page 47: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

A Sparse Viability Graph

Inspiration: L1 Visibility Graphs : [Clarkson-Kapoor-Vaidya’87]

Main Idea:

u

v

Do not need all O(n) edges adjacent to u

Take projections on a ‘split line’ `

Page 48: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

A Sparse Viability Graph

Inspiration: L1 Visibility Graphs : [Clarkson-Kapoor-Vaidya’87]

Main Idea:

u

v

Do not need all O(n) edges adjacent to u

Take projections on a ‘split line’ `

u

v

Page 49: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Also need at most four projections on neighboring obstacles

A Sparse Viability Graph

Inspiration: L1 Visibility Graphs : [Clarkson-Kapoor-Vaidya’87]

Main Idea:

u

v

Do not need all O(n) edges adjacent to u

Take projections on a ‘split line’ `

u

v

Total size: O(n logn)

Page 50: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Also need at most four projections on neighboring obstacles

A Sparse Viability Graph

Inspiration: L1 Visibility Graphs : [Clarkson-Kapoor-Vaidya’87]

Main Idea:

u

v

Do not need all O(n) edges adjacent to u

Take projections on a ‘split line’ `

u

v

Total size: O(n logn)

We show how to construct O(n logn) size L1 Viability Graphsedges can go through obstacles

Page 51: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Algorithm Overview

Will reuse idea of taking split line projections for [CKV’87]

Page 52: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Algorithm Overview

Will reuse idea of taking split line projections for [CKV’87]

can be naturally extended to edges of viability graph

Page 53: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Algorithm Overview

Will reuse idea of taking split line projections for [CKV’87]

can be naturally extended to edges of viability graph

However, taking projections on four neighboring obstacles is not su�cient

Page 54: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Algorithm Overview

Will reuse idea of taking split line projections for [CKV’87]

can be naturally extended to edges of viability graph

However, taking projections on four neighboring obstacles is not su�cient

We circumvent this problem by adding “bypass vertices”

Using this model we give an arguably simpler proof

of correctness for the more general viability graphs

Page 55: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Algorithm Overview

Will reuse idea of taking split line projections for [CKV’87]

can be naturally extended to edges of viability graph

However, taking projections on four neighboring obstacles is not su�cient

We circumvent this problem by adding “bypass vertices”

Using this model we give an arguably simpler proof

of correctness for the more general viability graphs

Next we describe an algorithm for constructing an L1 viability graph VG1

Page 56: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Obstacles with Costs ⇒ Segments with Costs

Page 57: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Obstacles with Costs ⇒ Segments with Costs

π1

π2

Obstacles are convex and disjoint

⇒ Shortest paths intersect zero or exactly two sides of an obstacle

Page 58: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Obstacles with Costs ⇒ Segments with Costs

π1

π2

Obstacles are convex and disjoint

⇒ Shortest paths intersect zero or exactly two sides of an obstacle

Assign cost ci/2 to all segments of an obstacle that has cost ci

Page 59: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Obstacles with Costs ⇒ Segments with Costs

π1

π2

Obstacles are convex and disjoint

⇒ Shortest paths intersect zero or exactly two sides of an obstacle

Assign cost ci/2 to all segments of an obstacle that has cost ci

Allows us to reason about geometry of line segments

Page 60: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Algorithm Description

v

w

Page 61: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Algorithm Description

v

w

`

Find the split line ` that splits vertices into equal sized sets Vl and Vr

Page 62: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Algorithm Description

v

w

`

v′

w′

Find the split line ` that splits vertices into equal sized sets Vl and Vr

Let v′

be the projection of v on this split line `

– Add vertex v′

and edge vv′

with cost c(vv ′)

– Cost of projection segment is the sum of

costs of all obstacle segments that it intersects

Page 63: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Algorithm Description

v

w

`

w2

v′

w′

v1

w1

v2

Find the split line ` that splits vertices into equal sized sets Vl and Vr

Let v′

be the projection of v on this split line `

– Add vertex v′

and edge vv′

with cost c(vv ′) Find �rst segment s

′of positive slope that intersects `

– Add two bypass vertices v1,v2 and edges vv′

and v1v2

– Bypass edges v1v2

have cost c(v1v2) = 0

– Cost of projection segment is the sum of

costs of all obstacle segments that it intersects

Page 64: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Algorithm Description

v

w

`

w2

v′

w′

v1

w1

v2

Find the split line ` that splits vertices into equal sized sets Vl and Vr

Let v′

be the projection of v on this split line `

– Add vertex v′

and edge vv′

with cost c(vv ′) Find �rst segment s

′of positive slope that intersects `

– Add two bypass vertices v1,v2 and edges vv′

and v1v2

Connect consecutive vertices on ` and obstacle boundary

Page 65: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Algorithm Description

v

w

`

w2

v′

w′

`

v

w

v1

w1

v2

Find the split line ` that splits vertices into equal sized sets Vl and Vr

Let v′

be the projection of v on this split line `

– Add vertex v′

and edge vv′

with cost c(vv ′) Find �rst segment s

′of positive slope that intersects `

– Add two bypass vertices v1,v2 and edges vv′

and v1v2

Connect consecutive vertices on ` and obstacle boundary

Repeat for a horizontal split line. Recurse on sets Vl and Vr .

Page 66: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Correctness

Su�ces to show: for any pair of obstacle vertices p,q there exists a path πpq

such that the L1 length ∥πpq∥1≤ ∥pq∥

1and cost c(πpq) ≤ c(pq)

Proof Idea:

Page 67: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Correctness

Su�ces to show: for any pair of obstacle vertices p,q there exists a path πpq

such that the L1 length ∥πpq∥1≤ ∥pq∥

1and cost c(πpq) ≤ c(pq)

Proof Idea:

p

q

Page 68: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Correctness

Su�ces to show: for any pair of obstacle vertices p,q there exists a path πpq

such that the L1 length ∥πpq∥1≤ ∥pq∥

1and cost c(πpq) ≤ c(pq)

Proof Idea:

p

sy

sx

De�ne a region (clipped rectangle) Rpq q

Page 69: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Correctness

Su�ces to show: for any pair of obstacle vertices p,q there exists a path πpq

such that the L1 length ∥πpq∥1≤ ∥pq∥

1and cost c(πpq) ≤ c(pq)

Proof Idea:

p

sy

sx

De�ne a region (clipped rectangle) Rpq q

Proof by induction on number of vertices in Rpq

– If Rpq contains an obstacle vertex

– If Rpq does not contains an obstacle vertex

Page 70: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Correctness

Su�ces to show: for any pair of obstacle vertices p,q there exists a path πpq

such that the L1 length ∥πpq∥1≤ ∥pq∥

1and cost c(πpq) ≤ c(pq)

Proof Idea:

p

sy

sx

De�ne a region (clipped rectangle) Rpq q

Proof by induction on number of vertices in Rpq

– If Rpq contains an obstacle vertex

– If Rpq does not contains an obstacle vertex

(Induction Step)

(Base Case)

Page 71: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Induction Step

p

q

lr

r

Page 72: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Induction Step

p

q

lr

r

We show how to �nd an intermediate vertex r such that

Page 73: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Induction Step

p

q

lr

r

We show how to �nd an intermediate vertex r such that

such that ∥pr∥1+ ∥rq∥

1≤ ∥pq∥

1and cost c(pr) + c(rq) ≤ c(pq)

Page 74: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Induction Step

p

q

lr

r

We show how to �nd an intermediate vertex r such that

such that ∥pr∥1+ ∥rq∥

1≤ ∥pq∥

1and cost c(pr) + c(rq) ≤ c(pq)

Details are technical, relies heavily on disjointness of obstacle segments

Page 75: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Base Case

`

B

CIdentify three types of edges A,B and C

p

A

q

Page 76: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Base Case

`

B

CIdentify three types of edges A,B and CIdentify three types of edges A,B and C

– Type B and C edges cannot co-exist

p

A

q

Page 77: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Base Case

`

B

CIdentify three types of edges A,B and CIdentify three types of edges A,B and C

– Type B and C edges cannot co-exist

Type B edge + vertical split line

≡ Type C edge + horizontal split line

p

A

q

Page 78: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Base Case

`

B

Identify three types of edges A,B and CIdentify three types of edges A,B and C

– Type B and C edges cannot co-exist

Type B edge + vertical split line

≡ Type C edge + horizontal split line

Exists a path πpq in VG1 using projection and bypass vertices

p

A

q

Page 79: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Base Case

`

B

Identify three types of edges A,B and CIdentify three types of edges A,B and C

– Type B and C edges cannot co-exist

Type B edge + vertical split line

≡ Type C edge + horizontal split line

Exists a path πpq in VG1 using projection and bypass vertices

Easy to verify that πpq has same L1 length and cost as the segment pq

p

A

q

Page 80: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

A Faster FPTAS

Key idea is to construct a sparse Viability Graph

Roadmap

– Construct an O(n logn) size viability graph VG1 preserving L1 distances

– Create 1/ϵ copies of VG1, one per direction and combine them to obtain VGϵ

– trade a factor (1 + ϵ) in path length for e�ciency

Preserves pairwise distances within a factor of (1 + ϵ)

– Run the slower FPTAS on O(nϵ logn) size viability graph VGϵ

Primary challenge is to construct the graph VG1

Page 81: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

A Faster FPTAS

Key idea is to construct a sparse Viability Graph

Roadmap

– Construct an O(n logn) size viability graph VG1 preserving L1 distances

– Create 1/ϵ copies of VG1, one per direction and combine them to obtain VGϵ

– trade a factor (1 + ϵ) in path length for e�ciency

Preserves pairwise distances within a factor of (1 + ϵ)

– Run the slower FPTAS on O(nϵ logn) size viability graph VGϵ

Primary challenge is to construct the graph VG1 ✓

Page 82: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

In Summary

Page 83: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

In Summary

Motivated by applications, we study the problem of computing shortest

path among removable obstacles

Page 84: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

In Summary

Motivated by applications, we study the problem of computing shortest

path among removable obstacles

We show that computing such a path exactly is NP-hard.

Page 85: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

In Summary

Motivated by applications, we study the problem of computing shortest

path among removable obstacles

We show that computing such a path exactly is NP-hard.

A simple (1 + ϵ)-approximation follows using the idea of viabilitygraphs (an extension of visibility graphs)

Page 86: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

In Summary

Motivated by applications, we study the problem of computing shortest

path among removable obstacles

We show that computing such a path exactly is NP-hard.

A simple (1 + ϵ)-approximation follows using the idea of viabilitygraphs (an extension of visibility graphs)

Obtain a faster approximation by constructing a sparse viability graph

Page 87: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

In Summary

Motivated by applications, we study the problem of computing shortest

path among removable obstacles

We show that computing such a path exactly is NP-hard.

A simple (1 + ϵ)-approximation follows using the idea of viabilitygraphs (an extension of visibility graphs)

Obtain a faster approximation by constructing a sparse viability graph

Obtained data structures for approximate shortest path queries running

in polylogarithmic time

Page 88: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

In Summary

Motivated by applications, we study the problem of computing shortest

path among removable obstacles

We show that computing such a path exactly is NP-hard.

A simple (1 + ϵ)-approximation follows using the idea of viabilitygraphs (an extension of visibility graphs)

Obtain a faster approximation by constructing a sparse viability graph

Obtained data structures for approximate shortest path queries running

in polylogarithmic time

Applied these results to solve a shortest path problem in a stochasticmodel of obstacles

Page 89: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

In Summary

Motivated by applications, we study the problem of computing shortest

path among removable obstacles

We show that computing such a path exactly is NP-hard.

A simple (1 + ϵ)-approximation follows using the idea of viabilitygraphs (an extension of visibility graphs)

Obtain a faster approximation by constructing a sparse viability graph

Obtained data structures for approximate shortest path queries running

in polylogarithmic time

Applied these results to solve a shortest path problem in a stochasticmodel of obstacles

Thanks!

Page 90: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Backup : NP-Hardness

Simple reduction from Partition

ai

t

Gi

a1an

. . . . . .s

A is a set of integers, ai corresponds to group Gi

Page 91: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Backup : NP-Hardness

Simple reduction from Partition

ai

t

Gi

a1an

. . . . . .s

A is a set of integers, ai corresponds to group Gi

Go through the middle obstacle by paying cost ai

Go around it by adding a detour of length ai

Path must go through the channel

Page 92: with Removable Obstacles Computing Shortest Paths in the Planesud03r.github.io/slides/swat-18.pdf · Computing Shortest Paths in the Plane Pankaj K. Agarwal,Neeraj Kumar, Stavros

Backup : NP-Hardness

Simple reduction from Partition

ai

t

Gi

a1an

. . . . . .s

A is a set of integers, ai corresponds to group Gi

Go through the middle obstacle by paying cost ai

Go around it by adding a detour of length ai

An s–t path with length at most L = 1

2∑ai and cost at most C =

1

2∑ai exists

Path must go through the channel

if and only if set A can be partitioned into two equal groups.