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 Path Algorithms 3. Timetable Information Graphs 4. Experiments 5. Conclusion & Outlook
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
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
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
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
6 Overview 1. Introduction √ 2. Multi-Level Graphs 3. Timetable Information Graphs 4. Experiments 5. Conclusion & Outlook
7 Multi-Level Graphs Given • a weighted digraph G = ( V, E ) • a sequence of subsets of V V ⊃ S 1 ⊃ . . . ⊃ S l 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
7 Multi-Level Graphs Given • a weighted digraph G = ( V, E ) • a sequence of subsets of V V ⊃ S 1 ⊃ . . . ⊃ S l 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
8 Level Construction G b c a G = ( V, E ) , S 1 = { a, b, c } , S 2 = { a, c }
8 Level Construction Level 1 G Level 0 b c a Connected Components in G − S 1
8 Level Construction Level 1 G Level 0 b c a No internal vertex of path belongs to S 1
8 Level Construction Level 1 G Level 0 b c a ⇒ Edge in level 1
8 Level Construction Level 1 G Level 0 b c a No internal vertex of path belongs to S 1
8 Level Construction Level 1 G Level 0 b c a ⇒ Edge in level 1
8 Level Construction Level 1 G Level 0 b c a No internal vertex of path belongs to S 1
8 Level Construction Level 1 G Level 0 b c a ⇒ Edge in level 1
8 Level Construction E Level 1 1 G Level 0 b c a All edges in level 1
8 Level Construction E Level 1 1 Consider now iteratively graph ( S 1 , E 1 )
8 Level Construction E Level 2 2 E Level 1 1 Connected components in G − S 2
8 Level Construction E Level 2 2 E Level 1 1 No internal vertex of path belongs to S 2
8 Level Construction E Level 2 2 E Level 1 1 ⇒ Edge in level 2
8 Level Construction E Level 2 2 E Level 1 1 All edges in level 2
8 Level Construction E Level 2 2 E Level 1 1 G Level 0 b c a 3-Level Graph M ( G, S 1 , S 2 )
9 Multi-Level Graphs Given • a weighted digraph G = ( V, E ) • a sequence of subsets of V V ⊃ S 1 ⊃ . . . ⊃ S l 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
10 Component Tree E Level 2 2 E Level 1 1 G Level 0
10 Component Tree Level 2 Level 1 Level 0
10 Component Tree root Level 2 Level 1 Level 0
10 Component Tree root Level 2 Level 1 Level 0
10 Component Tree root Level 2 Level 1 Level 0
10 Component Tree root Level 2 Level 1 Level 0
11 Multi-Level Graphs Given • a weighted digraph G = ( V, E ) • a sequence of subsets of V V ⊃ S 1 ⊃ . . . ⊃ S l 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
12 Define Subgraph root Level 2 Level 1 Level 0 t s
12 Define Subgraph root Level 2 Level 1 Level 0 t s
12 Define Subgraph root E Level 2 2 E Level 1 1 G Level 0 t s
12 Define Subgraph root E Level 2 2 E Level 1 1 G Level 0 t s
12 Define Subgraph root E Level 2 2 E Level 1 1 G Level 0 t s
12 Define Subgraph root E Level 2 2 E Level 1 1 G Level 0 t s
13 Multi-Level Graphs Given • a weighted digraph G = ( V, E ) • a sequence of subsets of V V ⊃ S 1 ⊃ . . . ⊃ S l 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
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
15 A Different Pair s, t root Level 2 Level 1 Level 0 s t
15 A Different Pair s, t E Level 2 2 E Level 1 1 s G Level 0 t
15 A Different Pair s, t Level 2 E Level 1 1 s Level 0 t
16 Overview 1. Introduction √ 2. Multi-Level Graphs √ 3. Timetable Information Graphs 4. Experiments 5. Conclusion & Outlook
17 Station Graph Korinthos Athens Patras
18 Train Graph Athens Patras Korinthos
18 Train Graph 00:00 Athens Patras Korinthos 24:00 time
18 Train Graph 00:00 Athens Patras Korinthos 24:00 time
18 Train Graph 00:00 Athens Patras Korinthos 24:00 time
19 Query Single-source some-targets shortest path problem 00:00 Athens Patras Korinthos departure 10:00 24:00 arrival time
20 Multi-Level Train Graph • Given l subsets of stations Σ 1 ⊃ . . . ⊃ Σ l • Component tree in station graph • Define subgraph for a pair of stations
21 Overview 1. Introduction √ 2. Multi-Level Graphs √ 3. Timetable Information Graphs √ 4. Experiments 5. Conclusion & Outlook
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
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 n j stations according to A, B, C • n 1 = 1974 , . . . , n 10 = 50 ❀ Sets of stations Σ A j , Σ B j , Σ C j
24 2-Level Graphs M ( G, Σ X j ) Number of Additional Edges 7e+06 importance degree random 6e+06 5e+06 4e+06 3e+06 2e+06 1e+06 0 0 200 400 600 800 1000 1200 1400 1600 1800 2000
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
26 2-Level Graphs M ( G, Σ A j ) Average Speed-up 4 speedup 3.5 3 2.5 2 1.5 1 0 200 400 600 800 1000 1200 1400 1600 1800 2000
27 Problem with small Σ A j Big components ⇒ Level 1 rarely used E Level 1 1 s G Level 0 t
28 2-Level Graphs M ( G, Σ A j ) Queries Using Level 1 14 110 speedup of queries using level 1 percentage of queries using level 1 12 100 10 90 8 80 6 70 4 60 2 50 0 40 0 200 400 600 800 1000 1200 1400 1600 1800 2000
29 3-Level Graphs M ( G, Σ A j , Σ A k ) Average Speed-up 11 1 7 8 9 10 9 8 7 6 5 4 0 50 100 150 200 250 300 350 400 450 500
30 l -Level Graphs M ( G, Σ 1 , . . . , Σ l − 1 ) Best Average Speed-up (CPU-time, #Edges hit) 18 CPU-speedup edge-speedup 16 14 12 10 8 6 4 2 0 1 2 3 4 5 6
31 Overview 1. Introduction √ 2. Multi-Level Graphs √ 3. Timetable Information Graphs √ 4. Experiments √ 5. Conclusion & Outlook
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
33 Overview 1. Introduction √ 2. Multi-Level Graphs √ 3. Timetable Information Graphs √ 4. Experiments √ 5. Conclusion & Outlook √
Recommend
More recommend