Study of a Combinatorial Game in Graphs Through Linear Programming

In the Spy game played on a graph G, a single spy travels the vertices of G at speed s, while multiple slow guards strive to have, at all times, one of them within distance d of that spy. In order to determine the smallest number of guards necessary for this task, we analyze the game through a Linear Programming formulation and the fractional strategies it yields for the guards. We then show the equivalence of fractional and integral strategies in trees. This allows us to design a polynomial-time algorithm for computing an optimal strategy in this class of graphs. Using duality in Linear Programming, we also provide non-trivial bounds on the fractional guard-number of grids and tori, which gives a lower bound for the integral guard-number in these graphs. We believe that the approach using fractional relaxation and Linear Programming is promising to obtain new results in the field of combinatorial games.


Introduction
Turn-by-turn combinatorial games in graphs involve two players placing their pawns on vertices of a graph and moving them along its edges in order to achieve some task. For instance, in Cops and Robber games, Player 1 has a team of cops that must collaborate to capture a robber moved by the second player [5,24,25]. In the Surveillance Game, Player 1 is allowed to cover vertices with some unmovable pawns at each of its turns, while the goal of Player 2 is to eventually move its surfer to an uncovered vertex [12]. Another example is the Eternal Domination Problem in which Player 2 has no pawn but is allowed to attack any vertex at each of its turns, while the goal of Player 1 is to always be able to move at least one of its cops to the attacked vertex [16]. Most of these games have been studied because they model natural problems involving mobile agents cooperating to perform some task (e.g., network security, robot motion planning, etc.). Surprisingly, these games can also be used to provide a novel understanding of problems arising in 1 telecommunication networks: for instance, the Surveillance Game was introduced for modelling resources prefetching [12].
In all these games, the goal is to minimize the amount of resources (e.g., the number of cops) ensuring the victory of one of the players. These combinatorial problems are generally "hard": Cops and Robber games are EXPTIME-complete [19] and W [2]-hard [13] and the Surveillance game is NP-hard and even PSPACE-complete in directed graphs [12]. Moreover, many longstanding (probably difficult) open questions have not been solved yet for these games. For instance, the celebrated Meyniel's conjecture states that O( √ n) cops are sufficient to capture a robber in any n-node graph [27], Schröder asks whether g + 3 cops are sufficient in any graph with genus at most g [26], the status of the complexity of Eternal Domination is still unknown, etc. A classical approach to tackle these open problems has been to study variants of these games in which one of the players often has some restrictions. For instance, the robber may be faster than the cops [2,13], the cops may capture at some distance [4], the surveyed area may be forced to be connected [14], etc. Another approach may be to restrict the games to particular graph classes such as trees [20], grids [17,23], planar graphs [1], bounded treewidth graphs [18,21], etc.
Recently, some of the authors of the present paper proposed a new framework that considers a fractional variant of these games (roughly where pawns may be split into arbitrarily small entities) and uses Linear Programming to obtain new bounds and algorithms [8,15]. While this approach seems not to be successful to handle Cops and Robber games, it has been fruitful in designing approximation algorithms for other combinatorial games. Precisely, it allowed to design polynomial-time approximation algorithms for various (NP-hard) variants of the surveillance game [15]. In this paper, we present a new successful application of this approach. In particular, we consider the Spy-game [8,10] and show that it can be solved in polynomial-time in trees using this approach. We emphasize that, as far as we know, it is the first exact algorithm for such combinatorial games using a Linear Programming approach and that we were not able to solve it without this technique. We hope that our results will encourage people to use this framework to study combinatorial games and we believe it will enable progress toward solutions of the difficult open problems. Spy-game. The Spy-game has been defined as it is closely related to the Cops and fast robber game and it generalizes the Eternal Domination Problem [8,10]. The Spy-game is a turn-by-turn 2-Player game with perfect information. The first player has a spy which is first placed at some vertex of a graph G. The second player has k ∈ N guards that are then placed at some vertices of G. During each round, the spy may first move along at most s ≥ 1 edges (s ∈ N * is the speed of the spy), and then each guard may move along one edge. Any number of guards and the spy may occupy the same vertex. The goal of the game is to minimize the number of guards, called the guard-number and denoted by gn s,d (G), ensuring that, at the end of each round, the spy is at distance at most d ∈ N from at least one guard (we say that the spy is controlled at distance d). Note that, in the case s = 1, then gn 1,d (G) = 1 since once a guard is at distance d from the spy (which can be the case initially), the same guard can keep its distance at most d from the spy if the guards's speed is at least the speed of the spy. Therefore, in the whole paper, we only consider the case s ≥ 2 (while the guards' speed is one). Moreover, when d = 0 and s is large (at least the diameter of G), the Spy-game is equivalent to the Eternal Domination Problem. The guard-numbers of paths and cycles, and corresponding optimal guards' strategies, have been characterized in [8]. To tackle the more difficult case of trees, we consider the fractional variant of the Spy-game, in which the rules are unchanged for the spy but the guards can be split into arbitrarily small entities. Fractional Spy-game. Formally, the fractional Spy-game proceeds as follows in a graph G = (V, E). Let s ≥ 2, d ≥ 0 be two integers and let k ∈ R such that k > 0. First, the spy is placed at a vertex. Then, each vertex v receives some amount g v ∈ R + (a non negative real) of guards such that the total amount of guards is v∈V g v = k. Then, on its turn, the spy may first move at distance at most s from its current position. Then, the "fractional" guards move following a flow constrained as follows. For any v ∈ V and for any u ∈ N [v] 1 , there is a flow f (v, u) ∈ R + of guards going from v to u ∈ N [v] such that u∈N [v] f (v, u) = g v , i.e., the amount of guards leaving v and staying at v is exactly what was at v. Finally, for any vertex v ∈ V , the amount of guards occupying v at the end of the round is g v = u∈N [v] f (u, v). We now need to rephrase the fact that the guards control the spy at distance d at the end of each round. This is the case if, after every guards' turn, w∈N d [x] g w ≥ 1, where x is the vertex occupied by the spy. Let f gn s,d (G) denote the minimum total amount of fractional guards needed to always control at distance d a spy with speed s in a graph G. Note that, by definition, since the fractional game is a relaxation of the "integral" Spy-game: Claim 1. For any graph G and any s ≥ 2, d ≥ 0, f gn s,d (G) ≤ gn s,d (G).
In this paper, we use the fractional variant of the Spy-game to show the first non-trivial lower bound on the guard-number of grids. Moreover, we give the first exact algorithm using the framework of fractional combinatorial games (in the case of trees).

