Recursive Concurrent Stochastic Games

We study Recursive Concurrent Stochastic Games (RCSGs), extending our recent analysis of recursive simple stochastic games to a concurrent setting where the two players choose moves simultaneously and independently at each state. For multi-exit games, our earlier work already showed undecidability for basic questions like termination, thus we focus on the important case of single-exit RCSGs (1-RCSGs). We first characterize the value of a 1-RCSG termination game as the least fixed point solution of a system of nonlinear minimax functional equations, and use it to show PSPACE decidability for the quantitative termination problem. We then give a strategy improvement technique, which we use to show that player 1 (maximizer) has \epsilon-optimal randomized Stackless&Memoryless (r-SM) strategies for all \epsilon>0, while player 2 (minimizer) has optimal r-SM strategies. Thus, such games are r-SM-determined. These results mirror and generalize in a strong sense the randomized memoryless determinacy results for finite stochastic games, and extend the classic Hoffman-Karp strategy improvement approach from the finite to an infinite state setting. The proofs in our infinite-state setting are very different however, relying on subtle analytic properties of certain power series that arise from studying 1-RCSGs. We show that our upper bounds, even for qualitative (probability 1) termination, can not be improved, even to NP, without a major breakthrough, by giving two reductions: first a P-time reduction from the long-standing square-root sum problem to the quantitative termination decision problem for finite concurrent stochastic games, and then a P-time reduction from the latter problem to the qualitative termination problem for 1-RCSGs.


