3.2.1 Nested Dissection Order
Since road networks have small vertex separators, we
can temporarily remove the vertices lying in the sep-
arator set, recursively contract the components of the
resulting graph, and finally, contract the vertices of
the separator. This “nested dissection” method was
first analyzed in (Gilbert and Tarjan, 1986). Later,
(Milosavljevi
´
c, 2012) and (Columbus, 2013) applied
it to contraction hierarchies, and shown that it would
generate O(|V |log |V |) shortcuts.
Analogously to what we have done in Section 3.1,
we can decompose any optimal path according to the
“levels” corresponding to the recursive dissection, ob-
taining a similar O(log |V |) upper bound for the de-
composition length.
3.2.2 Random Contraction Order
A much simpler method is to contract vertices in
random order. As we will show in this subsection,
this yields (in expectation) very similar results to the
nested dissection order.
Let us first look at the decomposition length.
The following observation is a direct consequence of
Lemma 5 in (Blum et al., 2021):
Observation 1. For any optimal path v
0
−→ v
1
−→
. . . −→ v
n
, the pair (v
0
, v
n
) forms a base path if and
only if v
0
and v
n
are both contracted later than all of
v
1
, . . . , v
n−1
.
For any vertices v
0
6= v
n
of a directed graph G, we
will estimate the expected value of the decomposition
length of the optimal path v
0
−→ . . . −→ v
n
.
Let v
m
be the vertex on that path with the largest
rank (i.e., contraction time). Then, the decomposition
length of the path is equal to the sum of decomposi-
tion lengths of v
0
v
m
and v
m
v
n
. Since the anal-
ysis of both parts is very similar, let us only focus on
the former.
For all i ∈ {0, . . . , m}, let X
i
be a random vari-
able indicating whether rank(v
i
) is larger than all of
rank(v
0
), . . . , rank(v
i−1
). Note, that X
0
= 1 land X
m
=
1. Let us look at the largest index j < m for which
X
j
= 1. From Observation 1, (v
j
, v
m
) forms a base
path, and since the rank of v
j
is larger than all pre-
vious values, we can recursively decompose v
0
v
j
.
Therefore, the expected decomposition length of the
path v
0
v
m
is equal to
E(
m
∑
i=1
X
i
) =
m
∑
i=1
1
i
= O(log m),
and hence the expected decomposition length of the
path v
0
v
n
is O(logn).
The above result holds for any class of graphs.
The assessment of the expected size of the base path
set has been done for the bounded growth model
(Blum et al., 2021). In this model, we assume for all
r ∈N, that the number of vertices reachable from any
single node using at most r edges is O(r
2
). Under
these conditions, the expected number of shortcuts
created in the contraction hierarchy is O(|V |log |V |).
Remember however, that we are precomputing in-
formation for every pair of base paths and we are an-
swering queries for pairs of optimal paths. Therefore,
we actually need to calculate the expected value of
the squared size of the base paths set and the expected
value of the product of decomposition lengths for any
two optimal paths. We can rephrase these as the fol-
lowing questions, yet unanswered:
Question 1. When contracting vertices in random or-
der, what is the variance of the size of the base path
set?
Question 2. When contracting vertices in random or-
der, for any two optimal paths, what is the covariance
between the decomposition lengths of these paths?
For real-life applications, the latter question does
not need to be that general—if we will only be an-
swering path aggregation queries, all we need is the
expected value of the squared decomposition length
of a single path v
0
−→ . . . −→ v
n
.
Note, that the previously introduced indicator
variables X
i
and X
j
are independent for i 6= j, and
so the expected value of the squared decomposition
length is O(log
2
n), which matches the deterministic
result for the separator-based algorithm.
For the case, mentioned in the Introduction, of a
concatenation of a few optimal paths, we would also
need pair queries over edge-disjoint paths v
0
v
n
and
u
0
u
m
, sharing only some small number k of ver-
tices. To analyze this case, we can partition each of
the two input paths into k +1 segments between these
shared vertices, and take advantage of the following
observation:
Observation 2 (Triangle inequality for decomposi-
tion length). For a graph G = (V, E), an optimal path
u w, and a vertex v ∈ u w, we have
δ(u v) + δ(v w) ≥ δ(u w),
where δ(π) denotes the decomposition length of the
path π.
Now, denoting the shared vertices as u
i
1
, . . . , u
i
k
(according to their positions on the path u
0
u
m
), we
can estimate the expected product of decomposition
lengths as
E(δ(v
0
v
n
)δ(u
0
u
m
)) ≤
E
δ(v
0
v
n
)
δ(u
0
u
i
1
−1
)+
VEHITS 2023 - 9th International Conference on Vehicle Technology and Intelligent Transport Systems
348