Related Work
Spy-game. The Spy-game has been defined in [8,10]. It has been shown that, for every d ≥ 0 and s ≥ 2, computing gn s,d (G) is NP-hard in a subclass of chordal graphs (precisely, graphs obtained from a clique and some paths, where one end of each path is connected to some vertices of the clique) [8,10]. The guard-number of paths is also characterized and almost tight lower and upper bounds are given in the case of cycles. More precisely, gn s,d (P ) = n 2d+2+ 2d s−1 for any n-node path P . Moreover, the strategy consists of partitioning the path into gn s,d (P ) subpaths with one guard assigned to each one [8,10]. We show that such a strategy (assigning disjoint subtrees to each guard) is not necessarily optimal in trees (see Section 4). Eternal Domination. The Spy game generalizes the Eternal Domination Problem [16]. In the latter game, a team of mobile agents (cops) occupy some vertices of a graph. In each round, the second player attacks some vertex v and then each of the cops is allowed to move to one of its neighbors or may stay idle such that at least one cop occupies v (note that in the original variant, only one agent was allowed to move in each round [7]). In other words, the agents must always occupy a dominating set D, such that for any vertex v / ∈ D, the agents can move to another dominating set containing v. The minimum number of agents ensuring to win the game in a graph G is denoted by γ m (G). It is easy to see that the Eternal Domination Problem is equivalent to the Spy game when the spy is arbitrarily fast and d = 0, i.e., γ m (G) = gn s,0 (G) for any s which is at least the diameter of the graph. Therefore, our results apply to the Eternal Domination Problem.
Eternal Domination has been investigated in several graph classes. In grids, only a few cases are known: for instance, tight bounds are known in m×n grids for n ≤ 4 [3,11] and the case n = 5 is considered in [28]. The best known general upper bound in grids is nm 5 +O(n+m) [23]. Note that the minimum size of a dominating set in any grid has only recently been characterized [17]. In the class of trees T , γ m (T ) can be computed in polynomial-time [20]. The key property in this simple recursive algorithm is that an optimal strategy consists of partitioning a tree into vertex-disjoint stars, each star being assigned to at most 2 cops. As already mentioned, such a method does not extend to the Spy-game.

Our results
We study the Spy-game in the classes of trees and grids. We prove that the guard-number of any tree can be computed in polynomial-time and give non-trivial lower and upper bounds on the fractional guard-number of grids. More precisely, for every s ≥ 2 and d ≥ 0: • We design a Linear Program that computes f gn s,d (T ) and a corresponding strategy in polynomial-time for any tree T . Then, we show that any fractional strategy (winning for the guards) using k guards in a tree can be turned into a winning (integral) strategy using k guards. The key argument is that we can restrict the study to what we call Spypositional strategies. Altogether, this shows that, in any tree T , f gn s,d (T ) = gn s,d (T ), and that gn s,d (T ) and a corresponding winning strategy can be computed in polynomial-time.
• Then, we show that there is a constant 0 < β * < 1 such that, for any n × n grid G n×n with n large enough, Ω(n 1+β * ) = f gn s,d (G n×n ) ≤ gn s,d (G n×n ). This gives the first non trivial lower bound for the guard number in the class of grids. Finally, for α = log 2 (1+ 1 s ), we show that f gn s,d (G n×n ) = O(n 2−α ). Note that the best known upper bound for gn s,d (G n×n ) is O(n 2 ) 2 . A similar bound holds for the n × n torus. We believe that the methods using Linear Programming used in this paper are a promising way to better understand other combinatorial games in graphs.

Representation of winning strategies and Spy-positional strategies
In this paper, all graphs are simple (without loops nor multi-edges), connected, and undirected.
be the set of vertices at distance at most s from v.
A strategy for the guards is a function describing the moves of the guards in each round. A strategy is winning if it allows the guards to perpetually control the spy. Note that there is always an optimal winning strategy (using the minimum number of guards) which is positional, i.e., such that the next move is only determined by the current position of both the spy and the guards, and not by the history of the game. This is because the Spy-game is a parity game (by considering the directed graph of configurations) and parity games always admit positional strategies for the winning player [22].
In other words, there is always an optimal winning strategy which is a function that takes the current positions of the spy and of the guards and returns the new positions of the guards (and so, their moves).
Representation of (fractional) guards' strategies. Let G = (V, E) be an n-node graph, s ≥ 2 and d ≥ 0 be two integers. Let V = {v 1 , · · · , v n }. A winning strategy σ using k ∈ R + guards is defined as a set σ = {C v } v∈V of sets of configurations. That is, for any v ∈ V (a possible position for the spy), C v is a non-empty set of functions, called configurations, that represent the possible positions of the guards when the spy is at v. More precisely, any ω ∈ C v is a function ω : V → R + , where ω(u) ∈ R + represents the amount of guards at vertex u ∈ V when the spy occupies v, that must satisfy u∈V ω(u) = k and u∈N d [v] ω(u) ≥ 1. Finally, for any v ∈ V , any ω ∈ C v , and any v ∈ N s [v], there must exist ω ∈ C v such that the guards can go from ω to ω in one round. That is, for any possible move of the spy (from v to v ), there must exist a valid flow from ω to ω (the guards must be able to reach a configuration controlling the spy in v ). A strategy is integral if k ∈ N + , each of its configurations is a function V → N, and every move is an integral flow. The size of a strategy is the number of different configurations necessary to describe the strategy, i.e., the size of σ is v∈V |C v |. Note that, a single position for the spy may correspond to many different positions of the guards. Therefore, the size of an integral strategy using k guards in an n-node graph is n O(k) . Moreover, the size of a fractional strategy is a priori unbounded.
Spy-positional strategies. In this paper, we will also consider more constrained strategies. A winning strategy is said to be Spy-positional if it depends only on the position of the spy. That is, in a spy-positional strategy σ = {C v } v∈V , the positions of the guards are only determined by the position of the spy. In particular, every time the spy occupies some vertex v, the set of vertices occupied by the guards is defined by a unique function σ v : V (G) → N such that, for every u ∈ V , σ v (u) is the number of guards occupying u when the spy is occupying v. That is, An important consequence for our purpose is that any (fractional or integral) spy-positional strategy has size O(n).
Let us remark that, in a spy-positional strategy, it is not required that the same guards occupy the same vertices when the spy is at some vertex. That is, assume that, at the end of some round, the spy occupies some vertex v, some Guard A occupies a vertex a and a guard B occupies a vertex b. It may happen that, after some rounds and at the end of such a round, the spy goes back to v and now Guard A is at b and Guard B is at a (however, the set of vertices occupied by the guards is the same).
Second, there does not always exist an optimal strategy (using the minimum number of guards) that is spy-positional. As an example, consider the cycle C 5 with 5 vertices {a, b, c, d, e}. It is easy to show that gn 2,1 (C 5 ) = 1. However, consider the following execution. It is easy to see that we may assume that, initially, the guard occupies a neighbor of the spy. W.l.o.g., the spy starts at b while the guard is at a. Then, the spy goes to c and the guard has to go to b. The spy goes to d and the guard has to go to c. Finally, the spy goes back to b and the guard either stays at c or goes to b. Hence, every spy-positional strategy in C 5 needs 2 guards. One of our main results is to show that, in trees, there always exists an optimal strategy which is spy-positional.
Let f gn * s,d (G) be the minimum total amount of fractional guards needed to always control at distance d a spy with speed s in a graph G, when the guards are constrained to play spypositional strategies. By definition, for any graph G and any s ≥ 2, d ≥ 0, f gn s,d (G) ≤ min{f gn * s,d (G), gn s,d (G)}.