Introduction
In recent work we have studied Recursive Markov Decision Processes (RMDPs) and turnbased Recursive Simple Stochastic Games (RSSGs) ( [16,17]), providing a number of strong upper and lower bounds for their analysis.These define infinite-state (perfect information) stochastic games that extend Recursive Markov Chains (RMCs) ( [14,15]) with nonprobabilistic actions controlled by players.Here we extend our study to Recursive Concurrent Stochastic Games (RCSGs), where the two players choose moves simultaneously and point solution of a system of nonlinear minimax functional equations.We use this to show PSPACE decidability for the qualitative termination problem (is the value of the game = 1?) and the quantitative termination problem (is the value of the game ≥ r (or ≤ r, etc.), for given rational r), as well as PSPACE algorithms for approximating the termination probabilities of 1-RCSGs to within a given number of bits of precision, via results for the existential theory of reals.(The simpler "qualitative problem" of deciding whether the game value is = 0 only depends on the transition structure of the 1-RCSG and not on the specific probabilities.For this problem we give a polynomial time algorithm.) We then proceed to our technically most involved result, a strategy improvement technique for 1-RCSG termination games.We use this to show that in these games player 1 (maximizer) has ǫ-optimal randomized-Stackless & Memoryless (r-SM for short) strategies, whereas player 2 (minimizer) has optimal r-SM strategies.Thus, such games are r-SMdetermined.These results mirror and generalize in a very strong sense the randomized memoryless determinacy results known for finite stochastic games.Our technique extends Hoffman-Karp's strategy improvement method for finite CSGs to an infinite state setting.However, the proofs in our infinite-state setting are very different.We rely on subtle analytic properties of certain power series that arise from studying 1-RCSGs.
Note that our PSPACE upper bounds for the quantitative termination problem for 1-RCSGs can not be improved to NP without a major breakthrough, since already for 1-RMCs we showed in [14] that the quantitative termination problem is at least as hard as the square-root sum problem (see [14]).In fact, here we show that even the qualitative termination problem for 1-RCSGs, where the problem is to decide whether the value of the game is exactly 1, is already as hard as the square-root sum problem, and moreover, so is the quantitative termination decision problem for finite CSGs.We do this via two reductions: we give a P-time reduction from the square-root sum problem to the quantitative termination decision problem for finite CSGs, and a P-time reduction from the quantitative finite CSG termination problem to the qualitative 1-RCSG termination problem.
It is known ( [6]) that for finite concurrent games, probabilistic nodes do not add any power to these games, because the stochastic nature of the games can in fact be simulated by concurrency alone.The same is true for 1-RCSGs.Specifically, given a finite CSG (or 1-RCSG), G, there is a P-time reduction to a finite concurrent game (or 1-RCG, respectively) F (G), without any probabilistic vertices, such that the value of the game G is exactly the same as the value of the game F (G).We will provide a proof of this in Section 2 for completeness.
Related work.Stochastic games go back to Shapley [28], who considered finite concurrent stochastic games with (discounted) rewards.See, e.g., [19] for a recent book on stochastic games.Turn-based "simple" finite stochastic games were studied by Condon [10].As mentioned, we studied RMDPs and (turn-based) RSSGs and their quantitative and qualitative termination problems in [16,17].In [17] we showed that the qualitative termination problem for both maximizing and minimizing 1-RMDPs is in P, and for 1-RSSGs is in NP∩coNP.Our earlier work [14,15] developed theory and algorithms for Recursive Markov Chains (RMCs), and [13,3] have studied probabilistic Pushdown Systems which are essentially equivalent to RMCs.
Finite-state concurrent stochastic games have been studied extensively in recent CS literature (see, e.g., [7,12,11]).In particular, the papers [8] and [7] have studied, for finite CSGs, the approximate reachability problem and approximate parity game problem, respectively.In those papers, it was claimed that these approximation problems are in NP∩coNP.Actually there was a minor problem with the way the results on approximation were phrased in [8,7], as pointed out in the conference version of this paper [18], but this is a relatively unimportant point compared to the flaw we shall now discuss.There is in fact a serious flaw in a key proof of [8].The flaw relates to the use of a result from [19] which shows that for discounted stochastic games the value function is Lipschitz continuous with respect to the coefficients that define the game as well as the discount β.Importantly, the Lipschitz constant in this result from [19] depends on the discount β (it is inversely proportional to 1 − β).This fact was unfortunately overlooked in [8] and, at a crucial point in their proofs, the Lipschitz constant was assumed to be a fixed constant that does not depend on β.This flaw unfortunately affects several results in [8].It also affects the results of [7], since the later paper uses the reachability results of [8].As a consequence of this error, the best upper bound which currently follows from the results in [8,12,7] is a PSPACE upper bound for the decision and approximation problems for the value of finite-state concurrent stochastic reachability games as well as for finite-state concurrent stochastic parity games.(See the erratum note for [8] on K. Chatterjee's web page [9], as well as his Ph.D. thesis.)It is entirely plausible that these results can be repaired and that approximating the value of finite-state concurrent reachability games to within a given additive error ǫ > 0 can in the future be shown to be in NP ∩ coNP, but the flaw in the proof given in [8] is fundamental and does not appear to be easy to fix.
On the other hand, for the quantitative decision problem for finite CSGs (as opposed to the approximation problem), and even the qualitative decision problem for 1-RCSGs, the situation is different.We show here that the quantitative decision problem for finite CSGs, as well as the qualitative decision problem for 1-RCSGs, are both as hard as the square-root sum problem, for which containment even in NP is a long standing open problem.Thus our PSPACE upper bounds here, even for the qualitative termination problem for 1-RCSGs, can not be improved to NP without a major breakthrough.Unlike for 1-RCSGs, the qualitative termination problem for finite CSGs is known to be decidable in P-time ( [11]).We note that in recent work Allender et.al. [1] have shown that the square-root sum problem is in (the 4th level of) the "Counting Hierarchy" CH, which is inside PSPACE, but it remains a major open problem to bring this complexity down to NP.
The rest of the paper is organized as follows.In Section 2 we present the RCSG model, define the problems that we will study, and give some basic properties.In Section 3 we give a system of equations that characterizes the desired probabilities, and use them to show that the problems are in PSPACE.In Section 4 we prove the existence of optimal randomized stackless and memoryless strategies, and we present a strategy improvement method.Finally in Section 5 we present reductions from the square root sum problem to the quantitative termination problem for finite CSGs, and from the latter to the qualitative problem for Recursive CSGs.

Basics
We have two players, Player 1 and Player 2. Let Γ 1 and Γ 2 be finite sets constituting the move alphabet of players 1 and 2, respectively.Formally, a Recursive Concurrent Stochastic Game (RCSG) is a tuple A = (A 1 , . . ., A k ), where each component (1) A finite set N i of nodes, with a distinguished subset En i of entry nodes and a (disjoint) subset Ex i of exit nodes.
b 1 : f be the set of all nodes, call ports and return ports; we refer to these as the vertices of component A i .(3) A mapping pl i : Q i → {0, play} that assigns to every vertex u a type describing how the next transition is chosen: if pl i (u) = 0 it is chosen probabilistically and if pl i (u) = play it is determined by moves of the two players.Vertices u ∈ (Ex i ∪ Call i ) have no outgoing transitions; for them we let pl i (u) = 0. (4) A transition relation , where if pl(u) = 0 then x is a real number p u,v ∈ [0, 1] (the transition probability), and if pl(u) = play then x = (γ 1 , γ 2 ) ∈ Γ 1 × Γ 2 .We assume that each vertex u ∈ Q i has associated with it a set Γ u 1 ⊆ Γ 1 and a set Γ u 2 ⊆ Γ 2 , which constitute player 1 and 2's legal moves at vertex u.
Additionally, for each vertex u and each x ∈ Γ u 1 × Γ u 2 , we assume there is exactly one transition of the form (u, x, v) in δ i .Furthermore they must satisfy the consistency property: for every unless u is a call port or exit node, neither of which have outgoing transitions, in which case by default v ′ p u,v ′ = 0. We use the symbols (N, B, Q, δ, etc.) without a subscript, to denote the union over all components.Thus, eg.N = ∪ k i=1 N i is the set of all nodes of A, δ = ∪ k i=1 δ i the set of all transitions, Q = ∪ k i=1 Q i the set of all vertices, etc.The set Q of vertices is partitioned into the sets Q play = pl −1 (play) and Q prob = pl −1 (0) of play and probabilistic vertices respectively.
For computational purposes we assume that the transition probabilities p u,v are rational, given in the input as the ratio of two integers written in binary.The size of a RCSG is the space (in number of bits) needed to specify it fully, i.e., the nodes, boxes, and transitions of all components, including the probabilities of all the transitions.Example 1.An example picture of a (1-exit) RCSG is depicted in Figure 1.This RCSG has one component, f , which has nodes {s, t, u 1 , u 2 , u 3 , u 4 , u 5 }.It has one entry node, s, and one exit node, t.It also has two boxes, {b 1 , b 2 }, both of which map to the only component, f .All nodes in this RCSG are probabilistic (black nodes) except for nodes u 1 and u 4 which are player nodes (white nodes).The move alphabet for both players is {L, R} (for, say, "left" and "right").At node u 1 both players have both moves enabled.At node u 4 , player 1 has only L enabled, and player 2 has both L and R enabled.
An RCSG A defines a global denumerable stochastic game M A = (V, ∆, pl) as follows.The global states V ⊆ B * ×Q of M A are pairs of the form β, u , where β ∈ B * is a (possibly empty) sequence of boxes and u ∈ Q is a vertex of A. More precisely, the states V ⊆ B * × Q and transitions ∆ are defined inductively as follows: (1) ǫ, u ∈ V , for u ∈ Q (ǫ denotes the empty string.)(2) If β, u ∈ V and (u, x, v) ∈ δ, then β, v ∈ V and ( β, u , x, β, v ) ∈ ∆.
We consider M A with various initial states of the form ǫ, u , denoting this by M u A .Some states of M A are terminating states and have no outgoing transitions.These are states ǫ, ex , where ex is an exit node.If we wish to view M A as a non-terminating CSG, we can consider the terminating states as absorbing states of M A , with a self-loop of probability 1.
Our goal is to answer termination questions for RCSGs of the form: "Does player 1 have a strategy to force the game to terminate (i.e., reach node ǫ, ex ), starting at ǫ, u , with probability ≥ p, regardless of how player 2 plays?".
First, some definitions: a strategy σ for player i, i ∈ {1, 2}, is a function σ : V * V play → D(Γ i ), where D(Γ i ) denotes the set of probability distributions on the finite set of moves Γ i .In other words, given a history ws ∈ V * V play , and a strategy σ for, say, player 1, σ(ws)(γ) defines the probability with which player 1 will play move γ.Moreover, we require that the function σ has the property that for any global state s = β, u , with pl(u) = play, σ(ws) ∈ D(Γ u i ).In other words, the distribution has support only over eligible moves at vertex u.
Given initial vertex u, and final exit ex in the same component, and given strategies σ ∈ Ψ 1 and τ ∈ Ψ 2 , for k ≥ 0, let q k,σ,τ (u,ex) be the probability that, in M u,σ,τ A , starting at initial state ǫ, u , we will reach a state w ǫ, ex in at most k "steps" (i.e., where |w| ≤ k).Let q * ,σ,τ (u,ex) = lim k→∞ q k,σ,τ (u,ex) be the probability of ever terminating at ex, i.e., reaching ǫ, ex .(Note, the limit exists: it is a monotonically non-decreasing sequence bounded by 1).Let , and let q * ,σ (u,ex) = inf τ ∈Ψ 2 q * ,σ,τ (u,ex) .Lastly, given a strategy τ ∈ Ψ 2 , let q k,•,τ (u,ex) = sup σ∈Ψ 1 q k,σ,τ (u,ex) , and let q * ,•,τ (u,ex) = sup σ∈Ψ 1 q * ,σ,τ (u,ex) .From, general determinacy results (e.g., "Blackwell determinacy" [26] which applies to all Borel two-player zero-sum stochastic games with countable state spaces; see also [25]) it follows that the games M A are determined, meaning: . We call a strategy σ for either player a (randomized) Stackless and Memoryless (r-SM) strategy if it neither depends on the history of the game, nor on the current call stack.In other words, a r-SM strategy σ for player i is given by a function σ : Q play → D(Γ i ), which maps each play vertex u of the RCSG to a probability distribution σ(u) ∈ D(Γ u i ) on the moves available to player i at vertex u.
We are interested in the following computational problems.(1) The qualitative termination problem: Is q * (u,ex) = 1? (2) The quantitative termination (decision) problem: given r ∈ [0, 1], is q * (u,ex) ≥ r?Is q * (u,ex) ≤ r?The approximate version: approximate q * (u,ex) to within desired precision.Obviously, the qualitative termination problem is a special case of the quantitative problem, setting r = 1.As mentioned, for multi-exit RCSGs these are all undecidable.Thus we focus on single-exit RCSGs (1-RCSGs), where every component has one exit.Since for 1-RCSGs it is always clear which exit we wish to terminate at starting at vertex u (there is only one exit in u's component), we abbreviate q * (u,ex) , q * ,σ (u,ex) , etc., as q * u , q * ,σ u , etc., and we likewise abbreviate other subscripts.
A different "qualitative" problem is to ask whether q * u = 0? As we will show in Proposition 3.5, this is an easy problem: deciding whether q * u = 0 for a vertex u in a 1-RCSG can be done in polynomial time, and only depends on the transition structure of the 1-RCSG, not on the specific probabilities.
As mentioned in the introduction, it is known that for concurrent stochastic games, probabilistic nodes do not add any power, and can in effect be "simulated" by concurrent nodes alone (this fact was communicated to us by K. Chatterjee [6]).The same fact is true for 1-RCSGs.Specifically, the following holds: Proposition 2.1.There is a P-time reduction F , which, given a finite CSG (or a 1-RCSG), G, computes a finite concurrent game (or 1-RCG, respectively) F (G), without any probabilistic vertices, such that the value of the game G is exactly the same as the value of the game F (G).
Proof.First, suppose for now that in G all probabilistic transitions have probability 1/2.In other words, suppose that for a probabilistic vertex s ∈ pl −1 (0) (which is not an exit or a call port) in an 1-RCSG, we have two transitions (s, 1/2, t) ∈ δ and (s, 1/2, t ′ ) ∈ δ.In the new game F (G), change s to a play vertex, i.e., let pl(s) = play, and let Γ s 1 = Γ s 2 = {a, b}, and replace the probabilistic transitions out of s with the following 4 transitions: (s, (a, b), t), (s, (b, a), t), (s, (a, a), t ′ ) and (s, (b, b), t ′ ).Do this for all probabilistic vertices in G, thus obtaining F (G) which contains no probabilistic vertices.Now, consider any strategy σ for player 1 in the original game G, and a strategy σ ′ in the new game F (G) that is consistent with σ, i.e. for each history ending at an original play vertex σ ′ has the same distribution as σ (and for the other histories ending at probabilistic vertices it has an arbitrary distribution).For any strategy τ for player 2 in the game G, consider the strategy, F (τ ), for player 2 in F (G), which is defined as follows: whenever the play reaches a probabilistic vertex s of G (in any context and with any history) F (τ ) plays a and b with 1/2 probability each.At all non-probabilistic vertices of G, F (τ ) plays exactly as τ (and it may use the history, etc.).This way, no matter what player 1 does, whenever play reaches the vertex s (in any context) the play will move from s to t and to t ′ with probability 1/2 each.Thus for any vertex u, the value q ⋆,σ,τ u in the game G is the same as the value q * ,σ ′ ,F (τ ) u in the game F (G).So the optimal payoff value for player 1 in the game starting at any vertex u is not greater in F (G) than in G.A completely symmetric argument shows that for player 2 the optimal payoff value starting at u is not greater in F (G) than in G. Thus, the value of the game starting at u is the same in both games.
We can now generalize this to arbitrary rational probabilities on transitions, instead of just probability 1/2, by using a basic trick to encode arbitrary finite probability distributions using a polynomial-sized finite Markov chain all of whose transitions have probability 1/2.Namely, suppose u goes to v 1 with probability p/q and to v 2 with probability 1 − p/q, where p,q are integers with k bits (we can write both as k-bit numbers, by adding leading 0's to p if necessary so that it has length exactly k, same as q).Flip (at most) k coins.View this as generating a k bit binary number.If the number that comes out is < p (i.e.0, . . ., p − 1), then go to v 1 , if between p and q (i.e., p, . . ., q − 1) then go to v 2 , if ≥ q go back to the start, u.A naive way to do this would require exponentially many states in k.But we only need at most 2k states to encode this if we don't necessarily flip all k coins but rather do the transition to v 1 , v 2 or u, as soon as the outcome is clear from the coin flips.That is, if the sequence α formed by the initial sequence of coin flips so far differs from both the prefixes p ′ , q ′ of p and q of the same length, then we do the transition: if α < p ′ transition to v 1 , if p ′ < α < q ′ transition to v 2 , and if α > q ′ then transition to u.Thus, we only need to remember the number j of coins flipped so far, and if j is greater than the length of the common prefix of p and q then we need to remember also whether the coin flips so far agree with p or with q.
Clearly, a simple generalization of this argument works for generating arbitrary finite rational probability distributions p 1 /q, p 2 /q, . . ., p r /q, such that r i=1 (p i /q) = 1.If q is a k-bit integer, then the number of new states needed is at most rk, i.e. linear in the encoding length of the rationals p 1 /q, . . ., p r /q.

Nonlinear minimax equations for 1-RCSGs
In ( [16]) we defined a monotone system S A of nonlinear min-& -max equations for 1-RSSGs (i.e. the case of simple games), and showed that its least fixed point solution yields the desired probabilities q * u .Here we generalize these to nonlinear minimax systems for concurrent games, 1-RCSGs.Let us use a variable x u for each unknown q * u , and let x be the vector of all x u , u ∈ Q.The system S A has one equation of the form x u = P u (x) for each vertex u.Suppose that u is in component A i with (unique) exit ex.There are 4 cases based on the "Type" of u.
(1) u ∈ T ype 1 : u = ex.In this case: (If u has no outgoing transitions, this equation is by definition , where the right-hand side is defined as follows.Given a value vector x, and a play vertex u, consider the zerosum matrix game given by matrix A u (x), whose rows are indexed by player 1's moves Γ u 1 from node u, and whose columns are indexed by player 2's moves Γ u 2 .The payoff to player 1 under the pair of deterministic moves γ 1 ∈ Γ u 1 , and ) be the value of this zerosum matrix game.By von Neumann's minimax theorem, the value and optimal mixed strategies exist, and they can be obtained by solving a Linear Program with coefficients given by the x i 's.In vector notation, we denote the system S A by x = P (x).Given 1-exit RCSG A, we can easily construct this system.Note that the operator P : R n ≥0 → R n ≥0 is monotone: for x, y ∈ R n ≥0 , if x ≤ y then P (x) ≤ P (y).This follows because for two game matrices A and B of the same dimensions, if A ≤ B (i.e., A i,j ≤ B i,j for all i and j), then Val(A) ≤ Val(B).Note that by definition of A u (x), for x ≤ y, A u (x) ≤ A u (y).
Example 3.1.We now construct the system of nonlinear minimax functional equations, x = P (x), associated with the 1-RCSG we encountered in Figure 1 (see Example 1).We shall need one variable for every vertex of that 1-RCSG, to represent the value of the termination game starting at that vertex, and we will need one equation for each such variable.Thus, the variables we need are x s , x t , x u 1 , . . ., The equations are as follows: We now identify a particular solution to x = P (x), called the Least Fixed Point (LFP) solution, which gives precisely the termination game values.Define P 1 (x) = P (x), and define P k (x) = P (P k−1 (x)), for k > 1.Let q * ∈ R n denote the n-vector q * u , u ∈ Q (using the same indexing as used for x).For k ≥ 0, let q k denote, similarly, the n-vector q k u , u ∈ Q. Theorem 3.2.Let x = P (x) be the system S A associated with 1-RCSG A. Then q * = P (q * ), and for all q ′ ∈ R n ≥0 , if q ′ = P (q ′ ), then q * ≤ q ′ (i.e., q * is the Least Fixed Point, of P : R n ≥0 → R n ≥0 ).Moreover, lim k→∞ P k (0) ↑ q * , i.e., the "value iteration" sequence P k (0) converges monotonically to the LFP, q * .Proof.We first prove that q * = P (q * ).Suppose q * = P (q * ).The equations for vertices u of types T ype 1 , T ype rand , and T ype call can be used to define precisely the values q * u in terms of other values q * v .Thus, the only possibility is that q * u = P u (q * ) for some vertex u of T ype play .In other words, q * u = Val(A u (q * )).Suppose q * u < Val(A u (q * )).To see that this can't happen, we construct a strategy σ for player 1 that achieves better.At node u, let player 1's strategy σ play in one step its optimal randomized minimax strategy in the game A u (q * ) (which exists according to the minimax theorem).Choose ǫ > 0 such that ǫ < Val(A u (q * )) − q * u .After the first step, at any vertex v player 1's strategy σ will play in such a way that achieves a value ≥ q * v − ǫ (i.e, an ǫ-optimal strategy in the rest of the game, which must exist because the game is determined).Let ε be an n-vector every entry of which is ǫ.Now, the matrix game A u (q * − ε) is just an additive translation of the matrix game A u (q * ), and thus it has precisely the same ǫ-optimal strategies as the matrix game A u (q * ), and moreover Val(A u (q * − ε)) = Val(A u (q * )) − ǫ.Thus, by playing strategy σ, player 1 guarantees a value which is u , which is a contradiction.Thus q * u ≥ Val(A u (q * )).A completely analogous argument works for player 2, and shows that q * u ≤ Val(A u (q * )).Thus q * u = Val(A u (q * )), and hence q * = P (q * ).Next, we prove that if q ′ is any vector such that q ′ = P (q ′ ), then q * ≤ q ′ .Let τ ′ be the randomized stackless and memoryless strategy for player 2 that always picks, at any state β, u , for play vertex u ∈ Q play , a mixed 1-step strategy which is an optimal strategy in the matrix game A u (q ′ ).(Again, the existence of such a strategy is guaranteed by the minimax theorem.)Lemma 3.3.For all strategies σ ∈ Ψ 1 of player 1, and for all k ≥ 0, q k,σ,τ ′ ≤ q ′ .Proof.By induction.The base case q 0,σ,τ ′ ≤ q ′ is trivial.
Example 2. For the system of equations x = P (x) given in Example 3.1, associated with the 1-RCSG given in Example 1, fairly easy calculations using the equations show that the Least Fixed Point of the system (and thus the game values, starting at the different vertices) is as follows: u 3 = 0.75; and q * (b 1 ,s) = 0.25.In this case the values turn out to be rational and are simple to compute, but in general the values may be irrational and difficult to compute, and even if they are rational they may require exponentially many bits to represent (in standard notation, e.g., via reduced numerator and denominator given in binary) in terms of the size of the input 1-RCSG or equation system.
Furthermore, in this game there are pure optimal (stackless and memoryless) strategies for both players.Specifically, the strategy for player 1 (maximizer) that always plays L from nodes u 1 is optimal, and the strategy for player 2 that always player L from nodes u 1 and u 4 is optimal.In general for 1-RCSGs, we show randomized stackless and memoryless ǫ-optimal and optimal strategies do exist for players 1 and 2, respectively.However, for player 1 only ǫ-optimal strategies may exist, and although optimal strategies do exist for player 2 they may require randomization using irrational probabilities.This is the case even for finite-state concurrent games.
We can use the system of equations to establish the following upper bound for computing the value of a 1-RCSG termination game: Theorem 3.4.The qualitative and quantitative termination problems for 1-exit RCSGs can be solved in PSPACE.That is, given a 1-exit RCSG A, vertex u and a rational probability p, there is a PSPACE algorithm to decide whether q * u ≤ p (or q * ≥ p, or q * < p, etc.).The running time is O(|A| O(n) ) where n is the number of variables in x = P (x).We can also approximate the vector q * of values to within a specified number of bits i of precision (i given in unary), in PSPACE and in time O(i|A| O(n) ).
Proof.Using the system x = P (x), we can express the condition q * u ≤ c by a sentence in the existential theory of the reals as follows: Note that the sentence is true, i.e. there exists a vector x that satisfies the constraints of the above sentence if and only if the least fixed point q * satisfies them.The constraints x i = P i (x 1 , . . ., x n ) for vertices i of type 1, 2, and 3 (exit, probabilistic vertex and call port) are clearly polynomial equations, as they should be in a sentence of the existential theory of the reals.We only need to show how to express equations of the form x v = Val(A v (x)) in the existential theory of reals.We can then appeal to well known results for deciding that theory ( [5,27]).But this is a standard fact in game theory (see, e.g., [2,19,12] where it is used for finite CSGs).The minimax theorem and its LP encoding allow the predicate "y = Val(A v (x))" to be expressed as an existential formula ϕ(y, x) in the theory of reals with free variables y and x 1 , . . ., x n , such that for every x ∈ R n , there exists a unique y (the game value) satisfying ϕ(y, x).Specifically, the formula includes, besides the free variables x, y, existentially quantified variables z γ 1 , γ 1 ∈ Γ v 1 , and w γ 2 , γ 2 ∈ Γ v 2 for the probabilities of the moves of the two players, and the conjunction of the following constraints (recall that each entry A u (γ 1 , γ 2 ) of the matrix A u is a variable x v where v is the vertex such that (u, (γ To approximate the vector of game values within given precision we can do binary search using queries of the form q * u ≤ c for all vertices u.Determining the vertices u for which the value q * u is 0, is easier and can be done in polynomial time, as in the case of the turn-based 1-RSSGs [17].Proposition 3.5.Given a 1-RCSG we can compute in polynomial time the set Z of vertices u such that q * u = 0.This set Z depends only on the structure of the given 1-RCSG and not on the actual values of the transition probabilities. Proof.From the system of fixed point equations we have the following: (1) all exit nodes are not in Z; (2) a probabilistic node u is in Z if and only if all its (immediate) successors v are in Z; Only the last case of a play node u needs an explanation.If Player 2 has such a move γ 2 , then clearly the corresponding column of the game matrix A u (q * ) has all the entries 0, and the value of the game (i.e., q * u ) is 0. Conversely, if every column of A u (q * ) has a nonzero entry, then the value of the game with this matrix is positive because for example Player 1 can give equal probability to all his moves.Thus, in effect, as far as computing the vertices with zero value is concerned, we can fix the strategy of Player 1 at each play vertex to play at all times all legal moves with equal probability to get a 1-RMDP; a vertex has nonzero value in the given 1-RCSG iff it has nonzero value in the 1-RMDP.
The algorithm to compute the set Z of vertices with 0 value is similar to the case of 1-RSSGs [17].Initialize Z to Q \ Ex, the set of non-exit vertices.Repeat the following until there is no change: • If there is a probabilistic node u ∈ Z that has a successor not in Z, then remove u from Z. • If there is a call port u = (b, en) ∈ Z such that both the entry node en of the corresponding component Y (b) and the return port (b, ex) of the box are not in Z, then remove u from Z. • If there is a play node u ∈ Z such that for every move γ 2 ∈ Γ u 2 of Player 2 there is a move γ 1 ∈ Γ u 1 of Player 1 such that the next node v from u under (γ 1 , γ 2 ) is not in Z, then remove u from Z.There are at most n iterations and at the end Z is the set of vertices u such that q * u = 0.

Strategy improvement and randomized-SM-determinacy
The proof of Theorem 1 implies the following: Corollary 4.1.In every 1-RCSG termination game, player 2 (the minimizer) has an optimal r-SM strategy.
Proof.Consider the strategy τ ′ in the proof of Theorem 3.2, chosen not for just any fixed point q ′ , but for q * itself.That strategy is r-SM and is optimal.
Player 1 does not have optimal r-SM strategies, not even in finite concurrent stochastic games (see, e.g., [19,12]).We next establish that it does have finite r-SM ǫ-optimal strategies, meaning that it has, for every ǫ > 0, a r-SM strategy that guarantees a value of at least q * u − ǫ, starting from every vertex u in the termination game.We say that a game is r-SM-determined if, letting Ψ ′ 1 and Ψ ′ 2 denote the set of r-SM strategies for players 1 and 2, respectively, we have sup Theorem 4.2.
(1) (Strategy Improvement) Starting at any r-SM strategy σ 0 for player 1, via local strategy improvement steps at individual vertices, we can derive a series of r-SM strategies σ 0 , σ 1 , σ 2 , . .., such that for all ǫ > 0, there exists i ≥ 0 such that for all j ≥ i, σ j is an ǫ-optimal strategy for player 1 starting at any vertex, i.e., q * ,σ j u ≥ q * u − ǫ for all vertices u.Each strategy improvement step involves solving the quantitative termination problem for a corresponding 1-RMDP.Thus, for classes where this problem is known to be in P-time (such as linearly-recursive 1-RMDPs, [16]), strategy improvement steps can be carried out in polynomial time.
Proof.Note that (2.) follows immediately from (1.), and (3.) follows because by Corollary 4.1, player 2 has an optimal r-SM strategy and thus Let σ be any r-SM strategy for player 1.Consider q * ,σ .First, let us note that if q * ,σ = P (q * ,σ ) then q * ,σ = q * .This is so because, by Theorem 3.2, q * ≤ q * ,σ , and on the other hand, σ is just one strategy for player 1, and for every vertex u, q u .Next we claim that, for all vertices u ∈ T ype play , q * ,σ u satisfies its equation in x = P (x).In other words, q * ,σ u = P u (q * ,σ ).To see this, note that for vertices u ∈ T ype play , no choice of either player is involved, thus the equation holds by definition of q * ,σ .Thus, the only equations that may fail are those for u ∈ T ype play , of the form x u = Val(A u (x)).We need the following.Lemma 4.3.For any r-SM strategy σ for player 1, and for any u ∈ T ype play , q * ,σ u ≤ Val(A u (q * ,σ )).
Proof.We are claiming that q * ,σ u = inf τ ∈Ψ 2 q * ,σ,τ u ≤ Val(A u (q * ,σ )).The inequality follows because a strategy for player 2 can in the first step starting at vertex u play its optimal strategy in the matrix game A u (q * ,σ ), and thereafter, depending on which vertex v is the immediate successor of u in the play, the strategy can play "optimally" to force at most the value q * ,σ v .
that every vertex that can be improved at any step i will be improved eventually, for all i ≥ 0 there exists k ≥ 0 such that q * ,σ i ≤ P (q * ,σ i ) ≤ q * ,σ i+k .In fact, there is a uniform bound on k, namely k ≤ |Q|, the number of vertices.This "sandwiching" property allows us to conclude that, in the limit, this sequence reaches a fixed point of x = P (x).Note that since q * ,σ i ≤ q * ,σ i+1 for all i, and since q * ,σ i ≤ q * , we know that the limit lim i→∞ q * ,σ i exists.Letting this limit be q ′ , we have q ′ ≤ q * .Finally, we have q ′ = P (q ′ ), because letting i go to infinity in all three parts of the "sandwiching" inequalities above, we get q ′ ≤ lim i→∞ P (q * ,σ i ) ≤ q ′ .But note that lim i→∞ P (q * ,σ i ) = P (q ′ ), because the mapping P (x) is continuous on R n ≥0 .Thus q ′ is a fixed point of x = P (x), and q ′ ≤ q * .But since q * is the least fixed point of x = P (x), we have q ′ = q * .We have so far not addressed the complexity of computing or approximating the (ǫ-) optimal strategies for the two players in 1-RCSG termination games.Of course, in general, player 1 (maximizer) need not have any optimal strategies, so it only makes sense to speak about computing ǫ-optimal strategies for it.Moreover, the optimal strategies for player 2 may require randomization that is given by irrational probability distributions over moves, and thus we can not compute them exactly, so again we must be content to approximate them or answer decision questions about them.It is not hard to see however, by examining the proofs of our theorems, that such decision questions can be answered using queries to the existential theory of reals, and are thus also in PSPACE.
Theorem 5.1.There is a P-time reduction from the square-root sum problem to the quantitative termination (decision) problem for finite CSGs.
Proof.Given positive integers (a 1 , . . ., a n ) ∈ N n , and k ∈ N, we would like to check whether n i=1 √ a i ≥ k.We can clearly assume that a i > 1 for all i.We will reduce this problem to the problem of deciding whether for a given finite CSG, starting at a given node, the value of the termination game is greater than a given rational value.
Given a positive integer a > 1, we will construct a finite CSG, call it gadget G(a), with the property that for a certain node u in G(a) the value of the termination game starting at u is d + e √ a, where d and e are rationals that depend on a, with e > 0, and such that we can compute d and e efficiently, in polynomial time, given a.
If we can construct such gadgets, then we can do the reduction as follows.Given (a 1 , . . ., a n ) ∈ N n , with a i > 1 for all i, and given k ∈ N, make copies of the gadgets G(a 1 ), . . ., G(a n ).In each gadget G(a i ) we have a node u i whose termination value is d i + e i √ a i , where d i and e i > 0 are rationals that depend on a i and can be computed efficiently from a i .Create a new node s and add transitions from s to the nodes u i , i = 1 . . ., n, with probabilities p i = E/e i , respectively, where E = 1/( n i=1 1 e i ).It is easy to check that the value of termination starting at s is D + E n i=1 √ a i , where D = n i=1 p i d i .Note that D and E are rational values that we can compute efficiently given the a i 's, so to solve the square root sum problem, i.e., decide whether n i=1 √ a i ≥ k, we can ask whether the value of the termination game starting at node s is ≥ D + Ek.Now we show how to construct the gadget G(a) given a positive integer a. G(a) has a play node u, the target node t, dead node z, and probabilistic nodes v 1 , v 2 .Nodes z and t are absorbing.At u each player has two moves {1, 2}.If they play 1, 1 then u goes to v 1 , if they play 2, 2 then u goes to v 2 , if they play 1, 2 or 2, 1 then u goes to z.
Note that we can write a as a = m 2 − l where m is a small-size rational (m is approximately √ a) and l < 1 is also a small-size rational, and such that we can compute both m and l efficiently given a.To see this note that, first, given a we can easily approximate √ a from above to within an additive error at most 1/(2a) in polynomial time, using standard methods for approximating square roots.In other words, given integer a > 1, we can efficiently compute a rational number m such that 0 ≤ m − √ a ≤ 1/(2a).We then have Having computed m and l, let c 2 = l/4, g = m − 1 − c 2 , and c 1 = gc 3 , where 0 < c 3 < 1 is a small-sized rational value such that c 3 < 1/2g.From node v 1 we move with probability c 1 to t, with probability c 2 to u, and with the remaining probability to z.From node v 2 we go with probability c 3 to t and 1 − c 3 to z.It is not hard to check that these are legitimate probabilities.
Let x be the value at u.We have x = Val(A), where the 2 × 2 matrix A for the one-shot zero-sum matrix game at u has A 1,1 = c 1 + c 2 x, A 2,2 = c 3 , and A 1,2 = A 2,1 = 0. Note that A 1,1 > 0 and A 2,2 > 0. If the optimal strategy of player 1 at u is to play 1 with probability p and 2 with probability 1 − p, then by basic facts about zero-sum matrix games we must have 0 < p < 1 and x = p(c 1 + c 2 x) = (1 − p)c 3 .So p = c 3 /(c 1 + c 2 x + c 3 ), and substituting this expression for p in the equality x = p(c 1 + c 2 x), we have: 2 Note that we must choose the root with + sign to get a positive value.
The discriminant can be written as (c 3 ) 2 [(g + 1 − c 2 ) 2 + 4gc 2 ].The term (c 3 ) 2 will come out from under the square root, as c 3 , so we care only about the expression in the brackets, which is Proof.Consider the 1-RMC depicted in Figure 2. We assume p 1 + p 2 = 1.As shown in ( [14], Theorem 3), in this 1-RMC the probability of termination starting at ǫ, en is = 1 if and only if p 2 ≥ 1/2.
Now, given a finite CSG, G, and a vertex u of G, do the following: first "clean up" G by removing all nodes where the min player (player 2) has a strategy to achieve probability 0. We can do this in polynomial time as follows.Note that the only way player 2 can force a probability 0 of termination is if it has a strategy τ such that, for all strategies σ of player 1, there is no path in the resulting Markov chain from the start vertex u to the terminal node.But this can only happen if, ignoring probabilities, player 2 can play in such a way as to avoid the terminal vertex.This can be checked easily in polynomial time.
The revised CSG will have two designated terminal nodes, the old terminal node, labeled "1", and another terminal node labeled "0".From every node v of T ype rand in the revised CSG which does not carry full probability on its outedges, we direct all the "residual" probability to "0", i.e., we add an edge from v to "0" with probability p v,"0" = 1− w p v,w , where the sum is over all remaining nodes w is the CSG.
Let ǫ > 0 be a value that is strictly less than the least probability, over all vertices, under any strategy for player 2, of reaching the terminal node.Obviously such an ǫ > 0 exists in the revised CSG, because by Corollary 4.1 (specialized to the case of finite CSGs) player 2 has an optimal randomized S&M strategy.Fixing that strategy τ , player 1 can force termination from vertex u with positive probability q * ,•,τ u .We take ǫ = (min u q * ,•,τ u )/2.(We do not need to compute ǫ; we only need its existence for the correctness proof of the reduction.) In the resulting finite CSG, we know that if player 1 plays ǫ-optimally (which it can do with randomized S&M strategies), and player 2 plays arbitrarily, there is no bottom SCC in the resulting finite Markov chain other than the two designated terminating nodes "0" and "1".In other words, all the probability exits the system, as long as the maximizing player plays ǫ-optimally.Now, take the remaining finite CSG, call it G ′ .Just put a copy of G ′ at the entry of the component A 1 of the 1-RMC in Figure 2, identifying the entry en with the initial node, u, of G ′ .Take every transition that is directed into the terminal node "1" of G, and instead direct it to the exit ex of the component A 1 .Next, take every edge that is directed into the terminal "0" node and direct it to the first call port, (b 1 , en) of the left box b 1 .Both boxes map to the unique component A 1 .Call this 1-RCSG A.
We now claim that the value q * u ≥ 1/2 in the finite CSG G ′ for terminating at the terminal "1" iff the value q * u = 1 for terminating in the resulting 1-RCSG, A. The reason is clear: after cleaning up the CSG, we know that under an ǫ-optimal strategy for the maximizer for reaching "1", all the probability exits G ′ either at "1" or at "0".We also know that the supremum value that the maximizing player can attain will have value 1 iff the supremum probability it can attain for going directly to the exit of the component in A is ≥ 1/2, but this is precisely the supremum probability that maximizer can attain for going to "1" in G ′ .
Lastly, note that the fact that the quantitative probability was taken to be 1/2 for the finite CSG is without loss of generality.Given a finite CSG G and a rational probability p, 0 < p < 1, it is easy to efficiently construct another finite CSG G ′ such that the termination probability for G is ≥ p iff the termination probability for G ′ is ≥ 1/2.

Conclusions
We have studied Recursive Concurrent Stochastic Games (RCSGs), and we have shown that for 1-exit RCSGs with the termination objective we can decide both quantitative and qualitative problems associated with computing their values in PSPACE, using decision procedures for the existential theory of reals, whereas any substantial improvement (even to NP) of this complexity, even for their qualitative problem, would resolve a long standing open problem in exact numerical computation, namely the square-root sum problem.Furthermore, we have shown that the quantitative decision problem for finite-state concurrent stochastic games is also at least as hard as the square-root sum problem.
An important open question is whether approximation of the game values, to within a desired additive error ǫ > 0, for both finite-state concurrent games and for 1-RCSGs, can be done more efficiently.Our lower bounds (with respect to square-root sum) do not address the approximation question, and it still remains open whether (a suitably formulated gap decision problem associated with) approximating the value of even finite-state CSGs, to within a given additive error ǫ > 0, is in NP.
In [16], we showed that model checking linear-time (ω-regular or LTL) properties for 1-RMDPs (and thus also for 1-RSSGs) is undecidable, and that even the qualitative or approximate versions of such linear-time model checking questions remains undecidable.Specifically, for any ǫ > 0, given as input a 1-RMDP and an LTL property, ϕ, it is undecidable to determine whether the optimal probability with which the controller can force (using its strategy) the executions of the 1-RMDP to satisfy ϕ, is probability 1, or is at most probability ǫ, even when we are guaranteed that the input satisfies one of these two cases.Of course these undecidability results extend to the more general 1-RCSGs.
On the other hand, building on our polynomial time algorithms for the qualitative termination problem for 1-RMDPs in [17], Brázdil et.al. [4] showed decidability (in Ptime) for the qualitative problem of deciding whether there exists a strategy under which a given target vertex (which may not be an exit) of a 1-RMDP is reached in any calling context (i.e., under any call stack) almost surely (i.e., with probability 1).They then used this decidability result to show that the qualititive model checking problem for 1-RMDPs against a qualitative fragment of the branching time probabilistic temporal logic PCTL is decidable.
In the setting of 1-RCSGs (and even 1-RSSGs), it remains an open problem whether the qualitative problem of reachability of a vertex (in any calling context) is decidable.Moreover, it should be noted that even for 1-RMDPs, the problem of deciding whether the value of the reachability game is 1 is not known to be decidable.This is because although the result of [4] shows that it is decidable whether there exists a strategy that achieves probability 1 for reaching a desired vertex, there may not exist any optimal strategy for

( 3 ) 1 of
the call port u = (b, en) of a box b is in Z if and only if the entry node en of the corresponding component Y (b) is in Z or the return port (b, ex) is in Z; (4) a play node u is in Z if and only if Player 2 has a move γ 2 ∈ Γ u2 such that for all moves γ 1 ∈ Γ u Player 1, the next node v, i.e. the (unique) node v such that (u, (γ 1 , γ 2 ), v) ∈ δ, is in Z.