dynamic shortest paths
Download
Skip this Video
Download Presentation
Dynamic Shortest Paths

Loading in 2 Seconds...

play fullscreen
1 / 31

Dynamic Shortest Paths - PowerPoint PPT Presentation


  • 76 Views
  • Uploaded on

Dynamic Shortest Paths. Camil Demetrescu University of Rome “La Sapienza” Giuseppe F. Italiano University of Rome “Tor Vergata”. update weight of edge (u,v) to w. Update (u,v,w) :. return distance from x to y. Query (x,y) :. (or shortest path from x to y).

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Dynamic Shortest Paths' - agrata


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
dynamic shortest paths

Dynamic Shortest Paths

Camil Demetrescu

University of Rome “La Sapienza”

Giuseppe F. Italiano

University of Rome “Tor Vergata”

dynamic all pairs shortest paths
update weight of edge (u,v) to w

Update(u,v,w):

return distance from x to y

Query(x,y):

(or shortest path from x to y)

Dynamic (All Pairs) Shortest Paths

Given a weighteddirectedgraph G=(V,E,w),perform any intermixed sequence of the following operations:

previous work on dynamic apsp
Previous work on dynamic APSP

# papers

65-69

70-74

75-79

80-84

85-89

90-94

95-99

00-

previous work on fully dynamic apsp
Graph

Weight

Update

Query

~

reals

O(n3)

Update recomputingfrom scratch

general

O(1)

~

[0,C]

O(n2.575 C0.681)

King 99

general

[0,C]

O(n2.5 (C log n)0.5)

O(1)

Henzinger et al. 97

planar

[0,C]

O(n9/7 log(nC))

Fackcharoemphol,

Rao 01

planar

reals

O(n9/5 log13/5 n)

general

reals

? < o(n3)

O(1)

D, Italiano 01

general

S reals

O(n2.5 (S log3 n)0.5)

O(1)

Previous work on fully dynamic APSP
a new fully dynamic algorithm
Graph

Weight

Update

Query

King 99

general

[0,C]

O(n2.5 (C log n)0.5)

O(1)

Henzinger et al. 97

planar

[0,C]

O(n9/7 log(nC))

Fackcharoemphol,

Rao 01

planar

reals

O(n9/5 log13/5 n)

D, Italiano 01

general

S reals

O(n2.5 (S log3 n)0.5)

O(1)

D, Italiano 02

general

reals

O(n2 log n)

O(1)

A new fully dynamic algorithm
uniform paths
A path is uniform if all of its

subpaths are shortest paths

x

y

πxy

Shortest path

Shortest path

Not a shortest path

Shortest path

x

y

πxy

Uniform paths

UNIFORM

NOT

UNIFORM

properties of uniform paths
Uniform paths

Shortest paths

Properties of Uniform paths

Theorem I

Shortest paths  Uniform paths

properties of uniform paths1
For the sake of simplicity, we assume that no two

paths in the graph have the same weight.

Theorem II

Uniform paths πxy are internally vertex-disjoint

π1

π2

x

y

π3

Properties of Uniform paths

(Ties can be broken by adding a tiny fraction to the

weight of each edge)

properties of uniform paths2
x

y

Properties of Uniform paths

Theorem III

There are at most n-1 uniform paths connecting x,y

This is a consequence of vertex-disjointess…

dynamic graphs
We call dynamic graph a sequence of graphs such that, for any t, Gt-1and Gt differ in the weight of exactly one edgeDynamic graphs
uniform paths in dynamic graphs1
Gt

x

y

A uniform path in Gt is disappearing if it is not uniform in Gt+1

Gt+1

x

y

Uniform paths in dynamic graphs
uniform paths in dynamic graphs2
Theorem IV

At most n uniform paths can appear after an increase

At most 1 uniform path can disappear after an increase

Corollary

The amortized number of appearing uniform paths

per update in an increase-only sequence is O(1)

