Conditional Fare Networks (CFNs)
- Conditional Fare Networks (CFNs) are an automaton-inspired framework that models complex public transport fare rules through state-based fare evolution.
- They unify diverse fare structures—such as zone-based, distance-based, and flat fares—into a single system that supports multi-objective journey planning.
- The approach tackles NP-hard optimization challenges while enabling efficient Pareto-optimal routing in real-world public transit networks.
Conditional Fare Networks (CFNs) are a unifying, automaton-inspired framework for representing arbitrarily complex public-transport fare rules and integrating them into earliest-arrival routing algorithms. They were introduced in the study of the price-optimal earliest arrival problem (POEAP), where the objective is to calculate the Pareto-set of journeys with respect to ticket price and arrival time in a public transportation network. The framework is motivated by the observation that public transit fare structures are often a combination of various fare strategies such as distance-based fares, zone-based fares, or flat fares, and that the rules determining the actual ticket price are often very complex; accordingly, fare structures are notoriously difficult to model, because it is in general not sufficient to simply assign costs to arcs in a routing graph (Euler et al., 2022).
1. Problem setting and rationale
The POEAP asks, for given and departure , for all journeys that are Pareto-optimal with respect to arrival time and total price (Euler et al., 2022). In the underlying formulation, the transportation network is represented as a directed graph of stops and arcs, where arcs include vehicle legs, footpaths, and transfers.
The central modeling difficulty is that fare accumulation in public transportation is not generally arc-additive. Zone transitions, transfer entitlements, ticket upgrades, and threshold effects can depend on the history of a journey rather than on any single arc in isolation. This is why the framework does not treat fare as an ordinary scalar edge weight. Instead, it treats fare computation as state evolution over a structured fare space. This suggests that CFNs were designed to bridge the gap between realistic fare semantics and the algorithmic requirements of multi-objective public-transit routing.
The paper characterizes research into POEAP as scarce and notes that prior work usually either relies on heuristics or only considers restrictive fare models that are too limited to cover the full scope of most real-world applications (Euler et al., 2022). Within that context, CFNs are presented as the first framework for representing a large number of real-world fare structures.
2. Formal structure of a Conditional Fare Network
A CFN is defined over several interacting components. The routing graph is , the usual directed graph of stops and arcs . Each arc has a travel-time 0, described as a FIFO function 1, together with fare annotations (Euler et al., 2022).
The fare-accumulation component is a positive partially ordered monoid 2 that collects all “numeric” fare parameters. The examples given include distance, number of stops, and set-union of visited fare zones. In parallel, there is a finite set 3 of discrete fare events, such as boarding a special train, leaving a city zone, or making a transfer. Ticket logic is encoded by a DAG 4 whose nodes are tickets or ticket classes and whose arcs indicate feasible upgrades or downgrades of ticket along a journey (Euler et al., 2022).
Initial conditions are specified by a function 5 labeling each origin stop with its initial fare state, where 6. Any fare state 7 is written as 8 with 9 and 0. Ticket prices are given by a non-decreasing price function 1 (Euler et al., 2022).
Fare-state evolution is governed by a state transition and an incremental-cost function:
2
with
3
and
4
where each arc 5 carries a monoid weight 6 and an event 7, and 8 chooses the next ticket among the current ticket’s out-neighbors (Euler et al., 2022).
The incremental cost of traversing arc 9 from fare state 0 is
1
The formulation also allows one to define 2 directly in terms of ticket upgrades or distance-based steps (Euler et al., 2022).
A notable feature of this definition is the separation between accumulated fare-relevant information 3, discrete events 4, and ticket-state evolution in the ticket graph. A plausible implication is that this decomposition is what enables CFNs to represent heterogeneous fare systems within a single formalism rather than through fare-model-specific routing encodings.
3. Modeling common fare strategies
The framework explicitly shows how several standard fare strategies fit into the same formal apparatus.
For zone-based fares, the zone set is 5, and the monoid is chosen as 6 with 7 and 8. Arc annotations take the form 9, and the event set is 0. The update rule is described as 1. There is no incremental cost, 2, and at journey end one buys the 3-zone ticket with 4 (Euler et al., 2022).
For distance-based fares, the monoid is 5 with ordinary addition and the natural order, and 6. Again 7. The transition function 8 keeps the same distance ticket until a threshold is exceeded; the example given is
9
Again 0, while final cost 1 depends on 2 via 3 (Euler et al., 2022).
For flat-fare and unlimited-transfer tickets, the ticket graph is defined on 4 with trivial 5. On the first boarding event, 6, and otherwise the state remains in Flat. Then 7 for all arcs, while the initial price 8 is a fixed fare. The same formalism can also encode transfers within a time window as events that keep the traveler in the same Flat ticket (Euler et al., 2022).
The examples are significant because they cover zones, distance, flat fares, transfer tickets, and threshold-triggered upgrades within a single state-transition language. This suggests that the ticket graph and monoid jointly serve as the abstraction layer through which otherwise disparate fare systems are rendered algorithmically comparable.
4. Computational complexity and limits
The paper states that optimizing over CFNs is NP-hard by the nature of their extensive modeling capabilities (Euler et al., 2022). It also gives a sharper hardness result for a restricted case: the single-criterion version of POEAP, with zero travel-time and minimizing only 9, is NP-hard.
The specific theorem is that finding an 0–1 path 2 minimizing 3 in a CFN with only zone-monoid 4 is NP-hard (Euler et al., 2022). The proof sketch is by reduction from the path-with-forbidden-pairs problem. Each forbidden pair 5 becomes a zone 6; traversing 7 or 8 increments 9 by 0; if both are visited, then 1 upgrades the ticket to an expensive one. Under that encoding, ensuring that no forbidden pair is fully visited is equivalent to keeping the cheap ticket.
This hardness result is methodologically important because it shows that computational difficulty is not an artifact of the most expressive versions of the framework. Even a restricted zone-monoid instantiation already inherits NP-hardness. A common misconception would be to treat fare optimization as a routine extension of earliest-arrival routing with an added scalar weight; the NP-hardness statement, together with the non-arc-additive fare semantics, directly contradicts that view.
5. Integration into multi-objective routing algorithms
A direct label-setting approach is obstructed by the fact that 2 alone violates subpath optimality: detours through extra zones may pay off later (Euler et al., 2022). To address this, the framework refines dominance using CFN structure.
The ticket set 3 is partitioned into three classes:
- 4, tickets whose reachable subgraph in 5 is “no-overtaking” and has a Hamiltonian trace;
- 6, tickets comparable only by equality;
- 7, all others, described as non-comparable (Euler et al., 2022).
Comparability of fare states is then defined as follows. For 8 and 9,
0
iff 1, 2, and:
- if 3 then 4;
- if 5 then 6 in 7 (Euler et al., 2022).
The strict order 8 holds if 9 and either 0 or 1. The monotonicity condition
2
ensures a weak subpath-optimality (Euler et al., 2022).
Labels are defined as 3, with stop 4, arrival time 5, and fare state 6. For an arc 7 and label 8, the relaxation computes
9
yielding 00. If no existing label at 01 dominates 02 under 03 and 04, the new label is inserted and all labels it dominates are removed (Euler et al., 2022).
The corresponding Multi-Criteria RAPTOR, denoted McRAP in the paper’s detailed description, proceeds in rounds 05 limiting the number of transfers. It maintains bags 06 of undominated labels at stop 07 after 08 boardings, initializes with 09, and alternates route scanning, footpath relaxation, and termination when no new labels are produced (Euler et al., 2022). The simplified pseudo-code in the source captures the label propagation rule: 20 Dominance between labels is defined by common stop, non-worse arrival time, and fare-state comparability, with at least one strict inequality (Euler et al., 2022).
6. Empirical evaluation and practical implications
The reported case study uses the MDV (Leipzig–Halle) network with 56 zones, 17 city-fares, approximately 49k trips, and 7.8k routes. The query set contains 4 964 random origin–destination pairs with departure time 8 am, and the implementation is in C++17 (Euler et al., 2022).
The paper reports three main configurations:
| Configuration | Main characteristics | Reported performance |
|---|---|---|
| Full McRAP with CFN | Optimizing 10 | Average run-time 11 ms; average Pareto labels per query: 3 total, 2.62 truly price-optimal |
| Price-Based Target Pruning + Fare-Specific Speed-ups | Adds pruning of labels already more expensive than best known at destination; ignores irrelevant monoid dimensions per ticket type | Run-time down to 12 ms |
| Restricted Pareto-Sets: Tight-BMRAP | Slack 13 min, trip-slack 14; initial earliest-arrival RAPTOR, backward bounds, then pruned McRAP | Average run-times 15 ms; standard deviation 16 ms; Pareto-set size 17–18 journeys |
For the unrestricted configuration, the paper notes high variance, and also reports a zone-only figure of approximately 19 s (Euler et al., 2022). The tighter variants rely on two mechanisms named in the source: Price-Based Target Pruning (PTP), which prunes labels already more expensive than the best known at the destination, and Fare-Specific Speed-ups (FSS), which ignore irrelevant monoid dimensions per ticket type. The restricted Pareto-set method, Tight-BMRAP, additionally performs an initial earliest-arrival RAPTOR, computes backward bounds, and then runs a pruned McRAP.
The practical significance lies in the contrast between worst-case hardness and observed query times. The source summarizes that CFNs make it possible to model real-world fare complexity compactly, integrate fare computations into multi-criteria routing via a refined domination relation, and still achieve sub-100 ms queries or better when restricting Pareto sizes, which is described as fast enough for interactive trip-planning applications (Euler et al., 2022).
7. Position within public-transit routing
Within the problem domain of public-transit journey planning, CFNs are introduced as a building block for label-setting multi-objective shortest path algorithms and, specifically, as an adaptation target for a multi-criteria RAPTOR-style search (Euler et al., 2022). Their role is not to replace timetable routing machinery, but to extend it with a fare semantics that is expressive enough to cover combinations of zone-based, distance-based, flat-fare, surcharge, and transfer rules.
The central conceptual contribution is the replacement of naïve fare additivity by structured fare-state evolution. In that sense, the framework addresses a long-standing mismatch between realistic tariff systems and shortest-path formulations. The paper’s refined dominance relation is equally central: because ordinary subpath-optimality fails when future fare interactions matter, comparability is weakened and made ticket-structure dependent rather than purely scalar (Euler et al., 2022).
A plausible implication is that CFNs are best understood as a modeling and algorithm-integration layer rather than as a single fare model. Their importance follows from the combination of three properties established in the source: they can represent a large number of real-world fare structures, they induce NP-hard optimization in general, and yet they admit practically effective query algorithms on a real-world data set (Euler et al., 2022).