Top Banner
Label Placement in Road Maps Andreas Gemsa, Benjamin Niedermann , Martin N ¨ ollenburg KIT – University of the State of Baden-Wuerttemberg and National Laboratory of the Helmholtz Association I NSTITUTE OF T HEORETICAL I NFORMATICS · KARLSRUHE I NSTITUTE OF T ECHNOLOGY www.kit.edu T St. K n u t h S t Hamming St. Dijkstra St. Hamming St. u g . r n i
51

Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Mar 07, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road MapsAndreas Gemsa, Benjamin Niedermann, Martin Nollenburg

KIT – University of the State of Baden-Wuerttemberg andNational Laboratory of the Helmholtz Association

INSTITUTE OF THEORETICAL INFORMATICS · KARLSRUHE INSTITUTE OF TECHNOLOGY

www.kit.edu

T

St.

KnuthSt

HammingSt.Dijkstra St.

Ham

ming

St.

u

g.

r ni

Page 2: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Introduction

Given: Road map.

Questions discussed in this talk:

Find: Good overlapping-free labelingHammingSt.

Dijkstra St.H

amm

ingSt.

th St.

Knu

Tur ngSt.i

Why should we consider road labeling?

How to model the problem of road labeling?

What is the computational complexity of labeling a road map?

What algorithms can be found for labeling road maps?

Page 3: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin NollenburgKIT – University of the State of Baden-Wuerttemberg andNational Laboratory of the Helmholtz Association

Motivation

www.kit.edu

Page 4: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Why considering road labeling?

Example: Google Maps

Karlsruhe Hermann-VollmerstraßeLocation:

20m

Page 5: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Why considering road labeling?

Example: Google Maps

Karlsruhe Hermann-VollmerstraßeLocation:

20m

Page 6: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Why considering road labeling?

Map:7 roads19 road sections

Example: Google Maps

Karlsruhe Hermann-VollmerstraßeLocation:

20m

road section = part of road between two junctions

Page 7: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Why considering road labeling?

Labeling:30 labels

Map:7 roads19 road sections

Example: Google Maps

Karlsruhe Hermann-VollmerstraßeLocation:

5 roads are labeled15 road sections are labeled.

20m

road section = part of road between two junctions

Page 8: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Why considering road labeling?

Labeling:30 labels

Map:7 roads19 road sections

Example: Google Maps

Karlsruhe Hermann-VollmerstraßeLocation:

5 roads are labeled15 road sections are labeled.

20m

road section = part of road between two junctions

Improvement:4 labels added7 roads are labeled19 road sections are labeled.

Page 9: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Why considering road labeling?

Labeling:30 labels

Map:7 roads19 road sections

Example: Google Maps

Karlsruhe Hermann-VollmerstraßeLocation:

5 roads are labeled15 road sections are labeled.

20m

road section = part of road between two junctions

Improvement:4 labels added7 roads are labeled19 road sections are labeled.16 labels less

Page 10: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Why considering road labeling?

Labeling:30 labels

Map:7 roads19 road sections

Example: Google Maps

Karlsruhe Hermann-VollmerstraßeLocation:

5 roads are labeled15 road sections are labeled.

20m

road section = part of road between two junctions

Improvement:4 labels added7 roads are labeled19 road sections are labeled.

Conclusion: many labels, but labeling can be improved.

16 labels less

Page 11: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Why considering road labeling?

Example: Bing MapsKarlsruhe KirchbuelLocation:

100m

Page 12: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Why considering road labeling?

Example: Bing Maps

Map:8 roads18 road sections

Karlsruhe KirchbuelLocation:

100m

Page 13: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Why considering road labeling?

Example: Bing Maps

Labeling:8 labels

Map:8 roads18 road sections

7 roads are labeled12 road sections are labeled.

Karlsruhe KirchbuelLocation:

100m

Page 14: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Why considering road labeling?

Example: Bing Maps

Labeling:8 labels

Map:8 roads18 road sections

7 roads are labeled12 road sections are labeled.

Improvement:4 labels are moved

7 roads are labeled17 road sections are labeled.

Karlsruhe KirchbuelLocation:

100m

100m

2 labels are added

Page 15: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Related Work

[Chirie, 2000]Criteria for road labeling

1) Labels placed inside and parallel to road shapes.2) Every road section between two junctions should

be clearly identified.3) No two road labels may intersect.

HammingSt.Dijkstra St.

Ham

ming

St.

th St.Knu

Tur ngSt.i

Page 16: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Related Work

[Chirie, 2000]Criteria for road labeling

