---
title: Constrained Stochastic Shortest Paths
url: https://www.emergentmind.com/topics/constrained-stochastic-shortest-path-problems-cssps
type: topic
---

# Constrained Stochastic Shortest Paths

Constrained stochastic shortest path problems (CSSPs) augment the classical stochastic shortest path problem by optimizing a primary path or policy cost subject to hard constraints on secondary costs, probabilities of failure, or risk functionals. In the literature, the term covers at least two closely related settings: network path problems with random arc attributes, and Markov decision process formulations with absorbing goal states, stochastic transitions, and additive stage costs. The common feature is that feasibility is no longer determined by reachability alone: it is defined by budgets, chance constraints, CVaR bounds, percentile constraints, or hard task specifications, and the corresponding solution methods range from algebraic path algorithms and LP/ILP formulations to stochastic approximation, heuristic search, and asymptotic probabilistic analysis [1504.07880][2204.04780][2302.13115].

## 1. Formal models and problem classes

A standard stochastic shortest path problem is typically formulated on an MDP \(M = (S, A, P, c, s_0, G)\) with finite state space \(S\), admissible actions \(A(s)\), transition probabilities \(P(s' \mid s,a)\), nonnegative one-step costs \(c(s,a)\), and a terminal or goal set \(G \subset S\). For proper policies, the canonical Bellman equation for the cumulative-sum objective is
\[
V(s) = \min_{a \in A(s)} \left( c(s,a) + \sum_{s' \in S} P(s'\mid s,a)\, V(s') \right), \quad s \notin G;\qquad V(s)=0,\ s\in G.
\]
Under the standard SSP assumptions—existence of at least one proper policy and infinite expected cost for all improper policies—value iteration converges monotonically to the unique fixed point \(V\) [2512.12761].

In constrained variants, the objective is paired with secondary cost limits. A fixed-horizon constrained MDP formulation, which directly captures a class of CSSPs, minimizes expected cumulative primary cost subject to bounds on secondary cumulative costs or on the probability of violating a safety condition. In the dead-end interpretation of SSPs, a typical formulation is
\[
\min_{\pi} \ \mathbb{E}_{\pi}\Big[\sum_{t=0}^{H-1} c_t(S_t,\pi(S_t))\Big]
\quad \text{s.t.}\quad
\mathbb{P}_{\pi}(S_H = g) \ge 1-\delta,
\]
which exhibits the cost-to-goal versus probability-to-goal trade-off explicitly [2204.04780].

A closely related undiscounted CSSP formulation uses absorbing goals and multiple stage-cost components. With initial state \(\bar{s}\), goal set \(G\), primary cost \(C_0\), secondary costs \(C_i\), and thresholds \(\Delta_i\), one writes
\[
f(\pi) = \mathbb{E}\!\left[\sum_{t=0}^{\infty} C_0(s_t,a_t,s_{t+1}) \,\bigg|\, s_0=\bar{s}, \pi\right],
\qquad
g_i(\pi) = \mathbb{E}\!\left[\sum_{t=0}^{\infty} C_i(s_t,a_t,s_{t+1}) \,\bigg|\, s_0=\bar{s}, \pi\right] - \Delta_i,
\]
and solves
\[
\min_{\pi \in \Pi} f(\pi) \quad \text{s.t.} \quad g_i(\pi) \le 0.
\]
This form is central in hierarchical constrained SSP planning [2205.05228].

The network-path viewpoint is structurally different. There, one chooses an \(s\)–\(t\) path offline in a digraph or complete graph, and resources accumulate along arcs. In the lattice-ordered monoid framework, each arc \(a\) carries a resource \(r(a)\in M\), the path resource is
\[
R(P) = \bigoplus_{a \in P} r(a),
\]
and the generalized problem is
\[
\min c(R(P)) \quad \text{s.t.} \quad p(R(P)) = 0.
\]
This formulation covers deterministic, non-linear, and stochastic constraints and objectives, including chance constraints, CVaR, and scenario-based random resources [1504.07880]. It contrasts with MDP-based SSPs, where one optimizes over policies under controlled transitions rather than over fixed paths.

## 2. Constraint semantics and risk models

CSSPs differ most sharply in the semantics of the constraint. Expected-value constraints are the closest analogue to classical constrained MDPs, but much of the literature focuses on distributional or pathwise requirements. Chance constraints are standard:
\[
\mathbb{P}(L \le \tau) \ge 1-\epsilon
\quad \text{or} \quad
\mathbb{P}(L > \tau) \le \epsilon,
\]
for cumulative path cost \(L\), threshold \(\tau\), and risk level \(\epsilon\) [2408.08668]. In fixed-horizon SSPs with dead-ends, the same idea appears as a failure-probability constraint: policies are restricted to
\[
\Pi_{x,\epsilon}
=
\Bigl\{
\pi \in \Pi \;\Big|\;
\Pr^{\pi}_{x}\bigl(\forall t\ge0: x_t \neq 0\bigr) \le \epsilon
\Bigr\},
\]
so that the probability of never reaching the terminal state remains below a prescribed tolerance [2409.16672].

Percentile constraints constitute another important class. For truncated-sum cost \(L\) until reaching a target set \(T\), a single percentile constraint is
\[
\mathbb{P}_{\pi}(L \le \ell) \ge \alpha,
\]
and the multi-constraint, multi-dimensional extension requires
\[
\forall i \in \{1,\dots,q\}:\quad
\mathbb{P}_{\pi}\!\big(L_i \le \ell_i\big) \ge \alpha_i,
\]
where each \(L_i\) may refer to a different dimension and target set [1411.0835]. This formulation directly controls quantiles of path-length distributions rather than expectations.

CVaR-based CSSPs replace hard probability thresholds by tail-expectation control. With confidence level \(\alpha\),
\[
\operatorname{VaR}_{\alpha}(X) = \inf \{ x \in \mathbb{R} \ : \ \mathbb{P}(X \le x) \ge \alpha \},
\]
and
\[
\operatorname{CVaR}_{\alpha}(X)
=
\inf_{t \in \mathbb{R}}
\left\{
t + \frac{1}{1-\alpha}\,\mathbb{E}\big[(X-t)_+\big]
\right\}.
\]
CSSPs then take forms such as \(\operatorname{CVaR}_{\alpha}(L)\le \kappa\), or optimize \(\operatorname{CVaR}_{\alpha}(L)\) directly [2408.08668][1405.2690]. In network models with independent random arc times, the same risk functional is used for path travel time \(T_P\), yielding problems of the form
\[
\min_{P \in \mathcal{P}(s,t)} \sum_{a\in P} c_a
\quad \text{s.t.}\quad
\rho(T_P)\le \beta,
\]
for any risk measure \(\rho\) consistent with the usual stochastic order [1408.0272].

Several works broaden CSSP semantics further. Beyond-worst-case formulations combine a worst-case upper bound with an expected-value bound on the same truncated sum [1411.0835]. Integer-weighted MDP formulations study weight-bounded reachability conditions such as
\[
\varphi = \bigvee_{t \in T} \Diamond( t \wedge (wgt \ge K_t) ),
\]
and ask whether such properties hold almost surely or with positive probability under some scheduler [1804.11301]. More recent formulations incorporate hard task specifications through finite-horizon linear temporal logic, product MDPs, and strict lexicographic priorities among mixed max- and sum-aggregated objectives, thereby turning safety or sequencing requirements into hard constraints rather than soft penalties [2512.12761].

A persistent misconception is that all CSSPs are simply expected-cost CMDPs. The literature does not support that view. Chance constraints, percentile constraints, CVaR, weight-bounded reachability, dead-end avoidance, and lexicographic hard priorities are all treated as genuinely distinct constraint mechanisms, with different Bellman structures, policy classes, and computational consequences [1411.0835][1804.11301].

## 3. Solution methods and algorithmic frameworks

One major algorithmic line treats CSSPs as generalized path problems. In the lattice-ordered monoid approach, strong pruning comes from lower bounds on suffix resources. For each node \(u\), the best-possible suffix bound is
\[
B(u) = \bigwedge_{P \in P(u,d)} R(P),
\]
and partial path \(Q\) ending at \(u\) can be discarded whenever either
\[
p(R(Q)\oplus B(u)) = 1
\quad \text{or} \quad
c(R(Q)\oplus B(u)) \ge c_{UB}.
\]
This yields generalized A\(^*\), label-correcting, and label-dominance algorithms. Exact computation of \(B(u)\) is NP-hard in general, but extended Ford–Bellman and generalized Dijkstra procedures provide polynomially computable lower bounds that are effective in practice [1504.07880].

In stochastic network models with random arc lengths, pruning is strengthened by stochastic lower bounds. The key object is the Stochastic On-Time Arrival Problem, whose dynamic programming recursion is
\[
F_t(t)=1,\qquad
F_v(t) =
\max_{(v,u)\in \delta^+(v)}
\sum_{k=0}^t \mathbb{P}(X_{(v,u)} = k)\, F_u(t-k).
\]
The resulting random variables \(Z_v^{LB}\) satisfy
\[
Z_t = 0,\qquad
Z_v \stackrel{(d)}{=} \bigwedge_{(v,u)\in \delta^+(v)} \left(X_{(v,u)} + Z_u\right),
\]
and allow label-setting algorithms for both risk minimization and deterministic-cost minimization under a stochastic risk constraint. The framework applies to risk measures consistent with the usual stochastic order, including CVaR, VaR, and the probability of being late [1408.0272].

Another standard technique is state augmentation. Percentile constraints on truncated sums are handled by constructing a product MDP that tracks cumulative cost up to a threshold \(\ell\), so that the original percentile query reduces to a reachability problem on the product state space. The same principle supports multi-percentile constraints, beyond-worst-case synthesis, and multi-environment guarantees, although the required memory and randomization can grow substantially [1411.0835]. For weight-bounded properties in integer-weighted MDPs, end-component classification, spider constructions, and reductions to mean-payoff games yield pseudo-polynomial or polynomial algorithms depending on the quantification pattern and the property considered [1804.11301].

Linear programming and integer programming dominate exact constrained MDP formulations. The standard occupancy-measure LP handles expected-value constraints, while exact chance-constrained SSP formulations require additional structure. In fixed-horizon layered models, chance constraints can be linearized through execution-risk recursions. This leads to exact ILP formulations with flow variables and binary policy-selection variables, as well as LP relaxations with randomized rounding. The same line of work shows that multi-step global chance constraints can be reduced to local chance constraints through augmented states, with a polynomial-sized approximation via resource augmentation [2302.13115]. Under local transition structure, a different approximation route is available: a fully polynomial-time approximation scheme computes near-optimal deterministic policies by discretizing objective-to-go values and solving structured knapsack subproblems inside a layered dynamic program [2204.04780].

Risk-sensitive optimization has also been attacked by gradient methods. For CVaR-constrained SSPs, the Lagrangian
\[
\mathcal{L}^{\theta,\lambda}(s^0)
=
G^{\theta}(s^0)
+
\lambda\left(\operatorname{CVaR}_{\alpha}(C^{\theta}(s^0)) - K_{\alpha}\right)
\]
is optimized with respect to policy parameters \(\theta\) and multiplier \(\lambda\). The crucial ingredients are likelihood-ratio policy-gradient estimators, Rockafellar–Uryasev CVaR estimation, multi-timescale stochastic approximation or mini-batches, and importance sampling for rare-event tail estimation. The resulting algorithms converge asymptotically to local saddle points of the Lagrangian [1405.2690].

## 4. Mean-field random CSSPs and asymptotic analysis

A distinctive strand of the CSSP literature studies random complete graphs. On \(K_n\) with fixed source and target vertices, each edge \(e\) carries independent random length \(L_e = w(e)\) and cost \(C_e = c(e)\), and the constrained objective is
\[
L_n(c_0) = \min_{P \in \mathcal{P}: C(P)\le c_0} L(P),
\qquad
L(P)=\sum_{e\in P} L_e,\quad
C(P)=\sum_{e\in P} C_e.
\]
In the base case \(w(e), c(e)\) are independent Uniform\([0,1]\), while the generalization takes \(w(e), c(e)\) to be independent copies of \(U^\gamma\) with \(\gamma \in (0,1)\) [2005.12241].

The central asymptotic statement in the uniform case is
\[
L_n(c_0) \sim \frac{\log^2 n}{4 c_0 n}
\quad \text{w.h.p.},
\]
for budgets \(c_0\) in a wide admissible window. The hop-count \(H_n\) of the optimal constrained path satisfies \(H_n = \Theta(\log n)\). A key lower bound is the universal product inequality
\[
w(P)c(P) > \frac{\log^2 n}{4n}
\quad \text{for every path } P,\ \text{w.h.p.},
\]
which implies
\[
L_n(c_0) \ge \frac{\log^2 n}{4 c_0 n}
\quad \text{w.h.p.}
\]
The matching upper bound is obtained by Lagrangian relaxation with modified edge weights \(W_{\Lambda}(e)=w(e)+\Lambda c(e)\) and an optimally chosen multiplier \(\Lambda^* \asymp \frac{\log^2 n}{4 c_0 n}\) [2005.12241].

The dual analysis links the constrained problem to mean-field first-passage percolation. Near zero, \(U_1 + \Lambda U_2\) behaves like a square-root tail, so the unconstrained shortest path under \(W_{\Lambda}\) is asymptotically governed by the \(s=\tfrac12\) first-passage model. This yields
\[
\phi(\Lambda^*) \sim \sqrt{2\Lambda^*}\,\frac{\log n}{n^{1/2}},
\]
and hence a feasible path with asymptotically optimal constrained length [2005.12241].

For \(U^\gamma\) edge weights, the paper proves
\[
L_n(c_0) = \Theta\!\left(\frac{\log^2 n}{c_0 n^\gamma}\right)
\quad \text{w.h.p.},
\]
with an explicit \(\gamma\)-dependent constant expressible using \(\Gamma(1+1/\gamma)\). The small-\(x\) tail \(F(x)\asymp x^\gamma\) is therefore the governing parameter. Heavier near-zero tails yield shorter unconstrained paths and tighter constrained bounds, while lighter tails lengthen both [2005.12241].

This random-graph analysis makes the budget penalty explicit. In the uniform case, the unconstrained shortest path is of order \((\log n)/n\), whereas the constrained optimum is
\[
\frac{\log^2 n}{4c_0 n}
=
\left[\frac{\log n}{n}\right]
\left[\frac{\log n}{4c_0}\right].
\]
Thus, for \(c_0 \ll \log n\), the constraint is strongly binding; for \(c_0 \gtrsim \log n\), the unconstrained shortest path is within budget with high probability [2005.12241]. The same paper also notes an expected polynomial-time route in this random setting, combining Lagrangian relaxation with dynamic programming over hop counts and random-knapsack techniques, leading to an \(O(n^7)\) expected-time algorithm.

## 5. Structured extensions: hierarchy, multi-agent coordination, sampling, and specifications

Hierarchical constrained SSPs arise when high-level actions must themselves be planned as lower-level SSPs. In this setting, events act as macro-level states, activities act as macro-actions, and global secondary-cost constraints couple multiple lower-level problems. A hierarchical solution is a pair \(\langle \rho, \Gamma \rangle\), where \(\rho\) is a procedural policy over events and \(\Gamma\) collects lower-level policies \(\Gamma_E\) for all activated activities. The global constraint has the form
\[
\sum_{E \in \Psi_j} L(E|\rho)\, g^{E}_{I_j(E)}(\Gamma_E) \le \Delta_j,
\]
and an anytime branch-and-bound algorithm searches over allocations of secondary-cost budgets to activities. Lower bounds come from optimistic activity costs and conservative secondary costs; upper bounds come from feasible incumbent activity policies. Under exact activity lower bounds, the branch-and-bound gap converges uniformly to zero as partitions shrink [2205.05228].

Multi-agent chance-constrained SSPs appear prominently in intelligent intersection management. There the system is decomposed into localized interaction points \(i \in \mathcal{I}\), each coupling only a small subset of vehicles \(\mathcal{V}^i\). The crucial execution-risk recursion at interaction point \(i\) is
\[
Er^j(s^i_k)
=
\sum_{s^i_{k+1},a^i}
Er^j(s^i_{k+1})\,\pi(s^i_k,a^i)\,\widetilde{T}^{i,j}(s^i_k,a^i,s^i_{k+1})
+
\widetilde{r}^j(s^i_k),
\]
with
\[
\widetilde{r}^j(s^i_k)
=
1-\prod_{v,v'\in\mathcal{V}^i}\bigl(1-r^j(s^v_k,s^{v'}_k)\bigr).
\]
This recursion enables an exact ILP in dual-flow variables. When the number of agents per interaction point is bounded, the formulation has a polynomial number of variables and constraints in the number of agents. Simulations in CARLA report up to \(200\%\) efficiency improvement while conforming to tunable risk thresholds [2210.01766].

Sampling-based planners provide another structured extension. In risk-sensitive incremental sampling, RA-RRT\(^*\) replaces expected-length cost-to-come by a CVaR cost-to-come. Under additive costs, independent segment uncertainties, fixed \(\alpha\), and standard RRT\(^*\) rewiring schedules, the planner uses
\[
\operatorname{CVaR}_{\alpha}(L)
=
\sum_{k=0}^{N-1}\operatorname{CVaR}_{\alpha}(L_k)
\]
and selects expansions that minimize cumulative segment-wise CVaR. In the reported grid-world experiments, query time and space remain linear in \(n\), processing time becomes \(\mathcal{O}(n\log(n\hat n))\), and the planner exhibits lower noise sensitivity and lower failure rates than baseline RRT\(^*\) [2408.08668].

Dead-end-aware formulations treat failure probability itself as the constrained quantity. By introducing discounted surrogates for the failure event and coupling an objective MDP with a constraint MDP in a two-person zero-sum game, the constrained problem becomes a Bayesian MDP over an augmented belief state. Value iteration on the operator
\[
(TJ)(x',\alpha)
=
\min_{u'\in \mathcal{U}(x')}
\sum_{x''} \bar{q}(x''|x',\alpha,u')
\Bigl[
\bar{G}(x',\alpha,u',x'') + J(x'',\nu(\alpha))
\Bigr]
\]
computes the game value and yields near-optimal mixed policies expressible as distributions over deterministic policies [2409.16672].

Hard specifications can also be internalized. Finite-horizon LTL is translated into a deterministic finite automaton, combined with the MDP into a product MDP, and then optimized lexicographically under mixed max- and sum-aggregated costs. Because max aggregation breaks the standard Bellman recursion on the original state space, the model augments the state with the running maximum cost \(m\). The resulting finite-horizon lexicographic value iteration handles bottleneck-style safety objectives together with cumulative efficiency objectives and resolves zero-marginal-cost cycles that otherwise obstruct proper termination [2512.12761].

## 6. Complexity, policy structure, and open directions

Complexity results across the CSSP literature are uniformly stringent. Deterministic CSSP is NP-hard in general [2005.12241]. Exact computation of best suffix resource bounds \(B(u)\) is NP-hard in the monoid framework [1504.07880]. Even under local transition structure, deterministic-policy constrained MDPs are NP-hard for horizon \(H=2\) [2204.04780]. Percentile SSPs are PSPACE-hard, beyond-worst-case synthesis is NP-hard, and general multi-percentile queries require exponential time [1411.0835]. For weight-bounded reachability in integer-weighted MDPs, several decision problems lie in \(\mathrm{NP}\cap\mathrm{coNP}\) and are at least as hard as mean-payoff games [1804.11301].

Policy structure is equally nuanced. In classical expectation-minimizing SSPs, pure memoryless optimal policies exist under standard assumptions [2512.12761]. That simplicity does not survive most constrained extensions. For single percentile constraints and beyond-worst-case SSPs, finite memory is sufficient and sometimes necessary; for multi-percentile constraints, randomized exponential-memory strategies are sufficient and in general necessary [1411.0835]. By contrast, several applied formulations deliberately restrict attention to deterministic policies for explainability, reliability, or solver tractability, including hierarchical constrained SSP planning and exact chance-constrained SSP ILPs [2205.05228][2302.13115].

Most tractable formulations also rely on strong structural assumptions. Independence is central in random-graph asymptotics, stochastic lower bounds via convolution, and CVaR decomposition across path segments [2005.12241][1408.0272][2408.08668]. Gaussian segment noise, bounded numbers of interacting agents, local transition overlap, finite supports on integer grids, or fixed horizons each play an enabling role in specific methods [2210.01766][2204.04780]. When these assumptions fail—because of correlation, non-additive path costs, dense interaction graphs, or unbounded continuous resources—the existing theory becomes much thinner.

Several open directions are identified explicitly. In the random complete-graph model, correlated edge lengths and costs remain untreated, as do sparse random-graph analogues with asymptotically sharp constants [2005.12241]. In CVaR-based sampling planners, correlated or non-Gaussian uncertainties, distributionally robust CVaR, and non-additive cost structures require new constructions [2408.08668]. In integer-weighted MDPs, the literature emphasizes that quantitative thresholds \(p \in (0,1)\) for weight-bounded properties remain hard and open [1804.11301]. More broadly, the coexistence of exact ILP methods, pseudo-polynomial dynamic programs, approximation schemes, and asymptotic probabilistic analyses suggests that “CSSP” is best understood not as a single problem, but as a family of constrained stochastic path-planning models whose mathematical character is determined by the interaction of constraint semantics, policy class, and ambient stochastic structure.

Source: https://www.emergentmind.com/topics/constrained-stochastic-shortest-path-problems-cssps