Spy-positional fractional strategies in general graphs
This section is devoted to present a polynomial-time algorithm that computes optimal spypositional fractional strategies in general graphs. Here, optimal means using the minimum total amount of guards with the extra constraint that guards are restricted to play spy-positional strategies. In other words, we prove that, for any graph G, s ≥ 2, and d ≥ 0, f gn * s,d (G) and a corresponding strategy can be computed in polynomial time.
We prove this result by describing a Linear Program with polynomial size that computes such strategies. In Section 4, we will show that in any tree T , gn s,d (T ) = f gn * s,d (T ). More precisely, we will show that in trees, the Linear Program below can be used to compute optimal (integral) strategies in polynomial time.
We describe a Linear Program for computing an optimal fractional spy-positional strategy. Variables. Let G = (V, E) be a connected n-node graph. Recall that a spy-positional strategy is defined by, for each position of the spy, the amount of guards that must occupy each vertex. Therefore, for any two vertices u, v ∈ V , let σ v (u) ∈ R + be the non-negative real variable representing the amount of guards occupying vertex u when the spy is at v.
Moreover, for any x ∈ V , y ∈ N s [x] and for any u ∈ V and v ∈ N [u], let f x,y,u,v ∈ R + be the non-negative real variable representing the amount of guards going from vertex u to v ∈ N [u] when the spy goes from x to y ∈ N s [x]. Finally, a variable k will represent the total amount of guards. Overall, there are O((|E| + n + 1)n 2 ) = O(n 4 ) real variables.
These variables fully describe a strategy since σ encodes a distribution of guards for every position of the spy and f describes a feasible transition between two successive distributions. Objective function. We aim at minimizing the total amount of guards.

Constraints.
The first family of constraints states that, for every position v ∈ V of the spy, the total amount of guards is at most k.
∀v ∈ V, The second family of constraints states that, for every position v ∈ V of the spy, the amount of guards at distance at most d from the spy is at least 1, i.e., the guards always control the spy The third family of constraints states that, for any move of the spy (from x to y ∈ N s [x]), the corresponding moves of the guards ensure that the amount of guards leaving a vertex v ∈ V plus what remains at v equals the amount of guards that was at v before the move.
The fourth family of constraints states that, for any move of the spy (from x to y ∈ N s [x]), the corresponding moves of the guards ensure that the amount of guards that are at a vertex w ∈ V after the moves equals the amount of guards arriving in w plus what remains at w.
Finally, the last family of constraints expresses the definition domain of the variables: There are O(n 4 ) constraints and the above Linear Program has polynomial size and clearly computes an optimal spy-positional fractional strategy. Hence: For any connected graph G, and any two integers s ≥ 2 and d ≥ 0, the above Linear Program computes f gn * s,d (G) and a corresponding spy-positional strategy in polynomial time.