1) Labels placed inside and parallel to road shapes.2) Every road section between two junctions should

be clearly identified.3) No two road labels may intersect.

Road labeling on gridsNP-complete to decide whether for every road at least one label can beplaced. [Seibert and Unger, 2000]Empirically efficient algorithm that finds such a labeling if possible[Neyer and Wagner, 2000]

HammingSt.Dijkstra St.

Ham

ming

St.

th St.Knu

Tur ngSt.i

Page 17: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin NollenburgKIT – University of the State of Baden-Wuerttemberg andNational Laboratory of the Helmholtz Association

Model for labeling road maps.

www.kit.edu

Page 18: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Basic Observations

T

St.

KnuthSt

HammingSt.

4) Labels of different roads may only intersect on junction areas.5) Maximizing the number of labels is not sufficient.

2) Labels are part of the roads.

Dijkstra St.

Ham

ming

St.

u

g.

r ni

KnuthSt.

Ham

ming

St.

HammingSt.

Turin

gSt

.

Ham

ming

St.

1) Roads can be decomposed into road sections.Part of the road that lies in be-tween two junctions.

3) Labels of the same road have the same length.

Maximize number of labeled road sections.

Page 19: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Model

Model road map as a planar embedded graph G = (V , E).

junction edge

road section

Each road section becomes an edge.Introduce junction edges to model junctions.Embedding of the edges is given by the skeleton of the road map.

Page 20: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Model

Model road map as a planar embedded graph G = (V , E).

junction edge

road section

Road =

Each road section becomes an edge.Introduce junction edges to model junctions.Embedding of the edges is given by the skeleton of the road map.

connected subgraph of G such that all contained road sectionshave the same name.

Page 21: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Model

Model road map as a planar embedded graph G = (V , E).

junction edge

road section

T

St.

KnuthSt

HammingSt.Dijkstra St.

Ham

ming

St.

u

g.

r ni

Labels are curves in the embedding.Labels must end on road sections,i.e., not on junction edges.Labels of same road have same length.

Each road section becomes an edge.Introduce junction edges to model junctions.Embedding of the edges is given by the skeleton of the road map.

Page 22: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Model

Model road map as a planar embedded graph G = (V , E).

junction edge

road section

T

St.

KnuthSt

HammingSt.Dijkstra St.

Ham

ming

St.

u

g.

r ni

Labels are curves in the embedding.Labels must end on road sections,i.e., not on junction edges.Labels of same road have same length.

Objective: Maximize number of labeled road sections.

Each road section becomes an edge.Introduce junction edges to model junctions.Embedding of the edges is given by the skeleton of the road map.

Page 23: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin NollenburgKIT – University of the State of Baden-Wuerttemberg andNational Laboratory of the Helmholtz Association

Computational complexity of road labeling.

www.kit.edu

Page 24: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Complexity

Problem of maximizing number of labeled road sections is NP-hard.

Page 25: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Complexity

Problem of maximizing number of labeled road sections is NP-hard.

Reduction: monotone planar 3-SAT.Given: 3SAT-Clauses C such that

each clause either contains positive or negative literals, andvariable-clause-graph G is planar.

Question: Is C satisfiable? (NP-hard)

Page 26: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Complexity

x4 ∨ x1 ∨ x5

x2 ∨ x1 ∨ x3 x3 ∨ x5 ∨ x4

x2 ∨ x4 ∨ x3

F Fx2 x3 x4 x5 x1

Problem of maximizing number of labeled road sections is NP-hard.

Reduction: monotone planar 3-SAT.Given: 3SAT-Clauses C such that

each clause either contains positive or negative literals, andvariable-clause-graph G is planar.

Question: Is C satisfiable? (NP-hard)

Example: x2 ∨ x4 ∨ x3 x4 ∨ x1 ∨ x5 x2 ∨ x1 ∨ x3 x3 ∨ x5 ∨ x4

x2 ∨ x4 ∨ x3 x4 ∨ x1 ∨ x5

x2 ∨ x1 ∨ x3 x3 ∨ x5 ∨ x4

x2 x3 x4 x5 x1 roadnetwork

Page 27: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin NollenburgKIT – University of the State of Baden-Wuerttemberg andNational Laboratory of the Helmholtz Association

Algorithms for labeling road maps.

www.kit.edu

Page 28: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Trees

root ρ

Assumption: Road map is tree T = (V , E).

Motivation:Use algorithms for trees as basis for heuristics.

Result:Algorithm that labels maximum number of roadsections in O(n3) time.

Page 29: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Motivation for Trees

Number ofsubgraphs in decomposition

