betaFeedback

WorksComputer Science

Concave Run Budgets and Restart Width

Abstract

A source-to-target path in an edge-labelled DAG uses each label in some number of maximal runs, with a label used in rr runs charged according to a nondecreasing concave rational tariff f(r)f(r). We seek a path of total charge at most BB, or a shortest such path. We parameterize by restart width ≀\wr, the maximum number of labels that have already appeared and can still begin a new run at some vertex. It is at most live width but can be arbitrarily smaller. Let Jf(T)J_f(T) denote the number of distinct marginal rates of ff up to horizon TT. A lazy-commitment dynamic program solves minimum charge and feasibility in J_f(T)^{\wr}\poly(N) time, allowing arbitrary per-label tariffs and unbounded charge magnitudes. Thus the problem is FPT whenever JfJ_f is effectively subpolynomial. Conversely, for every fixed tariff with Jf(T)≥TδJ_f(T)\ge T^δ eventually, feasibility is NP-complete and W[1]-hard in ≀\wr, even on planar bipartite DAGs of maximum degree three and treewidth two whose paths have equal length, and admits no g(≀)No(≀)g(\wr)N^{o(\wr)} algorithm under ETH. The reduction uses positive pairwise Jensen-gap charges, requires no denominator assumption, and covers harmonic, geometric, and power-law tariffs. A kk-colour clique instance has width at most 2k+12k+1, improved to k+1k+1 for polynomially bounded denominators. We further exhibit arbitrarily close tariffs with opposite parameterized complexity, give an FPT budget-relaxing scheme and accuracy obstruction, establish few-label hardness and W[P]-membership, and identify separate hardness from binary-encoded lengths. Oscillating plan growth and non-effective subpolynomial bounds remain open.

Introduction

Many resources are paid for per episode of use rather than per unit of use, and repeated episodes are discounted. A transit pass prices the second boarding of a line lower than the first and caps the total; a machine has a set-up cost each time it is switched back on, and maintenance contracts make later set-ups cheaper; a licence is reactivated at a declining fee. The common structure is a sequence of activities, each carried out with one resource, in which staying with a resource is free, returning to it starts a new episode, and the charge of a resource is a concave function of its number of episodes.

We study the routing problem this structure defines. The input is a directed acyclic graph with a source and a target whose edges carry labels (the resources). On a source-to-target path PP, a run of a label cc is a maximal block of consecutive cc-labelled edges, and rc(P)r_c(P) denotes the number of runs of cc. Given a nondecreasing concave tariff ff with f(0)=0f(0)=0, the path is charged

Φ(P)=∑cf(rc(P)).\Phi(P)=\sum_c f(r_c(P)).

CONCAVE RUN BUDGET asks whether some path has Φ(P)≤B\Phi(P)\le B; its optimisation variant asks for a shortest such path with respect to independent nonnegative edge lengths. For f(r)=rf(r)=r the charge is the number of label changes plus one, and for f(r)=min⁡{r,1}f(r)=\min\{r,1\} it is the number of distinct labels used, so the problem interpolates between two classical objectives. Minimising the number of line changes is polynomial on a last-label product graph [8, 17], whereas minimising the number of distinct labels is the minimum-label path problem, which is NP-hard, hard to approximate [10, 33, 8] and W[2]-hard in the number of labels used [23]. The tariff expression is already encompassed by the crossing-cost frameworks of Blanco et al. [5, 6], as explained in § 1.3. Our contribution is a parameterized analysis of this family in terms of restart width and marginal-rate growth, with a delayed-commitment algorithm and positive-charge consistency reductions.

What makes the general problem hard is memory: the charge of the next run of cc depends on how many runs of cc the path has already made. Only some of this history matters at a given vertex. A label that cannot occur again may be forgotten, and so may a label that can occur again but only as a continuation of its current run. We call the number of labels whose history genuinely has to be remembered at a vertex its restart width and write wrw_r for the maximum over all vertices (Definition 2.2). Restart width is bounded by the live width ww, the maximum number of labels that occur both on some prefix and on some continuation at a vertex, and both are small when resources are localised in time; § 2.3 lists simple structural conditions. The obvious dynamic program stores a run count for every remembered label and takes time (T+1)wrpoly⁡(N)(T+1)^{w_r}\operatorname{poly}(N), where TT is the largest number of edges on a path. The question of this paper is for which tariffs the exponent can be removed.

Results

Let Δj=f(j)−f(j−1)\Delta_j=f(j)-f(j-1) be the marginal rates of ff and let Jf(T)J_f(T) be the number of distinct values among Δ1,…,ΔT\Delta_1,\ldots,\Delta_T. We call ff effectively subpolynomial if there is a computable τ\tau with Jf(T)≤T1/pJ_f(T)\le T^{1/p} for all integers p≥1p\ge1 and T≥τ(p)T\ge\tau(p), and we write

Lf=lim inf⁡T→∞log⁡Jf(T)log⁡T,Uf=lim sup⁡T→∞log⁡Jf(T)log⁡T,L_f=\liminf_{T\to\infty}\frac{\log J_f(T)}{\log T},\qquad U_f=\limsup_{T\to\infty}\frac{\log J_f(T)}{\log T},

so that Lf>0L_f>0 means Jf(T)≥TδJ_f(T)\ge T^\delta for some δ>0\delta>0 and all sufficiently large TT. Throughout, NN is the input size and a fixed tariff is assumed to be rational and exactly computable up to horizon TT in time polynomial in TT.

Theorem 1.1 (Main theorem). Let ff be a fixed nondecreasing concave rational tariff with f(0)=0f(0)=0.

  1. CONCAVE RUN BUDGET can be solved in time Jf(T)wrpoly⁡(N).Henceitisfixed−parametertractableinJ_f(T)^{w_r}\operatorname{poly}(N). Hence it is fixed-parameter tractable inw_r$ if JfJ_f is effectively subpolynomial. The same holds for shortest feasible paths with polynomially bounded integer lengths, and for per-label tariffs with J=max⁡cJfcJ=\max_c J_{f_c}.

  1. If Lf>0L_f>0, then CONCAVE RUN BUDGET is NP-complete and W[1]-hard parameterized by wrw_r, and also by ww, even on simple planar bipartite DAGs of maximum degree three and treewidth at most two in which all source-to-target paths have the same number of unit-length edges. A kk-colour instance of MULTICOLORED CLIQUE is mapped to an instance with wr≤w≤2k+1w_r\le w\le2k+1. Unless ETH fails, there is no algorithm with running time g(wr)No(wr)g(w_r)N^{o(w_r)} for any computable gg.

  1. If moreover all values f(0),…,f(T)f(0),\ldots,f(T) lie in 1Df(T)Z\frac{1}{D_f(T)}\mathbb{Z} for a polynomially bounded DfD_f, the reduction in (2) can be made to have wr≤w≤k+1w_r\le w\le k+1.

Part (1) is Theorem 3.2, part (2) is Theorem 4.6 and part (3) is Theorem 5.1. Neither (1) nor (2) depends on the numerical size of the charges: the algorithm compares exact rationals and the reduction uses tariff values only as they come. The two conditions are complementary up to oscillation. Since 1≤Jf(T)≤T1 \le J_f(T) \le T, a tariff has Uf=0U_f = 0 exactly when Jf(T)=To(1)J_f(T) = T^{o(1)}, and the only tariffs not classified are those with Lf=0<UfL_f = 0 < U_f, whose plan count is polynomial along some horizons and subpolynomial along others, together with non-effective instances of Uf=0U_f = 0 (§ 10).

The growth of the value of the tariff is irrelevant; what matters is the number of distinct rates. § 6 exhibits a strictly concave tariff FF of logarithmic growth and, for every integer M≥1M \ge1, a tariff FMF_M with

F≤FM≤(1+2M)FF \le F_M \le\left(1 + \frac{2}{M}\right)F

such that the problem is W[1]-hard for FF and fixed-parameter tractable for every FMF_M (Proposition 6.3). Tariffs on a fixed monetary grid, finite menus of plans and caps are always on the tractable side (Proposition 3.6); hardness needs marginal rates of ever finer resolution.

We complement the main theorem in three directions.

  • Budget relaxation. For arbitrary per-label tariffs and arbitrary rational lengths, a path no longer than the optimum and of charge at most (1+ε)B(1 + \varepsilon)B can be found in time g(wr,1/ε)poly⁡(N)g(w_r,1/\varepsilon)\operatorname{poly}(N) (Theorem 7.2). For hard tariffs with inverse-polynomial separation the dependence on 1/ε1/\varepsilon cannot be made polynomial unless FPT = W[1] (Corollary 7.3).

  • Few labels. The total number qq of labels is a weaker parameter than width. For tariffs with Lf>0L_f > 0 on a polynomial grid the problem remains W[1]-hard in qq under disjunctive truth-table reductions, with 2k+12k + 1 labels, and for arbitrary per-label tariffs it belongs to W[P] (§ 8).

  • Binary lengths. With a length bound in binary, the harmonic tariff is NP-hard already at live width one, by a number-theoretic encoding unrelated to width (Proposition 9.1); tariffs on a polynomial grid do not show this effect.

Techniques

Algorithm. A concave tariff is the lower envelope of the affine functions βj+Δjr\beta_j + \Delta_j r that support it; each is a charging plan with a set-up fee and a per-run rate. This representation of concave costs is standard [37, 38]. A path may guess, for each label, the plan that will be tight for its final run count, and pay according to that plan. We observe that the guess can be postponed: a label pays the default rate f(1)f(1) until it commits, and committing late never undercuts the tariff (Lemma 3.1). The state of a label is then its committed plan or “default”, and unused labels and uncommitted labels are indistinguishable. Together with forgetting outside the restart set this gives Jf(T)δrJ_f(T)^{\delta_r} states per vertex and last label.

Hardness. We reduce from Multicolored Clique. A selection gadget picks a vertex in each colour class and an edge for each pair of classes; the budget must force every picked edge to end at the picked vertices. Encode the index xx of a vertex by a run count rxr_x. If two gadgets give a shared label rxr_x and ryr_y runs respectively, its charge is f(rx+ry)f(r_x + r_y), and concavity gives

2f(rx+ry)−f(2rx)−f(2ry)≥0.2f(r_x + r_y) - f(2r_x) - f(2r_y) \ge0.

Equality holds if x=yx = y, and for x≠yx \ne y it fails as soon as ff has a strict change of rate between 2rx2r_x and 2ry2r_y. So we use two shared labels for the pair of gadgets, and let each gadget pay, on private labels, a constant minus f(2rx)f(2r_x). The latter needs no subtraction: with zz candidate indices, the gadget selecting xx runs through private labels with 2ry2r_y runs for every y≠xy \ne x, which costs ∑yf(2ry)−f(2rx)\sum_y f(2r_y) - f(2r_x) up to a constant. All charges are tariff values, so no arithmetic assumption on ff is needed. Codes r1<⋯<rzr_1 < \cdots< r_z of polynomial size with a rate change between consecutive doubled values exist exactly when Lf>0L_f > 0 (Lemma 4.3). Checking each colour along a chain of its kk gadgets keeps two shared labels per colour alive at any time, whence width 2k+12k + 1.

With a single shared label per colour and kk gadgets one would use the kk-point Jensen inequality instead and must realise the charge C−f(krx)/kC - f(kr_x)/k, which is not a combination of tariff values. On polynomial grids this can still be done with positive charges after restricting the code to one residue class modulo kk (§ 5); this is how part (3) of the main theorem saves a factor of two in the width.

Related work

Labels, colours and changes on paths. The two extreme tariffs are classical. Paths with few distinct labels are studied in [10, 33], with parameterized results for the number of used labels and for graph width measures in [23]. Böhmová et al. [8] consider routes in transit networks whose colours are lines: a route with fewest line changes is found in polynomial time, while minimising the number of distinct lines is hard to approximate; the same two constraints define the interchange- and colour-constrained shortest paths of [17], and the number of boardings is the standard second criterion of transit routing [18]. Davot, Giroudeau and König [16] study both objectives when every arc carries a list of colours and obtain W[2]-hardness and an algorithm that is fixed-parameter in the total number of colours. Bentert, Kellerhals and Niedermeier [4] bound the number of occurrences of each colour on a short path and prove W[1]-hardness in the number of colours by a reduction from MULTICOLORED CLIQUE with parallel-path selection gadgets, a template that our reductions share. Their separate study of balance-fair shortest paths [3] classifies several structural parameterizations. These colour-count constraints differ from a single budget on a sum of concave run tariffs.

Reload and changeover costs. These costs depend on the two colours involved in a transition [42, 26, 29]. A last-colour product graph handles nonnegative transition costs for walks, and for paths in a DAG. It does not in general enforce simplicity in a cyclic graph or solve spanning-tree and arborescence variants. The latter include minimum changeover cost arborescence, with distinct tractability and hardness results in treewidth and degree [31, 30]. Our additional source of history is that entering a label costs an amount depending on its earlier run count.

Crossing costs. The general model of Blanco et al. [6], Section 2.1 contains our tariff expression. Extend each tariff linearly between integers, take each label’s edges as a region, and use the discrete metric. Every nonempty DAG run has distinct endpoints, so its regional charge is fc(rc(P))f_c(r_c(P)). Their arc weights are φd(u,v)\varphi d(u,v) for a positive constant φ\varphi; hence their full objective is

Cφ(P)=φ∣P∣+Φ(P).C_{\varphi}(P) = \varphi|P| + \Phi(P).

Consequently, minimum charge is recovered on equal-length instances. More generally, if all tariff values up to TT lie in D−1ZD^{-1}\mathbb{Z}, choose 0<φ<1/(D(T+1))0 < \varphi< 1/(D(T + 1)): the additive perturbation is smaller than any positive charge gap, so every minimizer of CφC_{\varphi} minimizes Φ\Phi. This is a deduction from their model. Our SHORTEST BUDGETED PATH, with independent lengths and a hard charge budget, is not a direct special case of that scalar objective.

The earlier ZIB report [5] studies linear, constant and piecewise-constant regional functions. Its Theorem 1 treats disjoint linear regions, Theorem 3 treats laminar linear regions, and Proposition 2 allows at most two linear regions per arc; Proposition 3 concerns flat fees, and Theorem 2 gives an FPTAS for one nontrivial piecewise-constant region measured by additive distance. Appendix A.2 retains entry vertices of currently traversed regions. Our label regions are disjoint, but nonlinear run charges require remembering a label after leaving it; simultaneous region overlap does not bound that history. These results do not give the restart-width and marginal-growth criteria studied here. The 2017 polynomial case assumes linear functions and pairwise disjoint regions [6 Section 2.2].

Fares and resource-constrained shortest paths. Our optimisation variant is a shortest path problem with one non-additive resource. Labelling algorithms for such problems are surveyed in [34], and Parmentier [39] treats non-linear resources in a lattice-ordered monoid. Fare structures of public transport are modelled by monoids of tickets and conditional fare networks by Euler, Lindner and Borndörfer [21, 22], and Schöbel and Urban [40] classify the cheapest ticket problem for distance- and zone-based fares into polynomial and NP-complete cases. These works address dominance, modelling power and classical complexity. We ask when one specific history, the run counts, can be compressed to a number of states that is fixed-parameter bounded. The numerical side of the two-criteria problem is that of restricted shortest paths [32, 36, 41], from which the budget-relaxing scheme takes its rounding.