Spy game is Polynomial in Trees
This section is devoted to the study of the Spy-game in trees (Theorem 13). Before going into the details, we would like to emphasize one difficulty when dealing with guards' strategies.
A natural idea would be to partition the tree into smaller subtrees (with bounded diameter) with a constant number of guards assigned to each of them. That is, each guard would be assigned (possibly with other guards) a subtree S and would move only when the spy is in S (in particular, the guard would only occupy some vertices of S). As already mentioned, there exist such strategies that are optimal in paths [8,10] or in trees when d = 0 and s is large (Eternal Domination) [20]. We show that we cannot expect such strategies for the Spy-game (for any s ≥ 2 and d > 0) in trees and hence, optimal guards' strategies seem difficult to be described in trees. We present an example in the case s = 2 and d = 1 but it can be generalized to any s ≥ 2 and d > 0 (by increasing the branches of the star S defined below).
Lemma 3. Let s = 2 and d = 1. There exists a family of trees with unbounded guard-number such that, for each of these trees, there is a strategy of the spy that forces every guard to occupy each non-leaf vertex infinitely often, whatever be the optimal strategy followed by the guards.
Proof. Let S be the tree obtained from a star with three leaves by subdividing each edge exactly twice (i.e., S has 10 vertices). Let (S i ) i≤k be k disjoint copies of S and let c i be the unique vertex of degree 3 of S i . Finally, let T be the tree obtained by adding one vertex c and making it adjacent to every c i , i ≤ k. Note that |V (T )| = 10k + 1 = n.
First, let us show that gn 2,1 (T ) = k + 1 = Θ(n) and that, when the spy is in c, the guards have to occupy the vertices c, c 1 , · · · , c k . We label the vertices as follows where 1 ≤ j ≤ 3k: let v 3j be a leaf, let v 3j−1 be the vertex adjacent to the leaf v 3j , and let v 3j−2 be the vertex adjacent to v 3j−1 and c i for i = j 3 (see Figure 1). Figure 1: Scheme of the tree T (in the proof of Lemma 3) where only the subtrees S 1 , S i and S k have been depicted (for some i such that 2 ≤ i < k). In the subtree S i , {j, j , j } = {3i − 2, 3i − 1, 3i}, i.e., i = z 3 for every z ∈ {j, j , j }.
• A strategy using k + 1 guards proceeds as follows. In any round, the vertices c 1 , · · · , c k are occupied (not necessarily by the same guards). Then, if the spy occupies c or one of the c i 's, one guard occupies c. If the spy occupies v 3j−1 or v 3j−2 for some j ≤ 3k, then v 3j−2 must be occupied by a guard. Finally, if the spy occupies v 3j , then v 3j−1 must be occupied by a guard. It is easy to see that, whatever be the strategy of the spy, the guards may move (at most 2 guards per round) as to ensure the desired positions. • Now we prove the lower bound. We now suppose the game is being played with at most k guards. The spy starts at a leaf v 3j for some 1 ≤ j ≤ 3k and moves at full speed to another leaf v 3l for some 1 ≤ l ≤ 3k such that l = j. Then, there must be a guard at either v 3j or v 3j−1 initially and when the spy reaches v 3j−2 , there must be at least one other guard at a vertex in the same subtree S i for i = j 3 as otherwise, the spy could move to one of {v 3(j+1) , v 3(j+2) } and win. Since there are two guards in the same subtree as the spy, then the spy moves to c. Neither of the two previous guards can reach any of the other k − 1 vertices c i in this round. There must be at least one guard in each of the other k − 1 subtrees S i as otherwise, the spy moves to a leaf in one of these subtrees and wins since it would take him two rounds but a guard at c could only be at distance at least 2 from the spy after two rounds. It also follows that, when the spy is at c, the guards must occupy the vertices c, c 1 , · · · , c k . Therefore, the spy wins against k guards. Now, we can prove the main statement of the lemma. For any i ≤ k and any vertex v ∈ V (T ) of degree two, there is a strategy of the spy that brings the guard initially at c i to v and thus, to any non-leaf vertex. For this purpose, let j = i be such that v ∈ V (S j ). The spy first goes (at full speed) to a leaf of S i , then to another leaf of S i , then it goes to a leaf of S j that is not the neighbor of v and finally the spy goes to the leaf neighbor of v. It can be verified that the guard that was initially at c i must occupy v. Repeating infinitely this strategy (for any v and i) gives the strategy announced in the statement.
To overcome this difficulty, we use the power of Linear Programming. Precisely, we prove that, in any tree T and for any s ≥ 2, d ≥ 0, gn s,d (T ) = f gn * s,d (T ). Therefore, using the Linear Program of Section 3, it follows that computing gn s,d (T ) can be done in polynomial time in trees. The proof is twofold. First, we prove that gn s,d (T ) = f gn s,d (T ) for any s ≥ 2 and d ≥ 0 (i.e., the integrality gap is null in trees), and then that f gn s,d (T ) = f gn * s,d (T ). Theorem 4. For any tree T and for any s ≥ 2, d ≥ 0, gn s,d (T ) = f gn s,d (T ). More precisely, any fractional winning strategy using a total amount of k ∈ R + guards can be transformed into an integral winning strategy using k guards. Moreover, such a transformation can be done in polynomial time in the size of the fractional strategy.
Proof. Let σ = {C v } v∈V be any fractional winning strategy using a total amount of k ∈ R + guards to control a spy with speed s ≥ 2, at distance d ≥ 0, and in an n-node tree T = (V, E).
We build a winning integral strategy σ r using k guards by "rounding" all configurations of σ. For any configuration ω of σ, we will define an integral configuration ω r (which we call a rounding of ω) using k guards (Claim 5), such that if the spy is controlled in ω then it is also controlled in ω r (Claim 6). Moreover, for any two configurations ω 1 and ω 2 such that there is a feasible flow from ω 1 to ω 2 , we show that there is feasible integral flow from ω r 1 to ω r 2 (Claim 7). Altogether, this shows that σ r is a winning integral strategy using k guards, which proves the theorem.
From now on, let us consider T to be rooted at some vertex r ∈ V . Notations. For any u ∈ V , let T u be the subtree of T rooted in u (i.e., the subtree that consists of u and all its descendants) and let Children(u) be the set of children of u. For any configuration ω : V → R + , let ω(T u ) = v∈V (Tu) ω(v) and let ω(T ) = ω(T r ). By definition, , cont(T, ω) is the set of vertices u such that the spy on u is controlled at distance d by the guards in the configuration ω).
Let us define the rounded configuration ω r : V → N as, for every u ∈ V , Intuitively, the fractional part of guards that are in each of the subtrees rooted in the children of u is "pushed" to u. Then, u "keeps" only the integral part of the sum of what it had plus what it received from its children.
We first prove that rounding a configuration using k guards provides an integral configuration using k guards.
Proof of the claim. The proof is by induction on |V |. It clearly holds if |V | = 1. Let T 1 , . . . , T h 8 be the subtrees of T \r rooted in the children of r. By definition, Then, Claim 6 proves that every position of the spy that is controlled by the guards in a configuration ω is also controlled by the guards in the configuration ω r .
that is closest to the root r, and let T be the subtree of T rooted in r . Finally, let Finally, Claim 7 shows that the moves that were valid in σ still hold in the "rounded" strategy.
Claim 7. Let ω 1 , ω 2 : V (T ) → R + be two configurations such that the guards can go from ω 1 to ω 2 in one round (there is feasible flow from ω 1 to ω 2 ). Then, the guards can go from ω r 1 to ω r 2 in one round (there is feasible integral flow from ω r 1 to ω r 2 ).
Proof of the claim. The proof is by induction on k, the result being trivial when k = 0 (note that k = ω r 1 (T ) = ω r 2 (T )). Let f be the flow representing the move of the guards from ω 1 to ω 2 . Clearly, we may assume that, ∀u, v ∈ V , at most one of f (u, v) and f (v, u) is non-null.
Among all vertices v ∈ V such that ω 1 (T v ) ≥ 1 or ω 2 (T v ) ≥ 1, let x be a lowest one (such a vertex furthest from the root). By symmetry (there is a feasible flow from ω 1 to ω 2 if and only if there is a feasible flow from ω 2 to ω 1 ), up to exchanging ω 1 and ω 2 , we may assume that ω 1 (T x ) ≥ 1. Note that, by the minimality of x, for every descendant u ∈ V (T x ) \ {x} of x, ω 1 (T u ) < 1 and ω 2 (T u ) < 1. Now, let γ 1 be the function defined by Now, there are two cases to be considered. • First, assume that ω 2 (T x ) ≥ 1. In this case, let γ 2 be the function defined by Note that there is a feasible flow f from γ 1 to γ 2 : for any Since ω r 1 (resp., ω r 2 ) is obtained from γ r 1 (resp., γ r 2 ) by adding 1 guard in x, this flow f * is also a feasible integral flow from ω r 1 to ω r 2 . • Second, ω 2 (T x ) < 1. Let p be the parent of x (x cannot be the root since ω r 2 (T ) ≥ 1). Note that, because there is flow from ω 1 to ω 2 , then ω 2 (p) + ω 2 (T x ) ≥ ω 1 (T x ) ≥ 1. In this case, let γ 2 be the function defined by γ 2 (u) = 0 for every Since ω r 1 (resp., ω r 2 ) is obtained from γ r 1 (resp., γ r 2 ) by adding 1 guard in x (resp., in p), there is a feasible integral flow from ω r 1 to ω r 2 that can be obtained from f * by adding to it one unit of flow from x to p.
This concludes the proof of Theorem 4.
The second step in this section is to show that there is always an optimal fractional strategy which is spy-positional. For this purpose, we prove the following theorem.
Theorem 8. For any tree T and for any s ≥ 2, d ≥ 0, f gn * s,d (T ) = f gn s,d (T ). More precisely, any fractional winning strategy using a total amount of k ∈ R + guards can be transformed into a spy-positional winning strategy using k guards.
Proof. Let σ = {C v } v∈V be any fractional winning strategy using a total amount of k ∈ R + guards to control a spy with speed s ≥ 2, at distance d ≥ 0, and in an n-node tree T = (V, E). Recall that, for any vertex v ∈ V , C v is the set of possible configurations ω : V → R + for the guards when the spy is at v.
The proof consists of defining a spy-positional strategy σ min that is a winning strategy using k guards. For any v ∈ V , we will define the function ω min v : V → R + to be the (unique) configuration of σ min when the spy is at v, i.e., σ min = {ω min v } v∈V . We first prove that σ min is a strategy using k guards (Claims 9-10), then that the spy at v ∈ V is controlled at distance d by the guards in the configuration ω min v (Claim 11). Finally, we prove that, for any move of the spy from v to v ∈ V , the guards can move from ω min v to ω min v (Claim 12). From now on, T is rooted in an arbitrary vertex r ∈ V .
Notations. For any weight function ω : V → R + , let ω + : V → R + be the cumulative function of ω, defined by, for every u ∈ V , ω + (u) = v∈V (Tu) ω(v) = ω(T u ). Let v ∈ V and C v = {ω 1 , · · · , ω h } ∈ σ be the set of configurations of the guards, when the spy is in v. Let α v : V → R + be such that, for every u ∈ V , α v (u) = min 1≤i≤h ω + i (u). Now, ω min v is defined as the (unique) function such that α v is its cumulative function, i.e., Claim 11 proves that the guards in the configuration ω min v control a spy located at v.
Finally, Claim 12 shows that the moves that were valid in σ still hold for σ min . Proof of the claim. Let C v = {ω 1 , · · · , ω h } ∈ σ (the configurations of σ when the spy is at v) and C v = {ω 1 , · · · , ω h } ∈ σ (the configurations of σ when the spy is at v ). Since σ is a winning strategy, it means that, for every 1 ≤ i ≤ h, there is 1 ≤ δ(i) ≤ h , such that there is a feasible flow from ω i ∈ C v to ω δ(i) ∈ C v . That is, there is a function f i : Note that, such a function f i can be defined as, for every u ∈ V and p ∈ V , the parent of u in T rooted in r (if u = r), f i (u, p) = max{ω + i (u) − (ω δ(i) ) + (u), 0} and f i (p, u) = max{(ω δ(i) ) + (u) − ω + i (u), 0}. Let u ∈ V , X ⊆ Children(u) be any subset of the children of u, and 1 ≤ i ≤ h. Because of the existence of the flow f i , w∈X (ω δ(i) ) + (w) ≤ ω i (u) + w∈X ω + i (w), hence: and so, since for every w ∈ V , α v (w) = min 1≤j≤h (ω j ) + (w) and α v (w) = min 1≤j≤h ω + j (w): The above inequality holds for every 1 ≤ i ≤ h. Since α v (u) = min 1≤i≤h ω + i (u), it follows that: By similar arguments (because, by symmetry, there is a flow from ω j to some ω j for every 1 ≤ j ≤ h ), we get We need to prove that there exists a function f : By definition, f preserves the amount of guards in every subtree. Consequently, it also preserves it at every node and so for every w)). Hence, we only need to prove that w∈N (u) f min (u, w) ≤ ω min v (u). Let u ∈ V , p its parent (if u = r), and let X ⊆ Children(u) be the set of vertices such that, for every w ∈ X, f min (u, w) = α v (w) − α v (w) > 0. There are two cases to be considered.
• First, let us assume that f min (u, p) = 0.
This concludes the proof of Theorem 8.
We can now prove the main theorem of this section.
Theorem 13. Let s ≥ 2 and d ≥ 0 be two integers. There is a polynomial-time algorithm that computes an integral winning strategy using gn s,d (T ) guards to control a spy with speed s at distance d in any tree T .
Proof. By Theorem 8, there exists an optimal (fractional) winning strategy that is spy-positional for T . By Theorem 2, such a strategy can be computed in polynomial time. From that strategy, Theorem 4 can compute in polynomial time an optimal integral winning strategy for T .

