Choosing best shortcuts for a path Martin Pe car Jozef Stefan - - PowerPoint PPT Presentation

choosing best shortcuts for a path
SMART_READER_LITE
LIVE PREVIEW

Choosing best shortcuts for a path Martin Pe car Jozef Stefan - - PowerPoint PPT Presentation

Choosing best shortcuts for a path Martin Pe car Jozef Stefan Institute, Ljubljana, Slovenia Koper, 17. 6. 2015 1 / 19 Motivation We want to improve the network, but are constrained (budget) Our goal is to improve DAGs like Contraction


slide-1
SLIDE 1

Choosing best shortcuts for a path

Martin Peˇ car

Jozef Stefan Institute, Ljubljana, Slovenia

Koper, 17. 6. 2015

1 / 19

slide-2
SLIDE 2

Motivation

We want to improve the network, but are constrained (budget) Our goal is to improve DAGs like Contraction Hierarchies

2 / 19

slide-3
SLIDE 3

Motivation

We want to improve the network, but are constrained (budget) Our goal is to improve DAGs like Contraction Hierarchies

2 / 19

slide-4
SLIDE 4

Motivation - example

3 / 19

slide-5
SLIDE 5

Related problems

1

The Shortcut Problem: asks what is the best set of k additional edges (shortcuts) so that shortest paths will be preserved and the average hop length of paths will be minimal;

2

Multi-Constrained Shortest Path: find a path from s to t with lowest cost, subject to constraints;

3

Constrained Network Optimization

4 / 19

slide-6
SLIDE 6

Related problems

1

The Shortcut Problem: asks what is the best set of k additional edges (shortcuts) so that shortest paths will be preserved and the average hop length of paths will be minimal;

2

Multi-Constrained Shortest Path: find a path from s to t with lowest cost, subject to constraints;

3

Constrained Network Optimization

4 / 19

slide-7
SLIDE 7

Related problems

1

The Shortcut Problem: asks what is the best set of k additional edges (shortcuts) so that shortest paths will be preserved and the average hop length of paths will be minimal;

2

Multi-Constrained Shortest Path: find a path from s to t with lowest cost, subject to constraints;

3

Constrained Network Optimization

4 / 19

slide-8
SLIDE 8

General model

Definition Weighted multiobjective network design problem B ∈ R+

d2

a vector of constraints (”budget”) G = (V, E) a directed (multi)graph c : E → R+

d1

costs b : E → R+

d2

”building” costs w : V × V → R+

d1

weights Determine E0 ⊂ E such that it satisfies the constrains b(E0) ≤ B and achieves min

ES⊂E(

  • i,j

wijc(PG(V,ES)(i, j)))

5 / 19

slide-9
SLIDE 9

General model

Definition Weighted multiobjective network design problem B ∈ R+

d2

a vector of constraints (”budget”) G = (V, E) a directed (multi)graph c : E → R+

d1

costs b : E → R+

d2

”building” costs w : V × V → R+

d1

weights Determine E0 ⊂ E such that it satisfies the constrains b(E0) ≤ B and achieves min

ES⊂E(

  • i,j

wijc(PG(V,ES)(i, j)))

5 / 19

slide-10
SLIDE 10

General model

Definition Weighted multiobjective network design problem B ∈ R+

d2

a vector of constraints (”budget”) G = (V, E) a directed (multi)graph c : E → R+

d1

costs b : E → R+

d2

”building” costs w : V × V → R+

d1

weights Determine E0 ⊂ E such that it satisfies the constrains b(E0) ≤ B and achieves min

ES⊂E(

  • i,j

wijc(PG(V,ES)(i, j)))

5 / 19

slide-11
SLIDE 11

General model

Definition Weighted multiobjective network design problem B ∈ R+

d2

a vector of constraints (”budget”) G = (V, E) a directed (multi)graph c : E → R+

d1

costs b : E → R+

d2

”building” costs w : V × V → R+

d1

