Using Multi-Level Graphs for Timetable Information Frank Schulz, - - PowerPoint PPT Presentation

using multi level graphs for timetable information
SMART_READER_LITE
LIVE PREVIEW

Using Multi-Level Graphs for Timetable Information Frank Schulz, - - PowerPoint PPT Presentation

Using Multi-Level Graphs for Timetable Information Frank Schulz, Dorothea Wagner, and Christos Zaroliagis 1 Overview 1. Introduction Timetable Information - A Shortest Path Problem 2. Multi-Level Graphs Speed-Up Technique for Shortest


slide-1
SLIDE 1

Using Multi-Level Graphs for Timetable Information

Frank Schulz, Dorothea Wagner, and Christos Zaroliagis

slide-2
SLIDE 2

1

Overview

  • 1. Introduction

⊲ Timetable Information - A Shortest Path Problem

  • 2. Multi-Level Graphs

⊲ Speed-Up Technique for Shortest Path Algorithms

  • 3. Timetable Information Graphs
  • 4. Experiments
  • 5. Conclusion & Outlook
slide-3
SLIDE 3

2

Overview

  • 1. Introduction

⊲ Timetable Information - A Shortest Path Problem

  • 2. Multi-Level Graphs

⊲ Speed-Up Technique for Shortest Path Algorithms

  • 3. Timetable Information Graphs
  • 4. Experiments
  • 5. Conclusion & Outlook
slide-4
SLIDE 4

3

Application Scenario

Timetable Information System

  • Large timetable

(e.g., 500.000 departures, 7.000 stations)

  • Central server

(e.g., 100 on-line queries per second) → Fast Algorithm Simple Queries

  • Input: departure and arrival station, departure time
  • Output: train connection with earliest arrival time
slide-5
SLIDE 5

4

Shortest Path Problem

Graph model

  • Solving a query ⇔ finding a shortest path

Speed-up techniques needed

  • Commercial products

⊲ Heuristics that don’t guarantee optimality

  • Scientific work

⊲ Geometric techniques ⊲ Hierarchical graph decomposition

slide-6
SLIDE 6

5

Contribution

Multi-Level Graph Approach

  • Hierarchical graph decomposition technique
  • For general digraphs
  • Idea

⊲ Preprocessing: Construct multiple levels of additional edges ⊲ On-Line Phase: Compute shortest paths in small subgraphs

Experimental Evaluation

  • For the given application scenario
  • With real data
slide-7
SLIDE 7

6

Overview

  • 1. Introduction √
  • 2. Multi-Level Graphs
  • 3. Timetable Information Graphs
  • 4. Experiments
  • 5. Conclusion & Outlook
slide-8
SLIDE 8

7

Multi-Level Graphs

Given

  • a weighted digraph G = (V, E)
  • a sequence of subsets of V

V ⊃ S1 ⊃ . . . ⊃ Sl Outline

  • Construct l levels of additional edges → M(G)
  • Component Tree
  • Define subgraph of M(G) for a pair s, t ∈ V
  • Use subgraph to compute s-t shortest path
slide-9
SLIDE 9

7

Multi-Level Graphs

Given

  • a weighted digraph G = (V, E)
  • a sequence of subsets of V

V ⊃ S1 ⊃ . . . ⊃ Sl Outline

  • Construct l levels of additional edges → M(G)
  • Component Tree
  • Define subgraph of M(G) for a pair s, t ∈ V
  • Use subgraph to compute s-t shortest path
slide-10
SLIDE 10

8

Level Construction

G a b c

G = (V, E), S1 = {a, b, c}, S2 = {a, c}

slide-11
SLIDE 11

8

Level Construction

G a b c Level 1 Level 0

Connected Components in G − S1

slide-12
SLIDE 12

8

Level Construction

G a b c Level 1 Level 0

No internal vertex of path belongs to S1

slide-13
SLIDE 13

8

Level Construction

G a b c Level 1 Level 0

⇒ Edge in level 1

slide-14
SLIDE 14

8

Level Construction

G a b c Level 1 Level 0

No internal vertex of path belongs to S1

slide-15
SLIDE 15

8

Level Construction

G a b c Level 1 Level 0

⇒ Edge in level 1

slide-16
SLIDE 16

8

Level Construction

G a b c Level 1 Level 0

No internal vertex of path belongs to S1

slide-17
SLIDE 17

8

