On Sequential Decisions and Markov Chains 2: Under Irreducibility, an Optimal Solution of a Linear Program over State-Action Frequencies Yields an Optimal Stationary ProcedureResearch Paper
Linear programming for Markov decision problems
A Markov decision problem asks how to control a system that moves at random between finitely many states, where each decision changes the probabilities of the next move and incurs a cost. Cyrus Derman's 1962 paper On Sequential Decisions and Markov Chains (Management Science 9(1):16–24) treats two criteria: the long-run average cost per period, and the total cost of driving the system into an absorbing state. Its Theorem 2 shows that, once attention is restricted to stationary procedures, each problem can be solved as a linear program over the state-action frequencies of the procedure. This mission formalizes that theorem, its supporting displays (3)–(10) and its Lemma on linear-fractional programs.
The linear programming formulation is now the standard computational and theoretical tool for constrained Markov decision processes, and its variables, the occupation measures, are the objects of most later work on that topic. Derman's paper is among the first to state it for the average-cost criterion. Manne (Linear Programming and Sequential Decisions, Management Science, 1960) gave an earlier average-cost formulation for an inventory model. The reduction of a ratio of linear functions to a linear program in Derman's Lemma is the transformation published in the same year by Charnes and Cooper (Programming with Linear Fractional Functionals, Naval Research Logistics Quarterly, 1962).
Setting
There are finitely many states and decisions , all available in every state. Making decision in state sends the system to state with probability , where , and costs .
A procedure of class is stationary randomized: in state it makes decision with probability , where and , independently of the past and of the time. Under such a procedure the states form a Markov chain with transition probabilities . Write for the expected cost at time when .
- Problem 1 (average cost): minimize . Here , and Assumption A says that under every procedure of all states belong to one class.
- Problem 2 (total cost): the state is absorbing under every decision and . Minimize , the expected cost of reaching . Assumption B says that under every procedure of , is reached from every state with probability one.
The state-action frequencies of a procedure with stationary distribution are . They satisfy the linear constraints
For Problem 2, Derman adjoins a state that restarts the chain uniformly on and is entered from . The expected total cost then becomes a ratio of two linear functions of the frequencies of this augmented chain, (9).
Formalization targets
Goal: Theorem 2, pinned-down reading
The printed statement, "If Assumption A (B) holds, then problem 1 (2) can be formulated as a linear programming problem", is not a mathematical statement as it stands. The goal is the reading established by its proof (pp. 20–23).
Under Assumption A with , the program
has an optimal solution. For every optimal , every row sum is positive, and satisfies for all and all .
Under Assumption B with the Problem 2 costs, the linear program obtained from (9) by the Lemma's transformation, subject to (12), has an optimal solution. For every optimal one has , and the procedure decoded from satisfies for all and all .
Milestones
In the order the proof uses them: the Cesàro limit and the unique positive stationary distribution of a one-class chain ((3), (5)); the taboo-probability identity (4); the formula (6) for ; the cycle formula (7) for the averaged total cost; the remark that minimizing the average of the minimizes each one; the correspondence between and the solutions of (10); and the Lemma reducing a linear-fractional program under conditions (i) and (ii) to the linear program (12).
Significance
The theorem replaces a search over infinitely many randomized procedures by a single finite linear program. It also yields the structural fact that an optimal stationary procedure can be read off from any optimal solution. The variables make constraints on long-run frequencies of actions expressible as linear constraints. That is the origin of the theory of constrained Markov decision processes, and of the dual linear programs whose variables are value functions. The Lemma is the classical linear-fractional reduction, used well beyond this setting.
All of these results are proved in the paper and in later textbooks (for example Puterman, Markov Decision Processes, 1994, §8.8 and §9.5). None of them has been formalized: Mathlib has Perron–Frobenius-type facts for irreducible matrices but no linear programming theory, no taboo probabilities and no Markov decision model. The mission produces machine-checked versions of the proof's chain of equalities and of the decoding step, written so that they can be reused for occupation-measure arguments.
Difficulty
Several steps fail in the naive argument. The correspondence between procedures and solutions of (10) needs every row sum to be positive. That uses Assumption A for a procedure obtained by completing the decoded rows arbitrarily, together with the uniqueness and positivity of the stationary distribution. Positivity of the stationary vector of an irreducible but possibly periodic chain, and the Cesàro (not ordinary) convergence of , have no ready-made form in Mathlib. The total-cost identity (7) needs the regenerative identity (4), whose sums must first be shown to converge, and needs the augmented chain to be irreducible, which follows from Assumption B but is not assumed. Problem 2 needs one more step: a minimizer of the averaged total cost is optimal from every starting state, which uses the finiteness of all .
Formalization scope
States and decisions are finite Lean types S and Act. Probabilities and costs are real numbers, a procedure of is a nonnegative real matrix with unit row sums, and the chain is chainMatrix q D. Assumption A is irreducibility (Matrix.IsIrreducible) of every such chain matrix. Assumption B is reachability of from every state; for a finite chain in which is absorbing, this is equivalent to absorption with probability one. is a real limsup of a bounded sequence, with the paper's sum over . takes values in . The paper requires on p. 17 and in Problem 2. The formalization uses for in Problem 2, and keeps the two problems as separate implications. The adjoined state is none : Option S, with the transition law that produces Derman's , for every procedure. The published JewellMRP.InfiniteStep definitions of an ergodic matrix and of a stationary vector are reused.
The goal states optimality of the decoded procedure against every competitor in , for every optimal solution of the linear program, with existence of an optimal solution as a separate clause. A statement that only identifies feasible sets, or that only asserts that some optimal procedure exists, does not count as Theorem 2. Optimality over all history-dependent procedures is Theorem 1, a separate mission of this series.
Welcome contributions: the stationary-distribution facts for irreducible finite stochastic matrices (reusable across Markov chain work), a small linear-programming existence lemma (a linear function attains its minimum on a nonempty compact polytope), and the Lemma's transformation, which is self-contained.
Selected references
- C. Derman, On Sequential Decisions and Markov Chains, Management Science 9(1):16–24, 1962. https://doi.org/10.1287/mnsc.9.1.16
- A. S. Manne, Linear Programming and Sequential Decisions, Management Science 6(3):259–267, 1960. https://doi.org/10.1287/mnsc.6.3.259
- A. Charnes and W. W. Cooper, Programming with Linear Fractional Functionals, Naval Research Logistics Quarterly 9(3–4):181–186, 1962. https://doi.org/10.1002/nav.3800090303
- K. L. Chung, Markov Chains with Stationary Transition Probabilities, Springer, 1960. https://doi.org/10.1007/978-3-642-49686-8
- M. L. Puterman, Markov Decision Processes: Discrete Stochastic Dynamic Programming, Wiley, 1994. https://doi.org/10.1002/9780470316887