weights Determine E0 ⊂ E such that it satisfies the constrains b(E0) ≤ B and achieves min

ES⊂E(

  • i,j

wijc(PG(V,ES)(i, j)))

5 / 19

slide-12
SLIDE 12

General model

Definition Weighted multiobjective network design problem B ∈ R+

d2

a vector of constraints (”budget”) G = (V, E) a directed (multi)graph c : E → R+

d1

costs b : E → R+

d2

”building” costs w : V × V → R+

d1

weights Determine E0 ⊂ E such that it satisfies the constrains b(E0) ≤ B and achieves min

ES⊂E(

  • i,j

wijc(PG(V,ES)(i, j)))

5 / 19

slide-13
SLIDE 13

General model

Definition Weighted multiobjective network design problem B ∈ R+

d2

a vector of constraints (”budget”) G = (V, E) a directed (multi)graph c : E → R+

d1

costs b : E → R+

d2

”building” costs w : V × V → R+

d1

weights Determine E0 ⊂ E such that it satisfies the constrains b(E0) ≤ B and achieves min

ES⊂E(

  • i,j

wijc(PG(V,ES)(i, j)))

5 / 19

slide-14
SLIDE 14

Simple problem

Consider a path connecting some cities. We have a budget which allows construction of a few new road sections.

1 2 3 ... n

Dashed shortcuts are not allowed (b(es) = Inf) All arcs point to a vertex with higher index

6 / 19

slide-15
SLIDE 15

Simple problem

Consider a path connecting some cities. We have a budget which allows construction of a few new road sections.

1 2 3 ... n

Dashed shortcuts are not allowed (b(es) = Inf) All arcs point to a vertex with higher index

6 / 19

slide-16
SLIDE 16

Simple problem

Consider a path connecting some cities. We have a budget which allows construction of a few new road sections.

1 2 3 ... n

Dashed shortcuts are not allowed (b(es) = Inf) All arcs point to a vertex with higher index

6 / 19

slide-17
SLIDE 17

Simple problem

Consider a path connecting some cities. We have a budget which allows construction of a few new road sections.

1 2 3 ... n

Dashed shortcuts are not allowed (b(es) = Inf) All arcs point to a vertex with higher index

6 / 19

slide-18
SLIDE 18

Variants of the problem

Cost of using a shortcut (b(es)): b(es) = 1 for all allowed shortcuts, b(es) can be different. Weights (wij): w1n = 1, other wij = 0 ⇒ constrained shortest path; several non-zero weights ⇒ constrained network

  • ptimization.

7 / 19

slide-19
SLIDE 19

Variants of the problem

Cost of using a shortcut (b(es)): b(es) = 1 for all allowed shortcuts, b(es) can be different. Weights (wij): w1n = 1, other wij = 0 ⇒ constrained shortest path; several non-zero weights ⇒ constrained network

  • ptimization.

7 / 19

slide-20
SLIDE 20

Variants of the problem

Cost of using a shortcut (b(es)): b(es) = 1 for all allowed shortcuts, b(es) can be different. Weights (wij): w1n = 1, other wij = 0 ⇒ constrained shortest path; several non-zero weights ⇒ constrained network

  • ptimization.

7 / 19

slide-21
SLIDE 21

Variants of the problem

Cost of using a shortcut (b(es)): b(es) = 1 for all allowed shortcuts, b(es) can be different. Weights (wij): w1n = 1, other wij = 0 ⇒ constrained shortest path; several non-zero weights ⇒ constrained network

  • ptimization.

7 / 19

slide-22
SLIDE 22

Variants of the problem

Cost of using a shortcut (b(es)): b(es) = 1 for all allowed shortcuts, b(es) can be different. Weights (wij): w1n = 1, other wij = 0 ⇒ constrained shortest path; several non-zero weights ⇒ constrained network

  • ptimization.

7 / 19

slide-23
SLIDE 23

Variants of the problem