Concave costs and plans. Goel, Tripathi and Wang [28] study combinatorial problems with concave discounted prices, including shortest paths in undirected graphs: selected edges are allocated to agents, each applying a concave function to its total assigned cost. Our labels are fixed and their charges depend on maximal runs. Zhang, Shen and Song [43] study a bi-attribute shortest-path objective with a concave function of an aggregate path attribute. Count-dependent concave penalties also occur in degree-constrained orientation [1] and set cover [12]; formal-language constraints [2] and nonadditive traffic-assignment costs [25] are further relatives.

Writing a concave cost as a minimum of fixed-charge affine pieces is standard [37, 38], as is approximating it by a small piecewise-linear menu [37]. Our algorithm uses this representation with delayed commitment, merges unused and default states, and forgets plans outside the restart set. Bredereck et al. [9 Section 2, Theorem 2] obtain fixed-parameter algorithms for mixed integer programs with few integer variables and constraints of the form ∑iFi(xi)≤∑iGi(xi)+b\sum_i F_i(x_i) \le\sum_i G_i(x_i) + b, with convex FiF_i and concave GiG_i. Each such inequality defines a convex continuous feasible set. An upper bound on a sum of concave costs has the opposite orientation and is generally nonconvex, so their theorem does not directly apply to our budget constraint. Theorem 1.1 instead relates the growth of the plan count to tractability in restart width.

Width parameters. Live width is a cut measure on label occurrences. On a single path, associate with each label the interval of internal cuts after its first edge and before its last, omitting empty intervals. Then live width is the clique number of the auxiliary interval graph on these label lifetimes and, when this graph is nonempty, one more than its pathwidth. This is an observation about the auxiliary graph, not the underlying path; Kinnersley [35] establishes the general equality between vertex separation and pathwidth. The vertex-interval-membership width of temporal graphs, introduced by Bumpus and Meeks [11] and developed further in [20], uses the related idea of vertices active between their first and last time-edge. In a branching DAG, liveness is taken over all prefixes and continuations of a vertex, as in the live-variable analysis of compilers, and restart width refines it further. Our contribution is the use of these label-history sets in the plan algorithm and hardness classification. Live width is incomparable with the treewidth of the underlying graph: the path with label word c1⋯cqc1⋯cqc_1 \cdots c_q c_1 \cdots c_q has live width qq, and an acyclic tournament with pairwise distinct edge labels has live width zero. Our hardness results hold on graphs of treewidth two.

Organisation

§ 2 fixes the model, defines the two width parameters and proves the forgetting lemma. § 3 gives the plan algorithm, § 4 the lower bound and § 5 its refinement on polynomial grids. § 6 discusses concrete tariffs and separation gaps. Sections 7, 8 and 9 treat budget relaxation, few labels and binary lengths, and § 10 lists open problems.

Model and width parameters

Tariffs and problems

A tariff is a function f:N→Q≥0f:\mathbb{N}\to\mathbb{Q}_{\ge0} with f(0)=0f(0)=0 whose marginals Δj=f(j)−f(j−1)\Delta_j=f(j)-f(j-1), j≥1j\ge1, satisfy Δ1≥Δ2≥⋯≥0\Delta_1\ge\Delta_2\ge\cdots\ge0; that is, ff is nondecreasing and concave. An integer t≥1t\ge1 is a drop of ff if Δt>Δt+1\Delta_t>\Delta_{t+1}, and dt=Δt−Δt+1≥0d_t=\Delta_t-\Delta_{t+1}\ge0 denotes the size of the decrement at tt. For a horizon T≥1T\ge1,

Jf(T)=∣{Δ1,…,ΔT}∣=1+∣{t<T:t is a drop}∣,J_f(T)=\left|\{\Delta_1,\ldots,\Delta_T\}\right|=1+\left|\{t<T:t\text{ is a drop}\}\right|,

and Df(T)D_f(T) denotes the least positive integer DD with f(0),…,f(T)∈1DZf(0),\ldots,f(T)\in\frac{1}{D}\mathbb{Z}. We say that ff lies on a polynomial grid if Df(T)≤TcD_f(T)\le T^c for a constant cc and all T≥2T\ge2.

An instance consists of a DAG G=(V,E)G=(V,E) with a source ss and a target tt, a label c(e)c(e) for every edge, and a budget B∈Q≥0B\in\mathbb{Q}_{\ge0}. We assume that GG is trimmed: every vertex and edge lies on an ss–tt path. A path is an ss–tt path unless said otherwise, a prefix at vv is an ss–vv path and a continuation at vv is a vv–tt path. For a walk PP we write lab⁡(P)\operatorname{lab}(P) for its set of labels, last⁡(P)\operatorname{last}(P) for the label of its last edge, and rc(P)r_c(P) for its number of maximal runs of cc. We let T≥1T\ge1 be the largest number of edges of a path and qq the number of labels.

In the common-tariff model one tariff ff is fixed in advance and is not part of the input. We assume that f(0),…,f(T)f(0),\ldots,f(T) can be computed in time polynomial in TT; in particular these numbers have polynomially many bits, although Df(T)D_f(T) may be exponential. In the per-label model every label cc has its own tariff fcf_c, given in the input by a representation from which fc(0),…,fc(T)f_c(0),\ldots,f_c(T) can be computed in time polynomial in the input size, such as a table of marginals, a finite menu of affine plans, or a cap fc(r)=min⁡{acr,bc}f_c(r)=\min\{a_cr,b_c\} with binary coefficients. The charge of a path is Φ(P)=∑cfc(rc(P))\Phi(P)=\sum_c f_c(r_c(P)). All algorithms are stated for the per-label model and all lower bounds for the common-tariff model. In both, NN denotes the total bit length of the input.

CONCAVE RUN BUDGET: decide whether some path PP has Φ(P)≤B\Phi(P)\le B.

SHORTEST BUDGETED PATH: given in addition nonnegative rational edge lengths ℓ\ell, find a path minimising ℓ(P)\ell(P) subject to Φ(P)≤B\Phi(P)\le B.

We refer to the first problem as feasibility. Hardness results always concern feasibility. For ℓ\ell we distinguish unit lengths, integer lengths bounded by a given WW, and arbitrary rational lengths in binary.

By a fixed-parameter algorithm we mean one with running time g(p)poly⁡(N)g(p)\operatorname{poly}(N) for a computable gg; this is the reason for the word “effectively” in the definition of effectively subpolynomial tariffs. If only fI(T)=To(1)f_I(T)=T^{o(1)} is known, the algorithm of § 3 still runs in time g(wr)poly⁡(N)g(w_r)\operatorname{poly}(N) for some function gg, which need not be computable; in the terminology of Downey and Fellows [19 Chapter 2, Definitions 2.1.1 and 2.2.1(i)] the problem is then uniformly but perhaps not strongly uniformly fixed-parameter tractable.

Remark 2.1 (Cyclic networks and policies). Deleting symbols from a word does not increase any run count: map each cc-run of the remaining word to the cc-run of the original word that contains its first symbol; two runs with the same image would be separated by a remaining symbol different from cc inside one run of cc. Hence, in a cyclic network, possibly in product with a finite automaton restricting the admissible label sequences [2], closed subwalks can be removed without increasing charge or length, and it suffices to consider walks with fewer edges than the product has vertices. Unrolling the product to that horizon gives a DAG to which our algorithms apply. Unrolling may increase the width considerably, since every label of a strongly connected component can be live in the middle layers; the parameters are meaningful primarily for acyclic or time-expanded inputs.

Live width and restart width

For a vertex vv let Π(v)\Pi(v) be the set of labels occurring on some prefix at vv and Γ(v)\Gamma(v) the set of labels occurring on some continuation at vv.

The restart set can be derived directly from the run-count update rule. Keep the last label to decide whether the next edge starts a run. A label’s older history can affect a future payment only if it has already occurred and some continuation can start another run of it. Taking this condition over all prefixes and continuations gives the following graph-defined set; the projection construction below proves that it is sufficient for exact dynamic programming.

Definition 2.2. The live set of vv is Λ(v)=Π(v)∩Γ(v)\Lambda(v)=\Pi(v)\cap\Gamma(v), and the live width of the instance is w=max⁡v∣Λ(v)∣w=\max_v|\Lambda(v)|. The restart set of vv is

Λr(v)={c:c∈lab⁡(P) and rc(PQ)>rc(P) for some prefix P and continuation Q at v},\Lambda_{\mathrm{r}}(v)=\{c:c\in\operatorname{lab}(P)\text{ and }r_c(PQ)>r_c(P)\text{ for some prefix }P\text{ and continuation }Q\text{ at }v\},

and the restart width is wr=max⁡v∣Λr(v)∣w_{\mathrm{r}}=\max_v|\Lambda_{\mathrm{r}}(v)|.

Both definitions quantify over all paths of the graph, irrespective of the budget. Clearly Λr(v)⊆Λ(v)\Lambda_{\mathrm{r}}(v)\subseteq\Lambda(v) and wr≤ww_{\mathrm{r}}\leq w. A label that occurs on a single edge is never live, because a prefix and a continuation at vv concatenate to a path. Hence w≤qrep≤qw\leq q_{\mathrm{rep}}\leq q, where qrepq_{\mathrm{rep}} is the number of labels occurring on at least two edges.

Lemma 2.3. (i) Let PP be a prefix at vv and QQ a continuation at vv. Whether an edge of QQ starts a new run in PQPQ depends only on QQ and last⁡(P)\operatorname{last}(P).

(ii) The sets Λr(v)\Lambda_{\mathrm{r}}(v) can be computed in polynomial time.

(iii) For every n≥1n\geq1 there is a simple DAG with w=nw=n and wr=0w_{\mathrm{r}}=0.

Proof. (i) An edge starts a new run exactly if the edge preceding it on PQPQ carries a different label or does not exist.

(ii) For a label cc let Ac(v)A_c(v) hold if some prefix at vv contains cc and ends with a label other than cc, and let Zc(v)Z_c(v) hold if some continuation at vv contains a cc-edge immediately preceded, within the continuation, by an edge with another label. By (i), a run of cc is started in QQ after PP either at the first edge of QQ, which requires last⁡(P)≠c\operatorname{last}(P)\ne c, or at a later edge, and conversely if last⁡(P)≠c\operatorname{last}(P)\ne c and c∈lab⁡(Q)c\in\operatorname{lab}(Q) then the first cc-edge of QQ starts a run. Therefore

c∈Λr(v)⟺(Ac(v)∧c∈Γ(v))∨(c∈Π(v)∧Zc(v)).c\in\Lambda_{\mathrm{r}}(v)\Longleftrightarrow\left(A_c(v)\land c\in\Gamma(v)\right)\lor\left(c\in\Pi(v)\land Z_c(v)\right).

Each predicate is a reachability question in the product of GG with a three-state automaton and is computed by one pass in topological order.

(iii) Take nn internally disjoint two-edge paths from ss to a vertex vv and nn internally disjoint two-edge paths from vv to tt; label both edges of the ii-th path on either side with cic_i. Then Λ(v)={c1,…,cn}\Lambda(v)=\{c_1,\ldots,c_n\}. Every path has the word cicicjcjc_ic_ic_jc_j, in which no label starts a second run, so all restart sets are empty.

We now define the projection explicitly. For each label cc, let HcH_c be a state set with initial state ⊥c\bot_c, let Ac(h)A_c(h) be the admissible choices in state hh, and let Uc(h,a)U_c(h,a) and Kc(h,a)K_c(h,a) be the updated state and payment. The full process starts with h(c)=⊥ch(c)=\bot_c for every cc. At a run start of cc it chooses a∈Ac(h(c))a\in A_c(h(c)), pays Kc(h(c),a)K_c(h(c),a) and replaces h(c)h(c) by Uc(h(c),a)U_c(h(c),a). On a continuation edge it pays zero and changes no history state. Other labels are unchanged at every step.

The projected key at vv is (v,b,σ)(v,b,\sigma), where bb is the last label (or an initial symbol ⋆\star) and σ(c)∈Hc\sigma(c) \in H_c is stored for c∈Λr(v)c \in\Lambda_r(v). Given an edge e=(v,u)e=(v,u) of label cc, set