Level Construction

G a b c Level 1 Level 0

⇒ Edge in level 1

slide-18
SLIDE 18

8

Level Construction

E G a b c

1

Level 1 Level 0

All edges in level 1

slide-19
SLIDE 19

8

Level Construction

E

1

Level 1

Consider now iteratively graph (S1, E1)

slide-20
SLIDE 20

8

Level Construction

E E

2 1

Level 2 Level 1

Connected components in G − S2

slide-21
SLIDE 21

8

Level Construction

E E

2 1

Level 2 Level 1

No internal vertex of path belongs to S2

slide-22
SLIDE 22

8

Level Construction

E E

2 1

Level 2 Level 1

⇒ Edge in level 2

slide-23
SLIDE 23

8

Level Construction

E E

2 1

Level 2 Level 1

All edges in level 2

slide-24
SLIDE 24

8

Level Construction

Level 2 Level 1 Level 0 E E G a b c

2 1

3-Level Graph M(G, S1, S2)

slide-25
SLIDE 25

9

Multi-Level Graphs

Given

  • a weighted digraph G = (V, E)
  • a sequence of subsets of V

V ⊃ S1 ⊃ . . . ⊃ Sl Outline

  • Construct l levels of additional edges → M(G) √
  • Component Tree
  • Define subgraph of M(G) for a pair s, t ∈ V
  • Use subgraph to compute s-t shortest path
slide-26
SLIDE 26

10

Component Tree

Level 2 Level 1 Level 0 E E G

2 1

slide-27
SLIDE 27

10

Component Tree

Level 2 Level 1 Level 0

slide-28
SLIDE 28

10

Component Tree

root Level 2 Level 1 Level 0

slide-29
SLIDE 29

10

Component Tree

root Level 2 Level 1 Level 0

slide-30
SLIDE 30

10

Component Tree

root Level 2 Level 1 Level 0

slide-31
SLIDE 31

10

Component Tree

root Level 2 Level 1 Level 0

slide-32
SLIDE 32

11

Multi-Level Graphs

Given

  • a weighted digraph G = (V, E)
  • a sequence of subsets of V

V ⊃ S1 ⊃ . . . ⊃ Sl Outline

  • Construct l levels of additional edges → M(G) √
  • Component Tree √
  • Define subgraph of M(G) for a pair s, t ∈ V
  • Use subgraph to compute s-t shortest path
slide-33
SLIDE 33

12

Define Subgraph

root Level 2 Level 1

t s

Level 0

slide-34
SLIDE 34

12

Define Subgraph

root Level 2 Level 1

t s

Level 0

slide-35
SLIDE 35

12

Define Subgraph

G

t s

root E E

2 1

Level 2 Level 1 Level 0

slide-36
SLIDE 36

12

Define Subgraph

G

t s

root E E

2 1

Level 2 Level 1 Level 0

slide-37
SLIDE 37

12

Define Subgraph

G

t s

root E E

2 1

Level 2 Level 1 Level 0

slide-38
SLIDE 38

12

Define Subgraph

t s

root E E

2 1

Level 2 Level 1 G Level 0

slide-39
SLIDE 39

13

Multi-Level Graphs

Given

  • a weighted digraph G = (V, E)
  • a sequence of subsets of V

V ⊃ S1 ⊃ . . . ⊃ Sl Outline

  • Construct l levels of additional edges → M(G) √
  • Component Tree √
  • Define subgraph of M(G) for a pair s, t ∈ V √
  • Use subgraph to compute s-t shortest path
slide-40
SLIDE 40

14

Lemma

The length of a shortest s-t path is the same in the s-t subgraph of M(G) and G. Subgraph of M(G):

s t

Original Graph G:

G

slide-41
SLIDE 41

15

A Different Pair s, t

root Level 2 Level 1 Level 0

s t

slide-42
SLIDE 42

15

A Different Pair s, t

E E G

2 1

Level 2 Level 1 Level 0

s t

slide-43
SLIDE 43

15

A Different Pair s, t

Level 2 Level 1 Level 0 E

1

t s

slide-44
SLIDE 44

16

Overview

  • 1. Introduction √
  • 2. Multi-Level Graphs √
  • 3. Timetable Information Graphs
  • 4. Experiments
  • 5. Conclusion & Outlook
slide-45
SLIDE 45

17

Station Graph

Patras Korinthos Athens