Uniform paths in dynamic graphs
uniform paths in dynamic graphs3
What about fully dynamic sequences?

10

10

20

20

x

x

y

y

100

30

30

The weights of uniform paths that disappear and

then reappear do not change…

40

40

Uniform paths in dynamic graphs
uniform paths in dynamic graphs4
We conjecture that the bound is O(1)…Uniform paths in dynamic graphs

Theorem V

For any pair (x,y), the amortized number of uniform

paths πxyappearingwith a new weight per update in

a fully dynamic sequence is O(log n)

shortest paths and edge weight updates
The shortest path is the same, but has different weight:

EASY

EASY

x

y



The shortest path is different (update = decrease):

x

y

-

Shortest paths and edge weight updates

How does a shortest path change after an update?

shortest paths and edge weight updates1
a

b

+

HARD

The shortest path is different (update = increase):

If we look closer, we realize that the new shortest path

from a to b was already uniform before the update!

x

y

Shortest paths and edge weight updates
a new approach to dynamic apsp
For each pair x,y, maintain in a data structure uniform pathsconnecting x to y

Main idea:

The combinatorial properties of uniform paths imply that only a small piece of information needs to be updated at each time…

Are we done?

A new approach to dynamic APSP

NO

how to pay only once
x

x

y

y

x

y

This path stays the same while flipping

between uniform and non-uniform:

We would like to have an update algorithm that pays only once for it

over the whole sequence...

How to pay only once?
looking at the substructure
may

x

y

resurrect!

x

y

This path remains a shortest path

after the insertion

This path is no longer a shortest path

after the insertion…

Looking at the substructure

…but if we removed the edge it would get a shortest path again!

zombies
Zombies

A path is azombieif it used to be a shortest path,

and its edges have not been updated since then

potentially uniform paths
shortest path

x

Uniform path

πxy

y

shortest path

shortest path or zombie

x

Potentiallyuniform path

πxy

y

shortest path or zombie

Potentially uniform paths

Relaxed notion of uniformity:

Subpaths do not need to be shortest at the same time

properties of potentially uniform paths
Theorem I

Uniform paths  Potentially uniform paths

Uniform paths

Shortest paths

Properties of potentially uniform paths

Potentiallyuniform paths

properties of potentially uniform paths1
Properties of potentially uniform paths

Theorem II

O(zn2) zombies at any time

O(zn2) new potentially uniform paths per update

how many zombies can we have
A lot!

We can construct a dynamic graph with (n3) zombies at any time, amortized.

100

100

100

(n)

(n)

90

90

100

90

80

80

(n)

70

= (n3)

# zombies = (n2)

+(n2)

+(n2)

(n)

How many zombies can we have?
reducing of zombies smoothing
100

90

100

90

80

100

100

100

100

70

100

100

(n)

(n)

90

90

90

90

100

90

90

80

80

80

80

(n)

70

70

(n2)

(n2)

(n2)

0 (in general, O(n2))

Reducing # of zombies: Smoothing

At each update we pick an edge with the maximum number of zombies passing through it, and we remove and reinsert it

# zombies =

a new approach to dynamic apsp ii
For each pair x,y, maintain in a data structure the potentially uniform paths connecting x to y

Main idea:

The combinatorial properties of potentially uniform paths imply that, if we do smoothing, we have only O(n2) new potentially uniform paths per update, amortized…

A new approach to dynamic APSP (II)

There exists and updatealgorithm that spendsO(log n) time per potentially uniform path

handling the hard case
EASY

+

The shortest path is different (update = increase):

If we maintain potentially uniform paths using priority queues,

we can find this path in O(1) time!

x

y

Handling the hard case
conclusions
Uniform paths are the heart of dynamic shortest paths

Combinatorially well-behaved in dynamic graphs

New approach based on maintaining

potentially uniform paths

Applications to Railway Optimization Problems?

Solves the problem in its full generality

Conclusions
ad