Spy-game in Grid and Torus
It is clear that, for any n × n grid G, gn s,d (G) ≤ |V (G)| = O(n 2 ). However, the exact order of magnitude of gn s,d (G) is not known. In this section, we prove that there exists β * > 0, such that Ω(n 1+β * ) guards are necessary to win against one spy in an n × n-grid. Our lower bound actually holds for the fractional relaxation of the game. Precisely, we prove that f gn s,d (G) is super-linear and sub-quadratic (in the side n). Let n, m ≥ 2 be two integers. We consider the n × m toroidal grid T G n×m = (V, E), i.e., the graph with vertices v i,j = (i, j) and edges {(i, j), (i+1 mod n, j)} and {(i, j), (i, j +1 mod m)}, for all 0 ≤ i < n and 0 ≤ j < m. The n × m grid G n×m is obtained from T G n×m by removing the edges {{(i, m − 1), (i, 0)}; {(n − 1, j), (0, j)} | ∀0 ≤ i < n, 0 ≤ j < m}.
First, we show that the number of fractional (resp., integral) guards required in the grid and in the torus have the same order of magnitude. Precisely: Lemma 14. For every n, m ≥ 2, s ≥ 2, d ≥ 0, and for every f ∈ {gn s,d , f gn s,d , f gn * s,d }: Proof. Let us present the proof in the integral case, i.e., when f = gn s,d , the other two cases are similar. Let σ be a winning strategy using k guards in T G n×m . We define a winning strategy using 4k guards in G n×m . For this purpose, let us label the guards used by σ as G 1 , · · · , G k . In G n×m , the behavior of Guard G i (1 ≤ i ≤ k) is "simulated" by four guards as follows. The guard G i being at (x, y) ∈ V (T G n×m ) is simulated by one guard at each of the four vertices: . That is, one of the four guards occupies (x, y) while the other three guards occupy its images with respect to the horizontal, vertical, and diagonal axes. Hence, gn s,d (G n×m ) ≤ 4 · gn s,d (T G n×m ).
Let σ be a winning strategy using k guards in G n×m . We define a winning strategy using 4k guards in T G n×m . Our strategy actually allows to control four spies whose moves are correlated. Precisely, assume that when one spy occupies vertex (x, y), the three other spies occupy respectively (n − 1 − x, y), (x, m − 1 − y), and (n − 1 − x, m − 1 − y). We divide the 4k guards into four teams, each of which uses the strategy σ (i.e., they all act as if they were in the grid) to control one of the four spies. When some spies cross an edge of E(T G n×m ) \ E(G n×m ), some teams will exchange their target. Hence, gn s,d (T G n×m ) ≤ 4 · gn s,d (G n×m ).
The first of the two main results of this section is: Theorem 15. There exists β * > 0 such that, for every s ≥ 2, d ≥ 0, f gn s,d (G n×n ) = Ω(n 1+β * ).
Section 5.1 is devoted to prove Theorem 15, and Section 5.2 will be devoted to prove the second main result of this section which is that f gn s,d (G n×n ) and f gn s,d (T G n×n ) are subquadratic (in the side n) when s is a constant.