slide-46
SLIDE 46

18

Train Graph

Athens Korinthos Patras

slide-47
SLIDE 47

18

Train Graph

Athens Korinthos Patras

00:00 24:00

time

slide-48
SLIDE 48

18

Train Graph

Athens Korinthos Patras

00:00 24:00

time

slide-49
SLIDE 49

18

Train Graph

Athens Korinthos Patras

00:00 24:00

time

slide-50
SLIDE 50

19

Query

Single-source some-targets shortest path problem

Athens Korinthos Patras

00:00 24:00

time departure arrival

10:00

slide-51
SLIDE 51

20

Multi-Level Train Graph

  • Given l subsets of stations Σ1 ⊃ . . . ⊃ Σl
  • Component tree in station graph
  • Define subgraph for a pair of stations
slide-52
SLIDE 52

21

Overview

  • 1. Introduction √
  • 2. Multi-Level Graphs √
  • 3. Timetable Information Graphs √
  • 4. Experiments
  • 5. Conclusion & Outlook
slide-53
SLIDE 53

22

Experiments

Given one instance G of a traingraph

  • Timetable of German trains, winter 1996/97
  • ∼ 500000 vertices, ∼ 7000 stations

Evaluate multi-level train graph M(G, Σ1, . . . , Σl) Investigate dependence on

  • number of levels
  • input sequence Σ1 ⊃ . . . ⊃ Σl
slide-54
SLIDE 54

23

Sets of stations Σi

Three criteria to sort stations A Importance regarding train changes B Degree in station graph C Random Consider the first nj stations according to A, B, C

  • n1 = 1974, . . . , n10 = 50

❀ Sets of stations ΣA

j , ΣB j , ΣC j

slide-55
SLIDE 55

24

2-Level Graphs M(G, ΣX

j )

Number of Additional Edges

1e+06 2e+06 3e+06 4e+06 5e+06 6e+06 7e+06 200 400 600 800 1000 1200 1400 1600 1800 2000 importance degree random

slide-56
SLIDE 56

25

Evaluation of M(G, Σ1, . . . , Σl)

Consider only criterion A in the following Average Speed-up over 100000 queries

  • r = Runtime for Dijkstra in G
  • q = Runtime for Dijkstra in subgraph of M
  • Speed-up = r/q
slide-57
SLIDE 57

26

2-Level Graphs M(G, ΣA

j )

Average Speed-up

1 1.5 2 2.5 3 3.5 4 200 400 600 800 1000 1200 1400 1600 1800 2000 speedup

slide-58
SLIDE 58

27

Problem with small ΣA

j

Big components ⇒ Level 1 rarely used

E G

1

s t

Level 1 Level 0

slide-59
SLIDE 59

28

2-Level Graphs M(G, ΣA

j )

Queries Using Level 1

2 4 6 8 10 12 14 200 400 600 800 1000 1200 1400 1600 1800 2000 40 50 60 70 80 90 100 110 speedup of queries using level 1 percentage of queries using level 1

slide-60
SLIDE 60

29

3-Level Graphs M(G, ΣA

j , ΣA k )

Average Speed-up

4 5 6 7 8 9 10 11 50 100 150 200 250 300 350 400 450 500 1 7 8 9

slide-61
SLIDE 61

30

l-Level Graphs M(G, Σ1, . . . , Σl−1)

Best Average Speed-up (CPU-time, #Edges hit)

2 4 6 8 10 12 14 16 18 1 2 3 4 5 6 CPU-speedup edge-speedup

slide-62
SLIDE 62

31

Overview

  • 1. Introduction √
  • 2. Multi-Level Graphs √
  • 3. Timetable Information Graphs √
  • 4. Experiments √
  • 5. Conclusion & Outlook
slide-63
SLIDE 63

32

Conclusion & Outlook

Experimental evaluation of multi-level graphs

  • Input graph from timetable information
  • Best number of levels: 4, 5
  • Sizes of Σi are crucial

Outlook

  • Other input graphs
  • Relation

(Σ1, . . . , Σl) ↔ speed-up

⊲ Here: Criteria A, B, C; Sizes of Σi

  • Theoretical analysis
slide-64
SLIDE 64

33

Overview

  • 1. Introduction √
  • 2. Multi-Level Graphs √
  • 3. Timetable Information Graphs √
  • 4. Experiments √
  • 5. Conclusion & Outlook √