trees 1 cycle ≥ 2 cycles∑

Paris20604 1742 583 2292989.9% 7.6% 2.5% 100%

London20538 1012 275 2182594.1% 4.6% 1.3% 100%

Los Angeles47131 767 350 4824897.7% 1.6% 0.7% 100%

Preprocessing Step:

Remove or cut any edge from road map that can be labeled triviallywithout loosing the optimal labeling.

For example: Long road sections.road map decomposes into subgraphs.

Page 30: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Trees

root ρ

Assumption: Road map G = (V , E) is tree.

Motivation:Use algorithms for trees as basis for heuristics.

Result:Algorithm that labels maximum number of roadsections in O(n3) time.

Page 31: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Trees

root ρ

Assumption: Road map G = (V , E) is tree.

Motivation:Use algorithms for trees as basis for heuristics.

Result:Algorithm that labels maximum number of roadsections in O(n3) time.

Notation:Point of label ` with smallest distanceto ρ in T is called lowest point of `.

lowestpoint of `

Page 32: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Canonical Labeling

root ρ

Arbitrary Labeling

Push labels towards leaves without changing the labeled road sections.Every labeling can be transformed into canonical labeling.

root ρ

Canonical Labeling

Page 33: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Properties of Canonical Labeling

root ρ

Canonical Labeling

(1) Each label starts either at vertex orat a previous label.

Page 34: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Properties of Canonical Labeling

root ρ

Canonical Labeling

(1) Each label starts either at vertex orat a previous label.

(2) Labels form tightly packed chains.

chain of labels

Page 35: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Properties of Canonical Labeling

root ρ

Canonical Labeling

(1) Each label starts either at vertex orat a previous label.

(2) Labels form tightly packed chains.

Idea: Construct all potential start pointsof labels in a canonical labeling.

Construct all possible chains.Each chain induces subdivision nodes.

Page 36: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Properties of Canonical Labeling

root ρ

Canonical Labeling

(1) Each label starts either at vertex orat a previous label.

(2) Labels form tightly packed chains.

Idea: Construct all potential start pointsof labels in a canonical labeling.

Construct all possible chains.Each chain induces subdivision nodes.

Page 37: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Properties of Canonical Labeling

root ρ

Canonical Labeling

(1) Each label starts either at vertex orat a previous label.

(2) Labels form tightly packed chains.

Idea: Construct all potential start pointsof labels in a canonical labeling.

Construct all possible chains.Each chain induces subdivision nodes.

Subdivision tree T ′=Original tree T +any possible start point of label incanonical labeling.

Page 38: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Properties of Canonical Labeling

root ρ

Canonical Labeling

(1) Each label starts either at vertex orat a previous label.

(2) Labels form tightly packed chains.

Idea: Construct all potential start pointsof labels in a canonical labeling.

Construct all possible chains.Each chain induces subdivision nodes.

Subdivision tree T ′=Original tree T +any possible start point of label incanonical labeling.

T ′ has O(n2) vertices.

Page 39: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Properties of Canonical Labeling

root ρ

Canonical Labeling

(1) Each label starts either at vertex orat a previous label.

(2) Labels form tightly packed chains.

Idea: Construct all potential start pointsof labels in a canonical labeling.

Construct all possible chains.Each chain induces subdivision nodes.

Subdivision tree T ′=Original tree T +any possible start point of label incanonical labeling.

T ′ has O(n2) vertices.

Page 40: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Optimal Labeling

Subdivision tree T ′

Consider vertex u of subdiv. tree T ′.

Lu= optimal labeling of tree T ′u rooted at u.

u

root ρ

Page 41: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Optimal Labeling

Subdivision tree T ′

Consider vertex u of subdiv. tree T ′.

Case 1: ∃ label ` ∈ Lu with lowest point u.

Lu= optimal labeling of tree T ′u rooted at u.

uLu =

⋃{Lv | v is child of u.}

root ρ

Page 42: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Optimal Labeling

Subdivision tree T ′

Consider vertex u of subdiv. tree T ′.

Case 1: ∃ label ` ∈ Lu with lowest point u.

Lu= optimal labeling of tree T ′u rooted at u.

Case 2: ∃ label ` ∈ Lu with lowest point u.

uLu =

⋃{Lv | v is child of u.}

Lu =⋃{Lv | v is child of `.} ∪ {`}

`

root ρ

Page 43: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Optimal Labeling

Subdivision tree T ′

Consider vertex u of subdiv. tree T ′.

Case 1: ∃ label ` ∈ Lu with lowest point u.