Cost of using a shortcut (b(es)): b(es) = 1 for all allowed shortcuts, b(es) can be different. Weights (wij): w1n = 1, other wij = 0 ⇒ constrained shortest path; several non-zero weights ⇒ constrained network

  • ptimization.

7 / 19

slide-24
SLIDE 24

Variants of the problem

Cost of using a shortcut (b(es)): b(es) = 1 for all allowed shortcuts, b(es) can be different. Weights (wij): w1n = 1, other wij = 0 ⇒ constrained shortest path; several non-zero weights ⇒ constrained network

  • ptimization.

7 / 19

slide-25
SLIDE 25

All subpaths distances

Subpath travelling costs c45 c34 c35 c23 c24 c25 c12 c13 c14 c15 cij = cij−1 + cj−1j

8 / 19

slide-26
SLIDE 26

All subpaths distances

Subpath travelling costs c45 c34 c35 c23 c24 c25 c12 c13 c14 c15 cij = cij−1 + cj−1j

8 / 19

slide-27
SLIDE 27

b = 1 Constrained shortest path

c(1, n, B) = min

i,k (c(1, i, k) + c(i, n, B − k))

k = ⌊B⌋ Algorithm 1 Dynamic Programming CSP

1: for l = 0 to k do 2:

for i = 1 to n do

3:

for j = i to n do

4:

c(i, j, l) = minv,s(c(i, v, s) + c(v, j, l − s))

5:

c(i, j, l) = min(c(i, j, l), cs

ij )

6:

end for

7:

end for

8: end for

Complexity is O(k2n3)

9 / 19

slide-28
SLIDE 28

b = 1 Constrained shortest path

c(1, n, B) = min

i,k (c(1, i, k) + c(i, n, B − k))

k = ⌊B⌋ Algorithm 2 Dynamic Programming CSP

1: for l = 0 to k do 2:

for i = 1 to n do

3:

for j = i to n do

4:

c(i, j, l) = minv,s(c(i, v, s) + c(v, j, l − s))

5:

c(i, j, l) = min(c(i, j, l), cs

ij )

6:

end for

7:

end for

8: end for

Complexity is O(k2n3)

9 / 19

slide-29
SLIDE 29

b = 1 Constrained shortest path

c(1, n, B) = min

i,k (c(1, i, k) + c(i, n, B − k))

k = ⌊B⌋ Algorithm 3 Dynamic Programming CSP

1: for l = 0 to k do 2:

for i = 1 to n do

3:

for j = i to n do

4:

c(i, j, l) = minv,s(c(i, v, s) + c(v, j, l − s))

5:

c(i, j, l) = min(c(i, j, l), cs

ij )

6:

end for

7:

end for

8: end for

Complexity is O(k2n3)

9 / 19

slide-30
SLIDE 30

b > 0 Constrained shortest path

Even the simplest form (each arc replaced by a shortcut) is NP-complete, can be translated to knapsack problem

1 2 3 ... n

(M − c12, b12) (M − c23, b23) (M − cn−1n, bn−1n) (M, 0) (M, 0) (M, 0) (M, 0)

M = maxi cii+1

10 / 19

slide-31
SLIDE 31

b > 0 Constrained shortest path

Even the simplest form (each arc replaced by a shortcut) is NP-complete, can be translated to knapsack problem

1 2 3 ... n

(M − c12, b12) (M − c23, b23) (M − cn−1n, bn−1n) (M, 0) (M, 0) (M, 0) (M, 0)

M = maxi cii+1

10 / 19

slide-32
SLIDE 32

b > 0 Constrained shortest path

Even the simplest form (each arc replaced by a shortcut) is NP-complete, can be translated to knapsack problem

1 2 3 ... n

(M − c12, b12) (M − c23, b23) (M − cn−1n, bn−1n) (M, 0) (M, 0) (M, 0) (M, 0)

M = maxi cii+1

10 / 19

slide-33
SLIDE 33

Observations

