Optimally Controlling a Random Population
Abstract
The population control problem is a parameterised problem where a controller sends messages to a whole population of identical finite-state agents, aiming to eventually move them all into a target state. The decision problem asks whether this can be achieved for arbitrarily large finite populations. We focus on the randomised version of this problem, where every agent is a copy of the same finite Markov Decision Process and non-determinism in the global action chosen by the controller is resolved independently and uniformly at random. Colcombet, Fijalkow and Ohlmann [6] showed that this problem is decidable, but without any complexity upper bound. We show that the random population control problem is in fact ExpTime-complete.
Keywords and phrases:
Controller synthesis, Parameterized verificationCategory:
Track B: Automata, Logic, Semantics, and Theory of ProgrammingFunding:
Patrick Totzke: EPSRC, grant no.: EP/X042596/1.Copyright and License:
2012 ACM Subject Classification:
Theory of computation Formal languages and automata theoryEditors:
Sayan Bhattacharya, Danupon Nanongkai, Michael Benedikt, and Gabriele PuppisSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
We place tokens on the initial state of a non-deterministic finite automaton and update their positions in rounds, in each of which a Controller selects a letter and then every token moves along an -labelled edge out of its current state. The goal for the Controller is to eventually synchronise all tokens, gathering them into accepting states at the same time. Naturally, increasing can only make this task more difficult. The decision question we study asks whether, for a given automaton, can the Controller succeed for all values of ?
This population control problem has been studied both in the adversarial and random settings, which differ in how agents resolve choices and what guarantees the Controller is after. In the adversarial setting, an antagonistic environment resolves all agents’ choices, trying to frustrate Controller and avoid synchronisation. Bertrand et al. [3, 4] showed that the adversarial population control problem is decidable and ExpTime-complete.
In the random setting, all agents’ choices are made uniformly at random and the Controller aims to synchronise the agents almost surely, with probability one.
Example 1.
Controller loses the adversarial population control game from Figure 1. For example, the opponent can win by keeping all tokens in the initial state in every round.
However, Controller does have a winning strategy for the corresponding random population control game: Regardless of the size of the population, she plays the action until exactly one token is in , which happens eventually with probability . She then plays followed by either (if the isolated token moved to ) or (if the token moved to ) to send that token to the final state. She can repeat this procedure until all tokens are in the target. Note that if instead she plays while more than one token is in then some of them may spread simultaneously to and and she is stuck: whatever action she plays, at least one token will move to the (invisible) sink state and cannot be recovered.
The random population control problem is ExpTime-hard [14] and decidable [6]. Colcombet et al.’s decision procedure is based on two ingredients [6]:
-
First, winning regions are downward-closed with respect to the natural product order on and can therefore be finitely represented and manipulated as a union of ideals.
-
The second ingredient is solving the sequential flow problem, which asks whether an unbounded number of tokens can be moved from one set of states to another, while respecting capacity constraints on the number of tokens occupying each transition. They show that one can compute the full corresponding pre-set of a given downward-closed set of target configurations, by a reduction to the boundedness problem of nested distance-desert automata [13].
Ultimately, this allows one to compute a representation of the winning region by iterative refinement. The main limitation of this approach is that the bounds on the representation of intermediate sets, and termination of the resulting algorithm rely on well-quasi-orders and therefore only provide a non-elementary upper bound.
Our Contribution.
We show that the random population control problem is ExpTime-complete. As in [6], our upper bound relies on symbolic representations. However, instead of computing the whole winning region, we show that one can witness positive instances already with a potentially smaller, more compactly representable subset (Theorem 7). Computing this in exponential time requires solving what we call the Dynamic flow problem, which asks whether we can transfer arbitrarily many tokens, with positive probability, from an initial configuration to the set of final configurations while staying in a given set of safe configurations. It is closely related to the sequential flow problem defined in [6]. For this we rely on a recent result showing that a closely-related problem is decidable in PSPACE [10], which we adapt to our setting.
Related work.
Models for biological, chemical, or computational systems with large crowds of simple finite-state components include Petri nets [16], population protocols [2], or chemical reaction networks [21].
Population control problems provide a formal framework for the design of strategies to control a large number of identical agents. This formalisation was introduced in [4], as a model for the synchronization of large populations of yeasts [23]. It fits into parameterized verification, a line of research that aims to verify distributed protocols over arbitrarily large networks [20, 8]. While we take a discrete approach, in the sense that we have an integral number of agents, other models have been studied where the number is considered so large that it can be abstracted by a continuous probability distribution [1, 7].
Another model close to our setting is explorable automata [11], which generalise both (adversarial) population control problems and history-deterministic automata on infinite words. Closer to our setting, other models of games parameterized by the number of agents exist, typically aiming to synthesize distributed protocols for arbitrarily large networks [5, 22]. Finally, recent works bridge the adversarial setting for population control to the modern study of history-deterministic automata: They introduce explorability games, played on automata on infinite words. A player gives an input letter by letter, while the other player has to move tokens in the state space of the automaton so that one of them finds an accepting run whenever the input word is in the language of the automaton [11].
We omit part of the proofs due to space constraints; missing proofs can be found in the full version of the paper.
2 Preliminaries
We assume familiarity with automata theory [18] and Markov Decision Processes [17], and proceed to recall some necessary notations.
Markov decision processes.
A Markov decision process (MDP) consists of a set of states, a set of actions, and a transition function , where denotes the set of probability distributions over .
We consider almost-sure reachability objectives, given by a set of target states that Controller aims to visit. A strategy is a function . Fixing such a strategy and an initial state results in a Markov Chain with probability measure (see [17] for details). We call winning from state if is reached -almost surely.
The winning region is the subset of states from which a winning strategy exists.
Random walks in winning regions.
In an MDP with finitely many states, if there is an almost surely winning strategy for Controller, then there is a canonical one: play at random any action that guarantees staying in the winning region. This is formalized using arenas and safe random walks, as follows.
We call an MDP simple if for all , the set of states reachable from is finite. A commit is an element of . An arena is a set of commits such that for all and , if then there exists such that . For brevity we will write instead of . A path in arena is a sequence such that and for all . A safe random walk in the arena is a strategy defined such that is the uniform distribution on . An arena is winning (with respect to ) if from every there is a path in to . This is closely linked with winning regions, as shown in the next lemma.
Lemma 2 (Winning arenas).
Given a simple MDP and a set of target states ,
-
1.
A union of winning arenas is a winning arena, and the winning region is the projection onto of the largest winning arena.
-
2.
In a winning arena, a safe random walk is a winning strategy from every state.
Random Populations.
We consider populations of agents (or tokens), described by a common finite MDP .
Our arguments require tracking the trajectory of selected (sets of) tokens along paths and the following definitions will be convenient for this purpose.
Write for the countably infinite set of tokens. For any finite subset , let denote the MDP whose states (called configurations) are functions mapping each token of to a state of , and is naturally lifted to : for all and . For a subset , contains those configurations where all tokens are mapped to states in . In particular, contains only the configuration mapping all tokens to , and is the set of final configurations, mapping all tokens to some state of .
We study the following decision problem, which asks whether for every finite population , Controller can almost surely ensure that all tokens simultaneously111Requiring all tokens to visit a final state simultaneously or possibly at different times is irrelevant for our purposes: The two variants are logspace inter-reducible (see the full version for a proof). reach a final state.
The Random population control problem
Given:
an MDP , initial state and target set .
Question: Is there a winning strategy to reach from , for all finite ?
We define as the disjoint union of all finite . Notice that, while the state space is infinite, each is finite and therefore is simple.
According to Lemma 2, a given MDP is a positive instance if, and only if, there is a winning arena with for all . Our main decidability result relies on identifying such a witness . By Lemma 2, the existence of such a witness does not depend on the precise probabilities in . We will omit them in all examples and just assume without loss of generality that all probability distributions are uniform.
Remark 3.
At this point one might wonder why we choose to define configurations as mappings from a set of tokens to states, and not simply as vectors counting the number of tokens in each state. This is due to the nature of our main proof: we use strategies in which tokens are split between a cohort of many tokens and small groups of tokens, isolated from each other. This isolation requirement is difficult to formulate without referring to specific token identities, and dropping those identities would make some proofs extremely hard to write (and read), especially for Lemma 16 and Theorem 7.
3 Symbolic Configurations
We first observe that the maximal winning arena of must be closed under renaming of tokens. That is, for any bijective and configurations and , if then either both and , or neither is in . Furthermore, must be closed under removal of tokens: if contains and then must also contain the restriction of to . Both these can be seen by simple transfers of winning strategies.
The winning region can therefore conveniently be represented as a downward-closed set of -dimensional vectors of integers, each of which just reflects how many tokens occupy each state. Given a configuration , we write for the vector of such that is the number of tokens in in , for all .
Take , the non-negative integers with natural ordering extended by a maximal element . This ordering is lifted pointwise to , whereby if and only if for all , and if and only if and .
Definition 4 (Symbolic representations).
A symbolic configuration is a vector . Given a symbolic configuration, the ideal is the set of all configurations such that For a set of symbolic configurations , we write for the set .
Similarly, a symbolic commit is a symbolic configuration together with an action . The commit ideal is the set .
We recall that the product ordering on commit ideals is a well-quasi-order. Every downward-closed set , including our maximal winning arena, can therefore be written as a union of finitely many incomparable ideals [19]. We call such a finite union of commit ideals a population arena, or simply an arena when clear from the context. Throughout this work we will make use of the notion of -definability, that bounds the maximal finite constants in such ideal representations of population arenas.
Definition 5 (-definability).
Let . A set of commits is -definable if it is a finite union of commit ideals of the form with . The maximal -definable subset of is denoted by
Example 6.
In the MDP from Example 1, the maximal winning arena is
with states enumerated as . A safe random walk in instructs to play, with positive probability, the action in any configuration where no tokens are on . Further, to play with positive probability if at most one token is on and none on . This set is clearly -definable and therefore, . Its maximal -definable subset is
While is still an arena (it is a forward invariant), it is not winning because there is no path in it from initial to target configurations. This is because the action that takes tokens to or is never played when there are tokens on .
4 Solving the Random Population Control Problem
We present our main result: the Random population control problem is solvable in exponential time. According to Lemma 2, there is a maximal winning arena containing all configurations from which there is a winning strategy. As a consequence, there is a winning strategy from all initial configurations if and only if there is a winning arena which contains them all.
Thus, all positive instances are witnessed by a set of commits that is 1) an arena (forward-closed), 2) winning (every included configuration can reach a target configuration without leaving this set), and finally, 3) includes all initial configurations.
We will symbolically represent candidate sets as per Definition 4, as finite unions of commit ideals . This makes it straightforward to check conditions 1) and 3) syntactically. The two main remaining ingredients for our approach are Theorem 7, that positive instances admit polynomially-definable winning arenas; and Theorem 8, that one can check condition 2) in exponential time (and even polynomial space). We formally state these theorems below and derive an algorithm to solve the Random population control problem in exponential time. The following sections contain proofs.
In what follows, fix an MDP , initial state and target set . Let denote the winning arena in , and recall that for every , is its maximal -definable subset. Let be the symbolic configurations mapping the state (resp. all states in ) to and other states to . Then in particular, is the set of configurations whose tokens are all in . Observe that, since all those configurations are in the winning region by definition, we have and the answer to the Random population control problem is positive if and only if contains all configurations with all tokens on the initial state, i.e., .
Theorem 7.
Let be the maximal winning arena. There is a winning arena with
-
contains ; and
-
is -definable.
Remark.
Theorem 7 implies that, if we can control arbitrarily many tokens then we can do so with a safe random walk in some -definable arena. This has no immediate consequences for the shape of the winning region . In fact, may not be -definable and its ideal representation may require doubly exponentially large constants (cf. Section 7.2). Therefore, in general, is strictly contained in .
To verify that a candidate arena is winning, we need to be able to check that all configurations in it can reach a final one while staying in the arena. We show (in Section 6), how to solve the following problem222This is a slightly different presentation of the “sequential flow problem” in [6]. They presented a solution in exponential space, which was recently improved to polynomial space [10]. .
The Dynamic flow problem
Given:
an MDP
,
a finite set of symbolic commits ,
a symbolic configuration and a set of symbolic configurations .
Question: Does every configuration in , admit a path to inside ?
Theorem 8.
The Dynamic flow problem can be solved in polynomial space in and , where is the largest integer appearing in the input.
Together, Theorems 7 and 8 suggest a simple algorithm to compute a suitable winning arena by refining a candidate set of symbolic commits until the corresponding union of ideals is a winning arena. Recall that given a set of commits we use the notation for . Similarly, given a set of configurations and a set of commits , we write instead of .
The idea is to compute a -definable winning arena as guaranteed by Theorem 7 by refinement. Start with the largest such candidate set (line 1), and reduce it if it is not an arena (lines 3 and 4) or if it is not a winning one (lines 5 and 6). Computing ideal representations for reduced candidate sets, and the check in line 3, are syntactic and therefore simple. The check in line 5 is an instance of the Dynamic flow problem. Once the procedure stabilizes, is a winning arena that satisfies the conditions of Theorem 7. In particular, it contains all of . The input therefore describes a positive instance if and only if , the output of the algorithm in line 8.
Observe that is deliberately initialised as the set of all symbolic configurations that may appear in the decomposition of , and therefore only reduces during the computation.
Theorem 9.
The Random population control problem is ExpTime-complete.
Proof.
ExpTime-hardness is shown as Theorem 21. The matching upper bound is provided by Algorithm 1: It remains to argue that it takes at most exponential time.
-
has elements at the start, and every iteration removes at least one.
-
The first condition (line 3) can be checked simply by computing the set of successors of each symbolic commit in . This can be straightforwardly done in exponential time in the number of states.
-
Checking the second condition (line 5) is solving an instance of the Dynamic flow problem with largest constant , for each in . This problem is solvable in polynomial space (and thus exponential time) in (Section 6).
Therefore, Algorithm 1 takes exponential time in the size of the input.
5 Theorem 6: Small Winning Arenas
Consider now a positive instance of the Random population control problem with maximal winning arena .
Towards proving Theorem 7, we now describe a winning strategy for Controller that remains in (and thus defines) a suitable winning sub-arena which satisfies the claim of the theorem. As discussed previously, the inclusion might be strict.
We consider the tokens of any configuration to be split between those that are part of the large cohort and a few individuals that are tracked separately. Increasing the number of tokens in states occupied by the cohort cannot result in configurations outside the winning region (see Definition 15). By contrast, increasing the number of individuals on a state may turn a winning configuration into a losing one.
The strategy operates in two modes. The first mode attempts to follow a “lucky” path in that leads to a final configuration: one where at any step only a few tokens leave the cohort and those that do, subsequently never meet until they rejoin the cohort. For instance, in Example 1 we would try sending tokens one by one via , while keeping all others in their current states. Formally, this means that the path stays within , and therefore introduces at most individual tokens. The existence of such paths is guaranteed by Lemma 11. Successfully following such a path to the end has a positive probability that is bounded away from zero (for a given number of tokens).
In case the “lucky” path is exited prematurely, our strategy enters a second, recovery mode that, almost surely, brings the individual tokens back into the large cohort (reaches ) in order to attempt a new “lucky” path to a final configuration again. See Figure 2 for an illustration.
This must be possible because we have not left the maximal winning arena , and therefore can still almost surely reach a final configuration in . We again attempt to follow another “lucky” path towards this new target, using Lemma 11, thereby creating up to additional individuals along the way. Again, following this path succeeds with probability bounded away from zero.
The issue with this approach is that we may continue to be unlucky and track ever more individual tokens. However, as we show in Lemma 16, one can play as described above while ensuring that individuals introduced at different steps never meet before they are brought back to the cohort. As each step produces at most new individual tokens (necessarily on distinct states), we can see at most individual tokens in each state overall.
We will need some notation to formalize our argument. In particular, we extend all previous definitions to (symbolic) configurations that explicitly track finitely many individual tokens. We thus extend the symbolic representations in Definition 4 accordingly.
Definition 10.
Let be a finite set of tokens, called individuals, whereas other tokens in are called the cohort tokens. Given a symbolic configuration and a configuration , the ideal tracking generated by and is written and defined as the set of configurations such that:
-
individuals are placed on states according to , i.e. and .
-
the number of cohort tokens on a state is bounded from above by , i.e.
Similarly, given an action , the commit ideal tracking associated with , and is denoted , and is the set of commits with . A population arena tracking is a finite union of commit ideals tracking .
Let be an arena and . Then denotes the union of all ideals tracking of the form with that are included in .
5.1 The Existence of Lucky Paths
We start from a fairly simple idea: Suppose that we are able to transfer arbitrarily many tokens from one state to another along paths that remain in the winning region. It may be necessary to transfer those tokens in small groups, as they have to go through a bottleneck. In this case, we might as well transfer them one by one.
Lemma 11.
Let be a finite set of tokens, an ideal tracking and a population arena tracking . If is a winning arena with respect to , then for every configuration there is a path in from to .
The rest of Section 5.1 is dedicated to the proof of Lemma 11. Let us start by defining the necessary terminology on flows and cuts. Let be the set of non-negative real numbers, with an additional maximum element . We extend the addition by setting for all .
Given a finite directed graph , a capacity function , and two vertices and (a source and a target), we define a flow from to as follows. It is a function such that for all , we have
The value of the flow is defined as .
A cut is a set of vertices such that every path from to contains a vertex of . Its weight is defined as .
Theorem 12 (Max flow-min cut [9]).
For every graph , capacity function and vertices ,
Remark 13.
We state this theorem with the capacities on the vertices, as it is convenient for the next proof. It is more commonly stated with capacities on the edges . The constraints on the flow is then for all and for all . A cut is then defined as a set of edges, and the theorem is stated analogously.
Another classic result is the integer flow theorem. It says that if all capacities in the graph are integers, then there is an integer maximal flow . This is a by-product of the Ford-Fulkerson algorithm.
Theorem 14 (Integer flow theorem [9]).
For every graph , capacity function and vertices , there exists a flow of maximal value such that for all .
With those two results in mind, we can establish Lemma 11.
Proof.
As is a population arena tracking , by definition it is a finite union of commit ideals tracking , hence we can decompose it as
Let be the largest constant used to define those commit ideals. That is, .
By definition, is also a finite union of commit ideals tracking . Let with be one of them. Let be the set of states such that and let . For all , define as a configuration obtained by taking and adding tokens on each state of . The set of configurations which satisfy the conclusion of the theorem is clearly stable by token renaming and token removal (because the set of paths in is stable by token deletion). Thus, it is enough to prove it for configurations of the specific form .
Fix , we show that a path from to in exists.
The configuration belongs to the ideal tracking , which is a subset of , hence there is a path within with and . Let be the set of tokens used in .
Consider the following directed graph and capacity function . The set of vertices is , i.e., one vertex for each state and configuration in the path, plus a source, a target, and one intermediate vertex between and each .
We define the set of edges and the capacity function on vertices of as follows: for all , we pick a commit ideal tracking in the ideal decomposition of such that is in it. We also define such that (they are well-defined since is an ideal tracking ). For all and states , there is an edge from to if and only if . We also have edges from to , to and from to for all .
For every state and index , the vertex is assigned capacity . Furthermore, for all , has capacity if and otherwise. Observe that by definition of , we only assigned capacities in to vertices .
The trajectories of tokens outside of in the path define a flow from to in of value : for each edge we define as the number of tokens of going from to at the th step. We also define for all and otherwise. For all , is the number of tokens of in at the end of the path. This flow satisfies the capacity constraints of by definition of .
Let us now define a new capacity function on , as follows.
-
For all we set if and otherwise.
-
For all other vertices , we set if and if .
We claim that has an integer flow of value satisfying the capacity constraint . Indeed, suppose the contrary, then by the integer flow theorem all flows have value . Therefore, by the max-flow min-cut theorem there is a cut in such that . As for all , that same cut has capacity in . By the max-flow min-cut theorem, this contradicts the existence of a flow of value in . We obtain that has a flow of value , which is optimal as is a cut of value .
As all capacities defined by are integers, the integer flow theorem guarantees the existence of an optimal integer flow of value , which in turn defines a path of length from to : at step , the tokens of move in the same way as in the step , and the number of other tokens sent from state to is . Note that by definition of tokens can only move from state to if .
Observe that the th commit along this path belongs to the ideal because the flow must respect the capacities of vertices , which were derived from . The path therefore stays in . In fact, by definition of , the th commit belongs to the smaller ideal , where is where all finite positive coefficients have been replaced by . Consequently, it belongs to . Since all have capacity , the resulting path starts with tokens outside in each state of . The path ends in as the capacities of constrain the final configuration to be in . This concludes the proof.
5.2 The Isolation Lemma
In a configuration, we say that a set of states is an -base if an arbitrary amount of extra tokens could be placed on these states without exiting the arena . This is formally defined as follows.
Definition 15 (-base and finite base).
Fix an arena and a configuration in over a set of tokens . A set of states is an -base of in if
with the symbolic configuration obtained from by mapping states of to .
By extension, a set of tokens is an -base of in if the set of states occupied by those tokens in is. Dually, a set of tokens is a finite base of in iff is an -base of in .
Note that a configuration may have several -bases and finite bases: for instance, say we have two states and the arena is , then the configuration has and as -bases, but not .
We say that two tokens meet in a configuration if they share the same state i.e. if . The following lemma says that if starting from a configuration with a finite base we can reduce the size of the finite base (bring back an individual token into the cohort) with a strategy that treats tokens symmetrically, then we can do so while making sure that the tokens of never meet the tokens outside before this goal is achieved.
Intuitively, while the tokens of are all in bounded places, it means that they only meet boundedly many other tokens. Since this strategy works with an arbitrarily large cohort, we can show that in fact we can strengthen it to make sure that no token meets the ones in .
Lemma 16 (Isolation Lemma).
Fix a population arena and , and assume that from all there is a strategy to almost surely reach a configuration with a finite base of size , without leaving .
Then for all with a finite base of size , there is a strategy which, when starting from :
-
surely remains in ;
-
almost surely reaches a configuration with a finite base strictly included in , and
-
guarantees that in every configuration before that, every state contains either only tokens of or no token of .
Sketch of proof.
This lemma is central to the proof of Theorem 7. Unfortunately we cannot include the full proof due to space constraints. The proof can be found in the full version, we sketch it here.
A crucial element in the assumption is that is a population arena, i.e., it does not distinguish tokens. Since we have a winning strategy to reach a configuration with finite base of size from everywhere in , a safe random walk in is a winning strategy, from all configurations of . Again, this random walk treats tokens symmetrically.
Now consider an initial configuration in , with tokens. On states of the -base, we can add many more tokens and still have a winning strategy. We add many imaginary tokens on all states of the -base. Then we make the following observation: as long as tokens in remain outside the cohort, no token of the initial finite base meets the cohort; they can only meet a few tokens at a time. If a token of meets sufficiently many tokens along a path, then some of them must have re-entered the cohort since they met. Since the random walk treats all tokens symmetrically, also had a chance of reaching the cohort. This lets us bound the expected number of tokens meets before reaching the cohort, independently of the number of tokens in total. As we add more imaginary tokens, the probability that one of the tokens meets one of the real ones converges to .
We use these observations to show that we can obtain a probability as small as we want that any of the tokens of meets tokens outside before reaching the cohort. Since the set of configurations reachable from is finite, this implies that this probability can be brought down to . As a consequence, we can make sure that a token of reaches the cohort while no token of meets one outside beforehand.
5.3 Proof of Theorem 7
The proof of Theorem 7 uses a partition of the individuals into non-empty groups with at most tokens per group. Moreover, the induction hypothesis assumes that
-
individuals of different groups never meet in the arena, other than in final configurations.
-
is a finite base, i.e., the set of states occupied by the cohort is an -base.
Since every group occupies at least one state then . The induction step is done by induction on . The base case is trivial, because in that case all tokens are individuals: the cohort is empty, and -definability follows from the hypothesis that tokens of different groups never meet unless on . The value of is not fixed; the induction step uses the inductive hypothesis for . The induction step is done as follows, details are in the full version.
-
We try to follow a path to the target set . We can choose this path so that we create at most individual tokens, by Lemma 11. These isolated tokens constitute a new group of individuals, denoted .
-
If we deviate from that path, we use Lemma 16 to define a sub-arena that lets us recover all individual tokens (i.e. bring them into the cohort) while making sure that none of them meets any token from outside their group. We then apply the induction hypothesis (for and the set of configurations where tokens of have been recovered) to recover those individual tokens within an -definable sub-arena.
-
Once all individuals are recovered, we apply the first step again, until we successfully follow the path to the end.
We define the desired sub-arena as the union of those paths and sub-arenas. Since, in any included configuration, the number of individuals residing on any one state is at most , this arena must be -definable. Clearly, Controller wins from any included configuration by following the strategy outlined above. Therefore, is a winning arena.
6 Theorem 7: The Dynamic Flow Problem
To prove Theorem 8, we rely on a result by Gimbert, Mascle and Totzke [10] about maximising the flow through directed graphs, where edge capacities are dynamically chosen by the maximiser. We recall the notation and statement of the relevant theorem.
A capacity is a function mapping each pair of states to a maximal number of tokens that can be transferred from to . Let be a finite alphabet of capacities, and a set of pairs of states. Given a word and a set of tokens , a token flow over is a sequence of configurations such that, for every and , . Define the global flow of as the function counting the number of tokens moving between each pair of states: formally, for all ,
Now let be a language over . The maximal sequential multi-flow on satisfying , denoted , is the maximum number of tokens that can be simultaneously transferred between every pair of states in by a path over some word of .
Example 17.
Consider the capacities from Figure 4, and set of edges . For the language containing only the capacity word , we get , witnessed by the token flow with global flow . Note that the maximal flow from to for the intermediate word cannot exceed . However letting , we have , because for every there is a token flow over so that .
As Gimbert et al. show, one can determine if such flows are unbounded, and otherwise precisely compute their finite value, in polynomial space.
Theorem 18 (Theorem 37 in [10]).
Let be a set of capacities over a set of states , with coefficients in , and a regular language recognised by an NFA with states. Then, either , or .
This is almost what we need for deciding the Dynamic flow problem, except for two things. First, our constraints are on vertices while theirs are on edges. Second, in our initial ideal we may have both states marked and states bounded by finite numbers. We will translate the constraints given by ideals over configurations into capacities, thereby reinterpreting paths as token flows. This way one can use Theorem 18 to check that we can transfer arbitrarily many tokens from the states marked , while using the regular constraint to track the finite number of extra tokens and make sure that all token end up in .
Let , , , be an instance of the Dynamic flow problem. We split in two parts , so that and . Vector describes the set of states with arbitrarily many tokens at the start, while describes the remaining tokens in other states. Intuitively, the Dynamic flow problem comes down to checking that we can simultaneously transfer tokens of and arbitrarily many tokens from every state marked in to . We will construct a finite alphabet of capacities and a finite automaton which guesses the movement of the remaining tokens. Its language is the set of sequences of capacities which can be used while making sure that both the cohort of tokens from unbounded states and those remaining tokens are brought safely to . The largest finite number appearing in the capacities is the same as in , and has exponential size in in and the logarithm of the largest finite number appearing in .
Lemma 19.
, , , is a positive instance of the Dynamic flow problem if and only if there exists such that
-
1.
-
2.
.
Proof of Theorem 8.
By Lemma 19, in order to check if , , , is a positive instance of the Dynamic flow problem, we can enumerate sets and for each such , check the two conditions from Lemma 19. Condition 2 can be checked easily in polynomial time (and space). For condition 1, we can rely on Theorem 18: Note that the automaton as constructed above is singly exponential in the input. Consequently, the same holds for and the quantity . This means that in order to check whether , it suffices to check that there is a word and a path over carrying tokens from to for all . These can be guessed on the fly: it suffices to memorise the current state in the automaton and the number of tokens in each state, in binary. This only requires polynomial space in and .
7 Lower bounds an a hard case
7.1 Complexity lower bound
An exponential-time lower bound for the Random population control problem can be established by reduction from countdown games, as shown by Mascle, Shirmohammadi, and Totzke in [14].
Definition 20.
A Countdown Game is given by a directed graph , where edges carry positive integer weights, . For an initial pair of a vertex and a number, two opposing players (Player 1 and 2) alternatingly determine a sequence of such pairs as follows. In each round, from , Player 1 picks a number such that contains at least one edge ; then Player 2 picks one such edge and the game continues from . Player 1 wins the game iff the play reaches a pair in .
Determining the winner of a Countdown Game, where all constants are given in binary, is ExpTime-complete [12]. We state the lower bound and a sketch of the construction.
Theorem 21.
The Random population control problem is ExpTime-hard.
Proof sketch.
The number of turns in a Countdown Game cannot exceed the initial value of the counter, as the initial counter value decreases at each turn. Thus, if Player 2 has a winning strategy, choosing actions at random yields a positive probability of applying that strategy, hence a positive probability of winning. Therefore, Player 1 wins the initial game if and only if she wins with probability one against a randomised adversary.
The main idea for the further construction is to require Controller, who impersonates Player 1, to move tokens one-by-one from a waiting state, first into the control graph of the Countdown game, and ultimately into the target. To avoid a loss in the intermediate phase, she must win an instance of the game against a randomising opponent. This is enforced using a combination of gadgets, including two binary counters (encoded using two states per bit) that can effectively test for zero, be set to specific numbers, and that are set up so that they can decrement at the same rate. These are used to hold the global integral value , and an auxiliary counter holding the value chosen by Player 1. Controller is compelled to reduce them both and can only continue once the auxiliary counter is exhausted. She can only afford to safely end the simulation of the game if the first counter holds value . As a result, Player 1 has a winning strategy for the two-player Countdown Game if, and only if, Controller can synchronise the -fold product of the constructed MDP for all .
7.2 A Double-exponential Cut-off
We use the following vocabulary: a state is marked in a configuration if at least one token occupies it: . Whenever an action takes state only back to itself we say that ignores . There are states Heaven (the target) and Hell which ignore all actions. For a given state , an action is angelic if it takes only to Heaven, and daemonic if it takes to Hell. An action is safe in a configuration if it is not daemonic for any marked state (in any gadget).
The cut-off of an MDP is the minimal number of tokens against which Controller does not have an almost-sure winning strategy, In this section we show that there are MDPs whose cut-off is finite but doubly-exponential in the number of states. We reuse a construction from [3]. We simply replace the adversary with randomisation. Let us summarise it here.
Let . We build an MDP as follows: We have an initial state and a final state , plus a sink state .
-
First of all we have a splitting gadget, as shown in Figure 6. This gadget forces Controller to play a word of until all three states are empty. We call a sequence of two actions of a round. Say there are tokens in at the start, then there is a positive probability that they distribute evenly between and whenever they split from . Therefore, for any strategy of Controller, there is a positive probability that after rounds there is still at least one token in .
-
Second, we have a counter gadget, as shown in Figure 5. This one consists of states, representing bits, . For all there is an action that fixes all states with , sends to , and sends each with to . The tokens in states with and are all sent to . Action sends all tokens in to and all tokens in to . Actions leave the tokens in those states idle. This gadget implements a binary counter over bits. Let . If we start with tokens in states and not in states , then at all times Controller has only one action from available, which increments the counter. Once every bit is , the only possible action apart from is . She is forced to play a sequence of actions of , interleaved with some and .
-
We add an action which sends tokens from to , and leaves all other tokens idle. All other actions map to .
If there are more than tokens, then, with positive probability, when playing one goes to each of the and the rest to . Then, as observed above, with positive probability the first gadget forces Controller to play at least actions from before being able to play . However, the second gadget forces Controller to play after playing actions from . Hence Controller cannot win almost surely.
If there are fewer than tokens, then Controller can play as follows: Play , then alternate between playing the available (it may be that several actions are available because some did not receive any tokens in the first step; in that case, choose the minimal ) and playing either or (whichever sends the most tokens to ). After steps, all tokens in the counter gadget are in the states . Since at every round we send at least half of the tokens in the splitting gadget to , after rounds the gadget is empty. Controller can then play safely, and send all tokens in the counter gadget to .
We obtain an MDP with states whose cut-off is between and .
7.3 A Butterfly
Consider now the example in Figure 7. We will set it up so that initially, all tokens are randomly distributed onto states and , and Controller must eventually place all of them on only one side of the graph. To do so,
-
add an initial action which moves tokens from an initial state to and and is daemonic everywhere else;
-
add a fresh winning action that is angelic for all red states and daemonic for all green states; and
-
add a fresh winning action that is angelic for all green states and daemonic for all red states.
Idea.
Each round starts with all tokens on and . Controller stepwise proposes a sequence of actions, either in or . Notice that until one side is empty, these are the only safe sequences to play. At the end of each round, all tokens (except possibly one) will switch sides. Controller can choose to isolate one token and keep it on its side, thereby getting closer to her goal of moving everyone to one side. The relevant decisions to make are
-
1.
whether to go left or right at the start of a round
-
2.
when to stop playing (or , resp.)
We say that two configurations are -equivalent if for all states , they either have the same number of tokens in or both have at least tokens in . A strategy is -deterministic if it “counts up to ”. That is, it is deterministic and for all -equivalent , it plays the same action from both.
Lemma 22.
The example is a positive instance of the Random population control problem. However, for every , every -deterministic strategy is losing.
Proof.
Referring to the relevant decisions above, a winning strategy is to
-
always pick the side with the least number of tokens (one can also pick the side at random), and
-
play (or ) until exactly one token is isolated.
Consider a -deterministic strategy. Say we start with tokens, and tokens end up on both and . Our strategy must play or , say it plays . We have tokens in the state below and in the one above . Playing or brings us back to the previous configuration (up to renaming tokens), and playing has no effect, thus it must play . Once this is done, it must keep playing until exactly one token is in the lower state: if all tokens are in the upper state we have established that it plays , and if there are or more tokens below, every move is losing except (playing risks tokens splitting between the two left states, after which we are stuck). Therefore, the strategy must wait until one token is in the lower state, then play and then or .
now contains tokens and contains , which is -equivalent to and . By repeating the same reasoning, in the next round the strategy does the same thing, which yields a configuration with tokens in both and , meaning we are back to the initial configuration.
8 Conclusion
We have shown that the Random population control problem is ExpTime-complete. We establish that it is possible to win the population MDP while staying in a part of the winning region that has low descriptive complexity, in the sense of Theorem 7. This is the key to defining an algorithm (Algorithm 1) to solve the Random population control problem using an exponential number of calls to an oracle solving the Dynamic flow problem.
These results shed new light on parameterised control and pave the way for further positive results with more ambitious objectives. For example, the tools developed in this paper may be used to address a generalised version of the problem, where infinite executions must satisfy -regular conditions.
A natural question that remains open is the cut-off: if there is a number such that we cannot synchronize almost surely tokens, how large can the smallest such be? In the adversarial case studied in [3], it was shown that the cut-off was doubly exponential in the worst case. We conjecture that this is also the case in our setting. We show in Appendix 7.2 that the cut-off may be doubly exponential, but we are missing a matching upper bound.
References
- [1] S. Akshay, Blaise Genest, and Nikhil Vyas. Distribution-based objectives for markov decision processes. In Proceedings of the 33rd Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2018, Oxford, UK, July 09-12, 2018, pages 36–45. ACM, 2018. doi:10.1145/3209108.3209185.
- [2] Dana Angluin, James Aspnes, Zoë Diamadi, Michael J. Fischer, and René Peralta. Computation in networks of passively mobile finite-state sensors. Distributed Comput., 18(4):235–253, 2006. doi:10.1007/S00446-005-0138-3.
- [3] Nathalie Bertrand, Miheer Dewaskar, Blaise Genest, and Hugo Gimbert. Controlling a population. In 28th International Conference on Concurrency Theory, CONCUR 2017, September 5-8, 2017, Berlin, Germany, volume 85 of LIPIcs, pages 12:1–12:16. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2017. doi:10.4230/LIPIcs.CONCUR.2017.12.
- [4] Nathalie Bertrand, Miheer Dewaskar, Blaise Genest, Hugo Gimbert, and Adwait Amit Godbole. Controlling a population. Logical Methods in Computer Science, Volume 15, Issue 3, July 2019. doi:10.23638/LMCS-15(3:6)2019.
- [5] Nathalie Bertrand, Paulin Fournier, and Arnaud Sangnier. Distributed local strategies in broadcast networks. In 26th International Conference on Concurrency Theory, CONCUR 2015, Madrid, Spain, September 1.4, 2015, volume 42 of LIPIcs, pages 44–57. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2015. doi:10.4230/LIPIcs.CONCUR.2015.44.
- [6] Thomas Colcombet, Nathanaël Fijalkow, and Pierre Ohlmann. Controlling a random population. Log. Methods Comput. Sci., 17(4), 2021. doi:10.46298/LMCS-17(4:12)2021.
- [7] Laurent Doyen. Stochastic games with synchronization objectives. J. ACM, 70(3):23:1–23:35, 2023. doi:10.1145/3588866.
- [8] E. Allen Emerson and Kedar S. Namjoshi. Reasoning about rings. In Conference Record of POPL’95: 22nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, San Francisco, California, USA, January 23-25, 1995, pages 85–94. ACM Press, 1995. doi:10.1145/199448.199468.
- [9] Lester Randolph Ford and Delbert Ray Fulkerson. Maximal flow through a network. Canadian journal of Mathematics, 8:399–404, 1956.
- [10] Hugo Gimbert, Corto Mascle, and Patrick Totzke. Optimal sequential flows. In Sayan Bhattacharya, Danupon Nanongkai, Michael Benedikt, and Gabriele Puppis, editors, 53rd International Colloquium on Automata, Languages, and Programming (ICALP 2026), volume 374 of LIPIcs, pages 98:1–98:18. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2026. doi:10.4230/LIPIcs.ICALP.2026.98.
- [11] Emile Hazard, Olivier Idir, and Denis Kuperberg. Explorable parity automata. CoRR, abs/2410.23187, 2024. doi:10.48550/arXiv.2410.23187.
- [12] Marcin Jurdzinski, François Laroussinie, and Jeremy Sproston. Model checking probabilistic timed automata with one or two clocks. In Tools and Algorithms for the Construction and Analysis of Systems, 13th International Conference, TACAS 2007, Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2007 Braga, Portugal, March 24 - April 1, 2007, Proceedings, volume 4424 of Lecture Notes in Computer Science, pages 170–184. Springer, 2007. doi:10.1007/978-3-540-71209-1_15.
- [13] Daniel Kirsten. Distance desert automata and the star height problem. RAIRO Theor. Informatics Appl., 39(3):455–509, 2005. doi:10.1051/ITA:2005027.
- [14] Corto Mascle, Mahsa Shirmohammadi, and Patrick Totzke. Controlling a random population is ExpTime-hard. CoRR, abs/1909.06420, 2019. arXiv:1909.06420.
- [15] Donald Ornstein. On the existence of stationary optimal strategies. Proceedings of the American Mathematical Society, 20(2):563–569, 1969. doi:10.2307/2035700.
- [16] Carl Adam Petri. Kommunikation mit Automaten. Dissertation, Schriften des IIM 2, Rheinisch-Westfälisches Institut für Instrumentelle Mathematik an der Universität Bonn, 1962.
- [17] Martin L. Puterman. Markov Decision Processes: Discrete Stochastic Dynamic Programming. John Wiley & Sons, Inc., 1st edition, 1994. doi:10.1002/9780470316887.
- [18] G. Rozenberg and A. Salomaa. Handbook of Formal Languages. Number v. 1-3 in Handbook of formal languages / G. Rozenberg; A. Salomaa. Springer, 1997.
- [19] Sylvain Schmitz. Algorithmic Complexity of Well-Quasi-Orders. Accreditation to supervise research, École normale supérieure Paris-Saclay, November 2017.
- [20] A. Prasad Sistla and Steven M. German. Reasoning with many processes. In Proceedings of the Symposium on Logic in Computer Science (LICS ’87), Ithaca, New York, USA, June 22-25, 1987, pages 138–152. IEEE Computer Society, 1987.
- [21] David Soloveichik, Matthew Cook, Erik Winfree, and Jehoshua Bruck. Computation with finite stochastic chemical reaction networks. Nat. Comput., 7(4):615–633, 2008. doi:10.1007/S11047-008-9067-Y.
- [22] Daniel Stan. Randomized strategies in concurrent games. (Stratégies randomisées dans les jeux concurrents). PhD thesis, University of Paris-Saclay, France, 2017. URL: https://tel.archives-ouvertes.fr/tel-01519354.
- [23] Jannis Uhlendorf, Agnès Miermont, Thierry Delaveau, Gilles Charvin, François Fages, Samuel Bottani, Pascal Hersen, and Gregory Batt. In silico control of biomolecular processes. Computational Methods in Synthetic Biology, pages 277–285, 2015.