Lu= optimal labeling of tree T ′u rooted at u.

Case 2: ∃ label ` ∈ Lu with lowest point u.

Bottom-up approach to obtain optimal label-ing Lρ of T

dynamic programming

O(n5) time and O(n2) space.

uLu =

⋃{Lv | v is child of u.}

Lu =⋃{Lv | v is child of `.} ∪ {`}

consider any label with lowest point u

root ρ

Page 44: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Acceleration (Sketch)

u

`1`2

Observation: Lowest point splits label ` intotwo sub-labels `1 and `2.

extend into different sub-trees.length(`1) + length(`2) = length(`)

Consider label ` with lowest vertex u.

Page 45: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Acceleration (Sketch)

u

`1`2

Observation: Lowest point splits label ` intotwo sub-labels `1 and `2.

extend into different sub-trees.length(`1) + length(`2) = length(`)

Let v1, . . . , vk denote the children of u.Bi is tree T ′

vi+ {u, vi}

Consider label ` with lowest vertex u.

Page 46: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Acceleration (Sketch)

u

`1`2

Observation: Lowest point splits label ` intotwo sub-labels `1 and `2.

extend into different sub-trees.length(`1) + length(`2) = length(`)

Let v1, . . . , vk denote the children of u.Bi is tree T ′

vi+ {u, vi}

Let Ldij be optimal labeling of T ′

u such thatLd

ij contains label ` with lowest point u` extends into Bi by length d` extends into Bj

Consider label ` with lowest vertex u.

Page 47: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Acceleration (Sketch)

u

For each pair Bi , Bj build datastructure Di j

`1`2

Observation: Lowest point splits label ` intotwo sub-labels `1 and `2.

extend into different sub-trees.length(`1) + length(`2) = length(`)

Let v1, . . . , vk denote the children of u.Bi is tree T ′

vi+ {u, vi}

Query: length d ∈ R+

Output: Value of Ldij

Let Ldij be optimal labeling of T ′

u such thatLd

ij contains label ` with lowest point u` extends into Bi by length d` extends into Bj

Consider label ` with lowest vertex u.

Page 48: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Acceleration (Sketch)

u

For each pair Bi , Bj build datastructure Di j

`1`2

Observation: Lowest point splits label ` intotwo sub-labels `1 and `2.

extend into different sub-trees.length(`1) + length(`2) = length(`)

Let v1, . . . , vk denote the children of u.Bi is tree T ′

vi+ {u, vi}

Query: length d ∈ R+

Output: Value of Ldij

Let Ldij be optimal labeling of T ′

u such thatLd

ij contains label ` with lowest point u` extends into Bi by length d` extends into Bj

Each vertex in Bi and Bj induces a query.Take the best result.Paper: O(n) queries in O(n) time per vertex is sufficient.

Consider label ` with lowest vertex u.

Page 49: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Acceleration (Sketch)

u

For each pair Bi , Bj build datastructure Di j

`1`2

Observation: Lowest point splits label ` intotwo sub-labels `1 and `2.

extend into different sub-trees.length(`1) + length(`2) = length(`)

Let v1, . . . , vk denote the children of u.Bi is tree T ′

vi+ {u, vi}

Query: length d ∈ R+

Output: Value of Ldij

Let Ldij be optimal labeling of T ′

u such thatLd

ij contains label ` with lowest point u` extends into Bi by length d` extends into Bj

Each vertex in Bi and Bj induces a query.Take the best result.Paper: O(n) queries in O(n) time per vertex is sufficient.

Theorem:If the road map is a tree, the maximum number of roadsections can be labeled in O(n3) time and O(n) space.

Consider label ` with lowest vertex u.

Page 50: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Conclusion

Results:

Future work:

General model for placing labels in road maps.

Complexity result: NP-hardness.

Polynomial time algorithm for tree-shaped maps.

Initial experiments.

Heuristics and approximation algorithms.

Implementation and evaluation of algorithms.

Solving problem on super classes of trees.

Page 51: Label Placement in Road Maps - ITI Algorithmik I · 2015-05-27 · Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg¨ Introduction Given: Road

Label Placement in Road Maps – Andreas Gemsa, Benjamin Niedermann, Martin Nollenburg

Conclusion

Results:

Future work:

General model for placing labels in road maps.

Complexity result: NP-hardness.

Polynomial time algorithm for tree-shaped maps.

Initial experiments.

Heuristics and approximation algorithms.

Implementation and evaluation of algorithms.

Solving problem on super classes of trees.

A

io

your

Thank you

for

Thankyou

t tt ne

for

n