The set of used shortcuts uniquely defines the resulting shortest path. Two shortcuts are compatible, if (interiors of) the intervals of the indexes of the end vertices are not overlapping. The shortest path can only contain compatible edges. Example: (5, 9) and (7, 12) are not compatible, while (5, 9) and (9, 12) are.

11 / 19

slide-34
SLIDE 34

Observations

The set of used shortcuts uniquely defines the resulting shortest path. Two shortcuts are compatible, if (interiors of) the intervals of the indexes of the end vertices are not overlapping. The shortest path can only contain compatible edges. Example: (5, 9) and (7, 12) are not compatible, while (5, 9) and (9, 12) are.

11 / 19

slide-35
SLIDE 35

Shortcut gain

Gain of using a shortcut is g(es

ij) = ( j−1

  • l=i

cll+1) − cij Gain of a compatible set of shortcuts is SC is g(SC) =

  • es∈SC

g(es)

12 / 19

slide-36
SLIDE 36

Shortcut gain

Gain of using a shortcut is g(es

ij) = ( j−1

  • l=i

cll+1) − cij Gain of a compatible set of shortcuts is SC is g(SC) =

  • es∈SC

g(es)

12 / 19

slide-37
SLIDE 37

Optimal gain

Lemma If the sets are compatible, then g(SO) ≥ g(SS) ⇒ c(PSO) ≤ c(PSS). PSS are edges from P which are skipped in PSS. c(PSS) = c(P) + c(SS) − c(PSS) = c(P) − g(SS) c(PSO) = c(P) + c(SO) − c(PSO) = c(P) − g(SO) g(SO) ≥ g(SS) ⇒ c(PSO) ≤ c(PSS) We are looking for the compatible set of shortcuts with the biggest gain.

13 / 19

slide-38
SLIDE 38

Optimal gain

Lemma If the sets are compatible, then g(SO) ≥ g(SS) ⇒ c(PSO) ≤ c(PSS). PSS are edges from P which are skipped in PSS. c(PSS) = c(P) + c(SS) − c(PSS) = c(P) − g(SS) c(PSO) = c(P) + c(SO) − c(PSO) = c(P) − g(SO) g(SO) ≥ g(SS) ⇒ c(PSO) ≤ c(PSS) We are looking for the compatible set of shortcuts with the biggest gain.

13 / 19

slide-39
SLIDE 39

Optimal gain

Lemma If the sets are compatible, then g(SO) ≥ g(SS) ⇒ c(PSO) ≤ c(PSS). PSS are edges from P which are skipped in PSS. c(PSS) = c(P) + c(SS) − c(PSS) = c(P) − g(SS) c(PSO) = c(P) + c(SO) − c(PSO) = c(P) − g(SO) g(SO) ≥ g(SS) ⇒ c(PSO) ≤ c(PSS) We are looking for the compatible set of shortcuts with the biggest gain.

13 / 19

slide-40
SLIDE 40

Optimal gain

Lemma If the sets are compatible, then g(SO) ≥ g(SS) ⇒ c(PSO) ≤ c(PSS). PSS are edges from P which are skipped in PSS. c(PSS) = c(P) + c(SS) − c(PSS) = c(P) − g(SS) c(PSO) = c(P) + c(SO) − c(PSO) = c(P) − g(SO) g(SO) ≥ g(SS) ⇒ c(PSO) ≤ c(PSS) We are looking for the compatible set of shortcuts with the biggest gain.

13 / 19

slide-41
SLIDE 41

Optimal gain

Lemma If the sets are compatible, then g(SO) ≥ g(SS) ⇒ c(PSO) ≤ c(PSS). PSS are edges from P which are skipped in PSS. c(PSS) = c(P) + c(SS) − c(PSS) = c(P) − g(SS) c(PSO) = c(P) + c(SO) − c(PSO) = c(P) − g(SO) g(SO) ≥ g(SS) ⇒ c(PSO) ≤ c(PSS) We are looking for the compatible set of shortcuts with the biggest gain.

