crossroads. So, finding k “best” (shortest, fastest or
cheapest) paths from a given origin to a given des-
tination in a road network is straightforward using
any kSSP algorithm. Unfortunately, this problem be-
comes harder in public transit networks. First, be-
cause public transit networks are time dependent, i.e.,
certain segments of the network can only be traversed
at specific times. Second, several additional optimiza-
tion criteria are considered in public transit network
such as the arrival time, the departure time, the num-
ber of transfers, etc.
Journey Planning Queries in Public Transit Net-
works. A plethora of algorithms were proposed to
efficiently answer queries of optimal journeys from a
given origin o to a given destination d after a depar-
ture time t
0
in a public transit network. For instance,
the Connection Scan Algorithm (CSA) (Dibbelt et al.,
2018) is the fastest algorithm, without any prepro-
cessing routine, enabling to find an earliest arrival
journey from o to d departing after t
0
. With the
help of a heavy preprocessing routine, the Transfer
Patterns algorithm (Bast et al., 2010) can achieve a
tremendous speed up with respect to the CSA. Be-
sides, Round Based Public Transit Routing (RAP-
TOR) (Delling et al., 2015) is the fastest algorithm
(also without any preprocessing routine) enabling to
compute a Pareto optimal set of journeys optimizing
the arrival time and the number of transfers of a jour-
ney. Recently, Bast et al. (Bast et al., 2016) presented
an extensive survey on the topic of journey planning
in road and public transit networks.
Related Work. Vo et al. (Vo et al., 2015) proposed a
time dependent graph modeling a bus network. Then,
they adapt Yen’s algorithm to find alternative journeys
in this network model. Precisely, they select a set of
alternative journeys (journeys sharing only a limited
part of their common edges) among those given by
Yen’s adaptation.
As shown below, Yen’s algorithm uses Dijkstra’s
algorithm as a basic brick to compute shortest detours
of a given path. Analogously, Vo et al. (Vo et al.,
2015) used the time-dependent shortest path (TDSP)
algorithm of (Schulz et al., 2000) to compute earliest
detours of a journey in a bus network. They evalu-
ated their method on a single network of around 4000
stops and 8000 connections, resulting in an average
running time of around 1 second to find 5 journeys.
On the other hand, Scano et al. (Scano et al.,
2015) modeled a transportation network as a labeled
directed graph where a label is an object composed
of the transportation mode (foot, car, bus, etc.) and
a travel time. This model merges road and public
transport networks together. Then, it is shown how
the k shortest path algorithms can be adapted for this
model. Precisely, they adapted Yen’s and Eppstein’s
algorithm to work on their model. In both algorithms,
a Dijkstra-like algorithm called Dijkstra Regular Lan-
guage Constraint (DRegLC) (Barrett et al., 2008)
is used to answer earliest arrival journeys queries.
Moreover, an Iterative Enumeration Algorithm (IEA)
is proposed to extract only simple journeys using Epp-
stein’s algorithm. i.e., using Eppstein’s k shortest
paths algorithm as an iterator and then selecting the
simple corresponding journeys (a journey is simple if
it does not visit a stop more than once).
Experimentally, Scano et al. showed that their
IEA is faster than Yen’s straightforward adaptation
on the transportation network of Toulouse (75 000
nodes, 500000 road edges and 43000 public transport
edges). On this network, the average running time of
Yen’s adaptation to find 100 journeys is 250 seconds
while it is 0.6 seconds using their refined IEA. How-
ever, IEA is not a polynomial-time algorithm, and its
memory consumption is too high (Scano et al., 2015).
In addition, using the labelled directed graph model
described in (Scano et al., 2015) may cause a duplica-
tion of the public transit part in practice, i.e., a large
number of journeys given by the algorithms proposed
in (Scano et al., 2015) may only differ on the footpath
part while sharing the exact same public transit part.
This is undesirable in applications requesting diverse
public transit journeys.
Our Contributions. In this paper, we aim at
answering k earliest arrival journeys queries from a
given origin to a given destination in a public tran-
sit network. To this end, we use the timetable model
of public transit networks as in (Bast et al., 2016;
Dibbelt et al., 2018; Delling et al., 2015). First, we
propose a performant adaptation of Yen’s k short-
est simple paths algorithm to public transit networks
(Yen - Public Transit, Y-PT algorithm). In contrast
with (Scano et al., 2015; Vo et al., 2015), we use the
Connection Scan Algorithm (CSA) to answer earliest
arrival journey queries in our algorithm.
Our main contribution is a novel algorithm, called
Postponed Yen’s algorithm for Public Transit net-
works (PY-PT). With the help of a lower bound on the
arrival time of a detour journey (a journey that may
be one of the k earliest arrival journeys), PY-PT post-
pones the effective computation of such detour (and
so the corresponding earliest arrival journey queries
using CSA) with the aim of skipping it.
Our experimental results on several train and pub-
lic transit networks show that the running time of our
adaptation of Yen’s algorithm is acceptable in prac-
tice. Moreover, on the same dataset, the PY-PT al-
gorithm performs 10 to 30 times faster than the Y-PT
algorithm on average.
On Finding k Earliest Arrival Time Journeys in Public Transit Networks
315