Compression of RDs
Compression of RDs
r
X
i
v
:
1
0
1
1
.
4
4
6
5
v
1
[
c
s
.
D
S
]
1
9
N
o
v
2
0
1
0
Compressed Transmission of Route Descriptions
Gernot Veit Batz, Robert Geisberger, Dennis Luxen, and Peter Sanders
{batz,geisberger,luxen,sanders}@kit.edu
November 22, 2010
Abstract
We present two methods to compress the description of a route in a road network, i.e., of a path in a
directed graph. The rst method represents a path by a sequence of via edges. The subpaths between
the via edges have to be unique shortest paths. Instead of via edges also via nodes can be used, though
this requires some simple preprocessing. The second method uses contraction hierarchies to replace
subpaths of the original path by shortcuts. The two methods can be combined with each other. Also,
we propose the application to mobile server based routing: We compute the route on a server which
has access to the latest information about congestions for example. Then we transmit the computed
route to the car using some mobile radio communication. There, we apply the compression to save
costs and transmission time. If the compression works well, we can transmit routes even when the
bandwidth is low. Although we have not evaluated our ideas with realistic data yet, they are quite
promising.
Keywords. server-based mobile route planning, GPS-based car navigation, hybrid scenario, data
compression, mobile communication, cellular phone network, graph algorithms, shortest path.
1 Introduction
Today GPS-based car navigation is quite common. There, routes can be computed either by a mobile
device located in the car or by a server system located in a computing center. The latter can be useful to
take temporary congestions or the latest changes of the road network or of the POI data into account. But
then, a description of the route has to be transmitted to the car using some mobile radio communication
like the cellular phone network for example. Of course, good compression rates are desireable as they
help to save costs and transmission time. Especially on countryside highways bandwidths can be low.
In this paper we describe two approaches for compressing a route: In the rst approach, we represent
a route by giving only a few road segments which we call via edges. Equivalently, one can also use via
nodes, though this requires some simple preprocessing of the road network. Via edges and via nodes
require that the mobile device located in the car has passably up-to-date map data and the capability to
compute optimal routes with respect to this data. In the second approach, contraction hierarchies [10]
are used to encode a route using shortcuts. In this case the mobile device in the car has to support
contraction hierarchies too. The two approaches can also be combined.
2 Preliminaries
In route planning a road network is usually represented by a weighted directed graph G= (V, E, c) where
the nodes represent junctions and the edges represent road segments; c : E C assigns a weight to every
:= (v
1
, v
2
), . . . , (v
m
, v
m+1
) with u
n+1
= v
1
can
be concatenated we write PP
for the concatenated path. Shortest paths are not necessary unique
in G, i.e., there may be more than one shortest path between the respective start and destination nodes.
But if there is a unique shortest path from a node u to a node v, then we denote it by SP(u, v).
3 Compression of Paths Using Via Edges
3.1 Representing a Path by Via Edges
Given a path P = (u
1
, u
2
), (u
2
, u
3
), . . . , (u
n
, u
n+1
) in G, which is not necessarily a shortest path. Let
Q = (u
i
1
, u
i
1
+1
), (u
i
2
, u
i
2
+1
), . . . , (u
i
k
, u
i
k
+1
) be a subsequence of P with the property that the shortest
paths from u
1
to u
i
1
, from u
i
k
+1
to u
n
, and from u
i
j
+1
to u
i
j+1
are unique for all 1 j < k. If
P = SP(u
1
, u
i
1
) (u
i
1
, u
i
1
+1
) SP(u
i
1
+1
, u
i
2
) (u
i
2
, u
i
2
+1
) SP(u
i
k
+1
, u
n+1
)
holds, then P is completely determined by Q. We call Q a representation of P by via edges in this case.
There, (u
i
1
, u
i
1
+1
), . . . , (u
i
k
, u
i
k
+1
) are the via edges.
Corollary 1. If Q is a representation of a path P by via edges, then |Q| |P| holds.
Corollary 1 means that Q is a compressed representation of P. At best, P itself is a unique shortest
path in G and we can represent P by the empty sequence Q = if the start and the destination of P are
known. Given a representation Q = (u
i
1
, u
i
1
+1
), . . . , (u
i
k
, u
i
k
+1
) of a path P by via edges the path P can
be reconstructed very easily: We only have to perform a one-to-one shortest path query between all pairs
of nodes u
i
j
+1
and u
i
j+1
for j {1, . . . , k 1}, between the start node and u
i
1
, as well as between u
i
k
+1
and the destination node.
3.2 Representing Paths by Via Nodes
Analogous to via edges, several paths can also be represented by via nodes. Then, a path P is represented
as a sequence of nodes lying on P. Again, the subpaths between the via nodes have to be unique shortest
paths. However, this fails in some cases. Consider, for example, a path that consists of one single
edge and that is not a unique shortest path. With via nodes we could not represent this path. However,
this problem can solved if we apply a simple preprocessing to G: We just have to replace all edges
in (u, v) E, that are not unique shortest paths, by a path (u, w
new
), (w
new
, v), where w
new
has to be
newly added to V. Also, we have to set c((u, w
new
)) := c((w
new
, v)) := c((u, v))/2. Having applied this
preprocessing all shortest paths in G can be represented using via nodes. Although the results in the
work are described in terms of via edges, they can also be used with via nodes if this preprocessing
is applied to the underlying graph before.
3.3 Computing a Minimal Representation by Via Edges
A representation Q of a path P by via edges is minimal if for all other such representations Q
holds
|Q| |Q
by the path they represent until no shortcuts are left, then we surely end up with the
original path P. Hence, P is completely determined by P
and we call P
a representation of P using a
CH. Note, that P
, that contains shortcuts from the given CH and that completely determines P, we
have |P
| |P
| |P| holds.
The sorting of the nodes (cf. Line 3) can be done in O(|P| log|P|) time. Let d be the maximum
number of incoming or outgoing edges of a node in the CH. Then, the Lines 4 to 6 take O(d|P|) time.
That means, Algorithm 2 needs O(d|P| +|P| log|P|) time in total.
4.2 Combining Via Edges and Contraction Hierarchies
The representation by via edges and the representation using a CH can be combined quite easily. First,
apply Algorithm 4 to the given path P and then compute a representation Q
from Q
as described in
Section 3.3 and then recursively unpack all shortcuts in P
completely.
4
Algorithm 4: Replaces subpaths of a path by shortcuts of a CH.
1 function compressWithCH((u
1
, u
2
), . . . , (u
n
, u
n+1
) : path) : path
2 R := (u
1
, u
2
), . . . , (u
n
, u
n+1
) : path
3 sort u
2
, . . . , u
n
according to increasing level yielding u
i
1
, . . . , u
i
n1
4 for j := 1 to n1 do
5 if a shortcut (v, w) representing the subpath (v, u
i
j
), (u
i
j
, w) of R is present in the CH
then
6 replace (v, u
i
j
), (u
i
j
, w) by (v, w) in R
7 return R
Note, that |P