two - player games played on graphs are nowadays a well - established model for systems where two antagonistic agents interact .in particular , they allow one to perform controller synthesis  , when one of the players models the controller , and the second plays the role of an evil environment .quantitative generalisations ( played on weighted graphs ) of these models have attracted much attention in the last decades  as they allow for a finer analysis of those systems .  in thissetting , most results assume that the arena ( i.e. , the graph ) on which the game is played does not change during the game .there are however many situations where this restriction is not natural , at least from a modelling point of view .for instance , grner _ model connectivity problems in _ dynamic _ networks ( i.e. , subject to failure and restoration ) using a variant of _ sabotage games _ a model originally proposed by van benthem  to model _ reachability problems _ in a network prone to errors .a sabotage game is played on a directed graph , and starts with a token in an initial vertex .then , and ( the two players of the game ) play in alternation : moves the token along one edge and is allowed to remove one edge . wins the game if he reaches a target set of vertices . in  , it is shown that deciding the existence of a winning strategy for is -complete .  in those sabotage games ,errors are regarded as unrecoverable failures . in practice, this hypothesis might be too strong .instead , one might want to model the fact that certain uncontrollable events incur additional costs ( modelling delays , resource usage ) , and look for strategies that allow one to fulfil the game objective _ at a minimal cost _ , whatever the occurrence of uncontrollable events .for instance , if the graph models a railway network , the failure of a track will eventually be fixed , and , in the meantime , trains might be slowed down on the faulty portion or diverted , creating delays in the journeys .it is thus natural to consider _ quantitative _ extensions of sabotage games , where controls the price of the actions in the game .this is the aim of the present paper .more precisely , we extend sabotage games in two directions .first , we consider games played on _ weighted _ graphs .is allotted an integral budget that he can distribute ( dividing it into integral parts ) on the edges of the graph , thereby setting their weights . at each turn , can change this distribution by moving units of budget from an edge to another edge ( for simplicity , we restrict ourselves to but our results hold for any ) .second , we relax the inherent finiteness of sabotage games ( all edges will eventually be deleted ) , and consider infinite horizon games ( i.e. , plays are now infinite ) . in this setting , the goal of is to minimise the cost defined by the sequence of weights of edges visited , with respect to some fixed cost function ( , , , , average or discounted - sum ) , while attempts to maximise the same cost .we call these games _ quantitative sabotage games _( , for short ) .let us briefly sketch one potential application of our model , showing that they are useful to perform synthesis in a dynamic environment .our application is borrowed from suzuki and yamashita  who have considered the problem of _ motion planning _ of multiple mobile robots that interact in a finite space .in essence , each robot executes a `` look - compute - move '' cycle and should realise some specification ( that we could specify using ltl , for instance ) . for simplicity , assume that at every observation ( look ) phase , at most one other robot has moved . clearlyevery motion phase ( move ) will require different amounts of time and energy depending on the location of the other robots .we can model the interaction of each individual robot against all others using a where is one robot , is the coalition of all other robots , and the budget is equal to the number of robots minus .this model allows one to answer meaningful questions such as ` _ _ what is , in the worst case , the average delay the robot incurs because of the dynamics of the system ? _ _ ' , or ` _ _ what is the average amount of additional energy required because of the movements of the other robots ? __ ' using appropriate cost functions .  as a second motivational example ,let us recall the motivation of the original sabotage game : consider a situation in which you need to find your way between two cities within a railway network where a malevolent demon starts cancelling connections ?this is called the _ real travelling salesman problem _ by benthem  . however , in real life , railway companies have contracts with infrastructure companies which ensure that failures in the railway network are repaired withing a given amount of time ( e.g. a service - level agreement ) . in this case , it is better to consider delays instead of absolute failures in the network .further , salesmen do not usually have one single trip in their whole carriers . for modelling purposes, one can in fact assume they never stop travelling . in this setting , can be used to answer the question : ` _ _ what is , in the worst case , the average delay time incurred by the salesman _our model can be used to treat the same questions for other networks and not just railway networks .[ [ related - works - contributions . ] ] related works & contributions .variations of the original sabotage games have been considered by students of van benthem . in  ,the authors have considered changing the _ reachability objective _ of to a _safety objective _ , and proved it is -complete as well .they also consider a co - operative variation of the game which , not surprisingly , leads to a lower complexity : -complete . in  , an asymmetric imperfect information version of the gameis studied albeit , under the guise of the well - known parlor game _scotland yard_and shown to be -complete .we remark that although the latter version of sabotage games already includes some sort of dynamicity in the form of the _ scotland yard _team moving their pawns on the board , both of these studies still focus on inherently finite versions of the game .we establish that are -complete in general .our approach is to prove the result for a very weak problem on , called the _ safety problem _, that asks whether can avoid _ ad vitam ternam _ edges with non - zero budget on it .we remark that although the safety problem is related to cops and robbers games  , we were not able to find -hard variants that reduce easily into our formalism .. ] the general problem being -complete , we consider the case where the budget is fixed instead of left as an input of the problem ( see corollary [ cor : fixed ] ) .we also consider restricting the behaviour of and define a variation of our in which is only allowed to choose an initial distribution of weights but has to commit to it once he has fixed it .we call this the _static _ version of the game . for both restrictions , we show that tractable algorithms exist for some of the cost functions we consider . a summary of the complexity results we establish in this work is shown in table [ tbl : summary ] . in section [ sec : conclusions ] , we comment on several implications of the complexity bounds proved in this work ..complexity results for quantitative sabotage games [ cols="<,^,^,^",options="header " , ]   [ tbl : summary ]let us now formally define quantitative sabotage games ( ) .we start with the definition of the cost functions we will consider , then give the syntax and semantics of .[ [ cost - functions . ] ] cost functions .  a _ cost function _ associates a real number to a sequence of rationals .the six classical cost functions that we consider are  * ; * ; * ; * ; * , which stands for the average cost ( also called _mean - payoff _ in the literature ) ; and * , ( with ) , stands for discounted - sum .  in the following ,we let .  [ [ syntax . ] ] syntax .  as sketched in the introduction , _ quantitative sabotage games _ are played by and on a directed weighted graph , called the _arena_. a play alternates between moving the token along the edges and modifying the weights .we consider that has a fixed integer budget  that he can distribute on edges , thereby setting their weights ( which must be integer values ) .formally , for a finite set and a budget , denotes the set of all _ distributions _ of budget on , where a distribution is a function such that ( the last constraint is an inequality since the whole budget need not be distributed on ) .then , a _ quantitative sabotage game _ is a tuple , where is a directed graph , is the budget of the game , is the initial vertex , is the initial distribution of the budget , and is a cost function . we assume , without loss of generality , that there are no deadlocks in , i.e. , for all , there is such that . in the following ,we may alternatively write for when is a with set of edges and budget .  [ [ semantics . ] ] semantics .  to define the semantics of a , we first formalise the possible redistributions of the budget by .we choose to restrict them , reflecting some physical constraints : can move at most one unit of weight in - between two edges . for , we say that is a _ valid redistribution _ from , noted , if and only if there are such that , , and for all other edges , .then , a _ play _ in a is an infinite sequence alternating vertices and budget distributions such that   ;   ; and  for all : , and .let denote the set of prefixes of plays ending in a budget distribution , and the set of prefixes of length at least 2 ending in a vertex .we abuse notations and lift cost functions to plays letting .a _ strategy _ of is a mapping such that for all .a strategy of is a mapping such that for all .we denote by ( respectively , ) the set of all strategies of ( respectively , ) .a pair of strategies of and defines a unique play such that for all :   ; and   .[ [ values - and - determinacy . ] ] values and determinacy .we are interested in computing the best value that each player can guarantee no matter how the other player plays . to reflect this , we define two values of a : the superior value ( modelling the best value for ) as , and the inferior value ( modelling the best value for sabo - teur ) as .it is folklore to prove that .indeed , for the previously mentioned cost functions , we can prove that are determined , i.e. , that for all .this can be formally proved by encoding a into a quantitative two - player game ( whose vertices contain both vertices of and budget distributions ) , and then using classical martin s determinacy theorem  , as formally done in appendix [ sec : qgames - sem ] . is henceforth called the _ value of _ , and denoted by .# 1  r0.2  \(1 ) at ( 1,1 ) ; ( 2 ) at ( 1,0 ) ; ( 3 ) at ( 0,0.5 ) ;  \(1 ) edge ( 2 ) ; ( 2 ) edge[bend right=40 ] ( 1 ) ; ( 2 ) edge ( 3 ) ; ( 3 ) edge ( 1 ) ;  [ [ example . ] ] example .consider the simple in [ fig : example ] , where the budget of is , and the cost function is .we claim that whatever the initial configuration , .indeed , consider the strategy of that consists in eventually putting all the budget on the edge ( i.e. , letting and for all other edges ) , and then playing as follows : whenever reaches , move one unit of budget from to ; if moves to , move the unit of budget from to ; and when moves back to , move all the budget back on , by consuming one unit either from or from .let us call this strategy . since we consider the average cost , only the long - term behaviour of is relevant to compute the cost of a play .so , as soon as has managed to reach a distribution such that , the only choices for each time he visits are either to visit the cycle , or the cycle . in the former case ,traverses edges and pays , hence an average cost of for this cycle . in the latter, he pays an average of for the cycle .hence , whatever the strategy of , we have , which proves that .one can check that the strategy of consisting in always playing the cycle indeed guarantees cost , proving that .this proves that the value of the game is .given a , our main objective is to determine whether can play in such a way that he will ensure a cost at most , no matter how plays , and where is a given threshold .this amounts to determining whether .thus , for a cost function , the threshold problem with cost function consists in determining whether , given a with cost function and a non - negative threshold . when , we assume that the discount factor is part of the input . if we want it to be a parameter of the problem ( and not a part of the input ) , we consider . our main contribution is to characterise the complexity of the threshold problem for all the cost functions introduced before , as summarised in the following theorem :  [ thm : exptime ] for cost functions , , , and , the threshold problem over is -complete ; for and , it is in .for all cost functions , the membership is established by using the encoding ( explained in appendix [ sec : qgames - sem ] ) of a into a classical quantitative two - player game which is played on a weighted graph , whose vertices are the configurations of the sabotage game , i.e. , a tuple containing the current vertex , the last crossed edge and the current weight distribution , and whose weights are in ( describing how much runner pays by moving from one configuration to another ) .notice that has size at most , since every distribution is a mapping of .hence , we see that the game has a number of vertices at most exponential with respect to , and polynomial with respect to ( which , being given in binary , can be exponential in the size of the input of the problem ) .using results from  , we know that we can compute in pseudo - polynomial time the value of the quantitative game for all the cost functions cited in the theorem : here , pseudo - polynomial means polynomial with respect to the number of vertices and edges of ( which is exponential with respect to ) , and polynomial with respect to the greatest weight in absolute value , here ( which is also exponential with respect to ) .thus we obtain the exponential time upper bound announced in the theorem .note that for , pseudo - polynomial also means polynomial in the value of the denominator of . with a discount factor ( not necessarily rational ) , but we ensure that only one turn over two has a non - zero weight , so that we may indeed apply the reasoning of and their pseudo - polynomial algorithm . ]when the budget is fixed , i.e. , when it is a parameter of the problem and not one of the inputs , the explanation above can be adapted to prove that the problem is solvable in polynomial time for all but the cost functions . indeed, we can refine our analysis of the size of .a budget distribution can also be encoded as a mapping where we consider the budget as a set of indexed pebbles : such a mapping represents the distribution defined by .this encoding shows that has size at most , which is polynomial in . for the discounted sum, the role of in the complexity stays the same , causing an and pseudo - polynomial complexity : this blow - up disappears if is a parameter of the problem . in the overall ,we obtain :  [ cor : fixed ] for cost functions , , , , , , and for fixed budget , the threshold problem for is in ; for ( where is an input ) , it is in and can be solved in pseudo - polynomial time .the rest of this section is devoted to the proof of -hardness in theorem [ thm : exptime ] for cost functions , , and ( this implies -hardness for too ) .our gold - standard problem for -hardness is the _ alternating boolean formula _( abf ) problem , introduced by stockmeyer and chandra in  .our proof consists of a sequence of reductions from this problem , as depicted in [ fig : reductions - dir ] .first , we show a reduction to the threshold problem for cost function when the threshold is and * the initial distribution is empty * ( i.e. , no budget on any edge ) , on extended with _safe edges _ and _ final vertices _ ( in order to make the reduction more readable ) .notice that this problem amounts to determining whether has a strategy to avoid crossing an edge with non - zero budget , therefore we refer to this problem as the _ extended safety problem _ ( ) .our next step is to encode safe edges and final vertices into ( non - extended ) with gadgets of polynomial size , therefore proving that the _ safety problem _ ( ) is itself -hard : is a special case of the threshold problem with cost function and threshold 0 , for empty initial distributions .reductions to threshold problems with other cost functions close our discussion to prove their -hardness .[ [ alternating - boolean - formula . ] ] alternating boolean formula .we first recall the alternating boolean formula problem ( abf ) introduced as game in  , which is the -hard problem from which we perform our reductions .intuitively , an abf is an ( infinite ) game played on a boolean formula whose variables are partitioned into two sets .each player controls the values of one of the sets of variables .players take turns changing the value of one of the variables they control .the objective of the first player ( prover ) is to eventually make the formula true , while the second player ( disprover ) tries to avoid this .we note that this game closely resembles an infinite horizon version of the more classical qbf problem .more formally , an abf instance is given by two finite disjoint sets of boolean variables , and , and a cnf formula over .the game is played by two players called prover and disprover .they take turns changing the value of at most one of the variables they own ( are the variables of prover , and those of disprover ) .prover wins if and only if the formula is eventually true. a configuration of this game is thus a pair where is the current valuation of the variables and indicates which player should play next .the abf problem consists in , given an abf game and an initial configuration , determining whether disprover has a winning strategy from the initial configuration .it is shown -complete in  .[ exa : abf ] consider the formula where , , and .let us further consider the partition of the variables into the sets of prover , and of disprover ; and the initial configuration , where ( we denote a valuation by the set of all variables it sets to true ) . clearly , in this initial configuration, is false since is false . from that configuration, prover can either set to true , or to false . in the former case , one obtains the configuration , where prover wins , as now evaluates to true . in the latter case , one obtains the configuration .we claim that , from this configuration , prover can not win the game anymore , i.e. , disprover has a winning strategy that consists in first setting to false , and in , all subsequent rounds , always flipping the value of , whatever prover does .playing according to this strategy ensures disprover to force visiting only configurations where either or is false .[ [ extended- . ] ] extended .  to make the encoding of abf instances into easier , we introduce _ extended quantitative sabotage games _ ( with cost function ) .those games are with cost function , a designated subset of _ final vertices _ and a designated subset of _ safe edges _( those special vertices and edges are henceforth depicted with double lines ) . and influence the semantics of the game :can place some budget on final vertices ( which is accounted for in the cost when visits those vertices ) , but can not put budget on safe edges ; and the game stops as soon as visits a final vertex .we consider the _ extended safety problem _ ( ) , which is to determine whether an extended _ with empty initial distribution _ has value .since the cost function is , this amounts to checking that has a strategy to reach a final vertex , with no budget assigned to it , without crossing any edge with non - null budget . from now on , we assume , as the problem is trivial otherwise . then :  [ lem : abf - to - extended ] the abf problem is polynomial - time reducible to .we consider an instance of the abf problem given by boolean variable sets and ( owned by prover and disprover , respectively ) and a cnf formula over .we construct an extended such that wins in if and only if prover wins in the abf problem .valuations of the variables in are encoded by budget distributions in . for each variable , has _ final _ vertices associated with , . a budget distribution encodes a valuation in which variable is * true * if and only if and .then , simulates the abf game as follows .the duty of is to move the budget distribution in such a way that he respects the encoding of the valuations explained above . to enforce this , we rely on the two gadgets , depicted in [ gadgetgeq2 ] and [ check(x ) ] .they allow to check that respects the encoding and let him lose if he does not .more precisely , the gadget in [ gadgetgeq2 ] allows one to check that there is a non - zero budget on at least two vertices from ; and the one in [ check(x ) ] that there is a non - zero budget on exactly or . to allow to check one of these conditions , we allow him to move to one of the four corner vertices of the corresponding gadget , from where one can easily check can win if and only if the condition is not respected . in our reduction , will be allowed to check condition , for all variables , from all vertices but will be able to check only on some of them , as we will see later .  the remaining of the construction is done in a way to allow and to choose valid re - configurations of for all variables , and make sure that if a player cheats , it allows the other player to win the safety game . if at some point , the formula becomes true , then we allow to enter a final gadget which verifies that the current budget distribution to satisfies .this last gadget lets choose a clause and then allows to choose a literal , within this clause , which should be true .it is easy to see that the choice of clause can be done by way of safe edges .the choice of literal , done by , consists in choosing a suffix of for which the left - most literal holds .figure [ fig : exa - abfmain ] shows the which results from applying our construction to the abf formula from example [ exa : abf ] .we refer the reader to appendix [ sec : abf2espr ] for the full reduction , in particular how we can force , before the beginning of the actual game , to start in the initial valuation of the abf game .( na1 ) at ( 0.59,0 ) ; ( na2 ) at ( 1.76,0 ) ; ( a1 ) at ( 2.81,0 ) ; ( a2 ) at ( 3.74,0 ) ;  ( nb1 ) at ( 4.79,0 ) ; ( nb2 ) at ( 5.97,0 ) ; ( b1 ) at ( 7.03,0 ) ; ( b2 ) at ( 7.97,0 ) ;  ( nc1 ) at ( 9.03,0 ) ; ( nc2 ) at ( 10.19,0 ) ; ( c1 ) at ( 11.24,0 ) ; ( c2 ) at ( 12.18,0 ) ;  ( nd1 ) at ( 13.24,0 ) ; ( nd2 ) at ( 14.43,0 ) ; ( d1 ) at ( 15.51,0 ) ; ( d2 ) at ( 16.47,0 ) ;  ( verif ) at ( 15,5 ) ; at ( verif.south east ) ; ( play ) at ( 5.5,5 ) ; at ( play.south east ) ; ( choose ) at ( 11,5 ) ; at ( choose.south east ) ; ( set2 ) at ( 11,4 ) ; at ( set2.south east ) ; ( set1 ) at ( 10,3 ) ; at ( set1.south east ) ;  ( setna1 ) at ( 1.5,3 ) ; at ( setna1.south east ) ; ( setna2 ) at ( 1.5,2 ) ; at ( setna2.south east ) ; ( seta1 ) at ( 3.5,3 ) ; at ( seta1.south east ) ; ( seta2 ) at ( 3.5,2 ) ; at ( seta2.south east ) ;  ( setnb1 ) at ( 5.5,3 ) ; at ( setnb1.south east ) ; ( setnb2 ) at ( 5.5,2 ) ; at ( setnb2.south east ) ; ( setb1 ) at ( 7.5,3 ) ; at ( setb1.south east ) ; ( setb2 ) at ( 7.5,2 ) ; at ( setb2.south east ) ;  ( cl1 ) at ( 3,-2 ) ; at ( cl1.south east ) ; ( cl2 ) at ( 7,-2 ) ; at ( cl2.south east ) ; ( cl3 ) at ( 11,-2 ) ; at ( cl3.south east ) ; ( cl4 ) at ( 15,-2 ) ; at ( cl4.south east ) ;  ( alpha ) at ( 3.5,5 ) ;  ( choose ) ( play ) ; ( choose ) ( verif ) ;  ( set2 ) ( choose ) ; ( set1 ) ( set2 ) ;  ( play ) ( setna1 ) ; ( play ) ( seta1 ) ; ( play ) ( setnb1 ) ; ( play ) ( setb1 ) ; ( setna1 ) ( setna2 ) ; ( seta1 ) ( seta2 ) ; ( setnb1 ) ( setnb2 ) ; ( setb1 ) ( setb2 ) ; ( setna2 ) ( na1 ) ; ( setna2 ) ( na2 ) ; ( seta2 ) ( a1 ) ; ( seta2 ) ( a2 ) ; ( setnb2 ) ( nb1 ) ; ( setnb2 ) ( nb2 ) ; ( setb2 ) ( b1 ) ; ( setb2 ) ( b2 ) ;  ( setna2 ) ( 1.5,1 ) ( 10,1 ) ( set1 ) ; ( seta2 ) ( 3.5,1 ) ( 10,1 ) ( set1 ) ; ( setnb2 ) ( 5.5,1 ) ( 10,1 ) ( set1 ) ; ( setb2 ) ( 7.5,1 ) ( 10,1 ) ( set1 ) ;  ( verif ) ( 15,3 ) ( 17,-2.7 ) ( 3,-2.7 ) ( cl1 ) ; ( verif ) ( 15,3 ) ( 17,-2.7 ) ( 7,-2.7 ) ( cl2 ) ; ( verif ) ( 15,3 ) ( 17,-2.7 ) ( 11,-2.7 ) ( cl3 ) ; ( verif ) ( 15,3 ) ( 17,-2.7 ) ( 15,-2.7 ) ( cl4 ) ;  ( cl1 ) ( a1.south ) ; ( cl1 ) ( nc1.south ) ;  ( cl2 ) ( c1.south ) ; ( cl2 ) ( d1.south ) ;  ( cl3 ) ( c1.south ) ; ( cl3 ) ( nd1.south ) ;  ( cl4 ) ( b1.south ) ; ( cl4 ) ( nb1.south ) ;  we now explain how to encode safe edges and final vertices into usual , therefore showing the -hardness of the safety problem for .[ lem : safe - extended - wlog ] the extended safety problem is polynomial - time reducible to a safety problem with budget .each final vertex in an extended is replaced by the gadget in [ finalnodes ] , where is a clique of size , hence bigger than the budget of . to encode in ,now puts one unit of budget on .if reaches the gadget ( through ) , puts one unit of budget on .clearly , loses if and only if there was already one unit on ( i.e. , was marked in ) .each safe edge is replaced by the gadget in [ safeedges ] . here , we make use of final vertices and disjoint paths so that can not block all paths from to without letting win by visiting a final vertex with zero budget .both gadgets have polynomial size since we assume that .as the safety problem is a specific case of the threshold problem for ( where the initial distribution is empty , and threshold is fixed to ) , it follows that and are -hard too .we note that given a , for all plays in , for all , and for all , if and only if .this implies the following result , showing that and are also -hard .[ lem : sup - to - ds ] for any , the threshold problem for and threshold is equivalent to the threshold problem for and threshold .let us now focus on . to show that is -hard, we describe a reduction from to as stated in the following lemma .[ lem : safe - to - limsup ] the safety problem is polynomial - time reducible to the threshold problem for and threshold .let be an instance of ( with its underlying graph ) .we build a with cost function such that if and only if wins in .the idea of the construction is that a play of consists in simulating a potentially infinite sequence of plays of , using appropriate gadgets to ` reset ' the safety game between two successive simulations .then , repeatedly playing a winning strategy for allows to ensure a of in ; and one can extract a winning strategy for the safety game from any strategy ensuring a of in .the has budget and is obtained by extending with two gadgets .note that we are giving more budget than he had in .however , as we will see in the sequel , at the beginning of every faithful simulation of ( i.e. when moves to ) there will be of it in the second gadget and in the first and during any faithful simulation of only budget from the initial gadget is redistribtued into .the first gadget is an initial gadget which is visited every time the safety game is ` reset ' .it allows to stay safe from any weighted edges ( and avoid reaching ) until has placed units of budget on it ( and thus removed them from the ) .it is depicted in [ fig : initial - gadget ] , where all are intuitively copies of , and corresponds to the set of all successors of in .the second gadget allows to leave if ever places more than units of budget on ( and thus removes this budget from the gadgets ) , thereby triggering a ` reset ' of the simulation .this gadget , depicted in [ fig : exit - gadget ] , also allows to come back to the initial gadget visiting only edges with zero budget .the figure shows a sequence of safe transitions ( i.e. several vertices with high out - degree ) which leads back to the copies of the initial vertex .further , this ` safe path ' takes long enough for to redistribute the budget from to both gadgets .in order for to stop from always taking this ` safe exit ' from he can place budget in specific edges of this second gadget .more specifically , he can place a unit of budget on one outgoing edge from each , for , before forcing to enter .  [ [ intuition - behind - the - global - construction . ] ] intuition behind the global construction .assume that has a winning strategy in .then , when is in the initial gadget , will play as expected and remove all weights from .critically , the weights he removes from will go to specific edges in both gadgets described above .is now forced to play into , and can follow his winning strategy to hit at some point without using more than weights . if attempts to bail out of through the alternative exit , and to head back to the initial gadget , then we make sure he is also hit by .clearly , this ensures that the value of the game is strictly greater than .now assume that has a winning strategy in . in this case , if does not remove all weights from , then is allowed to stay in the initial gadget forever or jump to and immediately bail out using the exit gadget . in both caseshe avoids getting hit by .let us assume plays as expected and thus enters eventually . in this case, can play his winning strategy , hence avoiding edges with non - zero budget ( with using budget ) .either he dodges weighted edges forever , or cheats and uses some of his additional budget .however , in this case he creates an exit for back to the initial gadget , and the same analysis as above applies .this implies that the value of the game is exactly .  proving the -hardness result for cost function done by noticing that , for threshold , both problems are equivalent .[ lem : limsup - to - mp ] the threshold problem for and threshold is polynomial - time reducible to the threshold problem for and threshold .in light of the -completeness of , we study in this section a restriction of the problem , that might be sufficient to model some interesting cases .the restriction concerns the dynamics of the behaviour of . in a _static _ , chooses at the beginning a budget distribution ( hence , changing the initial budget distribution ) , and then commits to this distribution during the whole game .the situation is no longer a reactive two - player game , but rather we ask whether for every possible initial ( and static ) budget distribution , has a nicely behaved strategy .  formally , for a ( we remove the initial budget distribution from the tuple in this section , since it is useless ) and a budget distribution , we denote by the obtained from by taking as initial budget distribution .furthermore , we define the _ identity strategy _ of in , as the strategy mapping every prefix to the last budget distribution appearing in prefix .we let , where denotes the unique play defined by the profile in .notice that this value is equal to , since in , when follows strategy , the quantitative game ( see appendix [ sec : qgames - sem ] ) is split into independent games , one for each initial distribution , that knows as soon as it starts playing .the static threshold problem with cost function consists in , given as input a with cost function and a non - negative threshold , determining whether the inequality holds .we now state the complexity of this new problem .  for cost functions and ,the static threshold problem over is in ; for , , , and , it is -complete .first , we give the intuition behind our polynomial - time algorithm to decide the static threshold problem for cost functions and .[ lem : poly - inf - linf ] for cost functions and , the static threshold problem over is in .  for ,we claim that , where is the set of edges reachable from .indeed once a distribution is chosen , any optimal strategy of will make him reach an edge of that has the minimum weight , thus must distribute evenly its budget over .a similar argument works for , showing that , where is the set of edges reachable from and contained in a strongly connected component .then , let us turn to the -completeness of the problem for cost functions , , , and .notice that , because of the two possible definitions of explained in the beginning of the section , the complement of the static threshold problem asks whether there exists a budget distribution such that for every strategy of .thus we show the -completeness of the complement of the static threshold problems for the four cost functions .[ lem : conp - complete ] for cost functions , , , and , the complement of the static threshold problem over is -complete .for the membership in , we can first guess a budget distribution ( that is of size polynomial ) , and then compute the value of the one - player ( since player no choices anymore ) quantitative game , to check if it is greater than  : computing the value of such a game can be done in polynomial time for the four cost functions we consider ( see  ) .  for the -hardness with cost functions and , we give a reduction from the following problem .the feedback arc set problem asks , given a directed graph and a threshold , whether there is a set of at most edges of such that is acyclic .karp showed that the feedback arc set problem is -complete .let us consider an instance of the feedback arc set problem , given by a directed graph and a natural integer .wlog , we can add to the graph a vertex , with null in - degree , and , for all vertices , an edge . observe that this does not change the output of the feedback arc set problem as is not included in any cycle .we then construct a with .it is not difficult to show that if and only if there exists a set of edges of such that is acyclic .the result for and is then obtained by a slight modification of the previous proof . in particular , we make use of lemma [ lem : sup - to - ds ] , once more .we refer the reader to appendix [ app : conp ] for the details .one can see a sabotage game as a system in which a controller tries to evolve while avoiding as much as possible the failures caused by the environment .the vertices of the graph represent configurations of the system , edges represent the actions , and the budget of the saboteur may represent a finite amount of failures that can simultaneously occur during the execution . in a quantitative reasoning , a failure may be better represented by a quantity describing how much some elements of the system are overloaded , and then how much it would cost , in terms of time or energy , to use them .following this main motivation , we propose to look at sabotage games as a particular semantics of controllable systems . indeed , while a standard semantics would analyse the feasibility of a requirement in a fully functional system , a _ sabotage semantics _allows one to analyse systems subject to errors , and to decide , e.g. , whether one can satisfy a boolean constraint while minimising the average number of failures encountered during the execution .in particular , sabotage games , as introduced in this work , would correspond to the sabotage semantics of a system where the controller must walk in a graph with no particular objective , other than minimising the failures .  from a modelling point of view , graphs which can be viewed as one - player games with trivial winning conditions are quite limited . in more realistic models, we may be interested in modelling systems with uncontrollable actions ( i.e. , two - player games ) , and where the controller has a specific boolean goal to achieve , instead of simply staying in the graph _ ad vitam ternam_. a more realistic goal is usually expressed via a parity condition or ltl formulas . in appendix[ sec : more - expressive ] , we show that when a reactive system is modelled by a two - player parity game , deciding whether one can ensure the parity condition , while maintaining a cost associated with the sabotage semantics below a given threshold , is not harder than solving sabotage games .that is , the problem is -complete .this result is obtained by a reduction to quantitative parity games  . when the requirement is expressed with an ltl formula instead of a parity condition ,the problem becomes 2 - -complete , due to an additional exponential blow - up in the size of the input formula .note , however , that the ltl - reactive synthesis problem itself ( with the standard non - sabotage semantics ) is already 2 - -complete . in this case, the sabotage semantics does not add to the complexity of the problem , which further shows that our present contributions might have practical applications , albeit the high complexity .we have conducted a study of systems subject to failure , using the model of _ quantitative sabotage games_. we have shown that under _ dynamic sabotage _ , the threshold problem is -complete for most objective functions , and -complete under _ static sabotage _, for the same functions ( see table [ tbl : summary ] for a summary of these results ) .we have also shown the applicability of our framework to deal with the more general problem of reactive synthesis in systems under failures .the we have introduced open many questions related to evolving structures . here we have studied the worst - case scenario , i.e. , where the environment is modelled by an antagonistic adversary , but , as considered in for reachability boolean objectives , one could also look at a probabilistic model , where failures , i.e. , redistributions of weights , are random variables .another natural extension of this work would be to consider a more realistic setting where the controller ( ) has partial information regarding the weights of .although the synthesis problem has been widely studied in theory , there are not many tools which implement the known theoretical solutions to decide it .the is is particularly true for quantitative objectives . recently , however , competitions have been organised to encourage the development of such tools and the standardisation of an input format ( see , e.g. , syntcomp and sygus ) . motivated by the similarities between the abf problem ( solving a safety game described by a logical formula ) and the synthesis problem as solved in those competition ( solving a safety game described by a logical circuit ) , one of our future projects is to show that quantitative extensions of some of the practical tools implemented for the reactive synthesis problem could be used to solve sabotage games .10  k. r. apt and e. grdel . .cambridge university press , 2011 .k. chatterjee , l. doyen , and t. a. henzinger .quantitative languages . , 11(4 ) , 2010 .k. chatterjee , t. a. henzinger , and m. jurdzinski .mean - payoff parity games . in _ lics _ , pages 178187 .ieee , 2005 .k. chatterjee , t. a. henzinger , and n. piterman .generalized parity games . in _ fossacs _ , pages 153167 .springer , 2007 .a. ehrenfeucht and j. mycielski .positional strategies for mean payoff games . , 8:109113 , 1979 .a. s. goldstein and e. m. reingold .the complexity of pursuit on a graph ., 143(1):93 112 , 1995 .s. grner , f. g. radmacher , and w. thomas .connectivity games over dynamic networks . , 493:4665 , 2013 .s. jacobs , r. bloem , r. brenguier , r. ehlers , t. hell , r. knighofer , g. a. prez , j .- f .raskin , l. ryzhyk , o. sankur , m. seidl , l. tentrup , and a. walker .the first reactive synthesis competition ( syntcomp 2014 ) .technical report 1506.08726 , arxiv , 2014 .m. jurdziski .deciding the winner in parity games is in ., 68(3):119124 , 1998 .r. m. karp .reducibility among combinatorial problems . in _ proceedings of a symposium on the complexity of computer computations _ , pages 85103 , 1972 .d. klein , f. g. radmacher , and w. thomas .moving in a network under random failures : a complexity analysis ., 77(7 - 8):940954 , 2012 .l. m. kurzen . .phd thesis , institute for logic , language and computation , 2011 .c. lding and p. rohde . solving the sabotage game is pspace - hard . in _ mfcs _ ,volume 2747 of _ lncs _ , pages 531540 .springer , 2003 .d. a. martin .borel determinacy . , 102(2):363371 , 1975 .d. a. martin .the determinacy of blackwell games . , 63(4):15651581 , 1998 .a. pnueli and r. rosner . on the synthesis of a reactive module . in _ proc .16th symp .principles of programming languages _ , pages 179190 .acm , 1989 .m. sevenster . .phd thesis , institute for logic , language and computation , 2006 .p. d. seymour and r. thomas .graph searching and a min - max theorem for tree - width ., 1:2233 , 1993 .l. j. stockmeyer and a. k. chandra .provably difficult combinatorial games ., 8(2):151174 , 1979 .  j. van benthem .an essay on sabotage and obstruction . in_ mechanizing mathematical reasoning_ , volume 2605 of _ lnai _ , pages 268276 .springer , 2005 .m. yamashita and i. suzuki . characterizing geometric patterns formable by oblivious anonymous mobile robots ., 411(26 - 28):24332453 , 2010 .w. zielonka .infinite games on finitely coloured graphs with applications to automata on infinite trees . , 200(12):135 183 , 1998 .u. zwick and m. s. paterson .the complexity of mean payoff games ., 158:343359 , 1996 .we observe that the result on safety games is related to the cops and robbers games studied mostly by the graph theoretical community ( see , e.g. ,  and references therein for a survey ) .we remark that cops and robbers games are usually defined as played on the vertices of undirected graphs . in it was shown that several variants of the cops and robbers game without helicopters and , as usual , played on the vertices of an undirected graph , are -complete .in contrast , our result implies that the cops and robbers game played on the edges of a graph with cops , one _ helicopter _ and a _ slow robber _ , i.e. , which can traverse at most one edge per turn , is -hard .a similar version is studied in  , where they consider helicopters and a _fast robber_. however , the game is played on the vertices of an undirected graph and the complexity of solving the game is left open in that paper .it is easy to lift our results to games where weights are placed on vertices and no longer on edges by considering line graphs : in contrast , the other direction from vertices to edges would have been more difficult , and is not currently known for the best of our knowledge .[ sab2games ]  in this section , we give formal definitions of quantitative two - player games , and show an exponential encoding of into these games .thereafter , we choose to call and the two players of our games , to distinguish them from and , used in the main part of this article .a weighted arena is a tuple with a finite set of vertices partitioned into the set of vertices of player and the set of vertices of player , is a set of edges , is a weight function assigning an integer weight to each edge of the arena , and is an initial vertex . given a weight function , we write for the greatest weight in , i.e. , .  intuitively , the two players and move a token along the edges of the graph , starting on vertex .when the token is on a vertex of , it is that chooses the next vertex , and when on , it is . to allow them to play infinitely , we make the assumption that every vertex has an outgoing edge , i.e. , that there exists .a strategy for a player is simply a mapping telling him what to play depending on the past . formally , given an arena , a play is an infinite sequence of vertices such that , and for all .we say that a prefix of a play belongs to (respectively , ) if ( respectively , ) . a strategy for player is a mapping from prefixes of plays belonging to to vertices such that for all prefix belonging to .the outcomes of a strategy of player are all plays such that for all with , .we write the set of plays in ( we omit when it is clear from the context ) , the set of outcomes of a strategy , and the only play contained in .since we are dealing with quantitative game , we use a _ value function _ to map plays to values in .a quantitative game is a pair consisting of an arena and such a value function .most standard value functions are defined by using the weights in the weighted arena : equipped of one of the cost functions described in the main part of the article ( , , , , , or for instance ) , we may define a value function by setting for all plays .  in a quantitative game ,the value of a strategy ( respectively , ) of ( respectively , ) is : to characterise the best value that each player can guarantee no matter what the opponent is doing , we consider the upper value ( the best can hope for ) and lower value ( the best can hope for ) , defined by :   in quantitative games , for all the value functions obtained by considering the cost functions used above , upper and lower values coincide : we then let be the value of the game .we rely on martin s determinacy theorem for blackwell games  , since all the cost functions considered are borel measurable .   starting from a , we encode it in the quantitative two - player game as follows :  * , : represent configurations of (i.e . , the vertex of occupied by , together with the current budget distribution ) , and encode the last edge played by in and again the current budget distribution ; * ; * for all and we let and * * if , * * otherwise ; * is the initial configuration ; * if , we let , otherwise .  we claim that and are equivalent , meaning that they have the same value .the main difference lies in the way costs are computed .indeed , consider a pair of consecutive moves from both players in the original , i.e. , the traversal of an edge by , followed by a budget redistribution by .observe that this pair of moves incurs a cost of in the original , but is encoded by the traversal of _ two consecutive edges _ and in that have _ both _weight ( or weight and then weight for the discounted sum case ) .observe however that this is not a problem for the cost functions that we are considering .indeed , , , , and are resistant to stuttering .the value of the average cost is also consistent , since both the sum of the visited weights _ and _ the length of the paths are doubled in with respect to . for the discounted sum ,this is taken care of by replacing the original discount factor in by in .in this section , we fix an instance of the abf problem , i.e. , a cnf formula and an initial configuration . we let be the number of variables in .we construct an extended such that wins in the extended safety problem over if and only if prover wins the abf game . therefore , will act as prover while will act as disprover . as an example of our construction, we consider the cnf formula of example [ exa : abf ] .recall that in extended , we allow for the use of safe edges , i.e. , edges where can not put budget , and final vertices , i.e. , vertices where the play ends , with the budget placed on this vertex taken into account to compute the cost .we present step by step the vertices contained in . for every variable , we create final vertices .we also create another final vertex called . in the following, we always assume that edges are safe , unless explicitly stated .   for each variable , and each triplet , we create two vertices , and such that in the graph , for all . note that if there is zero budget on the triplet when arrives in , then is sure to reach one of the without visiting edges with non - zero budget ( and hence win the game ) . for all vertices in the graph ( except those in the initialisation gadget , as we see later ) , all variables and all triplets as described above , we create an edge . if at some point in the game there is a variable such that there are less than vertices in with a budget on them , then is sure to win the game .this gadget is depicted in [ gadgetgeq2 ] . in the following , we assume that always place at least 2 units of budget on each .we also assume that if it is the case , then does not go on a vertex ( indeed he will be sure to lose the play if he does so ) .always places at least 2 units of budget on each .we also assume that if it is the case , then does not go on a vertex ( indeed he will be sure to lose the play if he does so ) .the budget in the game is .let be a vertex that has an outgoing edge towards .when leaves , in order for not to lose , there must be one unit of budget on and exactly 2 units of budget on each .now we present another gadget that allows to force , on some vertices , that either and have one unit of budget each , or and have one unit of budget each . to do so , for each pair , we construct a vertex that has two outgoing edges , and .let be a vertex that has outgoing edges toward each of those vertices .when leaves , if property is not fulfilled , then there is a pair with zero budget on it . by going on , ensures to reach one of those vertices without budget , hence to win the game .we let be the set of all those vertices associated with , and we will describe later which vertices have outgoing edges toward .this gadget is depicted in [ check(x ) ] .when leaves a vertex with an outgoing edge toward , we now assume that has made true property for , so that never goes to ( indeed he will be sure to lose if he does so when is fulfilled ) .let be a vertex that is connected to and to all vertices of for all ( we let ) .when leaves , in order for not to lose , there must be one unit of budget on , and one unit of budget either on and , or on and , for all .we call such a configuration a valid one , and remark that there is an immediate bijection from valid configurations and valuations of the variables of the cnf formula .we call a _ valid vertex _ a vertex connected to and to .we add a gadget , at the beginning of the game , forcing to distribute the budget accordingly to the initial valuation of the abf game .the gadget works as follows : crosses safe edges successively , and then goes on a vertex that has edges towards each vertex of the required initial configuration .has the time to put the required units of budget on this configuration , and is forced to do so , otherwise would be able to reach a final vertex .therefore , we are sure that once this gadget is left to start playing the game , the configuration is indeed the required one . from vertex , there is also another safe edge going either to the vertex or to the vertex ( the role of both vertices is explained later ) , depending on whether is disprover or prover , respectively .   from the cnf formula of example [ exa : abf ], we construct the graph depicted in [ fig : exa - abfmain ] . for the sake of clarity ,we omit the gadgets introduced above .double bordered vertices represent final vertices , and double arrows represent safe edges .as stated above , from all vertices depicted here , gadget of [ gadgetgeq2 ] is used to check that contains at least budget 2 , for all variables .the subscript in on vertices depicts an edge from the vertex to the corresponding gadget , or vertex .the two safe vertices and describe prover s turn to modify one of its variables .both vertices have an outgoing edge towards ensuring that one pebble is left on it . is a valid vertex , and is connected to for all variables belonging to disprover .finally , there is an edge connecting those two vertices .let be a valid vertex with an outgoing edge and let be the valuation of variables induced by a valid configuration at the moment leaves  .if goes to the vertex and then to , let be the valuation induced by the valid configuration at the moment leaves .we claim that between and , at most one variable of prover has been modified . indeed after has arrived in , can not remove the budget on , and he can not take the budget on some to put it on another , with , as there would be only budget 1 on and would win .therefore , the only possible move for is to redistribute the budget inside some .moreover , if belongs to disprover after a move , will not satisfy the property and , since is connected to , would win .therefore , either does nothing , or he redistributes the budget inside some where belongs to prover . if he has done nothing then after has gone to , by the same reasoning , and by the necessity that at this moment the configuration is valid , one can ensure that again does nothing , in which case we would have .let us focus on the case where prover has performed some redistribution in .without loss of generality , assume that when leaving , the budget was placed on and , and after leaving the budget is on and . by the same reasoning , we know that after reaching , can only redistribute the budget inside a where belongs to prover . furthermore ,if then , when leaving , would not satisfy and the configuration would not be valid .therefore can either choose to have the budget on and , or on and , therefore between and only the valuation of may have change .from the vertex , chooses a variable of disprover , and goes either to or to : assume without loss of generality that he goes to .those two vertices have outgoing edges toward and toward for all .let be the valuation associated with the valid configuration when leaves .after arriving in , can only redistribute the budget inside . after arriving in ,is forced to reach a valid valuation , therefore if he has modified the budget distribution in , he must do it again in order for to satisfy .furthermore , as has outgoing edges to the two final vertices and , there must be a unit of budget on each of those vertices .therefore , if we let be the valuation induced by the valid configuration when leaves , must be equal to except possibly for that must now be true .   before explaining the whole behaviour of the game ,let us describe the verification process .as is a valid vertex , when leaves this vertex , the configuration is valid : we therefore let be the valuation induced by this configuration .we show here that , from the moment leaves , has a winning strategy if and only if satisfies the cnf formula .let us first describe this part of the arena . has one outgoing safe edge toward each vertex associated with the eponymous clause .those vertices are connected to .take a clause .for each strict suffix of this clause containing at least two atoms , i.e. , for each sub - clause of the form with , create an eponymous vertex .then has a safe edge toward and a ( non safe ) edge toward the rest of the clause , i.e. , nothing if , if , and the vertex ` ' if .the same principle applies to the vertex ` ' , etc .for example , take in the cnf formula  .the vertex has edges toward and toward the vertex ` ' which is the rest of the clause .then the vertex ` ' has an edge toward and an edge toward .assume first that satisfies the formula , and let us see how has a winning strategy .when reaches a clause , we know that it is true in , i.e. , that one of its atom is true . on the game , this is represented by the fact that one of the atoms has non - zero budget on the two associated vertices and . for example assume that goes to and that is true , i.e. , there is some budget on and . will use the budget on to guide in direction of this atom . in the example , when reaches , will put the budget on , then when will go to ` ' , will move the same unit of budget on , forcing to go to .however , as there was already some budget on , can not leave ` ' without touching some non - zero budget , and loses the safety game .on the other hand , assume that does not satisfy the formula and let us see how has a winning strategy .as the valuation does not satisfy the formula , there exists a clause that is false .goes to this clause .as it is false , all the atoms are false , in particular , in the game , for all , there is budget 0 on .will have the following behaviour .if , after reaching , has not put some budget on , then he goes there and wins , otherwise he goes to the vertex representing the rest of the formula .from there , the same reasoning applies : if has not put some budget on , then goes there and wins , otherwise he reaches the next sub - clause . at the end , reaches the vertex ` ' , and whatever does , reaches a final vertex with budget 0 .when leaves vertex , the configuration is valid ; once he reaches , the configuration is valid again , and the difference with the previous one is that the valuation may have changed for at most one variable . once reaching ,may also have changed the valuation of one of its variables .when reaches , can only redistribute the budget on .one can easily see that he has no interest in changing the valuation by putting some budget in for some variable , as at the next step he must put the budget back on .however , can either put the free unit of budget on the edge , forcing to go to the verification part on the game , or put it on the edge , forcing to remain in the part of the game where they change the valuation .if has a winning strategy in the abf game , he will apply it , and once the valuation satisfies the formula , he will force to go to the verification part . on the other hand ,if the formula is never true , is forced to prevent from going to the verification part ( otherwise would reach a final vertex as seen above ) , and the game will last forever , allowing to win .  consider the formula given in example [ exa : abf ] , i.e. , where , , and .the constructed from is given in figure [ fig : exa - abfmain ] .notice that besides the variable vertices , there is one extra final vertex , . in this construction , saboteur plays the role of prover , whose variables are and , and runner the one of disprover whose variables are and .for the sake of clarity , edges pointing towards , as well as the two gadgets of figures [ gadgetgeq2 ] and [ check(x ) ] are omitted .consider that from all vertices but the variable ones , one can check condition for all variables , i.e. , in order not to lose , saboteur maintain a non - zero budget on at least two vertices from for all variable .furthermore , on the bottom right corner of nodes are written the variables for which one can check condition and whether there is an outgoing edge pointing towards , e.g. , when runner is in vertex , saboteur must ensure that and satisfy condition and that there is a non - zero budget on . in the following , we consider those gadgets as constraints , considering that condition  always holds , and for example that if saboteur is in we are sure that holds in and and that there is a non - zero budget in .if we let be the number of variables ( here ) , let us set the budget to . in this context, each contains units of budgets , and the remaining unit can be either on , on the outgoing edge of , or on one of the variable vertices .the initialisation gadget ensures that after some preliminary steps , runner reaches vertex , and there is one unit on , and for each variable there are exactly two units of budget either on or on , depending on the initial configuration of the abf game .let us now focus on the upper part of the game .when runner is on vertex , condition must be satisfied for all vertices , and there must be one unit of budget on , therefore the budget describes a valuation of the variables , e.g. , on either the two units of budget are on in which case we consider that is false , or on in which case is true .assume that is false , and runner wants to change its valuation .then , he goes to where saboteur has the possibility to move one unit of budget in , and then he goes to . in this configuration condition must be satisfied for .furthermore if the two units of budget are still on , then runner wins by going on , thus saboteur has been force to switch the two weights on .then , a similar process allows saboteur to modify the valuation of one of its variables , when runner goes through and .those steps simulate one round of the abf game .  on vertex , saboteur may remove the budget on and put it on one of the outgoing edges of choose , thus he can force runner to go either on or on .if is chosen , both players will simulate another round of the abf game .if it is , then runner goes to the lower part of the game .  in this part, runner chooses a clause and then saboteur can move the unit of budget that were on .for example , assume that runner chooses . as there were a unit of budget on , saboteur can take the budget of to put in on ensuring to win .observe that the verification part of the game ensures that saboteur wins if , for each clause , at least one of the atoms is true . indeedif it is the case , whatever clause is chosen by runner , saboteur will be able , as seen above , to prevent runner to play .on the other hand , if there is a clause where both atom are false , it means than both outgoing edges point towards empty final vertices , therefore whatever saboteur does on the next step , runner will be able to reach one of them , and thus win the game .we describe how to transform an extended into a regular .the transformation rids the original sabotage game of its safe edges and final vertices , and replaces them with corresponding gadgets with the same properties .final vertices are replaced by the gadget shown in [ finalnodes ] .more formally , all edges incident in a final vertex are replaced by edges incident on a copy of the gadget . is the entry point of the gadget , i.e. , any edge pointing towards the final vertex in the extended would now lead to . vertices and are both connected to , for all , and the s form a clique of size .it should be clear that , if reaches one of the , then he can ensure that the value of the play , from then onwards , is exactly 0 .indeed , as there are outgoing edges , at least one of them has no budget on it ; if crosses this edge , he reaches another where the same property holds .thus , one can easily see that when reaches , he can win if and only if there is no budget on either one of the edges : , .safe edges can be encoded as follows .assume that we have a safe edge in the extended . to encode it in a standard ( with final vertices , as we have already seen how to encode them) , we add vertices , and final vertices .we remove the edge , and add the edges , and , for all .the gadget is depicted in [ safeedges ] .has a strategy to go from to without crossing an edge with non - zero budget , and forcing to move at most one unit of budget inside the game .that is to say , we have introduced one additional step to get from to , but we will see that can not move more than one unit of budget on edges outside of the gadget , or he loses . indeed , when leaves , there must exist such that there is no budget on edges , , nor on the final vertex .if goes to , must take a unit of budget and put it either on or on , otherwise can reach and win .now , is able to reach , and then can redistribute the budget as he wants .consider an instance of the safety problem with underlying graph , budget , and a starting vertex .we build a with graph , initial vertex , budget , and cost function as follows : intuitively , the sub - graph of defined by the vertices and form an initial gadget which ensures that can stay out of without paying , as long as there is some weight assigned to edges from .we also add an exit gadget consisting of the sub - graph of defined by the vertices .these allow to exit from if `` cheats '' by assigning more weights to edges from than the original bound .both gadgets are linked by a `` safe path '' formed by the vertices .note that we add sufficiently many so that , for , getting from any to any is always possible without traversing a weighted edge .we prove that wins in if and only if .assume first wins . in , he has no trouble following a path from through the until he arrives on some with budget distribution such that , for some , since there are vertices at each level of the safe path . on his next turn, he can then move to such an .as long as the budget distribution has some budget assigned to some edge of , there exists a vertex or with no budget on either in - edges or out - edges , respectively . in the first case , can go to such such an via without paying anything . in the second case , can get to or via and repeat the process , all without paying .when the budget distribution has no weight assigned to edges of , can follow his strategy from  with the exception that he plays his first move from instead of  as long as keeps at most budget units on edges of .when this is no longer the case , say is on a vertex , with budget distribution , that means there are at most budget units on other edges , hence there is a vertex such that . then moves to . on his next turn, he can then move to either or , following an edge with no weight on it .then can restart this strategy .assume now , that wins .from the start of the game , will have to traverse one for all from to .when is on a vertex for between and , puts a budget unit on the edge and leaves it there .similarly , when is on a vertex for between and , puts a unit of budget back on the edge and leaves it there . when finally reaches some , passes .then , if goes to or , can assign some budget to or and put it back where it was after s next move , where he will inevitably cross a weighted edge , then wait until gets back to some .alternatively , from , can move to a vertex in . in this case , follows his strategy from , using budget units assigned to edges of the form when needed , until crosses an edge of with some weight on it or gets to some . in the latter case , can react the same way as if was coming from . in the former case , can start putting some weights on all edges of until gets to some .if never does , he will pay one at each step , which is enough for .otherwise , goes to some , then to or , where can restart his strategy .for , we claim that , where is the set of edges reachable from .indeed , for a given budget distribution , simply goes towards the edge reachable from with the least budget possible ; therefore , must place _ equal _ budget on each such edge . with a budget , he can ensure on every edge ( some edges may contain a bigger portion of the budget , but some edges will always have at most ) .hence , deciding the static threshold problem for amounts to computing the set ( can be done in linear time with a depth - first - search algorithm ) , and checking whether .  for , we must refine the study by considering strongly connected components .precisely , we claim that , where is the set of edges reachable from and contained in a strongly connected component of the graph .indeed , for a given budget distribution , simply goes towards a cycle reachable from containing an edge with the least budget possible : he will visit infinitely often this edge , ensuring an inferior limit at most .such a cycle is included in a strongly connected component , and reciprocally , every edge of a strongly connected component is part of a cycle .hence , must secure _ equal _ budget on each edge of every strongly connected components . then , deciding the static threshold problem for amounts to computing the set ( can be done in linear time , e.g. , with tarjan s algorithm ) , and checking whether .   for the membership in , we can first guess a budget distribution ( that is of size polynomial ) , and then compute the value of the one - player ( since player no choices anymore ) quantitative game , to check if it is greater than  : computing the value of such a game can be done in polynomial time for the four cost functions we consider ( see  ) .  to prove the -hardness for cost functions and , we give a reduction from the following problem .the feedback arc set problem consists in , given as input a directed graph and a threshold , determining whether there is a set of edges of such that is acyclic .karp showed in that the feedback arc set problem is -complete .we now use the feedback arc set problem to prove the results of -hardness of the static threshold problem .let us consider an instance of the feedback arc set problem , given by a directed graph and a natural integer .we suppose , without loss of generality , the existence of a vertex , without any in - going edges , and linked with an edge to every other vertex : since is not included in any cycle , the set of the output of the problem has no interest at containing any of the edges added in this way .we then construct a with .it is not difficult to show that if and only if there exists a set of edges of such that is acyclic .indeed , implies that there exists a distribution such that for all strategies of , . noticing that every vertex is reachable from the initial vertex , and considering memoryless strategies of ( such that ends with a simple cycle of the graph ), we show that every cycle contains at least one edge with a non - zero budget .the set is then a valid output for the feedback arc set problem . for the reciprocal implication ,we simply assign a budget to each vertex of the set .the result for and is then obtained by a slight modification of the previous proof .let be the obtained from by transforming every edge into a safe edge ( see lemma [ lem : safe - extended - wlog ] ) .without loss of generality , we can now assume that never assigns budget to the edges .we also note that has no in - going edges so that every play in traverses a safe edge at most once .we claim that if and only if there exists a set of edges of such that is acyclic . indeed , if , considering , it is easy to show that is acyclic : if not , may simply jump from , with a safe edge , to one of the vertices of a cycle of , and then loop in this cycle forever , without visiting any edge with non - zero budget . for the reciprocal implication , again , it suffices to assign a budget to each vertex of .the result for follows from the same reduction together with lemma [ lem : sup - to - ds ] .  in the following ,we suppose , without loss of generality , the existence of a vertex in every instance of the feedback arc set problem , without any in - going edges , and linked with an edge to every other vertex : since is not included in any cycle , the set of the output of the problem has no interest at containing any of the edges added in this way .[ lem : static - lsup ] for cost functions and , the static threshold problem for is -hard .we fix an instance of the feedback arc set problem , given by a directed graph and a natural integer .we then construct a with the vertex connected to every other vertex of , and .we show that if , and only if , there exists a set of edges of such that is acyclic .suppose first that there exists such a set of edges such that is acyclic .then , by considering the distribution of the budget over the edges of , we obtain a game in which every cycle contains at least one edge of , i.e. , every cycle has a positive weight .for both cost functions , this implies that .reciprocally , suppose that .this means that there exist a distribution such that for all strategy of , .notice that from the initial vertex , all other vertices are reachable in .hence , considering memoryless strategies of ( such that ends with a simple cycle of the graph ) , this shows that every cycle contains at least one edge with a non - zero budget .the set is a valid output for the feedback arc set problem .the result for and is then obtained by a slight modification of the previous proof .  for cost functions and ( for all ) , the static threshold problem for is -hard .  as before, we fix an instance of the feedback arc set problem , given by a directed graph and a natural integer .we suppose again that is connected to every other vertex , but has no in - going edge .let be the obtained from by transforming every edge into a safe edge ( see lemma [ lem : safe - extended - wlog ] ) .without loss of generality , we can now assume that never assigns budget to the edges .we also note that has no in - going edges so that every play in traverses a safe edge at most once .we now show that if , and only if , there exists a set of edges of such that is acyclic .assume first that there exists a set of edges of such that is acyclic .then , using the same argument as in the proof of lemma [ lem : static - lsup ] , we know that the budget distribution over edges of ensures that every strategy of in visits one of the cycles , each containing an edge with non - zero budget : we obtain .reciprocally , assume that .this means that there exists a budget distribution in such that every strategy of in visits an edge with non - zero budget . as claimed before, we may suppose that does not allocate any budget on edges of .letting , we claim that is acyclic . indeed ,if it is not the case , consider a cycle of : then , may simply jump from , with a safe edge , to one of the vertices of the cycle , and then loop in this cycle forever , without visiting any edge with non - zero budget .this contradicts the fact that .hence , is a valid output of the feedback arc set problem .the result for follows from the same reduction together with lemma [ lem : sup - to - ds ] .in this section we increase the expressiveness of the definition of sabotage games , and show that the threshold problem for these new games are still in .the lower bound is immediate since they are extensions of previous problems shown -hard in the rest of the article .one can see a sabotage game as a system in which a controller tries to evolve while avoiding as much as possible the weights put by saboteur .the vertices of the graph represent configurations of the system , edges represent the actions , and the budget of the saboteur may represent several problems that can occur during the execution .for example , it may describe a number of failures that can happen at the same time , or in a much quantitative way , it may represent how much some elements of the systems are overload , and then how much it would cost , in terms of time or energy , to use them .we propose to look at sabotage as a particular semantics of systems . based on the observation of appendix [ sab2games ], remember that one can define the semantics of a as a quantitative two - player game . if we split the model ( the graph with initial vertex ) , from the sabotage parameters ( budget , initial distribution , and cost function ) , we can define : we have seen that the value of the is identical to the value of the quantitative two - player game .  from a model point of view , graphs which can be viewed as one - player games with trivial winning conditions are quite limited . in more realistic models, we may be interested as modelling systems with uncontrollable actions ( i.e. , as two - player games ) , and where the controller has a specific boolean goal to achieve , instead of simply visiting the graph _ ad vitam ternam_. a more realistic goal is usually expressed via ltl formulas , that can be modelled into qualitative games with parity winning conditions , as we show in the following .   as a complement of the quantitative two - player games defined in appendix [ sec : qgames - sem ], we now focus on _ qualitative _ two - player games games .consider a weighted arena as before . in the qualitative setting , we are no longer interested in associating a value to each play ( in particular , the weight function is of no use here ) , but simply stating whether a play is winning or not for a player .formally , a _ winning condition _ is a subset of containing the set of winning plays .a qualitative game is a pair consisting of an arena and a winning condition .a play is declared winning for ( respectively , for ) if ( respectively , ) . a strategy of player is winning for if all plays are winning ; a play / strategy is losing for player otherwise .we say that player wins ( respectively , loses ) the game if he has ( respectively , does not have ) a winning strategy . hereare some usual winning conditions considered widely in the literature :  * for all or , is the set of plays that contain an occurrence of . * for all or , is the set of plays that do not contain any occurrence of . * for all or , is the set of plays that contain infinitely many occurrences of . * for all or , is the set of plays that contain only finitely many ( possibly none ) occurrences of .* for all ( such mapping is called a _ colouring function _ ) , is the set of plays such that the greatest colour appearing infinitely often in the sequence is even . given a colouring function , we let be the number of different colours of the vertices , i.e. , . * for all value function , and , is the set of plays such that .     in order to apply a sabotage semantics to qualitative game , where wants to satisfy a condition while minimising a cost, one must study some mixture between qualitative and quantitative aspects .we see how one can combine winning conditions and value functions , as introduced in .intuitively , in a weighted arena with a winning condition and a value function , could want to satisfy while minimising .we formalise this by building a new value function , denoted by , and defined by if , and otherwise . the quantitative two - player game now contains the combination of both objectives .we may finally introduce a sabotage semantics for parity games . instead of deciding whether a player has a winning strategy , which would be a standard semantics , we decide whether he has a winning strategy that guarantees ( or simply avoids in the case of a threshold ) a certain threshold over the quantity of penalties when the game is subject to failures .formally , given a two - player parity game , a budget , an initial distribution , and a cost function , the _-sabotage semantics of _ is the quantitative game where :  * , and : with respect to the one - player case of appendix [ sec : qgames - sem ] , we add some vertices to player that has now in charge both the moves of the environment ( uncontrollable actions ) , and redistributions of ; * ; * ; * is the initial configuration ; * .      to prove this theorem , we first establish a crude ( but sufficient ) upper bound on the complexity of solving quantitative games obtained by combining parity winning conditions and the previous cost functions .we start with the case . in it has been shown that one can decide who wins in a qualitative game with a parity condition with a complexity in . in  , it has been shown that one can compute the value of a quantitative game with an average cost function with a complexity in .the combination has been studied thoroughly in  .there , it has been shown that if one can solve average cost games in and parity games in , then one can solve games with a complexity in . by combining this result with the two above, we obtain a complexity in .we then turn to the case .our proof goes by encoding into a qualitative winning condition , and then using classical results of algorithmic game theory .observe that deciding the threshold problem in the game amounts to solving the following problem :    notice that is a subset of edges , and not vertices .however , it is easy to transform the problem into an equivalent problem where is indeed a subset of edges .informally , it suffices to enrich the vertex set by letting , letting the initial vertex instead of , and replacing each edge by the set of edges in :    now to conclude the proof , we describe two polynomials and such that deciding if win qualitative problem with a winning condition obtained by the intersection of a parity condition and another one from with can be done with a complexity in .we let the arena on which we play ( the weight function is of no use anymore ) .  for ( respectively , ), one can construct in polynomial time a parity game such that , , and in if and only if in ( respectively , ) . for , we remove for each vertex every outgoing edge in , and add a self loop , colouring them with an odd colour . hence, if a play reaches such a vertex the play is losing , and otherwise , it is winning if and only if the greatest colour seen infinitely often is even . for , we create two copies of the game . in the first copy ,every colour is odd , and for every vertex in the outgoing edges are modified to go to the same target but in the second copy . in the second copy, nothing is changed .the play start in the first copy . in order to win, must go to the second copy ( otherwise the colour will always be odd ) , i.e. , must reach a vertex in and then the greatest colour seen infinitely often must be even . as we have seen above parity gamescan be solved which concludes the proof for these cases .for and , there exist two colouring functions and such that : , , and .indeed , for , simply consider and , and for consider and . therefore solving a game with a winning condition of the form or can be turned into solving a game with a winning condition of the form with .such games have been studied in  .they have shown that they can be solved with a complexity in , which concludes the proof of the proposition .   from a parity game , a budget , an initial distribution , and a threshold , one can construct in exponential time .proposition [ solvingquantpar ] shows that we can decide who wins from in this game with a complexity in .we have and .furthermore . as and , we have .since is given in binary , we can suppose that is at most exponential in the size of the input of the problem , which , in summary , shows that we can solve the threshold problem in exponential time .the linear temporal logic ( ltl ) is a logic whose formulas describe properties of infinite sequences of predicate . more formally , given a game arena , a mapping from vertices to a set of predicate and an ltl formula , the winning condition is the set of plays such that the sequence satisfies .solving ltl - games , with their standard semantics , is already 2--complete  .the 2- membership can be obtained by turning an ltl formula into a parity automaton whose size is doubly exponential in the size of , and solving the parity game obtained by taking the product of the game arena with the automaton .when applying a sabotage semantics to an ltl game , we obtain a game of size exponential in the initial arena , and whose value function is a combination of a cost function and the ltl formula . by applying the same method as above , using the parity automaton associated with the formula and taking the product of the automaton with , we obtain a game whose size is doubly exponential in the size of , and whose value function is a combination of a cost function and a parity objective . applying the above result , one can show that this game can be solved in 2- with respect to the size of .

Abstract: we study a generalisation of sabotage games , a model of dynamic network games introduced by van benthem  . the original definition of the game is inherently finite and therefore does not allow one to model infinite processes . we propose an extension of the sabotage games in which the first player ( ) traverses an arena with dynamic weights determined by the second player ( ) . in our model of _ quantitative sabotage games _ , is now given a budget that he can distribute amongst the edges of the graph , whilst attempts to minimise the quantity of budget witnessed while completing his task . we show that , on the one hand , for most of the classical cost functions considered in the literature , the problem of determining if has a strategy to ensure a cost below some threshold is -complete . on the other hand , if the budget of is fixed a priori , then the problem is in for most cost functions . finally , we show that restricting the dynamics of the game also leads to better complexity .   [ theorem]proposition [ theorem]claim  # 1