13 / 19

slide-42
SLIDE 42

Optimal gain

Lemma If the sets are compatible, then g(SO) ≥ g(SS) ⇒ c(PSO) ≤ c(PSS). PSS are edges from P which are skipped in PSS. c(PSS) = c(P) + c(SS) − c(PSS) = c(P) − g(SS) c(PSO) = c(P) + c(SO) − c(PSO) = c(P) − g(SO) g(SO) ≥ g(SS) ⇒ c(PSO) ≤ c(PSS) We are looking for the compatible set of shortcuts with the biggest gain.

13 / 19

slide-43
SLIDE 43

b > 0 CSP - Greedy approach

Algorithm 4 Greedy CSP

1: Assign each shortcut eS its normalized gain gN(es) 2: Sort shortcuts S by their normalized gain (descending) 3: SO = {}, i = 1 4: while b(SO) < B do 5:

if S(i) compatible with SO then

6:

SO = SO ∪ S(i)

7:

end if

8:

i++

9: end while 10: for j = 1 to m do 11:

if g(S(j)) > g(SO) then

12:

SO = S(j)

13:

end if

14: end for

14 / 19

slide-44
SLIDE 44

b > 0 CSP - Greedy approach

Algorithm 5 Greedy CSP

1: Assign each shortcut eS its normalized gain gN(es) 2: Sort shortcuts S by their normalized gain (descending) 3: SO = {}, i = 1 4: while b(SO) < B do 5:

if S(i) compatible with SO then

6:

SO = SO ∪ S(i)

7:

end if

8:

i++

9: end while 10: for j = 1 to m do 11:

if g(S(j)) > g(SO) then

12:

SO = S(j)

13:

end if

14: end for

14 / 19

slide-45
SLIDE 45

b > 0 CSP - Greedy approach

Algorithm 6 Greedy CSP

1: Assign each shortcut eS its normalized gain gN(es) 2: Sort shortcuts S by their normalized gain (descending) 3: SO = {}, i = 1 4: while b(SO) < B do 5:

if S(i) compatible with SO then

6:

SO = SO ∪ S(i)

7:

end if

8:

i++

9: end while 10: for j = 1 to m do 11:

if g(S(j)) > g(SO) then

12:

SO = S(j)

13:

end if

14: end for

14 / 19

slide-46
SLIDE 46

Counterexample

2-approximation?

1 2 3 4 5

gN = 1 gN = 1 − ǫ gN = 1 − ǫ gN = 1 − ǫ gN = 1 − ǫ

2 B bmax

  • approximation

15 / 19

slide-47
SLIDE 47

Counterexample

2-approximation?

1 2 3 4 5

gN = 1 gN = 1 − ǫ gN = 1 − ǫ gN = 1 − ǫ gN = 1 − ǫ

2 B bmax

  • approximation

15 / 19

slide-48
SLIDE 48

Counterexample

2-approximation?

1 2 3 4 5

gN = 1 gN = 1 − ǫ gN = 1 − ǫ gN = 1 − ǫ gN = 1 − ǫ

2 B bmax

  • approximation

15 / 19

slide-49
SLIDE 49

Conclusions

Weighted multiobjective CNO was defined Special cases of CSP were discussed Further work - find effective solutions for wider classes of graphs

16 / 19

slide-50
SLIDE 50

Conclusions

Weighted multiobjective CNO was defined Special cases of CSP were discussed Further work - find effective solutions for wider classes of graphs

16 / 19

slide-51
SLIDE 51

Composition of problems

CSP is composed of 2 problems: find shortest path find path, cheaper than B Both are in P, but the composed problem is NP-hard

17 / 19

slide-52
SLIDE 52

Open problem

What can we tell about the complexity of the composed problem, based on complexity of the subproblems and the type

  • f composition?

18 / 19

slide-53
SLIDE 53

Questions

Questions, comments, ideas, · · · ?

19 / 19