Simple Algorithm
Reinforcement Learning · Fixed Point · 30 min

How Fast Is Policy Iteration?

Strongly polynomial bounds for a fixed discount, and exponential worst cases.

Policy iteration seems to finish in a handful of rounds on every problem anyone tries. Is that a theorem? For a fixed discount factor, yes: Ye (2011) proved it strongly polynomial, and later work sharpened the bound to O(SA1−γlog⁡11−γ)\order{\frac{SA}{1-\gamma}\log\frac{1}{1-\gamma}} rounds with a remarkably short proof, which this lesson gives in full. Let the discount approach 1, though, and carefully built MDPs force exponentially many rounds, and whether any algorithm solves MDPs in strongly polynomial time is still open.

What you’ll learn

  • Define strongly polynomial algorithms, and show with an example why value iteration is not one, even for a fixed γ\gamma.
  • State the iteration bounds of Ye, of Hansen, Miltersen & Zwick and of Scherrer for policy iteration, and prove Scherrer's bound.
  • Describe the exponential lower bounds for policy iteration and simplex-type rules, and reconcile them with the polynomial upper bounds.
  • Explain what remains open, including strongly polynomial algorithms for MDPs and Howard's rule on deterministic MDPs.

What “fast” means

Measure an MDP by its n=Sn=S states, its mm state–action pairs (m=SAm=SA when every state has AA actions), and the number of bits LL needed to write down its rewards, probabilities and discount. An algorithm is polynomial if its running time is bounded by a polynomial in nn, mm and LL. It is strongly polynomial if the number of arithmetic operations is bounded by a polynomial in nn and mm alone, whatever the numbers are (with intermediate numbers of polynomial size).

Linear programming solves MDPs in polynomial time, by interior-point methods, but no strongly polynomial algorithm is known for linear programs in general; that is Smale's ninth problem. Value iteration is not strongly polynomial, even for a fixed γ\gamma, as a two-state example shows.

Policy iteration is a simplex method. In the linear program over discounted occupancy measures, each vertex of the feasible polytope is the occupancy measure of a deterministic policy, and moving to an adjacent vertex swaps the action of a single state: simple policy iteration. An improving pivot is an action with positive advantage, the LP's reduced cost. Dantzig's rule picks the largest advantage overall. Howard's policy iteration switches every state with a positive advantage at once, a block pivot (Ye, 2011). Results flow both ways: bounds for policy iteration bound simplex methods on these LPs, and MDPs have supplied some of the strongest lower bounds for simplex pivoting rules.

Check your understanding

Why is value iteration not strongly polynomial, even with γ\gamma fixed?

  1. Each sweep costs more than polynomial time
  2. It may never converge
  3. It needs exponentially many sweeps on every MDP
  4. The number of sweeps before its greedy policy is optimal depends on how small the margins are, not just on SS and AA
Show the answer

D. The number of sweeps before its greedy policy is optimal depends on how small the margins are, not just on SS and AA

In the two-state example the sweep count grows without bound as the margin shrinks, with SS, AA and γ\gamma fixed. A strongly polynomial algorithm's operation count may depend only on the size of the MDP, not on the numbers in it.

Strongly polynomial for a fixed discount

ResultAlgorithmIterations (with nn states, mm state–action pairs)
Ye (2011)Howard's policy iteration, and the simplex method with Dantzig's rule(m−n)⌈n1−γlog⁡n21−γ⌉=O(mn1−γlog⁡n1−γ)(m-n)\left\lceil\frac{n}{1-\gamma}\log\frac{n^2}{1-\gamma}\right\rceil=\order{\frac{mn}{1-\gamma}\log\frac{n}{1-\gamma}}
Hansen, Miltersen & Zwick (2013)Howard's policy iteration, and strategy iteration for two-player turn-based stochastic games(m+1)⌈11−γlog⁡n1−γ⌉=O(m1−γlog⁡n1−γ)(m+1)\left\lceil\frac{1}{1-\gamma}\log\frac{n}{1-\gamma}\right\rceil=\order{\frac{m}{1-\gamma}\log\frac{n}{1-\gamma}}
Scherrer (2016)Howard's policy iteration(m−n)⌈11−γlog⁡11−γ⌉(m-n)\left\lceil\frac{1}{1-\gamma}\log\frac{1}{1-\gamma}\right\rceil
Scherrer (2016)Simplex policy iteration (Dantzig's rule)O(nm1−γlog⁡11−γ)\order{\frac{nm}{1-\gamma}\log\frac{1}{1-\gamma}}
Each round costs a linear solve, O(n3)\order{n^3}, plus a lookahead, O(mn)\order{mn}, so for a fixed γ\gamma the total work is a polynomial in nn and mm alone. Hansen, Miltersen and Zwick's extension to games gave the first strongly polynomial algorithm for discounted turn-based stochastic games with a fixed discount.
DerivationProof: every block of rounds eliminates an action for good
  1. V⋆−Vπ=(I−γPπ)−1ℓπ,ℓπ≤V⋆−Vπ,∥V⋆−Vπ∥∞≤∥ℓπ∥∞1−γV^\star-V^\pi=\big(I-\gamma P^\pi\big)^{-1}\ell^\pi,\qquad\ell^\pi\le V^\star-V^\pi,\qquad\norm{V^\star-V^\pi}_\infty\le\frac{\norm{\ell^\pi}_\infty}{1-\gamma}

    Losses against V⋆V^\star. For a deterministic policy π\pi let ℓπ(s)=V⋆(s)−Q⋆(s,π(s))≥0\ell^\pi(s)=V^\star(s)-Q^\star(s,\pi(s))\ge0, how much π\pi's action at ss gives up when judged by V⋆V^\star. It depends only on the action π(s)\pi(s). Splitting V⋆−Vπ=(V⋆−TπV⋆)+(TπV⋆−TπVπ)V^\star-V^\pi=(V^\star-\mathcal T^\pi V^\star)+(\mathcal T^\pi V^\star-\mathcal T^\pi V^\pi) gives an exact identity, and two consequences because (I−γPπ)−1≥I(I-\gamma P^\pi)^{-1}\ge I has max norm 1/(1−γ)1/(1-\gamma):

  2. ∥V⋆−Vπk∥∞≤γk∥V⋆−Vπ0∥∞\norm{V^\star-V^{\pi_k}}_\infty\le\gamma^k\norm{V^\star-V^{\pi_0}}_\infty

    Policy iteration contracts. It is never behind value iteration from the same start, Vπk≥(T⋆)kVπ0V^{\pi_k}\ge(\mathcal T^\star)^kV^{\pi_0}, so

  3. ℓπ0(s0)=ℓπk(s0)≤(V⋆−Vπk)(s0)≤γk∥V⋆−Vπ0∥∞≤γk1−γ ℓπ0(s0)\ell^{\pi_0}(s_0)=\ell^{\pi_k}(s_0)\le\big(V^\star-V^{\pi_k}\big)(s_0)\le\gamma^k\norm{V^\star-V^{\pi_0}}_\infty\le\frac{\gamma^k}{1-\gamma}\,\ell^{\pi_0}(s_0)

    A witness. Suppose π0\pi_0 is not optimal and pick s0s_0 where ℓπ0\ell^{\pi_0} is largest; let a0=π0(s0)a_0=\pi_0(s_0), so ℓπ0(s0)=∥ℓπ0∥∞>0\ell^{\pi_0}(s_0)=\norm{\ell^{\pi_0}}_\infty>0. If some later policy still uses a0a_0 at s0s_0, its loss there is the same number, and the three facts above chain together:

  4. k≥k⋆⟹πk(s0)≠a0k\ge k^\star\quad\Longrightarrow\quad\pi_k(s_0)\ne a_0

    Elimination. Dividing by ℓπ0(s0)>0\ell^{\pi_0}(s_0)>0 forces γk≥1−γ\gamma^k\ge1-\gamma, that is k≤ln⁡11−γ/ln⁡1γk\le\ln\frac{1}{1-\gamma}\big/\ln\frac1\gamma, and ln⁡1γ>1−γ\ln\frac1\gamma>1-\gamma. So after k⋆=⌈11−γln⁡11−γ⌉k^\star=\left\lceil\frac{1}{1-\gamma}\ln\frac{1}{1-\gamma}\right\rceil rounds, action a0a_0 is never used at s0s_0 again: a non-optimal state–action pair is eliminated for good.

  5. #rounds≤(m−n) k⋆=(m−n)⌈11−γln⁡11−γ⌉\#\text{rounds}\le(m-n)\,k^\star=(m-n)\left\lceil\frac{1}{1-\gamma}\ln\frac{1}{1-\gamma}\right\rceil

    Counting. Restart the argument from πk⋆\pi_{k^\star}: its witness pair is in use, so it has not been eliminated before, and it is eliminated within the next k⋆k^\star rounds. Each block of k⋆k^\star rounds removes a new non-optimal pair, every state keeps at least one optimal action, so at most m−nm-n pairs can go:

Predict before you look

At γ=0.9\gamma=0.9, after how many rounds is some non-optimal action guaranteed to be eliminated for good, ⌈11−γln⁡11−γ⌉\left\lceil\frac{1}{1-\gamma}\ln\frac{1}{1-\gamma}\right\rceil?

Show the answer

24

10ln⁡10≈23.0310\ln10\approx23.03, rounded up to 24. For the 4×3 gridworld (9 non-terminal cells, 4 actions, so m−n=27m-n=27) the bound is 27×24=64827\times24=648 rounds; policy iteration actually needs 3. At γ=0.99\gamma=0.99 the block length is ⌈100ln⁡100⌉=461\lceil100\ln100\rceil=461.

Exponential worst cases

ResultSettingWhat is slow
Melekopoglou & Condon (1994)MDPs, any discountSimple policy iteration (one switch per round) with several natural rules, including the smallest-index rule: exponentially many rounds
Fearnley (2010)Total and average rewardHoward's policy iteration: exponentially many rounds, on MDPs adapted from Friedmann's (2009) parity-game construction
Hollanders, Delvenne & Jungers (2012)Discounted, with γ\gamma part of the inputHoward's policy iteration: exponentially many rounds, with γ\gamma so close to 1 that the discounted MDP behaves like the undiscounted one
Friedmann, Hansen & Zwick (2011)Linear programs built from MDPsThe randomized simplex rules Random-Edge and Random-Facet: subexponential lower bounds, the latter essentially matching the known upper bounds
Mansour and Singh (1999) gave a bound for Howard's rule that does not depend on γ\gamma, about AS/SA^S/S rounds: exponential, but better than counting all ASA^S policies.

The constructions encode a binary counter: the MDP is wired so that the policy improvements flip "bits" in the order a counter would, and an nn-bit counter takes 2n2^n steps to run out. There is no contradiction with the strongly polynomial bounds, which grow like 1/(1−γ)1/(1-\gamma): in the discounted lower bound, 1−γ1-\gamma shrinks exponentially with the size of the instance, so 1/(1−γ)1/(1-\gamma) is itself exponential. A fixed γ\gamma and a γ\gamma that may depend on the instance are genuinely different problems.

Check your understanding

Hollanders, Delvenne and Jungers built discounted MDPs on which Howard's policy iteration needs exponentially many rounds. Why does this not contradict Ye's theorem?

  1. Their MDPs use average reward, not discounting
  2. In their family, γ\gamma approaches 1 as the MDPs grow, so the 1/(1−γ)1/(1-\gamma) factor in the upper bounds is itself exponential
  3. Ye's theorem covers only the simplex method, not Howard's rule
  4. Their MDPs have exponentially many actions
Show the answer

B. In their family, γ\gamma approaches 1 as the MDPs grow, so the 1/(1−γ)1/(1-\gamma) factor in the upper bounds is itself exponential

Strong polynomiality holds for each fixed γ\gamma. Letting γ\gamma depend on the instance removes that assumption: the upper bound O(m1−γlog⁡11−γ)\order{\frac{m}{1-\gamma}\log\frac{1}{1-\gamma}} is then exponential too, and the two results fit together.

What is open

For practice, the lesson is about cost per round as much as the count. A round of Howard's policy iteration costs a linear solve, so on large problems modified policy iteration, which solves each Newton system only approximately, usually wins, and for problems too large to enumerate, neither applies and sampling methods take over (Planning in Huge MDPs: Sparse Sampling).

Key takeaways

  • Strongly polynomial means an operation count bounded in SS and AA alone. Value iteration is not, even for a fixed γ\gamma: thin margins make it sweep arbitrarily long.
  • For a fixed γ\gamma, Howard's policy iteration needs at most (m−n)⌈11−γln⁡11−γ⌉(m-n)\lceil\frac{1}{1-\gamma}\ln\frac{1}{1-\gamma}\rceil rounds (Scherrer, 2016), improving Ye (2011) and Hansen, Miltersen & Zwick (2013). The proof: within each block of that many rounds a non-optimal action disappears for good.
  • When γ\gamma may approach 1, or with total or average reward, Howard's rule can need exponentially many rounds, and MDP constructions give lower bounds for simplex rules too.
  • Open: a strongly polynomial algorithm for MDPs with γ\gamma in the input, the behavior of Howard's rule on deterministic MDPs, and a theory of why policy iteration is fast in practice.

Check yourself

In the interactive lesson these are scored with your confidence, and what you miss comes back for review.

Question 1

Which property makes an MDP algorithm strongly polynomial?

  1. Its number of arithmetic operations is bounded by a polynomial in the number of states and actions, whatever the numbers in the MDP
  2. Its running time is polynomial in the number of states, actions and bits of the input
  3. It needs a polynomial number of samples from a simulator
  4. It converges geometrically
Show the answer

A. Its number of arithmetic operations is bounded by a polynomial in the number of states and actions, whatever the numbers in the MDP

Strong polynomiality forbids any dependence on the magnitudes or precision of rewards, probabilities and the discount. Interior-point methods are polynomial but not strongly polynomial; Howard's policy iteration is strongly polynomial for each fixed γ\gamma.

Question 2

An MDP has 100 states with 2 actions each, and γ=0.99\gamma=0.99. What does Scherrer's bound (m−n)⌈11−γln⁡11−γ⌉(m-n)\lceil\frac{1}{1-\gamma}\ln\frac{1}{1-\gamma}\rceil give?

  1. 461
  2. 21002^{100}
  3. 10,000
  4. 46,100
Show the answer

D. 46,100

m−n=200−100=100m-n=200-100=100 and ⌈100ln⁡100⌉=461\lceil100\ln100\rceil=461, so the bound is 46,100 rounds, against the 21002^{100} policies a naive count allows.

Question 3

What is the key step in the proof of Scherrer's bound?

  1. Every round changes the action in at least one state
  2. Every round improves every state's value by a fixed amount
  3. After about 11−γln⁡11−γ\frac{1}{1-\gamma}\ln\frac{1}{1-\gamma} rounds, some non-optimal action is never used again
  4. The values converge quadratically
Show the answer

C. After about 11−γln⁡11−γ\frac{1}{1-\gamma}\ln\frac{1}{1-\gamma} rounds, some non-optimal action is never used again

The action with the largest loss against V⋆V^\star in the current policy has a loss that the contraction γk∥V⋆−Vπ0∥∞\gamma^k\norm{V^\star-V^{\pi_0}}_\infty soon makes impossible, so it disappears forever. Counting the at most m−nm-n non-optimal actions finishes the proof.

Question 4

For which class of MDPs is a strongly polynomial algorithm known even when the discount is part of the input?

  1. MDPs with two actions per state
  2. Deterministic MDPs
  3. MDPs with sparse transition matrices
  4. Unichain MDPs
Show the answer

B. Deterministic MDPs

Deterministic MDPs give linear programs with two variables per constraint, which admit strongly polynomial algorithms; Post and Ye showed that even the simplex method with Dantzig's rule is strongly polynomial on them, for any discount. For general MDPs the question is open.

Further reading

  • Y. Ye, "The simplex and policy-iteration methods are strongly polynomial for the Markov decision problem with a fixed discount rate," Mathematics of Operations Research 36(4), 593–603 (2011).
  • T. D. Hansen, P. B. Miltersen & U. Zwick, "Strategy iteration is strongly polynomial for 2-player turn-based stochastic games with a constant discount factor," Journal of the ACM 60(1), 1–16 (2013).
  • B. Scherrer, "Improved and generalized upper bounds on the complexity of policy iteration," Mathematics of Operations Research (2016).
  • J. Fearnley, "Exponential lower bounds for policy iteration," Proceedings of ICALP, LNCS 6199, 551–562 (2010).
  • I. Post & Y. Ye, "The simplex method is strongly polynomial for deterministic Markov decision processes," Mathematics of Operations Research (2015).
  • H. Zhong & Y. Ye, "Policy iteration is not polynomial for deterministic Markov decision processes: the price of algorithmic anarchy," arXiv:2609.40147 (preprint, 2026).