Lower bound in Grids
The goal of this section is to prove that there exists β * > 0 such that f gn s,d (G n×n ) = Ω(n 1+β * ), i.e., the number of guards required in any n × n-grid is super-linear in the side n of the grid. We first make the following observation, which we will need for the proof of Theorem 26: Observation 17. In the class of n × n grids, gn s,d and f gn s,d are increasing functions of n.
Proof. For every n ≥ n, any strategy played by the guards on the n ×n grid can be transformed into a strategy on the n × n grid. Indeed, it is sufficient to project any quantity of guards located on a vertex v ∈ G n ×n onto the vertex of G n×n that is the closest to it, with respect to the Hamming distance (i.e., L 1 distance). Note that this vertex is unique, and that this transformation is compatible with moves between two consecutive positions.
To prove this section's lower bound on grids, let us define (yet) another parameter. For any s ≥ 2, d ≥ 0, t ≥ 0, q ≥ 1, and any graph G (note that t may be a function of |V (G)|), let gn q,t s,d (G) be the minimum number k of guards such that there is an integral strategy using k guards that ensures that at least q guards are at distance at most d from a spy with speed s during at least the first t rounds. Note that, by definition, sup t gn 1,t s,d (G) ≤ gn s,d (G). The first step of the proof is that gn q,2n s,d (G n×n ) = Ω(q · n log n) in any n × n-grid and then we "extend" this result to the fractional strategies. The latter result will then be used as a "bootstrap" in the induction proof for the main result. Let H : Lemma 18. ∃β ≥ 1/48 such that for any n ∈ N, s ≥ 2, d ≥ 0 (possibly d depends on n), q > 0, ).
Proof. The proof is for s = 2 since gn q,2n s,d (G n×n ) ≥ gn q,2n 2,d (G n×n ). In order to prove the result, we will consider a family of strategies for the spy. For every 0 ≤ r < n, the spy starts at position (0, 0) and runs at full speed toward (r, 0). Once there, it continues at full speed toward (r, n − 1). We name P r the strategy defined by that path (which is completed in 1 2 (r + n − 1) rounds) and sometimes use the same notation to denote the path itself. Note that the guards may be aware of the family of strategies played by the spy but do not know r in advance.
Let us assume that there exists a strategy using an amount k of guards that maintains at least q guards at distance at most d from the spy during at least 2n rounds. Moreover, the spy only plays the strategies described above.
Assuming that the guards are labeled with integers in {1, · · · , k}, we can name at any time of strategy P r the labels of q guards that are at distance at most d from the spy. In this way, let c(i, j) denote this set of q guards that are at distance at most d from the spy, when the spy is at position (i, j). Observe that this definition does not depend on the choice of r, since all strategies of our family that eventually reach position (i, j) are indistinguishable up to that round. Precisely, for any i ≤ n, when the spy reaches vertex (i, 0), it must be playing some strategy P r , for r ≥ i, but the guards do not know which one, and so c(i, 0) is independent of r ≥ i. Moreover, for any j > 0 and r ≤ n, the spy reaches vertex (r, j) only when it is playing the strategy P r . Hence, there is no ambiguity. Claim 19. Let j 1 , j 2 ∈ N * such that 2j 1 < n and 2j 2 < n. If |j 2 − j 1 | > 2d, then c(r, 2j 1 ) and c(r, 2j 2 ) are disjoint.
Proof of the claim. Assuming r 1 < r 2 , note that strategies P 2r1 and P 2r2 are identical for the first r 1 rounds. The spy is at position (2r 1 , 0) when they split. If c(2r 1 , 2j 1 ) intersects c(2r 2 , 2j 2 ) on a given guard, it means that at this instant (i.e., at round r 1 ) that guard is simultaneously at distance at most d + j 1 from (2r 1 , 2j 1 ) 3 and at distance at most d + |r 2 − r 1 | + j 2 from (2r 2 , 2j 2 ) 4 since the guard belongs to both sets. As those two points are at distance 2|r 2 − r 1 | + 2|j 2 − j 1 | from each other, we have: We can now proceed to prove that the number of guards is sufficiently large. To do so, we define a graph H on a subset of V (G n×n ) and relate the distribution of the guards (as described by c) with the independent sets of H by treating every guard as a color. Intuitively, an independent set I in H will consist of a set of sets c(i, j) of guards that must be pairwise disjoint. It is defined over V (H) = {(2r, 4dj) : 0 ≤ 2r < n, 0 ≤ 4dj < n}, where: • (2r, 4dj 1 ) is adjacent with (2r, 4dj 2 ) for j 1 = j 2 (see Claim 19). Claim 20). By definition, c gives q colors (represented by the q guards) to each vertex of H and any set of vertices of H receiving a common color is an independent set of H. If we denote by #c −1 (x) the number of vertices which received color x, and by α (2r,4dj) (H) the maximum size of an independent set of H containing (2r, 4dj), we have: It is easy, however, to approximate this lower bound.
We can now finish the proof: where H is the harmonic function.
Next, we aim at transposing Lemma 18 in the case of fractional strategies.