σˉ(d)={σ(d),d∈Λr(v),⊥d,d∉Λr(v).\bar{\sigma}(d)=\begin{cases} \sigma(d), & d\in\Lambda_r(v),\\ \bot_d, & d\notin\Lambda_r(v). \end{cases}

If b≠cb\ne c, choose a∈Ac(σˉ(c))a\in A_c(\bar{\sigma}(c)), pay Kc(σˉ(c),a)K_c(\bar{\sigma}(c),a) and let σ^\widehat{\sigma} equal σˉ\bar{\sigma} except that σ^(c)=Uc(σˉ(c),a)\widehat{\sigma}(c)=U_c(\bar{\sigma}(c),a). If b=cb=c, pay zero and set σ^=σˉ\widehat{\sigma}=\bar{\sigma}. The next key is

(u,c,σ^∣Λr(u)).(u,c,\widehat{\sigma}|_{\Lambda_r(u)}).

Initially all stored states are ⊥c\bot_c. Thus admissible choices, payment and next key are functions only of the current key, edge and choice; no unrecorded prefix is consulted.

Lemma 2.4 (Projection). For every source-to-target path, the full and projected processes have the same admissible choice sequences and the same payments along each such sequence.

Proof. Couple the processes along a path. For every prefix PP ending at vv and every d∈Λr(v)d\in\Lambda_r(v) maintain

σ(d)=h(d)or(d∈lab⁡(P) and no continuation at v starts a new run of d after P).(1)\sigma(d)=h(d)\quad\text{or}\quad(d\in\operatorname{lab}(P)\text{ and no continuation at }v\text{ starts a new run of }d\text{ after }P). \tag*{(1)}

The invariant holds initially. Suppose e=(v,u)e=(v,u) has label cc and starts a run. If c∈Λr(v)c\in\Lambda_r(v), the second alternative is impossible, since a continuation through ee starts a run of cc; hence σˉ(c)=h(c)\bar{\sigma}(c)=h(c). If c∉Λr(v)c\notin\Lambda_r(v), then c∉lab⁡(P)c\notin\operatorname{lab}(P), for otherwise PP and a continuation through ee would witness membership in Λr(v)\Lambda_r(v). Again σˉ(c)=h(c)=⊥c\bar{\sigma}(c)=h(c)=\bot_c. The choices, payment and update therefore agree. On a continuation edge both processes do nothing.

To propagate the invariant, fix d∈Λr(u)d\in\Lambda_r(u). If ee starts a run of dd, both updated states agree by the preceding argument. Otherwise neither process updates dd. If d∈Λr(v)d\in\Lambda_r(v), equal old states remain equal; the second alternative, when applicable, persists because every continuation QQ at uu gives the continuation eQeQ at vv. If d∉Λr(v)d\notin\Lambda_r(v) and d∉lab⁡(P)d\notin\operatorname{lab}(P), both old states are ⊥d\bot_d. If d∉Λr(v)d\notin\Lambda_r(v) but d∈lab⁡(P)d\in\operatorname{lab}(P), no continuation at vv can restart dd after PP; applying this to eQeQ proves the second alternative at uu. This completes the induction. At every run start the state consulted by either process is the same, proving admissibility and equality of payments in both directions.

A dynamic program on these keys is therefore exact. Lemma 2.3(i) determines run starts from the last label, and the explicit transition rule determines the next key and payment. The last label is stored even when it is outside the restart set.

Proposition 2.5 (Count-state baseline). For per-label tariffs, a path of minimum charge can be computed in time (T+1)wrpoly⁡(N)(T+1)^{w_r}\operatorname{poly}(N). If wr=0w_r=0, then every used label has exactly one run, Φ(P)=∑c∈lab⁡(P)fc(1)\Phi(P)=\sum_{c\in\operatorname{lab}(P)} f_c(1) is additive over run starts, and minimum-charge computation and feasibility are polynomial.

Proof. Apply Lemma 2.4 with h(c)=rch(c)=r_c and cost fc(h(c)+1)−fc(h(c))f_c(h(c)+1)-f_c(h(c)) at a run start, and keep the minimum accumulated charge for each key. There are at most ∣V∣(q+1)(T+1)wr|V|(q+1)(T+1)^{w_r} keys. If two runs of cc occurred on a path, cc would be in the restart set of the tail of the edge starting the second run.

Structural sources of small width

Since wr≤ww_r \leq w, any bound on live width is a bound on the parameter. Three simple situations give such bounds.

Temporal localisation. Suppose vertices carry times that do not decrease along edges, and all endpoints of cc-labelled edges have times in an interval IcI_c. A label that is live at vv has an edge before and an edge after vv, so IcI_c contains the time of vv. If no point of time lies in more than ω\omega intervals, then w≤ωw \leq\omega. Validity windows of contracts in a time-expanded network are of this form.

Bounded recurrence. In a layered DAG in which the edges leaving each layer use at most bb labels and the first and last layers in which a label is used are at most hh apart, a label live in layer ii is used in one of the hh preceding layers, so w≤bhw \leq bh.

Sessions. If the DAG is a series composition of sessions, at most aa labels are used in more than one session and each session has at most bb further labels occurring on more than one edge, then w≤a+bw \leq a+b, regardless of the number and size of the sessions.

Trips that cannot be re-boarded. This example is intended in the per-label tariff model, so trips and contracts may have different tariffs. Consider a time-expanded timetable with the following single-label assignment. Movement and dwell arcs aboard trip τ\tau carry its trip label cτc_\tau, so staying aboard through a stop continues the same run. Other arcs representing separately billed access or transfer services carry one of at most aa persistent contract labels, distinct from all trip labels; any remaining arcs have fresh labels. Thus each arc carries exactly one label, and a contract label never interrupts an on-vehicle trip segment. Suppose that, after leaving a trip, no feasible continuation can catch that trip again. Then trip labels never belong to a restart set, although they can be live along their routes. Only the aa contract labels can restart, giving wr≤aw_r \leq a regardless of the number of live trip labels. This hypothesis is substantive: walking shortcuts or faster connecting services can make re-boarding possible.

A stylised pulse-transfer hub illustrates the separation in Lemma 2.3(iii), with longer route segments and a shared source and target. Let nn through trips meet at one transfer event vv, with one incoming and one outgoing route segment for each trip and no further interchanges. Collapse the transfer event to one vertex, so staying aboard keeps the same label. Every route has label word ciaicjbjc_i^{a_i}c_j^{b_j} for positive ai,bja_i,b_j. Each trip label occurs on a prefix and a continuation at vv, giving w=nw=n, but no route uses any trip in two runs, giving wr=0w_r=0. The segments may have arbitrarily many stops.

These bounds refer to the labels as given. Splitting a persistent resource into one label per session changes the charge, because f(r1+r2)≤f(r1)+f(r2)f(r_1+r_2)\leq f(r_1)+f(r_2) is in general strict; it is legitimate only if the contract itself resets.

Plan growth

The following elementary reformulation of Lf>0L_f>0 is used in § 4. Let Tf∗(m)=min⁡{T:If(T)≥m}T_f^*(m)=\min\{T : I_f(T)\geq m\}, with Tf∗(m)=∞T_f^*(m)=\infty if no such TT exists.

Lemma 2.6. Lf>0L_f>0 if and only if Tf∗(m)T_f^*(m) is bounded by a polynomial in mm.

Proof. If If(T)≥TδI_f(T)\geq T^\delta for T≥T0T\geq T_0, then Tf∗(m)≤max⁡{T0,⌈m1/δ⌉}T_f^*(m)\leq\max\{T_0,\lceil m^{1/\delta}\rceil\}. Conversely, if Tf∗(m)≤CmhT_f^*(m)\leq Cm^h for all m≥m0m\geq m_0, then for large TT and m=⌊(T/C)1/h⌋m=\lfloor(T/C)^{1/h}\rfloor we get If(T)≥m≥T1/(2h)I_f(T)\geq m\geq T^{1/(2h)}, since IfI_f is nondecreasing.

Exact compression by charging plans

Supports and delayed commitment

Fix a label cc with tariff fcf_c, marginals Δc,j\Delta_{c,j} and horizon TT. For 1≤j≤T1 \le j \le T the support at jj is the affine function

πc,j(r)=βc,j+Δc,jr,βc,j=fc(j)−jΔc,j≥0.\pi_{c,j}(r) = \beta_{c,j} + \Delta_{c,j}r,\qquad\beta_{c,j} = f_c(j) - j\Delta_{c,j} \ge0.

Because the marginals are nonincreasing, πc,j(r)≥fc(r)\pi_{c,j}(r) \ge f_c(r) for all r≥0r \ge0, with equality at r=jr = j and r=j−1r = j - 1. Supports with the same rate coincide, so there are Jc(T):=Jfc(T)J_c(T) := J_{f_c}(T) distinct supports, and fc(r)=min⁡jπc,j(r)f_c(r) = \min_j \pi_{c,j}(r) for 1≤r≤T1 \le r \le T. The support at 1 is the default πc,1(r)=fc(1)r\pi_{c,1}(r) = f_c(1)r. We regard a support as a plan with set-up fee βc,j\beta_{c,j} and rate Δc,j\Delta_{c,j}. More generally, a menu for cc is any finite set of plans β+λr\beta+ \lambda r with β≥0\beta\ge0 and 0≤λ≤fc(1)0 \le\lambda\le f_c(1) that contains the default, dominates fcf_c on {0,…,T}\{0,\ldots,T\} and attains fc(r)f_c(r) for every 1≤r≤T1 \le r \le T. The canonical menu of supports need not be the smallest one: for a cap fc(r)=min⁡{acr,bc}f_c(r) = \min\{a_c r,b_c\} the two plans acra_c r and bcb_c form a menu, while there are three distinct marginals when bc/acb_c/a_c is not an integer.

Lemma 3.1 (Delayed commitment). Let a label pay as follows. At each new run it pays the default rate fc(1)f_c(1), until at the start of some run it commits to a non-default plan (β,λ)(\beta,\lambda) of its menu; at that run it pays β+λ\beta+\lambda, and at each later run it pays λ\lambda. Then every such strategy pays at least fc(r)f_c(r) over rr runs, and for every rr some strategy pays exactly fc(r)f_c(r).

Proof. Never committing costs fc(1)r≥fc(r)f_c(1)r \ge f_c(r). Committing to (β,λ)(\beta,\lambda) after u≥0u \ge0 default runs costs

fc(1)u+β+λ(r−u)=β+λr+(fc(1)−λ)u≥β+λr≥fc(r).f_c(1)u + \beta+ \lambda(r-u) = \beta+ \lambda r + \bigl(f_c(1)-\lambda\bigr)u \ge\beta+ \lambda r \ge f_c(r).

For exactness, commit at the first run to a plan attaining fc(r)f_c(r), or never commit if the default attains it.

The state of a label under such a strategy is either one of the non-default plans or “default”. A label that has not been used and a label that has been used at the default rate are in the same state, which is what makes the state space independent of run counts.

The algorithm

For per-label tariffs let J=max⁡cJc(T)J = \max_c J_c(T) for canonical menus, or the largest size of the supplied menus after deleting redundant plans. For a supplied menu, retain the default and one attaining plan for each integer r=2,…,Tr = 2,\ldots,T; this preserves exactness and ensures J≤TJ \le T.

Let D(T)D(T) be a common denominator of every retained plan fee and rate, including the default rates, and let A(T)=D(T)max⁡cfc(1)A(T) = D(T)\max_c f_c(1). For canonical supports it suffices to clear the tariff values fc(0),…,fc(T)f_c(0),\ldots,f_c(T), since their fees and rates are integer linear combinations of these values. For supplied menus the coefficients can require a finer grid. This distinction affects only part (3) below; parts (1) and (2) use exact rational arithmetic without forming D(T)D(T).

Theorem 3.2 (Plan compression). For per-label tariffs the following hold.

(1) A path of minimum charge can be computed in time Jwrpoly⁡(N)J^{w_r}\operatorname{poly}(N).

(2) With integer lengths at most WW, Shortest Budgeted Path can be solved in time Jwrpoly⁡(N,W)J^{w_r}\operatorname{poly}(N,W).

(3) With arbitrary rational lengths, it can be solved in time Jwrpoly⁡(N,A(T))J^{w_r}\operatorname{poly}(N,A(T)).

Proof. Consider the process of Lemma 2.4 in which h(c)∈{⊥}∪{non-default plans of c}h(c) \in\{\perp\} \cup\{\text{non-default plans of }c\}, where ⊥\perp means default. At an edge starting a run of cc with h(c)=⊥h(c)=\perp the process either stays in ⊥\perp and pays fc(1)f_c(1), or commits to a plan and pays its fee and rate; with h(c)=(β,λ)h(c)=(\beta,\lambda) it pays λ\lambda. Call the total payment along a path, for some choices, a certificate of the path. By Lemma 3.1, applied to each label, every certificate of PP is at least Φ(P)\Phi(P) and some certificate equals Φ(P)\Phi(P). Hence the minimum certificate over all paths and choices equals min⁡PΦ(P)\min_P \Phi(P).

By Lemma 2.4 the same certificates are produced by the projected process, whose keys consist of a vertex vv, the last label, and a state for every label in Λr(v)\Lambda_r(v). There are at most ∣V∣(q+1)Jwr|V|(q+1)^{J^{w_r}} keys, and each has at most JJ transitions per outgoing edge.

  1. Process the keys in topological order of their vertices and keep for each key the minimum certificate of a prefix reaching it. A path performs at most 2T2T additions of fees and rates, each a rational number with polynomially many bits, so all numbers stay polynomially long and no common denominator is ever formed.

  1. Extend the key by the accumulated length in {0,…,TW}\{0,\ldots,TW\} and keep the minimum certificate for each extended key. The answer is the least length for which some key at tt has certificate at most BB.

  1. Extend the key instead by the integer D(T)D(T) times the accumulated payment and keep the minimum length. Since payments are nonnegative and an exact certificate of a feasible path is at most Φ(P)≤Tmax⁡cfc(1)\Phi(P)\le T\max_c f_c(1), payments above D(T)⋅min⁡{B,Tmax⁡cfc(1)}D(T)\cdot\min\{B,T\max_c f_c(1)\} are discarded, which leaves at most TA(T)+1TA(T)+1 values.

In all three cases two records with the same extended key have the same transitions and future payments, so the dominated one can be discarded.

Corollary 3.3. Let F\mathcal{F} be a class of per-label inputs for which there is a computable τ\tau with J≤T1/pJ\le T^{1/p} whenever T≥τ(p)T\ge\tau(p). On F\mathcal{F}, feasibility and SHORTEST BUDGETED PATH with polynomially bounded integer lengths are fixed-parameter tractable in wrw_r. For rational lengths the same holds if in addition A(T)A(T) is polynomially bounded in NN. In particular this applies to every fixed effectively subpolynomial tariff, and for rational lengths if it also lies on a polynomial grid.

Proof. Let wr≥1w_r\ge1. If T≥τ(wr)T\ge\tau(w_r) then Jwr≤TJ^{w_r}\le T, and otherwise Jwr≤Twr<τ(wr)wrJ^{w_r}\le T^{w_r}<\tau(w_r)^{w_r}.

For example, J(T)≤(log⁡(T+2))aJ(T)\le(\log(T+2))^a gives Jwr≤ga(wr)(T+2)J^{w_r}\le g_a(w_r)(T+2), and so does J(T)≤exp⁡(alog⁡(T+2))J(T)\le\exp(a\sqrt{\log(T+2)}), because awrL≤a2wr2/4+Law_r\sqrt{L}\le a^2w_r^2/4+L for L=log⁡(T+2)L=\log(T+2).

Example 3.4 (Huge denominators are harmless). Let Δj=2−2⌊log⁡2j⌋\Delta_j=2^{-2^{\lfloor\log_2 j\rfloor}}. Then Jf(T)=1+⌊log⁡2T⌋J_f(T)=1+\lfloor\log_2 T\rfloor, while Df(T)=22⌈log⁡2T⌉≥2T/2D_f(T)=2^{2^{\lceil\log_2 T\rceil}}\ge2^{T/2}. The numerators and denominators of all values up to TT each have at most T+O(log⁡(T+1))T+O(\log(T+1)) bits, so Theorem 3.2(1),(2) apply and the problem is fixed-parameter tractable, although no polynomial grid exists.

Example 3.5 (Per-label caps). If every label has a cap tariff fc(r)=min⁡{acr,bc}f_c(r)=\min\{a_cr,b_c\} with its own binary-encoded coefficients, the two-plan menus give time 2wrpoly⁡(N)2^{w_r}\operatorname{poly}(N) for feasibility, whereas run counting needs up to min⁡{T,⌊bc/ac⌋}+1\min\{T,\lfloor b_c/a_c\rfloor\}+1 states per label. For rational lengths the per-label magnitudes matter: already linear tariffs fc(r)=acrf_c(r)=a_cr on a graph in which every label occurs once (w=0w=0, J=1J=1) encode the restricted shortest path problem, which is NP-hard [27]. This is why part (3) involves A(T)A(T).

Fixed monetary resolution

Proposition 3.6. For a tariff ff the following are equivalent: (a) all marginals lie in 1D0Z\frac{1}{D_0}\mathbb{Z} for some integer D0D_0; (b) ff is eventually linear; (c) JfJ_f is bounded. In this case SHORTEST BUDGETED PATH is fixed-parameter tractable in wrw_r even for rational lengths.

Proof. If (a) holds, the marginals form a nonincreasing sequence in {0,1D0,…,Δ1}\{0,\frac{1}{D_0},\ldots,\Delta_1\}, which has at most D0Δ1D_0\Delta_1 drops; this gives (c), and (c) implies that the marginals are eventually constant, which is (b). If (b) holds, there are finitely many distinct marginals and their common denominator serves as D0D_0. Under (a) both JfJ_f and DfD_f are bounded by constants, and Theorem 3.2(3) applies.

Thus every tariff quoted in a fixed currency unit is tractable, and so is every finite family of such tariffs from which labels choose. For an eventually linear fixed tariff one could equally clip run counts at the point of linearity; plans are needed for input-dependent menus such as Example 3.5 and for tariffs that never become linear. If per-label marginals lie on a grid 1D0Z\frac{1}{D_0}\mathbb{Z} supplied with the input, then Jc(T)≤min⁡{T,D0fc(1)+1}J_c(T) \leq\min\{T,D_0f_c(1)+1\}, and feasibility is fixed-parameter tractable in wr+max⁡cD0fc(1)w_r+\max_c D_0f_c(1).

For a fixed tariff with Jf(T)=Θ(Tδ)J_f(T)=\Theta(T^\delta), 0<δ<10<\delta<1, Theorem 3.2 still improves the exponent of the baseline from wrw_r to δwr\delta w_r. The next section shows that it cannot be removed.

Hardness for polynomial plan growth

Throughout this section ff is a fixed tariff in the common-tariff model.

Jensen gaps and strict codes

Lemma 4.1 (Gap identity). Let K≥2K \geq2 and let a1,…,aK≥0a_1,\ldots,a_K \geq0 be integers whose mean m=1K∑iaim=\frac{1}{K}\sum_i a_i is an integer. Put amin⁡=min⁡iaia_{\min}=\min_i a_i and amax⁡=max⁡iaia_{\max}=\max_i a_i. Then

f(m)−1K∑i=1Kf(ai)=∑t≥1dtbt,bt=1K∑i=1K(ai−t)+−(m−t)+,f(m)-\frac{1}{K}\sum_{i=1}^{K}f(a_i)=\sum_{t\geq1}d_t b_t,\qquad b_t=\frac{1}{K}\sum_{i=1}^{K}(a_i-t)_+-(m-t)_+,

where bt=0b_t=0 unless amin⁡<t<amax⁡a_{\min}<t<a_{\max}, and bt≥1Kmin⁡{t−amin⁡,amax⁡−t}≥1Kb_t\geq\frac{1}{K}\min\{t-a_{\min},a_{\max}-t\}\geq\frac{1}{K} for amin⁡<t<amax⁡a_{\min}<t<a_{\max}. In particular the left-hand side is nonnegative, and it vanishes if and only if ff has no drop tt with amin⁡<t<amax⁡a_{\min}<t<a_{\max}. If amin⁡<amax⁡a_{\min}<a_{\max}, it is at least 1K(Δamin⁡+1−Δamax⁡)\frac{1}{K}(\Delta_{a_{\min}+1}-\Delta_{a_{\max}}); if amin⁡=amax⁡a_{\min}=a_{\max}, it is zero.

Proof. From Δj=Δ1−∑t<jdt\Delta_j=\Delta_1-\sum_{t<j}d_t we get f(r)=rΔ1−∑t≥1dt(r−t)+f(r)=r\Delta_1-\sum_{t\geq1}d_t(r-t)_+ for every integer r≥0r\geq0. The linear terms cancel in the left-hand side, which gives the identity. If t≤amin⁡t\leq a_{\min} then all positive parts equal their arguments and bt=0b_t=0; if t≥amax⁡t\geq a_{\max} all terms vanish. Let amin⁡<t<amax⁡a_{\min}<t<a_{\max}. If t≥mt\geq m then bt=1K∑i(ai−t)+≥1K(amax⁡−t)b_t=\frac{1}{K}\sum_i(a_i-t)_+\geq\frac{1}{K}(a_{\max}-t). If t<mt<m then bt=1K∑i((ai−t)+−(ai−t))=1K∑i(t−ai)+≥1K(t−amin⁡)b_t=\frac{1}{K}\sum_i((a_i-t)_+-(a_i-t))=\frac{1}{K}\sum_i(t-a_i)_+\geq\frac{1}{K}(t-a_{\min}). If amin⁡=amax⁡a_{\min}=a_{\max}, all coefficients btb_t are zero. Otherwise ∑amin⁡<t<amax⁡dt=Δamin⁡+1−Δamax⁡\sum_{a_{\min}<t<a_{\max}}d_t=\Delta_{a_{\min}+1}-\Delta_{a_{\max}}, which gives the stated lower bound.

Definition 4.2. Let K≥2K\geq2. A sequence of positive integers r1<⋯<rzr_1<\cdots<r_z is a KK-strict code for ff if for every x<zx<z there is a drop tt of ff with Krx<t<Krx+1Kr_x<t<Kr_{x+1}. Its size is the number rzr_z.

By Lemma 4.1 with ai=Krxia_i=Kr_{x_i}, a KK-strict code satisfies, for all indices x1,…,xK∈{1,…,z}x_1,\ldots,x_K\in\{1,\ldots,z\},

EK(x1,…,xK):=f(∑i=1Krxi)−1K∑i=1Kf(Krxi)≥0,with equality iff x1=⋯=xK.(2)E_K(x_1,\ldots,x_K):=f\left(\sum_{i=1}^{K}r_{x_i}\right)-\frac{1}{K}\sum_{i=1}^{K}f(Kr_{x_i})\geq0,\quad\text{with equality iff }x_1=\cdots=x_K. \tag*{(2)}

We need codes whose size, and not merely bit length, is polynomial, because run counts are realised by explicit paths. For instance, the tariff with Δj=1/(1+⌈log⁡2j⌉)\Delta_j=1/(1+\lceil\log_2j\rceil) has the 2-strict codes rx=4xr_x=4^x, but none of polynomial size.

Lemma 4.3 (Codes and plan growth). The following are equivalent.

(a) Lf>0L_f>0.

(c) There are constants c,ec,e such that for all K≥2K \ge2 and z≥1z \ge1 a KK-strict code of length zz and size at most c(Kz)ec(Kz)^e exists and can be computed in time polynomial in KK and zz.

Proof. (c) implies (b) trivially. Assume (b). The drops witnessing strictness for x=1,…,z−1x = 1, \ldots, z - 1 are distinct and smaller than 2rz2r_z, so Jf(2rz)≥zJ_f(2r_z) \ge z and Tf∗(z)≤2czeT_f^*(z) \le2cz^e; Lemma 2.6 gives (a).

Assume (a). By Lemma 2.6 there are constants with Tf∗(m)≤CmhT_f^*(m) \le Cm^h for m≥m0m \ge m_0. Given KK and zz, let m=max⁡{m0,2Kz+1}m = \max\{m_0, 2Kz + 1\} and compute marginals until mm distinct values have been seen; this happens at horizon T=Tf∗(m)≤CmhT = T_f^*(m) \le Cm^h and takes polynomial time. There are at least 2Kz2Kz drops below TT. Let t1<⋯<tzt_1 < \cdots< t_z be the 2K2K-th, 4K4K-th, …\ldots, 2Kz2Kz-th of them, so that tx+1−tx≥2Kt_{x+1} - t_x \ge2K, and set rx=⌊tx/K⌋+1r_x = \lfloor t_x/K \rfloor+ 1. Then tx<Krx≤tx+K<tx+1<Krx+1t_x < Kr_x \le t_x + K < t_{x+1} < Kr_{x+1}, so the sequence is increasing and the drop tx+1t_{x+1} lies strictly between KrxKr_x and Krx+1Kr_{x+1}. The size is rz≤T/K+1r_z \le T/K + 1. □

No bound on denominators enters this lemma. The algorithm in (c) need not know the constants: it simply scans until enough drops are found.

Building blocks

A label is fresh if it is used on exactly one edge of the constructed graph. A fresh label is never live and contributes f(1)f(1) to the charge of every path through its edge. A label is private to a subpath if all its occurrences are on that subpath.

Lemma 4.4 (Normalised block). For integers 1≤r≤U1 \le r \le U and a label cc there is a word N(c,r,U)N(c,r,U) of length 2U2U that contains UU occurrences of cc, forming exactly rr runs, and UU fresh labels, the last of which is its final symbol.

Proof. Write U−r+1U-r+1 copies of cc, then r−1r-1 times a fresh label followed by cc, then U−r+1U-r+1 fresh labels.

Whenever such a block is preceded by a symbol other than cc, it gives cc exactly rr new runs, and the other labels of the block are charged Uf(1)Uf(1) regardless of rr.

Lemma 4.5 (Selection gadget). Let W1,…,WnW_1, \ldots, W_n, with n≥1n \ge1, be label words of common length ℓ≥1\ell\ge1, and put d=⌈log⁡2n⌉d = \lceil\log_2 n \rceil. There is a two-terminal series-parallel DAG with terminals a,ba,b, of size O(nℓ)O(n\ell), such that every aa–bb path spells dd fresh labels, some WiW_i, and dd fresh labels, and every WiW_i is spelled by some path. The terminals have degree at most two and all other vertices have degree at most three.

Proof. Repeat words to obtain a list of exactly 2d2^d words. For one word take a path spelling it. For a list of 2j2^j words, j≥1j \ge1, take the gadgets of its two halves, new terminals a,ba,b, a fresh-labelled edge from aa to the first terminal of each half and a fresh-labelled edge from the second terminal of each half to bb. Inner terminals receive one edge on the outside and have at most two on the inside. □

A chain of selection gadgets joins the second terminal of each gadget to the first terminal of the next by a fresh-labelled bridge. If the words within each gadget have equal length, then all source-to-target paths of the chain have the same number of edges, so the DAG is layered and hence bipartite. It is simple, series-parallel, hence planar and of treewidth at most two [7], and its maximum degree is three. All paths contain the same number gg of fresh selector and bridge edges.

Figure 1. The kk modules of one colour ii, in the order in which a path meets them. Consecutive modules share two check labels. The check between positions mm and m+1m+1 contributes 2f(rxm+rxm+1)−f(2rxm)−f(2rxm+1)≥02f(r_{x_m}+r_{x_{m+1}})-f(2r_{x_m})-f(2r_{x_{m+1}})\ge0 above a constant, with equality exactly if xm=xm+1x_m=x_{m+1}. At any vertex at most two check labels of the colour are live.

The reduction

Multicolored Clique asks, for a graph HH whose vertex set is partitioned into colour classes V1,…,VkV_1,\ldots,V_k, whether HH has a clique with one vertex in each class. It is W[1]-hard parameterized by kk [24]. We assume k≥2k\ge2, write Vi={vi,1,…,vi,zi}V_i=\{v_{i,1},\ldots,v_{i,z_i}\}, and put z=max⁡{2,z1,…,zk}z=\max\{2,z_1,\ldots,z_k\}. Let EijE_{ij} be the set of edges between ViV_i and VjV_j; if some ViV_i or EijE_{ij} is empty the answer is no.

Theorem 4.6. Let ff be a fixed tariff with Lf>0L_f>0. There is a polynomial-time algorithm that maps an instance (H,k)(H,k) of Multicolored Clique to an equivalent instance of Concave Run Budget for ff with wr≤w≤2k+1w_r\le w\le2k+1 whose graph is a simple planar bipartite DAG of maximum degree three and treewidth at most two in which all paths have the same number of edges. Consequently Concave Run Budget for ff is NP-complete and W[1]-hard parameterized by wrw_r or by ww on this class of graphs, and unless ETH fails it has no algorithm with running time g(wr)No(wr)g(w_r)N^{o(w_r)} for any computable gg.

Proof. Since Lf>0L_f>0, we have f(1)>0f(1)>0: otherwise all marginals would vanish. If some colour class ViV_i or some set EijE_{ij} is empty, output the one-edge ss–tt graph with budget zero. Its unique path has charge f(1)>0f(1)>0, and its live width is zero. We may therefore assume that all these sets are nonempty. Code entries not used as vertex indices are allowed in the compensating private blocks.

Code. By Lemma 4.3 we compute a 2-strict code r1<⋯<rzr_1<\cdots<r_z of size U:=rzU:=r_z polynomial in zz. For indices x,yx,y let

γ(x,y)=2f(rx+ry)−f(2rx)−f(2ry)=2E2(x,y),\gamma(x,y)=2f(r_x+r_y)-f(2r_x)-f(2r_y)=2E_2(x,y),

so γ(x,y)≥0\gamma(x,y)\ge0 with equality exactly if x=yx=y, by (2).

Gadgets and positions. The graph is a chain of selection gadgets: a vertex gadget ViV_i for each colour ii, followed by an edge gadget EijE_{ij} for each pair i<ji<j. Colour ii is involved in ViV_i and in the k−1k-1 gadgets EijE_{ij}, j≠ij\ne i; we number these kk gadgets 1,…,k1,\ldots,k in chain order and call the number the position of the gadget for colour ii. For every colour ii and every m∈{1,…,k−1}m\in\{1,\ldots,k-1\} there are two check labels ai,ma_{i,m} and ai,m′a'_{i,m}.

Parts and modules. For a colour ii, a check mm and an index xx, the part Qi,m(x)Q_{i,m}(x) is the word

N(ai,m,rx,U) N(ai,m′,rx,U) N(p1,ρ1,2U)⋯N(pz,ρz,2U),ρy={2ryy≠x,1y=x.\mathrm{N}(a_{i,m},r_x,U)\ \mathrm{N}(a'_{i,m},r_x,U)\ \mathrm{N}(p_1,\rho_1,2U)\cdots\mathrm{N}(p_z,\rho_z,2U), \qquad \rho_y= \begin{cases} 2r_y & y\ne x,\\ 1 & y=x. \end{cases}

where p1,…,pzp_1,\ldots,p_z are new labels private to their blocks. It has length 4U(z+1)4U(z+1). Apart from the two check labels, its labels are charged

2Uf(1)+∑y≠xf(2ry)+f(1)+2Uzf(1)=A−f(2rx).(3)2Uf(1)+\sum_{y\ne x}f(2r_y)+f(1)+2Uzf(1)=A-f(2r_x). \tag*{(3)}

where A:=∑y=1zf(2ry)+(2U(z+1)+1)f(1)A := \sum_{y=1}^{z} f(2r_y) + (2U(z+1)+1)f(1) does not depend on xx. The module Mi,m(x)M_{i,m}(x) for position mm is Qi,m−1(x)Qi,m(x)Q_{i,m-1}(x)Q_{i,m}(x), where Qi,0Q_{i,0} and Qi,kQ_{i,k} are empty. Its length depends only on mm.

Payloads. The words of ViV_i are the modules Mi,m(x)M_{i,m}(x) for x=1,…,zix=1,\ldots,z_i, where mm is the position of ViV_i for colour ii. The words of EijE_{ij} are Mi,m(x)Mj,m′(y)M_{i,m}(x)M_{j,m'}(y) for all edges vi,xvj,y∈Eijv_{i,x}v_{j,y}\in E_{ij}, with m,m′m,m' the positions of EijE_{ij} for ii and jj. Private and fresh labels are new in every word, including repeated copies. The budget is

B0=2k(k−1)A+gf(1),B_0 = 2k(k-1)A + g f(1),

where gg is the number of selector and bridge edges on a path.

Charge of a path. A path selects one word in every gadget and thus, for each colour ii, an index xi,mx_{i,m} at each position mm. Every block either starts the path or is preceded by a fresh label, possibly the final label of another block, so runs never merge across blocks. The label ai,ma_{i,m} occurs only in the parts Qi,mQ_{i,m} at positions mm and m+1m+1 and therefore has rxi,m+rxi,m+1r_{x_{i,m}}+r_{x_{i,m+1}} runs; the same holds for ai,m′a'_{i,m}. A path traverses 2k(k−1)2k(k-1) parts, two for each check, and by (3)

Φ(P)=B0+∑i=1k∑m=1k−1γ(xi,m,xi,m+1).\Phi(P) = B_0 + \sum_{i=1}^{k}\sum_{m=1}^{k-1}\gamma(x_{i,m},x_{i,m+1}).

Hence Φ(P)≥B0\Phi(P)\ge B_0, with equality if and only if xi,1=⋯=xi,kx_{i,1}=\cdots=x_{i,k} for every ii, that is, if and only if every selected edge in EijE_{ij} joins the selected vertices of ViV_i and VjV_j. Such a path exists exactly if HH has a multicoloured clique.

Width. Write G1,…,GhG_1,\ldots,G_h for the gadgets in chain order. For a colour ii, let ji,1<⋯<ji,kj_{i,1}<\cdots<j_{i,k} be the indices of its involved gadgets, and put Ci,m={ai,m,ai,m′}C_{i,m}=\{a_{i,m},a'_{i,m}\} for 1≤m<k1\le m<k and Ci,0=Ci,k=∅C_{i,0}=C_{i,k}=\varnothing. Labels in Ci,mC_{i,m} occur only in Gji,mG_{j_{i,m}} and Gji,m+1G_{j_{i,m+1}}.

First consider a vertex in a gadget that does not involve ii. If exactly mm involved gadgets precede it, all check labels other than those in Ci,mC_{i,m} have both occurrence gadgets on the same side, so only Ci,mC_{i,m} can be live there. The same argument applies at both endpoints of a bridge: take mm to be the number of involved gadgets up to and including the gadget before that bridge. The bridge itself is a single fresh edge and has no internal vertices.

Now let vv lie in the involved gadget Gji,mG_{j_{i,m}}. Only the labels in Ci,m−1∪Ci,mC_{i,m-1}\cup C_{i,m} can be live at vv. View the selection gadget as a splitting tree, internally disjoint payload paths, and a merging tree. At a vertex of the splitting tree, including a payload start, every prefix traverses only selector edges within this gadget. Since labels in Ci,mC_{i,m} first occur in this gadget, Ci,m∩Π(v)=∅C_{i,m}\cap\Pi(v)=\varnothing. At a vertex of the merging tree, including a payload end, every continuation traverses only selector edges within this gadget. Since labels in Ci,m−1C_{i,m-1} last occur in this gadget, Ci,m−1∩Γ(v)=∅C_{i,m-1}\cap\Gamma(v)=\varnothing. These statements also cover the gadget terminals and the case of a single payload, for which the selector trees have depth zero.

If vv is strictly inside a payload path, every prefix and continuation through vv uses that same payload path inside the gadget. In this word all occurrences of Ci,m−1C_{i,m-1} precede all occurrences of Ci,mC_{i,m}, because the module is Qi,m−1(x)Qi,m(x)Q_{i,m-1}(x)Q_{i,m}(x); any module of another colour is wholly before or after it. If the payload prefix up to vv contains no edge labelled from Ci,mC_{i,m}, then Ci,m∩Π(v)=∅C_{i,m}\cap\Pi(v)=\varnothing. Otherwise all occurrences of Ci,mC_{i,m} in this payload precede vv, and this check has no later occurrence gadget, so Ci,m−1∩Γ(v)=∅C_{i,m-1}\cap\Gamma(v)=\varnothing. Thus at most one of the two check pairs can contribute live labels, and at most two check labels of colour ii are live at every vertex.

Fresh labels are never live. A private label is confined to one block on one payload copy. If it is live at vv, a prefix and a continuation witnessing this concatenate to a path through two occurrences of that label, forcing vv to be an internal vertex of its block. Distinct private blocks have disjoint interiors, so at most one private label is live at a vertex. Consequently w≤2k+1w\le2k+1, and wr≤ww_r\le w by definition.

Size and graph class. Every payload has at most 16U(z+1)16U(z+1) symbols. Each gadget has at most z2z^2 candidate words before padding and fewer than 2z22z^2 payload copies after padding.

There are k+(k2)k+\binom{k}{2} gadgets, so the numbers of vertices and edges are O(k2z2U(z+1))O(k^2z^2U(z+1)). Since UU is polynomial in zz, this is polynomial in kk and zz, with an exponent independent of kk. The values of ff up to 2U2U have polynomial bit length and can be computed in polynomial time. The budget is a sum of polynomially many such rational values with polynomially bounded integer coefficients, so it too has polynomial bit length and is exactly computable in polynomial time. Encoding vertex and label identifiers therefore gives N≤(kz)O(1)N\leq(kz)^{O(1)}. The graph properties were established after Lemma 4.5.

Consequences. The reduction is polynomial and maps kk to a width of at most 2k+12k+1; this proves NP-hardness and W[1]-hardness. Membership in NP holds because the charge of a given path is computed in polynomial time. Under ETH, MULTICOLORED CLIQUE has no g(k)no(k)g(k)n^{o(k)} algorithm for computable gg [15 Corollary 14.23] (see also [13]). Suppose feasibility had running time g(p)Ne(p)g(p)N^{e(p)} for p=wrp=w_r, with e(p)=o(p)e(p)=o(p). Put G(p)=max⁡0≤q≤pmax⁡{1,g(q)}G(p)=\max_{0\leq q\leq p}\max\{1,g(q)\} and E(p)=max⁡0≤q≤pmax⁡{0,e(q)}E(p)=\max_{0\leq q\leq p}\max\{0,e(q)\}. Then GG is computable and E(p)=o(p)E(p)=o(p): for any η>0\eta>0, the finitely many values before e(q)≤ηqe(q)\leq\eta q contribute only a fixed constant to the maximum. For a constant CC the constructed instance has N≤(kz)CN\leq(kz)^C and p≤2k+1p\leq2k+1, so the target running time is at most G(2k+1)(kz)CE(2k+1)G(2k+1)(kz)^{CE(2k+1)}. Here CE(2k+1)=o(k)CE(2k+1)=o(k), and the factor depending only on kk is bounded by a computable function, since E(2k+1)=O(k)E(2k+1)=O(k). Including the polynomial reduction time therefore gives a g′(k)zo(k)g'(k)z^{o(k)} algorithm with computable g′g', contradicting the cited lower bound because z≤max⁡{2,n}z\leq\max\{2,n\}.

Up to constant factors in the exponent the lower bound matches the count-state algorithm of Proposition 2.5, whose running time is NO(wr)N^{O(w_r)}.

Remark 4.7 (Separation gap). In the constructed instances every path has charge exactly B0B_0 or at least B0+γmin⁡B_0+\gamma_{\min}, where by Lemma 4.1

γmin⁡=min⁡x≠yγ(x,y)≥min⁡x<z(Δ2rx+1−Δ2rx+1)>0.\gamma_{\min}=\min_{x\ne y}\gamma(x,y)\geq\min_{x<z}\left(\Delta_{2r_x+1}-\Delta_{2r_x+1}\right)>0.

If ff lies on a polynomial grid, all charges and B0B_0 are multiples of 1/Df(2U)1/D_f(2U), so γmin⁡≥1/Df(2U)\gamma_{\min}\geq1/D_f(2U) is inverse-polynomial. In general γmin⁡\gamma_{\min} may be exponentially small, as for geometric marginals.

Remark 4.8. The construction uses private labels generously. The number of labels occurring more than once is polynomial in kk and zz, so the theorem says nothing about the parameters qq and qrepq_{\mathrm{rep}}, which are treated in Section 8.

Width k+1k+1 on polynomial grids

The reduction of Section 4 keeps two check labels per colour alive. With a single shared label cic_i per colour, receiving rxr_x runs in each of the kk gadgets that involve the colour, the charge of cic_i is f(∑mrxim)f(\sum_m r_{x_i m}), and (2) with K=kK=k shows that consistency is detected if each of these gadgets additionally pays a constant minus f(krx)/kf(kr_x)/k. This quantity is not a sum of tariff values. We show that on a polynomial grid it can nevertheless be paid by positive charges, after a suitable choice of the code. The result is the following refinement.

Theorem 5.1. Let ff be a fixed tariff on a polynomial grid with Lf>0L_f>0. Then the statement of Theorem 4.6 holds with wr≤w≤k+1w_r\leq w\leq k+1 in place of 2k+12k+1.

Lemma 5.2 (Positive padding). Let f(1)>0f(1)>0, let R≥1R\geq1, let DD be a positive integer with f(0),…,f(R)∈1DZf(0),\ldots,f(R)\in\frac{1}{D}\mathbb{Z}, and put

vr=D(f(r)+(r−1)f(1)),d=gcd⁡(v1,…,vR),ur=vr/d,a=max⁡ur,v_r=D\bigl(f(r)+(r-1)f(1)\bigr),\qquad d=\gcd(v_1,\ldots,v_R),\qquad u_r=v_r/d,\qquad a=\max u_r,

where rr ranges over 1,…,R1,\ldots,R.

  • (i) Df(r)∈dZD f(r) \in d\mathbb{Z} for all 0≤r≤R0 \le r \le R.

  • (ii) Every integer n≥a2n \ge a^2 is a sum of at most nn numbers from {u1,…,uR}\{u_1,\ldots,u_R\}, and such a representation can be computed in time polynomial in RR, aa and nn.

  • (iii) For every integer n≥a2n \ge a^2 and every integer ℓ≥(2R−1)n\ell\ge(2R-1)n, one can construct in time polynomial in RR, nn, ℓ\ell a word of length exactly ℓ\ell and charge exactly dn/Ddn/D in which no label has more than RR runs, all labels are new, and at most one label is live at any position.

Proof. (i) Df(r)=vr−(r−1)v1D f(r)=v_r-(r-1)v_1.

(ii) The uru_r are positive integers with greatest common divisor one. Let μ=min⁡rur\mu=\min_r u_r and consider the digraph on Z/μZ\mathbb{Z}/\mu\mathbb{Z} with an arc of weight uru_r from xx to x+urx+u_r for all xx and rr. The residues reachable from 00 form a subsemigroup of a finite group, hence a subgroup, which is the whole group because the uru_r are coprime. A shortest path from 00 to the residue of nn uses at most μ−1\mu-1 arcs and has weight at most (μ−1)a<a2≤n(\mu-1)a<a^2\le n; adding copies of μ\mu gives nn. Shortest paths are found by Dijkstra’s algorithm.

(iii) For a term uru_r write a new label cc followed by r−1r-1 times a fresh label and cc. This word has charge f(r)+(r−1)f(1)=dur/Df(r)+(r-1)f(1)=du_r/D. Concatenate the words of all terms of a representation of nn, with new labels in each; consecutive words begin and end with different labels. The only labels with more than one occurrence are the labels cc, each confined to its word. There are at most nn terms and each block has length 2r−1≤2R−12r-1\le2R-1, so the concatenation has length at most (2R−1)n(2R-1)n. Repeating its first symbol reaches any prescribed ℓ≥(2R−1)n\ell\ge(2R-1)n without adding a run.

Lemma 5.3 (Residue-selected modules). Let ff lie on a polynomial grid and Lf>0L_f>0. For all K≥2K\ge2 and z≥1z\ge1 one can compute, in time polynomial in KK and zz, a KK-strict code r1<⋯<rzr_1<\cdots<r_z of size UU, a rational C0>0C_0>0 and an integer ℓ\ell such that for every xx and every label cc there is a word Rc(x)R_c(x) of length ℓ\ell that consists of N(c,rx,U)N(c,r_x,U) followed by a word in new labels, has at most one live label other than cc at any position, and whose labels other than cc are charged exactly

C0−f(Krx)K.C_0-\frac{f(Kr_x)}{K}.

All charges of labels with at most KUKU runs are multiples of 1/D1/D for an integer DD bounded by a polynomial in KK and zz, and KC0∈1DZKC_0\in\frac{1}{D}\mathbb{Z}.

Proof. By Lemma 4.3(c) compute a KK-strict code t1<⋯<tKzt_1<\cdots<t_{Kz} of length KzKz; let U=tKzU=t_{Kz}, R=KUR=KU and D=Df(R)D=D_f(R), which are polynomially bounded, and define dd, uru_r and aa as in Lemma 5.2. As in the proof of Theorem 4.6, f(1)>0f(1)>0. By Lemma 5.2(i) the numbers νy=Df(Kty)/d\nu_y=Df(Kt_y)/d are nonnegative integers. Some residue class b∈{0,…,K−1}b\in\{0,\ldots,K-1\} modulo KK contains at least zz of them; keep zz such candidates and call them r1<⋯<rzr_1<\cdots<r_z. A subsequence of a KK-strict code is KK-strict. The integers

mx=1K(Df(Krx)d−b)≥0,h=a2+max⁡xmx,C=dD(h+bK)m_x=\frac{1}{K}\left(\frac{Df(Kr_x)}{d}-b\right)\ge0,\qquad h=a^2+\max_x m_x,\qquad C=\frac{d}{D}\left(h+\frac{b}{K}\right)

satisfy

C−f(Krx)K=dD(h−mx),h−mx≥a2.C-\frac{f(Kr_x)}{K}=\frac{d}{D}(h-m_x),\qquad h-m_x\ge a^2.

Put L=(2R−1)hL=(2R-1)h. Since a2≤h−mx≤ha^2\le h-m_x\le h, Lemma 5.2(iii) constructs, for every xx, a padding word of length exactly LL and charge dD(h−mx)\frac{d}{D}(h-m_x). Let Rc(x)R_c(x) be N(c,rx,U)N(c,r_x,U) followed by this word, set ℓ=2U+L\ell=2U+L, and set C0=Uf(1)+CC_0=Uf(1)+C. The block ends with a fresh label, so no runs merge. Since a≤2RDf(1)a\le2RDf(1) and mx≤Df(R)≤DRf(1)m_x\le Df(R)\le DRf(1), the numbers hh and ℓ\ell are polynomial. Finally KC=dD(Kh+b)∈1DZKC=\frac{d}{D}(Kh+b)\in\frac{1}{D}\mathbb{Z}.

The role of the residue class is to make f(Krx)/Kf(Kr_x)/K congruent, for all retained xx, to one fixed element modulo the lattice dDZ\frac{d}{D}\mathbb{Z} of realisable charges. The pool of KzKz candidates and the numbers DD and dd are fixed before the selection, so there is no circular dependence between the code and its lattice.

Proof of Theorem 5.1. Apply Lemma 5.3 with K=kK=k. Use the chain of gadgets of Theorem 4.6, one shared label cic_i per colour, the words Rci(x)R_{c_i}(x) in ViV_i and the words Rci(x)Rcj(y)R_{c_i}(x)R_{c_j}(y) in EijE_{ij}, with new private labels in every word. Each colour is involved in exactly K=kK=k gadgets, so a path selecting indices xi,1,…,xi,kx_{i,1},\ldots,x_{i,k} for colour ii has charge

Φ(P)=k2C0+gf(1)+∑i=1kEk(xi,1,…,xi,k).\Phi(P)=k^2C_0+gf(1)+\sum_{i=1}^{k}E_k(x_{i,1},\ldots,x_{i,k}).

because cic_i is charged f(∑mrxi,m)f(\sum_m r_{x_{i,m}}) and the other labels of its kk words are charged kC0−1k∑mf(krxi,m)kC_0-\frac{1}{k}\sum_m f(kr_{x_{i,m}}). By (2) the budget B0=k2C0+gf(1)B_0=k^2C_0+gf(1) is met exactly by the paths that encode a multicoloured clique. At most the kk shared labels and one private label are live at a vertex. The remaining assertions are proved as in Theorem 4.6. Every label has at most kUkU runs, so all charges and B0B_0 lie in 1DZ\frac{1}{D}\mathbb{Z}, and inconsistent paths exceed the budget by at least 1/D1/D.

Concrete tariffs, close tariffs and separation

Hard tariffs

A tariff is strictly concave if every t≥1t\ge1 is a drop; then Jf(T)=TJ_f(T)=T, Lf=1L_f=1, and rx=xr_x=x is a KK-strict code for every K≥2K\ge2. Theorem 4.6 therefore applies to the harmonic tariff H(r)=∑j≤r1/jH(r)=\sum_{j\le r}1/j, to the reciprocal-power tariffs with Δj=j−p\Delta_j=j^{-p} for a fixed integer p≥1p\ge1, and to the bounded geometric tariff with Δj=21−j\Delta_j=2^{1-j}. None of these lies on a polynomial grid. The following tariffs do.

Let u(j)=2⌊log⁡2j⌋u(j)=2^{\lfloor\log_2 j\rfloor} and define FF and, for a fixed integer α≥1\alpha\ge1, GαG_\alpha by

ΔjF=3u(j)−j2u(j)2,ΔjGα=Δ⌈j1/α⌉F.(4)\Delta_j^F=\frac{3u(j)-j}{2u(j)^2},\qquad\Delta_j^{G_\alpha}=\Delta_{\lceil j^{1/\alpha}\rceil}^F. \tag*{(4)}

Proposition 6.1. (i) FF is a strictly concave tariff with dt=1/(2u(t)2)d_t=1/(2u(t)^2) for all tt, DF(T)≤2T2D_F(T)\le2T^2 and F(r)=Θ(log⁡(r+1))F(r)=\Theta(\log(r+1)).

(ii) GαG_\alpha is a tariff whose drops are exactly the perfect α\alpha-th powers; JGα(T)=⌈T1/α⌉J_{G_\alpha}(T)=\lceil T^{1/\alpha}\rceil, DGα(T)≤8T2/αD_{G_\alpha}(T)\le8T^{2/\alpha}, and Gα(r)=Θ(r1−1/α)G_\alpha(r)=\Theta(r^{1-1/\alpha}) for α≥2\alpha\ge2.

Proof. (i) Within a dyadic range u≤j<2uu\le j<2u consecutive marginals differ by 1/(2u2)1/(2u^2). The last marginal of the range is (u+1)/(2u2)(u+1)/(2u^2) and the first of the next range is 1/(2u)1/(2u), which again differ by 1/(2u2)1/(2u^2). All marginals up to TT have denominators dividing 2u(T)2≤2T22u(T)^2\le2T^2, and the marginals of a dyadic range sum to 34+14u\frac{3}{4}+\frac{1}{4u}. (ii) The index map j↦⌈j1/α⌉j\mapsto\lceil j^{1/\alpha}\rceil is nondecreasing and increases exactly after perfect α\alpha-th powers; the remaining claims follow from (i), ⌈T1/α⌉≤2T1/α\lceil T^{1/\alpha}\rceil\le2T^{1/\alpha} and ΔjF=Θ(1/j)\Delta_j^F=\Theta(1/j).

Corollary 6.2. CONCAVE RUN BUDGET is NP-complete and W[1]-hard in wrw_r on the graph class of Theorem 4.6, with the ETH bound stated there, for every strictly concave tariff with polynomial-time evaluation, in particular for HH, for reciprocal powers and for geometric marginals, and for FF and every GαG_\alpha. For FF and GαG_\alpha the instances can be taken of width at most k+1k+1, and SHORTEST BUDGETED PATH with rational lengths is in XP for these two families. For every δ>0\delta>0 there is a hard tariff with Jf(T)=O(Tδ)J_f(T)=O(T^\delta). Proof. Theorems 4.6 and 5.1 and Proposition 6.1. For the XP statement extend the keys of Proposition 2.5 by the scaled charge as in Theorem 3.2(3). The last claim is GαG_{\alpha} with α>1/δ\alpha> 1/\delta.

Arbitrarily close tariffs of different complexity

For a fixed integer M≥1M \ge1 let FMF_M be the tariff with marginals

ΔjFM=⌈Mu(j)ΔjF⌉Mu(j).\Delta_j^{F_M}=\frac{\lceil M u(j)\Delta_j^F\rceil}{M u(j)}.

Proposition 6.3. For every M≥1M \ge1, FMF_M is a tariff with F≤FM≤(1+2M)FF \le F_M \le(1+\frac{2}{M})F, JFM(T)≤⌈M/2⌉(1+log⁡2T)J_{F_M}(T) \le\lceil M/2\rceil(1+\log_2 T) and DFM(T)≤MTD_{F_M}(T) \le MT. Consequently SHORTEST BUDGETED PATH for FMF_M is fixed-parameter tractable in wrw_r, even with rational lengths, whereas feasibility for FF is W[1]-hard.

Proof. Within a dyadic range with u=u(j)u=u(j) the numbers MuΔjF=M(3u−j)/(2u)M u\Delta_j^F=M(3u-j)/(2u) decrease and lie in (M/2,M](M/2,M], so their ceilings are nonincreasing and take at most ⌈M/2⌉\lceil M/2\rceil values. The first marginal of the next range is exactly 1/(2u)1/(2u), which is at most the last rounded marginal of the current one. Hence FMF_M is a tariff with the stated plan count, and its denominators divide Mu(T)≤MTMu(T) \le MT. Moreover ΔjF≤ΔjFM<ΔjF+1Mu≤(1+2M)ΔjF\Delta_j^F \le\Delta_j^{F_M}<\Delta_j^F+\frac{1}{Mu}\le(1+\frac{2}{M})\Delta_j^F, because ΔjF>12u\Delta_j^F>\frac{1}{2u}. The algorithmic claim is Corollary 3.3, and hardness of FF is Corollary 6.2.

Since F≤FM≤(1+2M)FF \le F_M \le(1+\frac{2}{M})F, a shortest path for FMF_M with budget (1+2M)B(1+\frac{2}{M})B is no longer than the optimum for FF with budget BB and exceeds the budget by a factor of at most 1+2M1+\frac{2}{M} with respect to FF. This is the principle behind the budget-relaxing scheme of § 7, and Corollary 7.3 shows that the price g(wr,M)g(w_r,M) of this relaxation cannot be made polynomial in MM.

Separation

Definition 6.4. A fixed tariff ff with Lf>0L_f>0 is polynomially separated if there are constants C≥1C\ge1, a,b≥0a,b\ge0, and an algorithm which, for every integer z≥2z\ge2, runs in time at most CzaCz^a and outputs a 2-strict code r1<⋯<rzr_1<\cdots<r_z with rz≤Czar_z\le Cz^a and

γmin⁡=min⁡1≤x<y≤z(2f(rx+ry)−f(2rx)−f(2ry))≥C−1z−b.\gamma_{\min}=\min_{1\le x<y\le z}\left(2f(r_x+r_y)-f(2r_x)-f(2r_y)\right)\ge C^{-1}z^{-b}.

The constants and algorithm may depend on ff, but not on zz, the clique parameter, or the graph instance.

Lemma 6.5. A tariff ff with Lf>0L_f>0 is polynomially separated if it lies on a polynomial grid, or if there are constants c>0c>0 and pp with dt≥ct−pd_t\ge ct^{-p} for all t≥1t\ge1.

Proof. On a polynomial grid, γ(x,y)\gamma(x,y) is a positive multiple of 1/Df(2rz)1/D_f(2r_z). In the second case ff is strictly concave, rx=xr_x=x is a 2-strict code, and by Remark 4.7, γmin⁡≥min⁡x<zd2x+1≥c(2z)−p\gamma_{\min}\ge\min_{x<z}d_{2x+1}\ge c(2z)^{-p}.

Thus FF, GαG_{\alpha}, HH and the reciprocal powers are polynomially separated, the latter two with dt≥p(t+1)−p−1d_t\ge p(t+1)^{-p-1}. The class is stable under perturbations that preserve a polynomial lower bound on the decrements; for example Δj=1/j+∑i=2nai/ji\Delta_j=1/j+\sum_{i=2}^{n}a_i/j^i with rational ai≥0a_i\ge0 has dt≥1/(2t2)d_t\ge1/(2t^2). Geometric marginals have Lf=1L_f=1 but are not polynomially separated: there γ(x,y)=2(2−rx−2−ry)2\gamma(x,y)=2(2^{-r_x}-2^{-r_y})^2, which is exponentially small in zz for some pair of any code of length zz.

Budget relaxation

With rational lengths, Theorem 3.2(3) depends on the numerical range A(T)A(T) of the charges, and plan counts may be large. Both dependencies disappear if the budget may be exceeded slightly.

The construction combines piecewise-linear approximation of concave costs [37] with the scaling and rounding used for restricted shortest paths [32, 36, 41]. The additional point is that the approximate plans retain the delayed-commitment property and can be stored only on the restart set.

Lemma 7.1 (Value-spaced menus). Let fc(1)>0f_c(1)>0 and 0<η≤10<\eta\le1. One can compute a set of at most 2+log⁡1+η(fc(T)/fc(1))=O(1+η−1log⁡(T+1))2+\log_{1+\eta}\left(f_c(T)/f_c(1)\right)=O\left(1+\eta^{-1}\log(T+1)\right) supports of fcf_c, including the default, whose minimum f^c\hat{f}_c satisfies fc(r)≤f^c(r)≤(1+η)fc(r)f_c(r)\le\hat{f}_c(r)\le(1+\eta)f_c(r) for 1≤r≤T1\le r\le T.

Proof. Start with x=1x=1. Given x≤Tx\le T, let t≤Tt\le T be largest with fc(t)≤(1+η)fc(x)f_c(t)\le(1+\eta)f_c(x), add the support at tt and continue with x=t+1x=t+1. For x≤r≤tx\le r\le t we have fc(r)≤πc,t(r)≤πc,t(t)=fc(t)≤(1+η)fc(x)≤(1+η)fc(r)f_c(r)\le\pi_{c,t}(r)\le\pi_{c,t}(t)=f_c(t)\le(1+\eta)f_c(x)\le(1+\eta)f_c(r). The values fc(x)f_c(x) at consecutive starting points grow by a factor larger than 1+η1+\eta and lie between fc(1)f_c(1) and fc(T)≤Tfc(1)f_c(T)\le Tf_c(1).

Theorem 7.2 (Budget-relaxing scheme). For per-label tariffs, rational lengths and 0<ε≤10<\varepsilon\le1, one can compute in time Jappwrpoly⁡(N,1/ε)J_{\mathrm{app}}^{w_r}\operatorname{poly}(N,1/\varepsilon), where Japp=O(1+ε−1log⁡(T+1))J_{\mathrm{app}}=O(1+\varepsilon^{-1}\log(T+1)), either a path PP with

ℓ(P)≤OPT⁡(B)andΦ(P)≤(1+ε)B,\ell(P)\le\operatorname{OPT}(B)\qquad\text{and}\qquad\Phi(P)\le(1+\varepsilon)B,

where OPT⁡(B)\operatorname{OPT}(B) is the least length of a path of charge at most BB, or a correct statement that no path has charge at most BB. The running time is of the form g(wr,1/ε)poly⁡(N)g(w_r,1/\varepsilon)\operatorname{poly}(N).

Proof. If B=0B=0, only labels with fc(1)=0f_c(1)=0 can be used; their tariffs vanish identically, and a shortest path in the corresponding subgraph is the answer. Let B>0B>0 and ρ=εB/(4T)\rho=\varepsilon B/(4T). Labels with fc(1)=0f_c(1)=0 have the zero tariff and a single plan. For every other label take the menu of Lemma 7.1 with η=ε/2\eta=\varepsilon/2, and round all fees and rates up to multiples of ρ\rho. Run the projected plan process of Theorem 3.2 with these rounded plans, extend the key by the accumulated rounded payment divided by ρ\rho, an integer that is kept only up to ⌊(1+ε)B/ρ⌋=O(T/ε)\lfloor(1+\varepsilon)B/\rho\rfloor=O(T/\varepsilon), and store the minimum length for each extended key.

The proof of Lemma 3.1 applies verbatim to the plans of Lemma 7.1: every strategy pays at least f^c(r)≥fc(r)\hat{f}_c(r)\ge f_c(r), and committing at the first run to the plan attaining f^c(r)\hat{f}_c(r) pays exactly f^c(r)\hat{f}_c(r). Rounding up only increases payments, so every path found has Φ(P)≤(1+ε)B\Phi(P)\le(1+\varepsilon)B.

Conversely let P∗P^* be a path of length OPT⁡(B)\operatorname{OPT}(B) and charge at most BB. Its exact strategies for the f^c\hat{f}_c pay at most (1+ε/2)B(1+\varepsilon/2)B before rounding, and involve at most TT rates and at most TT fees, so rounding adds at most 2Tρ=εB/22T\rho=\varepsilon B/2. All prefixes of this trajectory survive, and the algorithm returns a path of length at most ℓ(P∗)\ell(P^*).

There are at most ∣V∣(q+1)JappwrO(T/ε)|V|(q+1)J_{\mathrm{app}}^{w_r}O(T/\varepsilon) extended keys. Finally (log⁡(T+1)/ε)wr≤ε−wr(wr/ε)wr(T+1)(\log(T+1)/\varepsilon)^{w_r}\le\varepsilon^{-w_r}(w_r/\varepsilon)^{w_r}(T+1) for wr≥1w_r\ge1, which gives the form g(wr,1/ε)poly⁡(N)g(w_r,1/\varepsilon)\operatorname{poly}(N).

Corollary 7.3 (Accuracy obstruction). Let ff be a fixed polynomially separated tariff. Unless FPT=W[1]\mathrm{FPT}=\mathrm{W[1]}, no algorithm achieves the guarantee of Theorem 7.2 in time g(wr)poly⁡(N,1/ε)g(w_r)\operatorname{poly}(N,1/\varepsilon), even on unit-length instances that have a feasible path and whose graphs are simple planar bipartite DAGs of maximum degree three and treewidth at most two.

Proof. First decide any source instance with an empty colour class ViV_i or an empty edge set EijE_{ij} as a no-instance, without constructing a fallback. For the remaining sources, take the instance of Theorem 4.6, built from a polynomially separated code, and let L0L_0 be the common length of its paths. Here B0≥f(1)>0B_0\ge f(1)>0. Add a fallback path of 3L03L_0 edges from ss to tt, all carrying one new label. Its charge is f(1)≤B0f(1) \le B_0, so the instance is feasible. The parities of L0L_0 and 3L03L_0 agree, so the graph remains bipartite; it remains series-parallel and of maximum degree three, and the new label is live only on the fallback path. Let ε=min⁡{1,γmin⁡/(2B0)}\varepsilon= \min\{1, \gamma_{\min}/(2B_0)\}. Since B0B_0 is at most the number of edges of a path times f(1)f(1), and γmin⁡\gamma_{\min} is inverse-polynomial, 1/ε1/\varepsilon is polynomially bounded. If HH has a multicoloured clique, then OPT⁡(B0)=L0\operatorname{OPT}(B_0) = L_0 and the algorithm must return a path of length L0L_0. Otherwise every path other than the fallback has charge at least B0+γmin⁡>(1+ε)B0B_0 + \gamma_{\min} > (1 + \varepsilon)B_0 by Remark 4.7, and the algorithm returns the fallback, of length 3L03L_0. This decides MULTICOLOURED CLIQUE in fixed-parameter time.

The same fallback construction gives a standard gap statement for the length objective under the exact budget.

Corollary 7.4. Let ff be a fixed tariff with Lf>0L_f > 0 and 0<δ<10 < \delta< 1. Unless FPT = W[1], there is no algorithm with running time g(wr)poly⁡(N)g(w_r)\operatorname{poly}(N) that, on feasible unit-length instances, returns a path of charge at most BB and length at most N1−δ⋅OPT⁡(B)N^{1-\delta}\cdot\operatorname{OPT}(B).

Proof. First decide any source instance with an empty colour class ViV_i or an empty edge set EijE_{ij} as a no-instance, without constructing a fallback. For the remaining sources, let SS be the size of the instance of Theorem 4.6, with common path length L0L_0, and add a fallback of μL0\mu L_0 edges bearing one new label, for an odd μ=Θ(Sb)\mu= \Theta(S^b) with b>2/δb > 2/\delta. Here B0≥f(1)>0B_0 \ge f(1) > 0, so the fallback is feasible, and the width is at most max⁡{wr,1}\max\{w_r,1\}. Since L0≤SL_0 \le S, the number of added edges is O(Sb+1)O(S^{b+1}); allowing for binary vertex and label identifiers gives the coarse bound N=O(Sb+2)N = O(S^{b+2}). For all sufficiently large SS,

μN1−δ=Ω(Sδb+2δ−2)>1.\frac{\mu}{N^{1-\delta}} = \Omega\left(S^{\delta b+2\delta-2}\right) > 1.

If the source graph has a multicoloured clique, then OPT⁡(B0)=L0\operatorname{OPT}(B_0) = L_0 and the approximation guarantee forces the returned path to have length less than μL0\mu L_0; it must therefore lie in the original branch. Conversely, any exactly budget-feasible path in that branch encodes a clique by Theorem 4.6. If no clique exists, the fallback is the only feasible branch. Inspecting the returned branch thus decides MULTICOLOURED CLIQUE in fixed-parameter time. The finitely many smaller values of SS can be handled by exhaustive search.

Few labels

The total number qq of labels and the number qrepq_{\mathrm{rep}} of labels occurring on more than one edge are upper bounds on live width. They are easier to interpret but much more restrictive, and the reduction of § 4 does not bound them. For constraints on the number of occurrences of each colour, W[1]-hardness in the number of colours is known by a many-one reduction [4]; that reduction prescribes a separate bound for every colour, whereas here a single budget bounds a sum of concave charges.

Proposition 8.1. For per-label tariffs and rational lengths, SHORTEST BUDGETED PATH can be solved in time (T+1)qpoly⁡(N)(T+1)^q\operatorname{poly}(N). In the common-tariff model it can be solved in time (T+1)qrep+1poly⁡(N)(T+1)^{q_{\mathrm{rep}}+1}\operatorname{poly}(N).

Proof. Store the last label and the run counts of all labels; the charge is a function of this vector, so it suffices to keep the minimum length for each vector. In the common-tariff model store the counts of the repeated labels and the number n1n_1 of edges traversed whose label occurs on no other edge; the charge is determined by these and equals the charge of the repeated labels plus n1f(1)n_1 f(1).

For the lower bound we use a weaker reducibility. A disjunctive reduction maps an instance (x,k)(x,k) in polynomial time to a list of instances (y1,p1),…,(yn,pn)(y_1,p_1),\ldots,(y_n,p_n) with pi≤β(k)p_i\leq\beta(k) for a computable β\beta, such that (x,k)(x,k) is a yes-instance if and only if some (yi,pi)(y_i,p_i) is. A fixed-parameter algorithm for the target yields one for the source, and if β(k)=O(k)\beta(k)=O(k), an algorithm with running time g(p)NO(p)g(p)N^{O(p)} for the target contradicts ETH when the source is MULTICOLORED CLIQUE.

Theorem 8.2. Let ff be a fixed tariff on a polynomial grid with Lf>0L_f>0. There is a disjunctive reduction from MULTICOLORED CLIQUE with kk colours to CONCAVE RUN BUDGET for ff on instances with at most 2k+12k+1 labels. The number of queries, their individual bit sizes, and their construction time are polynomial in the source input size, with exponents depending only on ff and independent of kk. Hence feasibility is W[1]-hard in qq and in qrepq_{\mathrm{rep}} under disjunctive reductions, and has no g(q)NO(q)g(q)N^{O(q)} algorithm unless ETH fails.

Proof. Use the source notation of § 4, with k≥2k\geq2. If any colour class ViV_i or edge set EijE_{ij} is empty, output the single query consisting of one ss–tt edge and budget zero; this is a no-instance because Lf>0L_f>0 implies f(1)>0f(1)>0. Otherwise let r1<⋯<rzr_1<\cdots<r_z be a kk-strict code from Lemma 4.3, and put U=rz+1U=r_z+1. In particular, U≤C(kz)U\leq C(k^z) for constants C,eC,e depending only on ff. The labels are ci,dic_i,d_i for each colour ii and one separator ζ\zeta. For a colour ii and an index xx let

Wi(x)=(ζci)rx(ζdi)U−rxζ.W_i(x)=(\zeta c_i)^{r_x}(\zeta d_i)^{U-r_x}\zeta.

Build the chain of gadgets of Theorem 4.6 with the words Wi(x)W_i(x) in ViV_i and Wi(x)Wj(y)W_i(x)W_j(y) in EijE_{ij}, and label all selector and bridge edges with ζ\zeta. On a path that selects the indices xi,1,…,xi,kx_{i,1},\ldots,x_{i,k} for colour ii, the label cic_i has si=∑mrxi,ms_i=\sum_m r_{x_{i,m}} runs, did_i has kU−sikU-s_i runs, and ζ\zeta has exactly k2U+1k^2U+1 runs, since the k2Uk^2U symbols other than ζ\zeta are isolated and the path begins and ends with ζ\zeta. With ψ(t)=f(t)+f(kU−t)\psi(t)=f(t)+f(kU-t) and Z=f(k2U+1)Z=f(k^2U+1),

Φ(P)=Z+∑i=1kψ(si)≥Z+V(P),V(P):=1k∑i=1k∑m=1kψ(krxi,m).\Phi(P)=Z+\sum_{i=1}^{k}\psi(s_i)\geq Z+V(P),\qquad V(P):=\frac{1}{k}\sum_{i=1}^{k}\sum_{m=1}^{k}\psi(kr_{x_{i,m}}).

Indeed ψ(si)−1k∑mψ(krxi,m)\psi(s_i)-\frac{1}{k}\sum_m\psi(kr_{x_{i,m}}) is the sum of Ek(xi,1,…,xi,k)E_k(x_{i,1},\ldots,x_{i,k}) and of the Jensen gap of ff at the points k(U−rxi,m)k(U-r_{x_{i,m}}); both are nonnegative by Lemma 4.1, and the first is positive unless all indices agree. So Φ(P)=Z+V(P)\Phi(P)=Z+V(P) exactly for the paths that encode a multicoloured clique.

The value V(P)V(P) depends on the clique, which is why a single budget does not suffice. Give the first edge of every word Wi(x)W_i(x) the length c0−ψ(krx)/kc_0-\psi(kr_x)/k, where c0=max⁡xψ(krx)/kc_0=\max_x\psi(kr_x)/k, and all other edges length zero, so that ℓ(P)=k2c0−V(P)\ell(P)=k^2c_0-V(P). Let M0=kDf(kU)M_0=kD_f(kU). All lengths and all values V(P)V(P) are multiples of 1/M01/M_0, and 0≤V(P)≤2kf(kU)0\leq V(P)\leq2kf(kU). For each of the polynomially many multiples bb of 1/M01/M_0 in this range consider the two-budget question

Φ(P)≤Z+bandℓ(P)≤k2c0−b.\Phi(P)\leq Z+b\qquad\text{and}\qquad\ell(P)\leq k^2c_0-b.

A path satisfying both has ∑iψ(si)≤b≤V(P)≤∑iψ(si)\sum_i\psi(s_i)\leq b\leq V(P)\leq\sum_i\psi(s_i) and therefore encodes a clique; conversely a clique path satisfies the question for b=V(P)b=V(P).

It remains to express each two-budget question as an instance of feasibility without new labels. Let Λb=M0(k2c0−b)\Lambda_b=M_0(k^2c_0-b); if Λb<0\Lambda_b<0 the question is discarded. Form the DAG with vertices (v,λ)(v,\lambda), 0≤λ≤Λb0\leq\lambda\leq\Lambda_b an integer, an edge from (u,λ)(u,\lambda) to (v,λ+M0ℓ(e))(v,\lambda+M_0\ell(e)) with the label of ee for every edge e=(u,v)e=(u,v) whose two endpoints lie in this range, source (s,0)(s,0), and a new target joined by a ζ\zeta-labelled edge from every (t,λ)(t,\lambda), and trim it. Its paths correspond to the paths of the original graph with ℓ(P)≤k2c0−b\ell(P)\leq k^2c_0-b, with the same label word followed by one ζ\zeta, which prolongs the final run of ζ\zeta. The budget is Z+bZ+b.

For the size bound, write D=Df(kU)D=D_f(kU). There are at most 1+∣2kM0f(kU)∣1+\lvert2kM_0f(kU)\rvert queries, and c0≤2f(kU)/kc_0\leq2f(kU)/k gives Λb≤2kM0f(kU)\Lambda_b\leq2kM_0f(kU). Since M0=kDM_0=kD and concavity gives f(kU)≤kUf(1)f(kU)\leq kUf(1), both bounds are at most 1+2k3DUf(1)1 + 2k^{3}DUf(1). The polynomial-grid hypothesis bounds DD by a fixed polynomial in kUkU, and U≤C(kz)eU \le C(kz)^{e}. Before layering, the selection gadgets have O(k2z2U)O(k^{2}z^{2}U) vertices and edges; the layered construction multiplies this by at most 1+Λb1 + \Lambda_b and adds a target. Rational arithmetic and label identifiers have polynomial bit length, including the value Z=f(k2U+1)Z = f(k^{2}U + 1). Thus the number of queries, each query’s bit size, and the total construction time are (kz)Of(1)(kz)^{O_f(1)}, with an exponent independent of kk.

A many-one reduction would have to combine the queries, whose budgets Z+bZ + b differ, over a bounded alphabet; we do not know how to do this. For membership, the plan representation gives a short certificate.

Proposition 8.3. For per-label tariffs, CONCAVE RUN BUDGET parameterized by qq, and also by qrepq_{\mathrm{rep}}, belongs to W[P].

Proof. We use the characterisation of W[P] by nondeterministic algorithms that run in fixed-parameter time and make O(g(p)log⁡N)O(g(p)\log N) nondeterministic binary choices [14]. Guess for every label cc either “off” or one of its at most TT supports (βc,λc)(\beta_c,\lambda_c); this takes O(qlog⁡(T+1))O(q\log(T+1)) bits. Delete the edges with labels that are off, and compute a path that minimises the sum of λc\lambda_c over its run starts, by a shortest path computation on the product with the last label. Accept if this minimum plus ∑cβc\sum_c \beta_c over all labels that are not off is at most BB. If the algorithm accepts, the path found has Φ(P)≤∑c∈lab⁡(P)(βc+λcrc(P))≤B\Phi(P) \le\sum_{c\in\operatorname{lab}(P)}(\beta_c+\lambda_c r_c(P)) \le B, since supports dominate the tariffs and fees are nonnegative. Conversely, for a feasible path guess “off” for unused labels and a support attaining fc(rc(P))f_c(r_c(P)) for the used ones. For qrepq_{\mathrm{rep}}, guess only for repeated labels; a label on a single edge is charged fc(1)f_c(1) on that edge.

Whether the problem is in W[P], or in W[1], when parameterized by wrw_r is open; the XP algorithms do not provide short certificates.

Binary lengths: a numerical source of hardness

All hardness results so far concern feasibility, where numbers play no role beyond the tariff itself. SHORTEST BUDGETED PATH with rational lengths in binary has a second, purely numerical source of hardness, which appears already at width one for tariffs without a polynomial grid.

Proposition 9.1. For the harmonic tariff HH, deciding whether a path with Φ(P)≤B\Phi(P) \le B and ℓ(P)≤Λ\ell(P) \le\Lambda exists is NP-complete on series-parallel DAGs of maximum degree three with live width one and nonnegative rational lengths in binary.

Proof. We reduce from EXACT COVER BY 3-SETS [27]: given a set XX of 3n3n elements and triples S1,…,Sm⊆XS_1,\ldots,S_m \subseteq X, is XX the disjoint union of nn of the triples? Assign to each e∈Xe \in X a distinct prime pe>max⁡{m,3}p_e > \max\{m,3\} of polynomial magnitude. A harmonic block with rr runs is a new private label in rr runs separated by r−1r-1 fresh labels; its charge is Hr+r−1H_r+r-1. For each triple SiS_i build two parallel branches: the exclude branch is the concatenation of harmonic blocks with pe−1p_e-1 runs for e∈Sie \in S_i, the include branch that of blocks with pep_e runs. Join the gadgets of consecutive triples by fresh bridges. Including SiS_i adds

νi=3+∑e∈Si1pe<4\nu_i = 3 + \sum_{e\in S_i}\frac{1}{p_e} < 4

to the charge. Give one edge of each exclude branch the length 44, one edge of each include branch the length 4−νi4-\nu_i, and all other edges length zero. If CC is the charge of the all-exclude path and II the set of included triples, then Φ(P)=C+∑i∈Iνi\Phi(P) = C + \sum_{i\in I}\nu_i and ℓ(P)=4m−∑i∈Iνi\ell(P) = 4m-\sum_{i\in I}\nu_i. With θ=3n+∑e∈X1/pe\theta= 3n + \sum_{e \in X} 1/p_e, B=C+θB = C + \theta and Λ=4m−θ\Lambda= 4m - \theta, both bounds hold if and only if ∑i∈Iνi=θ\sum_{i \in I} \nu_i = \theta. If mem_e denotes the number of included triples containing ee, this reads

Fixed common tariffFeasibilityShortest path, rational lengths in binary
Bounded JfJ_f (fixed monetary grid, caps, finite menus)FPT in wrw_r (Prop. 3.6)FPT in wrw_r (Prop. 3.6)
Effectively subpolynomial JfJ_fFPT in wrw_r (Cor. 3.3)FPT in wrw_r on a polynomial grid (Cor. 3.3)
Rounded twins FMF_MFPT in wrw_r (Prop. 6.3)FPT in wrw_r (Prop. 6.3)
Lf>0L_f > 0W[1]-hard in wrw_r, in XP (Thm. 4.6)W[1]-hard in wrw_r
Lf>0L_f > 0 on a polynomial grid, e.g. FF, GαG_\alphaW[1]-hard in wrw_r; hard in qq under disjunctive reductions (Thms. 5.1, 8.2)W[1]-hard in wrw_r, in XP (Cor. 6.2)
Harmonic HHW[1]-hard in wrw_r, in XPNP-hard at w=1w = 1 (Prop. 9.1)

Table 1. Complexity for a fixed tariff shared by all labels. Feasibility results extend to unit and polynomially bounded integer lengths.

3(∣I∣−n)+∑e∈Xme−1pe=0.3(|I| - n) + \sum_{e \in X} \frac{m_e - 1}{p_e} = 0.

Multiplying by ∏epe\prod_e p_e and reducing modulo pep_e gives me≡1(modpe)m_e \equiv1 \pmod{p_e}, hence me=1m_e = 1 since 0≤me≤m<pe0 \le m_e \le m < p_e. So II is an exact cover, and conversely an exact cover satisfies the equation. Only the private label of the current block is live at any vertex. Block sizes and bit lengths are polynomial.

This is the knapsack mechanism of restricted shortest paths, carried by the arithmetic of harmonic numbers; the lengths have a common denominator of exponential size. It disappears with unary lengths, where Theorem 3.2(2) with the baseline keys is polynomial at bounded width, and it does not occur for tariffs on a polynomial grid, for which rational lengths are in XP (Corollary 6.2). Table 1 summarises the picture for a fixed common tariff.

Open problems

The oscillating regime. Theorem 1.1 leaves open the tariffs with Lf=0<UfL_f = 0 < U_f. For such a tariff Tf∗T_f^* is not polynomially bounded (Lemma 2.6), so strict codes of polynomial size exist only for infinitely many, sparsely placed lengths zz, and padding a source instance to the next good length may cost superpolynomial size. On the other hand the plan algorithm is slow at the horizons where Jf(T)≥TδJ_f(T) \ge T^\delta. We do not know whether such tariffs can be fixed-parameter tractable, or whether hardness can be shown by a reduction that does not rely on a single uniform code.

Effectiveness. The remaining Uf=0U_f = 0 cases are those without an effective subpolynomial bound. Can the effectiveness requirement be weakened, or can a different algorithm yield a computable parameter dependence for these tariffs? Together with the oscillating regime, this prevents Theorem 1.1 from being a complete dichotomy.

Classes. Is Concave Run Budget, for a hard tariff, complete for W[1] when parameterized by wrw_r, or does it lie higher? We do not even know membership in W[P].

Few labels. Is feasibility W[1]-hard in qq under many-one reductions, and is the grid hypothesis of Theorem 8.2 necessary? The harmonic tariff is a natural test case.

Width constants. Theorem 4.6 gives width 2k+12k + 1 and Theorem 5.1 gives k+1k + 1 on polynomial grids. Can k+O(1)k + O(1) be achieved without a grid? This would require paying C−f(krx)/kC - f(kr_x)/k, or a substitute, with tariff values only.

Accuracy. Corollary 7.3 separates g(wr,1/ε)poly⁡(N)g(w_r, 1/\varepsilon)\operatorname{poly}(N) from g(wr)poly⁡(N,1/ε)g(w_r)\operatorname{poly}(N, 1/\varepsilon) for polynomially separated tariffs. The best joint dependence on wrw_r and 1/ε1/\varepsilon, and the case of exponentially small separation such as geometric marginals, remain open.

Code availability

Source code is available at https://github.com/ndehouche/concave-run-tariffs.

References

  1. [1]Y. Asahiro, J. Jansson, E. Miyano, H. Ono. Upper and lower degree-constrained graph orientation with minimum penalty. Theoretical Computer Science 900:53–78, 2022.DOI
  2. [2]C. Barrett, R. Jacob, M. Marathe. Formal-language-constrained path problems. SIAM Journal on Computing 30(3):809–837, 2000. doi:10.1137/S0097539798337716.DOI
  3. [3]M. Bentert, L. Kellerhals, R. Niedermeier. The structural complexity landscape of finding balance-fair shortest paths. Theoretical Computer Science 933:149–162, 2022. doi:10.1016/j.tcs.2022.08.023.DOI
  4. [4]M. Bentert, L. Kellerhals, R. Niedermeier. Fair short paths in vertex-colored graphs. Theoretical Computer Science 1085:116201, 2026. doi:10.1016/j.tcs.2026.116201. Conference version: AAAI 2023, 37(10):12346–12354, 2023. doi:10.1609/aaai.v37i10.26455.
  5. [5]M. Blanco, R. Borndörfer, N. D. Hoàng, A. Kaier, T. Schlechte, S. Schlobach. The shortest path problem with crossing costs. ZIB-Report 16-70, Zuse Institute Berlin, 2016. Report PDF; urn:nbn:de:0297-zib-61240.
  6. [6]M. Blanco, R. Borndörfer, N. D. Hoàng, A. Kaier, P. Maristany de las Casas, T. Schlechte, S. Schlobach. Cost projection methods for the shortest path problem with crossing costs. In ATMOS 2017, OASIcs 59, 15:1–15:14, 2017. doi:10.4230/OASIcs.ATMOS.2017.15.DOI
  7. [7]H. L. Bodlaender. A tourist guide through treewidth. Acta Cybernetica 11(1–2):1–21, 1993.
  8. [8]K. Böhmová, L. Häfliger, M. Mihalák, T. Pröger, G. Sacomoto, M.-F. Sagot. Computing and listing st-paths in public transportation networks. Theory of Computing Systems 62(3):600–621, 2018. doi:10.1007/s00224-016-9747-4.DOI
  9. [9]R. Bredereck, P. Faliszewski, R. Niedermeier, P. Skowron, N. Talmon. Mixed integer programming with convex/concave constraints: fixed-parameter tractability and applications to multicovering and voting. Theoretical Computer Science 814:86–105, 2020. doi:10.1016/j.tcs.2020.01.017.DOI
  10. [10]H. Broersma, X. Li, G. J. Woeginger, S. Zhang. Paths and cycles in colored graphs. Australasian Journal of Combinatorics 31:299–311, 2005.
  11. [11]B. M. Bumpus, K. Meeks. Edge exploration of temporal graphs. Algorithmica 85(3):688–716, 2023. doi:10.1007/s00453-022-01018-7.DOI
  12. [12]J. Cardinal, C. Dumeunier. Set covering problems with general objective functions. Preprint, arXiv:0802.2184, 2008.arxiv.org/abs/0802.2184
  13. [13]J. Chen, X. Huang, I. A. Kanj, G. Xia. Strong computational lower bounds via parameterized complexity. Journal of Computer and System Sciences 72(8):1346–1367, 2006. doi:10.1016/j.jcss.2006.04.007.DOI
  14. [14]Y. Chen, J. Flum, M. Grohe. Machine-based methods in parameterized complexity theory. Theoretical Computer Science 339(2–3):167–199, 2005. doi:10.1016/j.tcs.2005.02.003.DOI
  15. [15]M. Cygan, F. V. Fomin, Ł. Kowalik, D. Lokshtanov, D. Marx, M. Pilipczuk, M. Pilipczuk, S. Saurabh. Parameterized Algorithms. Springer, 2015. doi:10.1007/978-3-319-21275-3.DOI
  16. [16]T. Davot, R. Giroudeau, J.-C. König. On the shared transportation problem: computational hardness and exact approach. International Journal of Foundations of Computer Science 35(6):741–756, 2024. doi:10.1142/S0129054123410058.DOI
  17. [17]N. Dehouche. The k-interchange-constrained diameter of a transit network: a connectedness indicator that accounts for travel convenience. Transportation Letters 12(3):197–201, 2020. doi:10.1080/19427867.2018.1564987.DOI
  18. [18]D. Delling, T. Pajor, R. F. Werneck. Round-based public transit routing. Transportation Science 49(3):591–604, 2015. doi:10.1287/trsc.2014.0534.DOI
  19. [19]R. G. Downey, M. R. Fellows. Fundamentals of Parameterized Complexity. Springer, 2013. doi:10.1007/978-1-4471-5559-1.DOI
  20. [20]J. Enright, S. D. Hand, L. Larios-Jones, K. Meeks. Families of tractable problems with respect to vertex-interval-membership width and its generalisations. In SAND 2026, LIPIcs 373, 4:1–4:17, 2026. doi:10.4230/LIPIcs.SAND.2026.4.DOI
  21. [21]R. Euler, R. Borndörfer. A graph- and monoid-based framework for price-sensitive routing in local public transportation networks. In ATMOS 2019, OASIcs 75, 12:1–12:15, 2019. doi:10.4230/OASIcs.ATMOS.2019.12.DOI
  22. [22]R. Euler, N. Lindner, R. Borndörfer. Price optimal routing in public transportation. EURO Journal on Transportation and Logistics 13:100128, 2024. doi:10.1016/j.ejtl.2024.100128.DOI
  23. [23]M. R. Fellows, J. Guo, I. Kanj. The parameterized complexity of some minimum label problems. Journal of Computer and System Sciences 76(8):727–740, 2010. doi:10.1016/j/jcss.2010.02.012.
  24. [24]M. R. Fellows, D. Hermelin, F. Rosamond, S. Vialette. On the parameterized complexity of multiple-interval graph problems. Theoretical Computer Science 410(1):53–61, 2009. doi:10.1016/j.tcs.2008.09.065.DOI
  25. [25]S. A. Gabriel, D. Bernstein. The traffic equilibrium problem with nonadditive path costs. Transportation Science 31(4):337–348, 1997. doi:10.1287/trsc.31.4.337.DOI
  26. [26]I. Gamvros, L. Gouveia, S. Raghavan. Reload cost trees and network design. Networks 59(4):365–379, 2012. doi:10.1002/net.20443.DOI
  27. [27]M. R. Garey, D. S. Johnson. Computers and Intractability: A Guide to the Theory of NP-Completeness. W. H. Freeman, 1979.
  28. [28]G. Goel, P. Tripathi, L. Wang. Combinatorial problems with discounted price functions in multi-agent systems. In FSTTCS 2010, LIPIcs 8, pp. 436–446, 2010. doi:10.4230/LIPIcs.FSTTCS.2010.436.DOI
  29. [29]L. Gourvès, A. Lyra, C. A. Martinhon, J. Monnot. The minimum reload s–t path, trail and walk problems. Discrete Applied Mathematics 158(13):1404–1417, 2010. doi:10.1016/j.dam.2010.03.009.DOI
  30. [30]D. Gözüpek, S. Özkan, C. Paul, I. Sau, M. Shalom. Parameterized complexity of the MinCCA problem on graphs of bounded decomposability. Theoretical Computer Science 690:91–103, 2017. doi:10.1016/j.tcs.2017.06.013.DOI
  31. [31]D. Gözüpek, H. Shachnai, M. Shalom, S. Zaks. Constructing minimum changeover cost arborescences in bounded treewidth graphs. Theoretical Computer Science 621:22–36, 2016. doi:10.1016/j.tcs.2016.01.022.DOI
  32. [32]R. Hassin. Approximation schemes for the restricted shortest path problem. Mathematics of Operations Research 17(1):36–42, 1992. doi:10.1287/moor.17.1.36.DOI
  33. [33]R. Hassin, J. Monnot, D. Segev. Approximation algorithms and hardness results for labeled connectivity problems. Journal of Combinatorial Optimization 14(4):437–453, 2007. doi:10.1007/s10878-007-9044-x.DOI
  34. [34]S. Irnich, G. Desaulniers. Shortest path problems with resource constraints. In Column Generation, pp. 33–65. Springer, 2005.
  35. [35]N. G. Kinnersley. The vertex separation number of a graph equals its path-width. Information Processing Letters 42(6):345–350, 1992. doi:10.1016/0020-0190(92)90234-M.DOI
  36. [36]D. H. Lorenz, D. Raz. A simple efficient approximation scheme for the restricted shortest path problem. Operations Research Letters 28(5):213–219, 2001. doi:10.1016/S0167-6377(01)00069-4.DOI
  37. [37]T. L. Magnanti, D. Stratila. Separable concave optimization approximately equals piecewise linear optimization. In IPCO 2004, LNCS 3064, pp. 234–243. Springer, 2004. doi:10.1007/978-3-540-25960-2_18. Full version: arXiv:1201.3148, 2012.DOI
  38. [38]T. L. Magnanti, D. Stratila. Strongly polynomial primal-dual algorithms for concave cost combinatorial optimization problems. Preprint, arXiv:1202.2654, 2012.arxiv.org/abs/1202.2654
  39. [39]A. Parmentier. Algorithms for non-linear and stochastic resource constrained shortest path. Mathematical Methods of Operations Research 89(2):281–317, 2019. doi:10.1007/s00186-018-0649-x.DOI
  40. [40]A. Schöbel, R. Urban. The cheapest ticket problem in public transport. Transportation Science 56(6):1432–1451, 2022. doi:10.1287/trsc.2022.1138.DOI
  41. [41]G. Tsaggouris, C. Zaroliagis. Multiobjective optimization: improved FPTAS for shortest paths and non-linear objectives with applications. Theory of Computing Systems 45(1):162–186, 2009. doi:10.1007/s00224-007-9096-4.
  42. [42]H.-C. Wirth, J. Steffan. Reload cost problems: minimum diameter spanning tree. Discrete Applied Mathematics 113(1):73–85, 2001. doi:10.1016/S0166-218X(00)00392-9.DOI
  43. [43]Y. Zhang, Z.-J. M. Shen, S. Song. Parametric search for the bi-attribute concave shortest path problem. Transportation Research Part B: Methodological 94:150–168, 2016. doi:10.1016/j.trb.2016.09.009.DOI

Paper details

vlnc:W_52dsbxv6
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 4

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents