Reachability and Safety Objectives in Markov Decision Processes on Long but Finite Horizons

We consider discrete-time Markov decision processes in which the decision maker is interested in long but finite horizons. First we consider reachability objective: the decision maker’s goal is to reach a specific target state with the highest possible probability. A strategy is said to overtake another strategy, if it gives a strictly higher probability of reaching the target state on all sufficiently large but finite horizons. We prove that there exists a pure stationary strategy that is not overtaken by any pure strategy nor by any stationary strategy, under some condition on the transition structure and respectively under genericity. A strategy that is not overtaken by any other strategy, called an overtaking optimal strategy, does not always exist. We provide sufficient conditions for its existence. Next we consider safety objective: the decision maker’s goal is to avoid a specific state with the highest possible probability. We argue that the results proven for reachability objective extend to this model.


Introduction
We consider discrete-time Markov decision processes (MDP) with finite state and action spaces. We consider two different types of objectives for the decision maker: reachability objectives and safety objectives. The decision maker is said to have reachability objective, if his goal is to reach a specific state of the MDP with the highest possible probability, and the decision maker is said to have a safety objective, if his goal is the opposite: to avoid a specific state of the MDP with the highest possible probability. Both objectives are standard and have been analyzed extensively in the literature, but they are quite different in nature (see, e.g., [1][2][3]).
An important question is on which time horizon the decision maker evaluates his strategies. On any given finite horizon, backward induction guarantees that the decision maker has a pure optimal strategy. This optimal strategy can depend heavily on the horizon, and generally there is no strategy that is optimal on all finite horizons. On the infinite horizon, the decision maker has a pure stationary optimal strategy (cf. [4,5]).
In this paper, instead of considering a fixed horizon, we propose to evaluate strategies by how they perform on all long but finite horizons. In particular, such an evaluation can be meaningful, if the decision maker knows that the decision process will last for many periods, but he has no information on its exact length. In the case of reachability objectives, such an evaluation may also reflect the attitude of a decision maker who is patient and can wait for many periods to reach the target state.
More precisely, when the decision maker has reachability objective with target state s * , we say that a strategy σ overtakes another strategy σ , if there exists T ∈ N such that, on all finite horizons t ≥ T , the probability of having visited the state s * within horizon t is strictly larger under σ than under σ . Thus, conditionally on the MDP lasting at least T periods, σ performs better than σ regardless of the horizon, and consequently the decision maker should prefer σ to σ . When the decision maker has a safety objective and wants to avoid a state s * , we say that a strategy σ overtakes another strategy σ , if there exists T ∈ N such that, on all finite horizons t ≥ T , the probability of having visited the state s * within horizon t is strictly smaller under σ than under σ .
We also define a more permissive version of the aforementioned relations between strategies. For reachability objectives, we say that a strategy σ weakly overtakes another strategy σ , if there exists T ∈ N such that, on all finite horizons t ≥ T , the probability of having visited the target state s * within horizon t under σ is at least as much as that under σ , but strictly more for infinitely many horizons t. The definition is analogous for safety objectives.
Under these comparisons of strategies, we call a strategy overtaking optimal, if it is not overtaken by any other strategy and call it strongly overtaking optimal, if it is not weakly overtaken by any other strategy. Strong overtaking optimality is a strict refinement of overtaking optimality, and as an appealing property, they are both strict refinements of optimality on the infinite horizon.
Our contribution. For reachability objectives, we obtain the following results, sorted by the attributes of the MDP. (I. 1) We prove that if the MDP is such that each action can lead to at most one non-target state with a positive probability, then there exists a pure stationary strategy that is not weakly overtaken by any pure strategy. This is Theorem 4.1. We show with Example 4.2 that such a statement does not hold for all MDPs. (I.2) We prove by means of Example 4.1 that an overtaking optimal strategy does not always exist. This MDP is however constructed in a very specific way and is non-generic. (I. 3) We consider MDPs that are generic, in the sense that the transition probabilities are randomized using any non-trivial joint density function. We show for these MDPs that there exists a pure stationary strategy that overtakes each other stationary strategy. This is Theorem 5.1. (I.4) We present sufficient conditions in Theorem 6.1 for the existence of a stationary strategy that is strongly overtaking optimal. For safety objectives, we argue that the same results hold.
Proof techniques. We use quite different proof techniques to obtain our results. For proving result (I.1), we transform the MDP with the reachability objective into a regular MDP, by assigning payoffs to actions based on the immediate transition probabilities to the target state. In this new MDP, we invoke some results in [6] to derive a specific pure stationary strategy. We show that this strategy is exactly the desired strategy in the original MDP with the reachability objective. This proof technique is suitable for pure strategies, but probably also limited to them, as the relation between the two MDPs is much weaker for non-pure strategies. When considering generic MDPs in result (I.3), we rely on techniques from linear algebra. The overtaking comparison between two stationary strategies can be reduced to the comparison of the spectral gaps of the transition matrices that these strategies induce. The spectral gap of a transition matrix refers to the difference between the largest eigenvalue, which is equal to 1, and the modulus of the second eigenvalue, which can be a complex number. To obtain result (I.3), we need to compare the spectral gaps of transition matrices induced by stationary and pure stationary strategies. Result (I.4) is proven in a constructive way. The mixed actions of the desired stationary strategy can be derived from the conditions of Theorem 6.1. The results for safety objectives are proven similarly.

Related literature.
Reachability and safety problems were studied both in the MDP framework and in the context of two-player zero-sum games, for an overview we refer to [1] and respectively to [2] and [3]. An important distinction is made between the qualitative and the quantitative approaches. The qualitative approach is interested in the probability with which the decision maker succeeds to meet his objective. For the quantitative approach, however, it also matters how quickly the target state is reached in the case of reachability objective, or how long the bad state has been avoided in the case of a safety objective. Our overtaking approach could thus be classified as a quantitative approach on the infinite horizon. For other quantitative approaches, we refer to [7,8] and the references therein, and to [9].
In the literature, various definitions of overtaking optimality have been proposed. They all serve as a refinement of optimality on the infinite horizon, based on the performance of strategies on the finite horizons. For an overview, we refer to [10][11][12][13][14][15][16].
A well-established definition of overtaking optimality is given in Section 5.4.2 in [11] for MDPs in which the decision maker receives a payoff at each period, depending on the state and the chosen action. According to this definition, a strategy σ * is overtaking optimal if, for each strategy σ and for each error-term δ > 0 the following holds: for all large horizons N , the expected sum of the payoffs during the first N periods under σ * is at least as much as that under σ minus δ. In our framework, there are no immediate payoffs, hence this definition does not apply. However, we show in Example 3.1 that, if we take the natural assignment of payoff 0 to each non-target state and payoff 1 to the target state, then our definition of overtaking optimality can lead to different strategies than Puterman's definition, as well as variants of Puterman's definition defined therein.
Our definition of overtaking optimality is a relatively direct translation of the definitions of sporadic overtaking optimality in [6,10] and repeated optimality in [16], into the context of MDPs with reachability and safety objectives.
One important feature of our definition is that it does not require the strategy to outperform all other strategies on long but finite horizons. It only requires that the strategy is not outperformed by any other strategy. Our definition is therefore weaker than overtaking optimality and uniform overtaking optimality as in [10], and weaker than strong overtaking optimality as in [17] or [18]. See also [16], who delineates "not-outperformed" definitions from "outperform-all" definitions of optimality.
Organization of the paper. Section 2 details the model. Then, we start by analyzing reachability objectives. Section 3 provides an example, which highlights different aspects of the concept of overtaking optimality by comparing it with other optimality notions. Sections 4 and 5 present the results for piecewise deterministic MDPs and generic MDPs, respectively. Section 6 provides sufficient conditions that ensure that a stationary strategy is strongly overtaking optimal. In Sect. 7, we turn to safety objectives. Section 8 concludes.

MDPs with Reachability Objective
The model. An MDP is given by [1] a nonempty, finite set S of states, [2] for each state s ∈ S, a nonempty, finite set A(s) of actions and [3] for each state s ∈ S and action a ∈ A(s), a probability distribution p(s, a) = ( p(z | s, a)) z∈S on the set S of states. The MDP is played at periods in N = {1, 2, . . .} as follows: The initial state s 1 is given. At each period t, the decision maker chooses an action a t ∈ A(s t ), which leads to a state s t+1 ∈ S drawn according to the distribution p(s t , a t ). An MDP with reachability objective is an MDP together with a specific state s * ∈ S, called the target state, which is not the initial state s 1 .

Histories.
Let H ∞ be the set of all infinite histories, i.e., the set of sequences (s 1 , a 1 , s 2 , a 2 , . . . ) such that s i ∈ S, a i ∈ A(s i ), and p(s i+1 | s i , a i ) > 0 for each i ∈ N. A history at period t is a prefix (s 1 , a 1 , . . . , s t−1 , a t−1 , s t ) of an infinite history.
Denote by H t the set of all histories at period t, by H = ∪ t∈N H t the set of all histories, and by s(h) the final state of each history h ∈ H .

Strategies.
A mixed action in a state s ∈ S is a probability distribution on A(s). The set of mixed actions in state s is denoted by (A(s)). A strategy σ is a map that, to each history h ∈ H , assigns a mixed action σ (h) ∈ (A(s(h))). The interpretation is that, if history h arises, σ chooses an action according to the probabilities given by the mixed action σ (h). A strategy σ is called pure, if σ (h) places probability 1 on one action, for each history h. A strategy σ is called stationary, if the recommendation of the action only depends on the current state, i.e., σ (h) = σ (h ) whenever s(h) = s(h ). Note that a pure stationary strategy can be seen as an element of × s∈S A(s). Every initial state s and strategy σ induce a probability measure P sσ on H ∞ , where H ∞ is endowed with the sigma-algebra generated by the cylinder sets. We denote the corresponding expectation operator by E sσ .
Value and optimality. Let t * denote the first period when state s * is reached; if s * is not reached then t * = ∞. The value at the initial state s is the maximal probability that state s * can be reached: v(s) = sup σ P sσ (t * < ∞). A strategy σ is called optimal at the initial state s if P sσ (t * < ∞) = v(s). It is known that the decision maker always has a pure stationary strategy that is optimal at all initial states (cf. [4,5]).
Overtaking optimality. We say that a strategy σ overtakes a strategy σ at the initial state s if there is T ∈ N such that for all periods t ≥ T we have P sσ (t * ≤ t) > P sσ (t * ≤ t). This means that, for all periods t ≥ T , the probability under σ to reach s * within the first t periods is strictly larger than that under σ . If the decision maker is sufficiently patient with regard to his goal to reach the target state, then he strictly prefers σ to σ .
Note that two strategies can be incomparable in the sense that neither of them overtakes the other one. Consider the following example. The state space is {x, s * }.
In state x, the decision maker has three actions: a 0 , a 1/2 , a 7/8 . For z ∈ {0, 1/2, 7/8}, under action a z , the play moves to state s * with probability z and remains in state x with probability 1 − z. Now suppose that σ recommends to always play action a 1/2 and σ recommends to play the sequence of actions a 0 , a 7/8 , a 0 , a 0 , a 7/8 , a 0 , . . . as long as the play is in state x. Then, at periods t = 3k A strategy σ is called overtaking optimal at the initial state s, if there is no strategy that overtakes σ at that initial state. That is, σ is maximal with respect to the relation of "overtakes" between strategies.
Note that any optimal strategy overtakes any strategy that is not optimal. Indeed, if strategy σ is optimal at the initial state s but strategy σ is not, then P sσ (t * < ∞) = v(s) > P sσ (t * < ∞), and hence P sσ (t * ≤ t) > P sσ (t * ≤ t) for all sufficiently large t. Consequently, an overtaking optimal strategy at the initial state s is also optimal at that initial state. As Example 3.1 will show, the converse is not true: there exist optimal strategies at an initial state that are not overtaking optimal at that initial state. Thus, overtaking optimality is a strict refinement of optimality.
Strong overtaking optimality. We say that a strategy σ weakly overtakes a strategy σ at the initial state s if there is T ∈ N such that for all periods t ≥ T we have P sσ (t * ≤ t) ≥ P sσ (t * ≤ t) with strict inequality for infinitely many t. Note that if σ overtakes σ at the initial state s then σ also weakly overtakes σ at that initial state.
A strategy σ is called strongly overtaking optimal at the initial state s, if no strategy weakly overtakes σ at that initial state. A strongly overtaking optimal strategy at an initial state is also overtaking optimal at that initial state.

Discounted and Average Payoff MDPs
We will also consider MDPs with the discounted payoff or with the average payoff, but only as auxiliary models. A discounted MDP is an MDP together with a discount factor β ∈]0, 1[ and a payoff function, namely a function (s, a) → u(s, a) ∈ R that maps a payoff to each state s ∈ S and action a ∈ A(s). For initial state s ∈ S, the β-discounted value is defined as (1) A strategy σ is called β-discounted optimal at the initial state s, if the supremum in (1) is attained at σ . A strategy σ * is called Blackwell optimal, if there is B ∈]0, 1[ such that σ * is β-discounted optimal at all initial states for all discount factors β ∈ [B, 1[. By the results of [19] and [5], it is known that for each discount factor β ∈]0, 1[, the decision maker has a pure stationary strategy that is β-discounted optimal at all initial states, and that he has a Blackwell optimal strategy too.
An average payoff MDP is similar to a discounted MDP, except that the decision maker's goal is to maximize the expectation of the average payoff lim inf T →∞ 1 T T t=1 u(s t , a t ). The average value and average optimality are defined analogously to the corresponding definitions for reachability objective. By [4,5], it is known that the decision maker has a pure stationary strategy that is average optimal at all initial states. Moreover, each Blackwell optimal strategy is average optimal at all initial states.

Reachability Objectives: An Illustrative Example
In this section, we discuss a specific MDP with reachability objective, which demonstrates four properties of overtaking optimality. First, there are optimal strategies that are not overtaking optimal. That is, overtaking optimality is a strict refinement of optimality. Second, finding overtaking optimal strategies cannot be done by simply solving a related discounted MDP. Third, the strategy that minimizes the expected time of reaching the target state s * can be different from the overtaking optimal strategies, even when the latter is unique. Fourth, for a related MDP, overtaking optimality in not the same as the concept of overtaking optimality as defined in [11], or the related concepts of cumulative overtaking optimality and average overtaking optimality that were defined therein.

Example 3.1
Consider an MDP that has state space S = {x, y, z, s * } such that: -State x is the initial state. In this state, the decision maker has two actions: a and b.
Action a leads to state s * with probability q and to state y with probability 1 − q.
Action b leads to state s * with probability 1 2 and to state z with probability 1 2 . -In state y, there is only one action, denoted by c, which leads to state s * with probability q and to state y with probability 1 − q. -In state z, there is only one action, denoted by d, which leads to state s * with probability p and to state z with probability 1 − p. -State s * is absorbing.
The MDP is depicted in Fig. 1. In this figure, the state s * is omitted for simplicity, states x, y, and z are denoted by circles, and actions are denoted by arcs together with the name of the action and the corresponding probability of moving to state s * . For example, the arrow from state x to state y denoted by a : q indicates that this action is called a and that, when played at state x, it leads to state s * with probability q and to state y with probability 1 − q. Suppose that the initial state is x. Since in states y and z there is a single action, a strategy is characterized by the action it selects in state x. Choosing the action a at state x leads to the following sequence of probabilities of moving to state s * : (q, q, q, . . .). Choosing the action b at state x leads to the following sequence of probabilities of moving to state s * : (1/2, p, p, . . .). The state s * is eventually reached with probability 1 under both actions a and b. Below we argue that while b (and not a) is optimal according to many optimality concepts, a (and not b) is overtaking optimal under reachability objective.

Claim 1
In Example 3.1, action a is overtaking optimal under reachability objective, and action b is not.
Proof Take a period t ≥ 2. Under a the probability of reaching the target state s * within the first t periods is Since p < q by assumption, This completes the proof.

Claim 2
Consider the discounted MDP that has payoff equal to 1 in state s * and payoff 0 in states x, y and z. Strategy b is Blackwell optimal, while strategy a is not Blackwell optimal.
Proof In the discounted MDP, if state s * is reached at some period t, then the βdiscounted payoff is equal to As one can verify, we have The denominator of the fraction above is positive for all β ∈]0, 1[. As q < 2 p 2 p+1 by assumption, the expression 1 − (1 − 2 p)(1 − q) − 2q is positive. Hence, the numerator of the fraction above is positive for large β ∈]0, 1[. Thus, we find D b (β) > D a (β) for large β ∈]0, 1[, and the claim follows.

Claim 3
In Example 3.1, the expectation of the period t * when reaching the state s * is smaller under b than under a: by assumption, the claim follows.
Claim 4 Consider the MDP with payoff 1 in state s * and payoff 0 in states x, y, and z.
The strategy b is both overtaking optimal and cumulative overtaking optimal according to the definitions in Section 5.4.2 in [11], and strategy a is neither of them. 1 Proof For each strategy σ and period N , define R(σ, N ) to be the expected sum of the payoffs (which is also the sum of the expected payoffs) up to period N . Since the initial state x is not the target state, R(a, 1) = R(b, 1) = 0 holds trivially. We claim that R(a, N ) < R(b, N ) for every N ≥ 2, and, moreover, Since p < q and q < 2 p 2 p+1 by assumption, N ), and therefore b (and not a) is cumulative overtaking optimal according to Puterman's definition. Moreover, so b (and not a) is overtaking optimal according to Puterman's definition.

Reachability Objectives: Piecewise Deterministic MDPs
A piecewise deterministic Markov process [20] is a process whose behavior is governed by random jumps at points in time, but whose evolution is deterministically governed by an ordinary differential equation between those times. These processes have been shown to be useful in a wide range of applications, including queueing theory, ruin problems, biochemistry and geology. In this section, we study an analogous concept when the state space is finite and when the jumps lead to the target state.
We call an MDP with reachability objective piecewise deterministic if for each state s = s * and each action a ∈ A(s) there is a state ω(s, a) ∈ S such that p ({ω(s, a), s * } | s, a) = 1. That is, for any state and action, the play moves to the target state s * or to a specific state that is not s * .
A special case of piecewise deterministic MDPs is that of deterministic MDPs (see Section 3.3 in [11]), that is, when there is no randomness in the transitions: for every state s ∈ S and action a ∈ A(s) there is a unique state w(s, a) ∈ S such that p(w(s, a) | s, a) = 1.
The following theorem states that, in piecewise deterministic MDPs with reachability objective, there always exists a pure stationary strategy that is at least as good as any pure strategy in the overtaking sense. The main idea of the proof is to transform the MDP with reachability objective into an average payoff MDP. The payoffs that we assign to actions are related to the probabilities that these actions lead to the target state.
The condition that the MDP is piecewise deterministic plays an important role. Indeed, Example 4.2 will show that the result is not true in general for MDPs that are not piecewise deterministic.   (w(s, a) | s, a)).
Intuitively, the MDP M represents what happens if in the MDP M the decision maker is unlucky at all periods and the process never reaches state s * . Let σ be a pure Blackwell optimal stationary strategy in M . We show that σ is not weakly overtaken by any pure strategy, thereby proving the theorem.
Consider any other pure strategy ρ in M . Since the MDP M is deterministic, each of the pure strategies σ and ρ induces a specific infinite history in M with probability 1. Let (s t , a t ) t∈N denote the infinite history induced by σ and (z t , b t ) t∈N denote the infinite history induced by ρ.
In the original MDP M, the probability under σ that state s * is not reached within the first t periods is 1 − P s 1 ,σ (t * ≤ t). This probability is related to the payoffs in the average payoff MDP M . Indeed, for each period t ≥ 2 we have  s 1 , σ ). s 1 , ρ). By the choice of σ in M (cf. Theorem 4.2), one of the following holds: (i) There is M ∈ N such that for all periods t ≥ M we have u t (s 1 , σ ) = u t (s 1 , ρ). (ii) There is a strictly increasing sequence (t k ) k∈N of periods such that for each k ∈ N we have u t k (s 1 , σ ) > u t k (s 1 , ρ).
If (i) holds, then we have P s 1 ,σ (t * ≤ t) = P s 1 ,ρ (t * ≤ t) for all t ≥ M + 1, and hence ρ does not weakly overtake σ in the original MDP M. If (ii) holds, then P s 1 ,σ (t * ≤ t k ) > P s 1 ,ρ (t * ≤ t k ) for each k ∈ N, and hence ρ does not weakly overtake σ in the original MDP M in this case either.
The following example demonstrates that, even if the MDP with reachability objective is piecewise deterministic, an overtaking optimal strategy may fail to exist. In the example, each pure strategy is equally good in the overtaking sense, but each pure strategy is overtaken by any strategy that uses randomization at every period. Fig. 2, with a notation similar to that of Example 3.1. The initial state is state x.

Example 4.1 Consider the MDP with reachability objective given in
Since in states y and z there is a single action, a pure strategy is characterized by the period in which the action b is first played in state x. When playing action b and subsequently action d, the total probability during these two periods of reaching the target state is 3 4 . Playing action a twice (or action e twice) leads to the same total probability, as 1 2 + 1 2 · 1 2 = 3 4 . It follows that P xσ (t * ≤ t) = 1 − 1 2 t−1 , for all pure strategies σ , except of the strategy σ = a t−2 b that plays the action a in the first t − 2 periods and the action b in period t − 1, for which P xσ (t * ≤ t) > 1 − 1 2 t−1 . This implies that strategies that use randomization at state x at every period do better in the overtaking sense than all pure strategies. Indeed, given any t ≥ 2, when calculating the probability of reaching the target state within the first t periods, there is a positive probability that action b is played exactly at period t − 1 (and thus we reach the target state exactly at period t), while not having to include consequences of playing action d yet.
Claim 1 Consider Example 4.1. For each pure strategy σ , it holds for sufficiently large periods t that the probability of reaching the target state within the first t periods is P xσ (t * ≤ t) = 1 − 1 2 t−1 . In particular, no pure strategy is overtaken by another pure strategy.
Proof For the pure strategy a ∞ that plays a at all periods, we have for all periods t that P xa ∞ (t * ≤ t) = 1 − 1 2 t−1 . For any other pure strategy a n−1 b that plays a at the first n − 1 periods and plays b at period n, we have for all periods t ≥ n + 1 that P x,a n−1 b (t * ≤ t) = 1 − 1 2 t−1 . Claim 2 Consider Example 4.1. Take two strategies σ and σ . Consider a period t ≥ 2. Then, P xσ (t * ≤ t) > P xσ (t * ≤ t) holds if and only if the probability under σ of being in state x and playing action b at period t − 1 is strictly larger than that under σ , i.e., P xσ (a t−1 = b) > P xσ (a t−1 = b). Consequently, if the condition P xσ (a t−1 = b) > P xσ (a t−1 = b) holds for all sufficiently large periods t, then σ overtakes σ .
Proof Suppose that when playing two strategies σ and σ , it holds that for some period On the finite horizon up to period t, the set of pure strategies is the finite set W t = {a t , b, ab, a 2 b, . . . , a t−1 b}. Under a t−2 b, the probability of reaching the target state within the first t periods is P The strategy σ induces in a natural way a probability distribution on the finite set W t of pure strategies. Indeed, denote by ((x, a) k−1 , x) the history at period k in which the play remained through action a in state x until period k, and by σ (h)(a) the probability to select action a after history h. Then, we have: σ ((x, a) k , x)(b). Similarly, the strategy σ also induces a probability distribution on W t . It follows on the finite horizon t that and similarly for the strategy σ . −1 = b). The proof is complete.
By Claim 2, the stationary strategy ( 1 2 , 1 2 ) ∞ that always chooses action a and action b each with probability 1 2 overtakes every pure strategy. Also, the stationary strategy ( p, 1 − p) ∞ overtakes the stationary strategy (q, 1 − q) ∞ if q < p < 1, as for large periods t we have This means that in Example 4.1 there is no stationary overtaking optimal strategy. We now show that there is no overtaking optimal strategy at all.

Claim 3 The MDP in Example 4.1 admits no overtaking optimal strategy.
Proof Consider any strategy σ . We construct a strategy that overtakes σ . The strategy σ can be seen as a sequence (ξ n ) ∞ n=1 where ξ n denotes the probability that σ assigns to action b when being in state x at period n. We distinguish two cases.
Case 1 Assume that either ξ n = 0 for all periods n or ξ n = 1 for some period n. In this case, P xσ (a n = b) = 0 at large periods n. Hence, by Claim 2, the stationary strategy ( 1 2 , 1 2 ) ∞ overtakes σ . Case 2 Assume that ξ m > 0 for some period m and ξ n < 1 for all periods n. We can choose a sequence (ξ n ) ∞ n=1 such that (i) for all periods n = 1, . . . , m − 1 we have ξ n = ξ n , (ii) for period m we have ξ m < ξ m , (iii) for all periods n > m we have ξ n < ξ n < 1, and (iv) The idea is to slightly reduce the probability ξ m at period m and slightly increase all probabilities ξ n , n > m, so that (iv) holds, i.e., the total probability of ever This means that the probability of being in state x at period t is at least as large under σ as under σ . Thus, by (iii), we obtain P xσ (a t = b) > P xσ (a t = b). Since this is true for all periods t > m, in view of Claim 2, σ overtakes σ .
The following example, which is an adaptation of Example 4.1, shows that if the MDP with reachability objective is not piecewise deterministic, then it can happen that each pure strategy is overtaken by another pure strategy. As a consequence, Theorem 4.1 cannot be extended to all MDPs.

Example 4.2
Consider the MDP with initial state x and reachability objective that is depicted in Fig.3. In this MDP, the only choice of the decision maker is when to play action c, if at all, and action c can be played at most once. In this MDP, action c leads to the target state s * with probability 5/8, to state y with probability 1/8 and to state x with probability 1/4. It will be easier to think about action c in the following way, which gives the same transition probabilities: After playing action c, a lottery is executed: (1) with probability 1/2 the play follows the upper-part of the arrow, and thus the play moves to state s * with probability 3/4 and to state y with probability 1/8, and (2) with probability 1/2 the play follows the bottompart of the arrow, and thus the play moves to state s * with probability 1/2 and to state x with probability 1/2. Action c in state x has a similar interpretation. Note that this MDP is not piecewise deterministic, as each of the actions c and c leads to two non-target states with a positive probability.
The pure strategies in this MDP are a ∞ , c, ac, a 2 c, . . .. The strategy a ∞ corresponds to strategy a ∞ in Example 4.1, and the strategy a t c corresponds to the mixed strategy in Example 4.1 that, in state x, recommends action a up to period t and the mixed action ( 1 2 , 1 2 ) at all periods after t. The reader can verify that a ∞ is overtaken by c, and each a t c is overtaken by a t+1 c. That is, each pure strategy is overtaken by another pure strategy.

Reachability Objectives: Generic MDPs
As shown in Sect. 4, an overtaking optimal strategy may fail to exist. In this section, we show that this is due to non-genericity of the transition function: when transitions are generic, an overtaking optimal strategy always exists. Generic transitions are natural in various applications, where transitions are affected by random noise.
We call an MDP with reachability objective generic if (a) all transitions from states that are not the target state 3 are positive: p(z | s, a) > 0 for every s = s * , a ∈ A(s), and z ∈ S, and (b) the second largest eigenvalue of A 1 , A 2 , . . . , A K are all different, where K is the number of pure stationary strategies, and A j is the transition matrix of the Markov chain on the state space S induces by the j'th pure stationary strategy, for every j ∈ {1, 2, . . . , K }. These requirements involve only finitely many linear equalities and inequalities. It follows that if one randomly chooses the transition function of the MDP from ( (S)) s =s * |A(s)| according to some probability distribution that is absolutely continuous w.r.t. the Lebesgue measure, then with probability 1 the transition function is generic.
The main result of this section is the following theorem.

Theorem 5.1 In generic MDPs with reachability objective, there is a pure stationary strategy that overtakes each other stationary strategy at each initial state.
The idea of the proof of Theorem 5.1 is as follows. Fix a state space S = {1, . . . , n}, where n ≥ 2, and let the target state be state s * = n. As above, we assume without loss of generality that state n is absorbing. Every stationary strategy σ defines a transition matrix A σ . Under the strategy σ , the rate of absorption to state n is exactly λ 2 (A σ ), the second largest eigenvalue of A σ . Thus, if λ 2 (A σ ) < λ 2 (A σ ), then σ overtakes σ for the reachability objective. As before, let A 1 , A 2 , . . . , A K be all transition matrices that are induced by pure stationary strategies. Since the MDP is generic, the second largest eigenvalues of these matrices differ, and therefore there is one of them, say, A 1 , whose second largest eigenvalue is minimal. The matrix A σ is in the convex hull of the matrices A 1 , A 2 , . . . , A K , and we will prove that if A σ = A 1 then λ 2 (A σ ) > λ 2 (A 1 ). This will imply that the pure stationary strategy that corresponds to the matrix A 1 overtakes each other stationary strategy at each initial state. The proof of Theorem 5.1 consists of four steps.
Step 1 Proving that the second largest eigenvalue determines the overtaking relation between stationary strategies: When comparing two stationary strategies σ A and σ B generating the respective transition matrices A and B, λ 2 (A) < λ 2 (B) implies that σ A overtakes σ B at each initial state.
Step 2 Proving that the second largest eigenvalue of a transition matrix A, corresponding to a stationary strategy, is equal to the largest eigenvalue of the (n − 1) × (n − 1) submatrix A that remains when we remove from A the column and the row associated with the target state: λ 2 (A) = λ 1 (A ).
Step 3 Proving that for two positive square matrices A and B that differ only in one row, the largest eigenvalue of their any convex combination cannot be lower than the minimum between the largest eigenvalues of the two matrices: for every then the inequality is strict.
Step 4 Proving that it suffices to consider only matrices that differ in one row.
Steps 1-4 imply that the pure stationary strategy that corresponds to the transition matrix with minimal second largest eigenvalue overtakes each other stationary strategy, at each initial state.

Proof of Step 2:
Let σ be a stationary strategy with an n × n transition matrix A, with entry (i, j) being the probability under σ of moving from state i to state j. Since the target state s * = n is absorbing and since the sum of entries in each row is equal to 1, the largest eigenvalue of A is λ 1 (A) = 1 with eigenvector (0, 0, . . . , 0, 1).
Consider the submatrix A of A that arises when we delete the last column and the last row (which correspond to the target state). Since the MDP is generic, the matrix A is positive, hence by the Perron-Frobenius Theorem, the largest eigenvalue λ 1 (A ) of the matrix A is a real number. As the sum of entries in each row of A is strictly less than 1, we have λ 1 (A ) < 1.
The proof that λ 1 (A ) is the second largest eigenvalue of the matrix A follows from the following two observations: (i) Any eigenvalue of A is also an eigenvalue of A. Indeed, let μ be an eigenvalue of A with right eigenvector (y 1 , . . . , y n−1 ). 5 Then μ is an eigenvalue of A with right eigenvector (y 1 , . . . , y n−1 , 0). (ii) If μ = 1 is an eigenvalue of A, then μ is also an eigenvalue of A . Indeed, let y = (y 1 , . . . , y n ) be a right eigenvector of A corresponding to μ. Then, Ay = μy.
This implies y n = μ · y n , which is only possible if y n = 0. Hence, μ is an eigenvalue of A with eigenvector (y 1 , . . . , y n−1 ).

Proof of Step 3:
The statement of Step 3 follows from the following theorem. Step 3 inductively, we obtain that Moreover, if A / ∈ B 0 , then at least one of the inequalities in Eq. (2) is strict. Now assume that τ = σ . If A / ∈ B 0 then λ 2 (A) > min B∈B 0 λ 2 (B) = λ 2 (A 1 ), whereas if A ∈ B 0 then λ 2 (A) > λ 2 (A 1 ) by the choice of A 1 . Thus, by Step 1, σ overtakes τ at each initial state.

Remark 5.1
Let σ be a strategy as in Theorem 5.1, σ = σ be a stationary strategy and s be the initial state. One can compute a horizon T such that σ outperforms σ beyond T , i.e., P sσ (t * ≤ t) > P sσ (t * ≤ t) for all t ≥ T , by using inequalities (A1) and (A2) in [21].

Sufficient Conditions for Strong Overtaking Optimality
In a discounted MDP, if for every s ∈ S the strategy σ s is an optimal strategy at the initial state s, then the stationary strategy that plays at each state s the mixed action that σ s plays at the initial period is also optimal. The next theorem aims at developing the analogous result for strongly overtaking optimal strategies in MDPs with reachability objective. Theorem 6.1 Consider an MDP with reachability objective. Suppose that, for every initial state s ∈ S, there is a strategy σ s with the following properties: 6 Note that if A and B differ in several rows, then the statement is no longer true: for the 3×3−matrices A = ((98, 98, 1), (98, 1, 1), (1, 1, 1)) and B = ((1, 1, 1), (1, 1, 98), (1, 98, 98) . By (ii), σ z weakly overtakes σ [h] for initial state z. Therefore, the quantity P z,σ z (t * ≤ t) − P z,σ [h] (t * ≤ t) is non-negative for all large t and strictly positive for infinitely many t. Thus, the same holds for P σ s (t * ≤ t) − P σ s (t * ≤ t), and hence σ s is weakly overtaken by σ s . This is a contradiction to (i).
Hence, each history h has the same probability under σ s and under α. As σ s is strongly overtaking optimal at the initial state s, so is the strategy α.

Safety Objectives
The model of MDPs with safety objective is similar to the model of MDPs with reachability objective, except that the decision maker's objective is to reach the state s * with as low a probability as possible.
Overtaking optimality. A strategy σ overtakes a strategy σ at the initial state s if there is T ∈ N such that P sσ (t * ≤ t) < P sσ (t * ≤ t) for all t ≥ T . A strategy σ is overtaking optimal at the initial state s if there is no strategy that overtakes σ at that initial state.

Strong overtaking optimality.
A strategy σ weakly overtakes a strategy σ at the initial state s if there is T ∈ N such that for all t ≥ T we have P sσ (t * ≤ t) ≤ P sσ (t * ≤ t) with strict inequality for infinitely many t. If σ overtakes σ at the initial state s then σ also weakly overtakes σ at that initial state. A strategy σ is strongly overtaking optimal at the initial state s if no strategy weakly overtakes σ at that initial state. A strongly overtaking optimal strategy at the initial state s is also overtaking optimal at that state.
Results. Theorem 4.1 remains valid for safety objectives. The proof requires the following changes. (1) We can still assume that the MDP M has no state s = s * and action a ∈ A(s) with p(s * | s, a) = 1. Indeed, such an action can be deleted, and if all actions in a state s are deleted, then we can delete the state s and replace each transition to s by a transition to s * . (2) Because now the decision maker prefers low probabilities to state s * , the payoffs in the auxiliary MDP M are defined to be the opposite: u (s, a) = log ( p(w(s, a) | s, a)), .
Theorems 5.1 and 6.1 remain valid for safety objectives, with analogous proofs. Similarly to Example 4.1, the following MDP with safety objective has no overtaking optimal strategy: Take the MDP in Example 4.1 and replace b : 3 4 with b : 0 and d : 0 with d : 3 4 . In this MDP, b is still preferred over d.

Conclusions
It remains an open problem if generic MDPs with reachability objective admit a pure stationary strategy that is strongly overtaking optimal (cf. Theorem 5.1). The difficulty is that when we allow non-stationary strategies, the transition probabilities generally cannot be described by a single transition matrix. When using a stationary strategy, sometimes it is important to study the probability distribution of the current state, at any period t, on condition that the state s * has not been reached yet. This conditional distribution converges under some conditions to a limit, called a quasi-stationary distribution. This convergence and its speed are subject of study in the literature; see, e.g., [22]. of loops is finite and therefore the following quantity is negative: δ = max{φ( ) : is a loop and φ( ) < 0}; the definition of δ is irrelevant if the set over which the maximum is taken is empty.
Let σ be a Blackwell optimal strategy for the initial state s, and σ be a pure strategy. Let s 1 = s, a 1 , s 2 , a 2 , . . . and s 1 = s, a 1 , s 2 , a 2 , . . . be the sequences of states and actions induced by σ and respectively by σ . Denote u t = u(s t , a t ) and u t = u(s t , a t ).
The following two claims are proven in [6], page 220.
Suppose by way of contradiction that there is M ∈ N such that u T (s, σ ) ≥ u T (s, σ ) for all T ≥ M and the inequality is strict for an infinite sequence T 1 < T 2 < . . ., where M < T 1 . Let q 1 = 0 and q t = u 1 + · · · + u t−1 for each t ≥ 1. Likewise, let q 1 = 0 and q t = u 1 + · · · + u t−1 for each t ≥ 1. Due to our assumption about σ , we have q t − q t > 0 for each t = T 1 , T 2 , . . .. We next argue that there exists μ > 0 such that q t −q t ≥ μ for each t = T 1 , T 2 , . . .. Indeed, suppose that no such μ > 0 exists. Then, by taking a subsequence if necessary, we can assume that the sequence {q T n − q T n } n∈N is strictly decreasing: q T n − q T n > q T n+1 − q T n+1 for every n ∈ N. As is shown in [6], page 220, by claims 1 and 2 above, this leads to q T n − q T n < 0 for all sufficiently large n, which is a contradiction.