Lemma 22.
Let n ∈ N * and d ∈ N (possibly depending on n). There exists β > 0 (the one of Lemma 18) such that f gn s,d (G n×n ) ≥ β n d+1 H( n d+1 ), where H is the harmonic function. Moreover, against a smaller amount of guards, the spy wins after at most 2n rounds starting from a corner of G n×n .
Proof. Let us start by the following claim.
Claim 23. Let G be any graph with n vertices and d, s, t, q ∈ N. Then, Proof of the claim. From a fractional strategy using a total amount c of guards, let us define an integral strategy keeping at least q guards at distance at most d from the spy during at least t rounds. Initially, each vertex v which has an amount x v of guards in the fractional strategy receives x v q + (t + 1)n guards in the integral strategy. That is, our integral strategy uses at most v∈V (G) (( x v q + (t + 1)n) ≤ (t + 1)n 2 + v∈V (G) x v q ≤ (t + 1)n 2 + cq guards. We then ensure that, in each round t ∈ {1, ..., t}, a vertex v occupied by an amount of x v guards in the fractional strategy is occupied by at least x v q + (t − t )n guards in the integral strategy. To this aim, whenever an amount x uv of guards is to be moved from u to v in the fractional strategy, we move x uv q + 1 in the integral strategy.
Precisely, let x v (resp., x v ) be the amount of guards at v in round t (resp., at t + 1). Let A ⊆ N (v) be the set of neighbors of v sending it a positive amount of flow and let B ⊆ N (v) be the set of neighbors of v that receive a positive amount of flow from v. We have In the integral strategy, by induction on t , we get that, after round t + 1, the number of guards at v is at least Since B ⊆ N (v), |B| < n and so, the number of guards at v in round t + 1 is at least As our invariant is preserved throughout the t rounds, the spy which had an amount of at least 1 guard within distance d in the fractional strategy now has at least q guards around it, which proves the result. Indeed, the number of guards at distance at most d from the spy (occupying vertex y in round t ≤ t) is at least The previous claim holds for every q ∈ N. Therefore, lim sup q→∞ gn q,t s,d (G) q ≤ f gn s,d (G).
Finally, by Lemma 18, there exists β > 0 such that gn q,2n s,d (G n×n ) ≥ β · q · n d+1 H( n d+1 ). Altogether, f gn s,d (G n×n ) ≥ β n d+1 H( n d+1 ). Moreover, Lemma 18 shows that against strictly less than β · q · n d+1 H( n d+1 ) integral guards, the spy will win in 2n rounds, starting from the corner. By the claim, this result implies that the spy will win in 2n rounds, starting from the corner, against less than β n d+1 H( n d+1 ) fractional guards.
The next lemma is a key argument for our purpose. While it holds for any graph and its proof is very simple, we have not been able to prove a similar lemma in the classical (i.e., nonfractional) case. Note that this is the only part in this section where we really need to consider the fractional variant of the spy game.
Lemma 24. Let G = (V, E) be any graph and s ≥ 2, d ≥ 0 be two integers with f gn s,d (G) > c ∈ Q * where the spy wins in at most t rounds against c guards starting from v ∈ V (G).
For any fractional strategy using a total amount k > 0 of guards, there exists a strategy for the spy (with speed s) starting from v such that after at most t rounds, the amount of guards at distance at most d from the spy is less than k/c.
Proof. For purpose of contradiction, assume that there is a strategy S using k > 0 guards that contradicts the lemma. Then, consider the strategy S obtained from S by multiplying the number of guards by c/k. That is, if w ∈ V is initially occupied by q > 0 guards in S, then S places qc/k guards at w initially (note that S uses a total amount of kc/k = c guards). Then, when S moves an amount q of guards along an edge e ∈ E, S moves qc/k guards along e. Since S contradicts the lemma, in any round ≤ t, at least an amount k/c of guards is at distance at most d from the spy, whatever be the strategy of the spy. Therefore, S ensures that an amount of at least 1 guard is at distance at most d from the spy during at least t rounds. This contradicts that the spy wins after at most t rounds against a total amount of c guards.
From Lemmas 22 and 24, we get Corollary 25. Let n ∈ N * and d ∈ N (possibly depending on n). There exists β > 0 (the one of Lemma 18) such that for any strategy using a total amount of k > 0 guards in G n×n , there exists a strategy for the spy (with speed s, starting from a corner of G n×n ) such that after at most 2n rounds, the amount of guards at distance at most d from the spy is less than . The next Theorem is the main result of this section. Before going into the details, we aim at providing informal guidelines of its proof. In a few words, we use Corollary 25 recursively to show that if G n×n requires Θ(n log(n)) guards, then a spy traveling in a larger G an×an grid (for a large integer a) must have, at all times, at least Θ(n log(n)) guards in any G n×n grid that contains the spy. This provides a new lower bound, on which we recurse until the claimed lower bound is obtained.
Proof. Let a ≥ 2 be an integer and let β > 0 be the constant defined in Lemma 18. Note that, as f gn s,d is monotone by Observation 17, we only need to prove the theorem for grids of side n ∈ {a c | c ∈ N}. Let us then define n = a c for some c ≥ 1 and d p = 4n a p for every p ∈ N * , where 4n/a p ≥ d. The following claim is a recursive application of Corollary 25: Claim 27. Let p ∈ N * such that d p = 4n/a p ≥ 1. For any k > 0, there is a spy-strategy (against an amount of k fractional guards) in G n×n such that, after p i=1 2n a i−1 rounds, the amount of guards at distance at most d p from the spy is less than .
Proof of the claim. The proof is by induction on p ≥ 1. By Corollary 25 applied for d 1 , there is a spy-strategy (against fractional guards) such that, after 2n rounds, the amount of guards at distance at most d 1 from the spy is less than k β n d 1 +1 H( n d 1 +1 ) . Therefore, the induction hypothesis holds for p = 1. Let us assume by induction that it holds for p − 1 ≥ 1. That is, there is a spy-strategy S p−1 such that, after 2n a i−1 rounds, the amount of guards at distance at most d p−1 from the spy is less than .
Let v p−1 be the vertex reached by the spy after the (t p−1 ) th round of the spy-strategy S p−1 . Let F p−1 be the set of vertices at distances at most d p−1 = 4n a p−1 from v p−1 and let H p be any subgrid of G n×n with v p−1 as corner and side n a p−1 . Note that any vertex in V (G n×n ) \ F p−1 is at distance at least 2n a p−1 from any vertex of H p (since a ≥ 2). Therefore, after following the spy-strategy S p−1 during t p−1 rounds, whatever the spy does during the next 2n a p−1 rounds, there can be at most guards in H p .
Starting from the configuration reached after the (t p−1 ) th round of the spy-strategy S p−1 , and applying Corollary 25 in H p (of side n/a p−1 ) and for d p , there is a spy-strategy S (against fractional guards) such that, after the next 2n a p−1 rounds, the amount of guards at distance at most d p from the spy is less than k p = kp−1 β n/a p−1 dp +1 H( n/a p−1 dp +1 ) . Hence, concatenating S p−1 and S , we get a spy-strategy S p (against fractional guards) such that, after 2n a i−1 rounds, the amount of guards at distance at most d p from the spy is less than .
Let us now simplify the bound provided in the above claim. We have: Hence, the above claim implies that, for any k > 0, there is a spy-strategy (against an amount of k fractional guards) in G n×n such that, after p i=1 2n a i−1 rounds, the amount of guards at distance at most d p from the spy is less than k p ≤ k (β a 5 H( a 5 )) p . Note that, for the guards' strategy to be winning, it must be ensured that k p ≥ 1 whenever d p ≥ d.
Let us now define a * to be any integer such that β a * 5 H( a * 5 ) > a * : it exists since this holds whenever H( a * 5 ) > 5 β , which is asymptotically true for a * (since β is a constant). Applying the previous claim with a = a * , n = (a * ) c , and with p ≤ c = log a * n such that d p ≥ d, we get that k p ≥ 1 implies: The above theorem proves Theorem 15 and Corollary 16.

Upper bound in Torus
The second of the two main results of this section is: To prove Theorem 28, we make use of the Linear Program (LP) of Section 3. Recall that, in a spy-positional strategy, the positions of the guards (configuration) only depend on the position of the spy. Also, note that T G n×n is a vertex-transitive graph, that is, given any two vertices u, v ∈ T G n×n , there exists an automorphism f : V (T G n×n ) → V (T G n×n ) such that f (u) = v. Roughly, every vertex in a vertex-transitive graph is the same. Then, in any vertex-transitive graph (so in T G n×n ), there is actually a unique configuration to be considered (where the spy is occupying the vertex (0, 0)). Therefore, the LP of Section 3 can be reformulated as follows.
Throughout subsection 5.2, all coordinates are assumed to be taken modulo n whenever appropriate. We are looking for a function ω : {0, · · · , n − 1} 2 → R + such that ω(i, j) is the amount of guards occupying the vertex (i, j) when the spy is occupying the vertex (0, 0). This function must be defined such as to minimize the number of guards, i.e., 0≤i,j<n ω(i, j) must be minimum, subject to the following constraints. The spy must be controlled, i.e., (i,j)∈N d [(0,0)] ω(i, j) ≥ 1. Moreover, for any move of the spy from (0, 0) to (x, y) ∈ N s [(0, 0)], there must be a feasible flow from the configuration (ω(i, j)) (i,j)∈V (T Gn×n) to (ω(i − x, j − y)) (i,j)∈V (T Gn×n) . Before going further, let us simplify the latter constraint. Indeed, instead of considering every possible move of the spy in N s [(0, 0)], we only consider the extremal moves from (0, 0) to one of the vertices in {(0, s), (s, 0), (−s, 0), (0, −s)}, i.e., we weaken the spy by allowing it to move only "horizontally" or "vertically" at full speed. We prove in Lemma 29 that it does not change the order of magnitude of an optimal solution.
Lemma 29. Let n, s ≥ 2, and d ≥ 0 be integers. Assume that there exists a (fractional or integral) winning strategy using k guards to control a spy, with speed s and restricted moves, at distance d in the n × n-torus. Then, there exists a (fractional or integral) winning strategy using O(s 2 k) guards to control a spy, with speed s, at distance d in the n × n-torus.
Proof. The proof is written in the integral case. The fractional case is similar.
For any strategy of a (non-restricted) spy, we will define a strategy for a restricted spy, called the spy's shadow, that ensures that the shadow is always at distance at most 2s from the non-restricted spy. To control the non-restricted spy, the strategy consists of applying the strategy σ against its shadow (i.e., using k guards) and replacing each guard γ of σ by O(s 2 ) guards, one at every vertex at distance at most 2s from the position of γ.
The shadow starts at the same vertex as the spy and "follows" it but only using restricted moves. The shadow can easily stay at distance < 2s from the spy if the spy moves from a vertex at distance < 2s from the shadow to a vertex at distance at least 2s (but < 3s since the spy has speed s) from the shadow. This means, then, that the shadow is at a position such that one of its coordinates differs by at least s from one of the spy's coordinates. So it can decrease its distance to the spy by exactly s using a restricted move. This means that after the shadow moves, the distance is still < 2s.
The above LP, restricted to vertex-transitive graphs, is more efficient than the one presented in Section 3 since there is only one configuration to be considered and fewer flow constraints (and so, fewer variables and constraints). In particular, it gives interesting experimental results as presented in the conclusion. In what follows, we present and analyze a function using a sub-quadratic (in n) number of guards that satisfies the above LP.
If X ∩ C j would not be connected, one of the cases of the two previous paragraphs should occur. Therefore, X ∩ C j is connected.
Proof of the claim. Since X ∩ C j is connected, it has the form H(a, b) ∩ C j for some a and b. We assume that |a − b| > 1 (the other case can be done similarly). Therefore, by previous claims, it remains to prove that, for any a and b, γ(H s ∩ C j ) ≤ γ (H(a, b) Since the function f 0 is maximum around i = 0 and minimum around i = n/2, it is easy to check that, for any a and b: −s/2+1≤i≤s/2+1 (f 0 (b − s/2 + i, j) − f 0 (n/2 + i, j)) ≥ 0 and −s/2≤i≤s/2−2 (f 0 (a − s/2 + i, j) − f 0 (i, j)) ≤ 0.
Finally, we are ready to present a winning strategy in the n × n torus which proves Th. 28.
Lemma 40. Let n, s ≥ 2 where s is a constant, d ≥ 0 and, α = log 2 (1 + 1 s ). There exists a constant B > 0 (independent of n) such that the function ω α : V (T G n×n ) → R + where ω α (v) = B (d(v)+1) α for every v ∈ V (T G n×n ) is a spy-positional winning fractional strategy that uses O(n 2−α ) guards to control a spy with speed s at distance d in T G n×n .

Conclusion
Concerning the Spy-game, the main open question is to determine the exact value of gn s,d (G n×n ) in any n × n grid G n×n (or torus). A first step towards such a result would be to prove that gn s,d (G n×n ) = O(gn s ,d (G n×n )) for any s, s ≥ 2 and d, d ≥ 0. To get more intuition on optimal strategies for guards, we used Cplex to solve the LP described in Section 3 with additional constraints of symmetry. The left drawing in Fig. 2 represents the density of guards in the torus of side 150 (where the central vertex is the position of the spy) for s = 2 and d = 1. It shows that optimal symmetric Spy-positional (SSP) strategies may be much more intricate than the strategy ω α we studied. For instance, it is not monotone when the distance to the spy's position increases. On the right, we plotted the number of guards used by optimal SSP (in red) which is much less than n 2−log 2 (3/2) for n ≤ 250 (it is difficult to extrapolate further intuition from such small values of n) 5 . Even the optimal distance-invariant strategies (i.e., the density of guards is only a function of the distance to the spy's position) computed using the LP (plotted in blue) use much less guards than n 2−log 2 (3/2) (we did not plot the function n 2−log 2 (3/2) for more readability, indeed, 50 2−log 2 (3/2) > 500 and 250 2−log 2 (3/2) > 6600). In trees, it would be interesting to design a combinatorial algorithm (i.e., not relying on the solution of a Linear Program) that computes optimal strategies for controlling a spy with speed s at distance d.
More importantly, using the fractional framework to obtain new results in two-player combinatorial games in graphs seems promising.