The Complexity of Node Blocking for Dags

We consider the following modification of annihilation game called node blocking. Given a directed graph, each vertex can be occupied by at most one token. There are two types of tokens, each player can move his type of tokens. The players alternate …

Authors: ** Dariusz Dereniowski (Gdańsk University of Technology, Pol, ) – 이메일: `deren@eti.pg.gda.pl` --- **

The Complexity of Node Blocking for Dags
The Complexity of Node Blocking for Dags Dariusz Dereniowski Department of Algorithms and System Modeling, Gda ´ nsk Univ ersity of T echnology , P oland deren@eti.pg.gda.pl November 10, 2018 Abstract: W e consider the following modification of annihilation game called node block ing. Giv en a dire cted graph, each vertex can be occu - pied by at m ost o ne token. There ar e two types o f to kens, each player can move his type o f tokens. The players alter nate their moves and the current player i selects one token of typ e i and moves the token along a directed edge to an unocc upied verte x. If a play er canno t make a move then he loses. W e consider th e pr oblem o f determ ining the com plexity of the game: giv en an arbitrary con figuration of tokens in a d irected acyclic gr aph, does the current playe r h as a winning strategy? W e prove that the problem is PSP A CE-co mplete. Keywords: an nihilation game, node blocking, PSP A CE-com pleteness 1 Introd uction The study of annih ilation g ames has been suggested by John Conway and the first papers were published by Fraenkel and Y esha [7, 9]. T hey considered a 2-playe r game played on an underlying directed g raph G (possibly with cycles). The current player selects a token and moves it along an arc o utgoing from a vertex containin g the token. If a vertex contains two tokens then they are removed from G ( ann ihilation ). Au thors in [9] gave a polyn omial-time algorithm for co mputing a winn ing strategy . In this paper, including all the m entioned h ere results, w e assume the n ormal play , wh ere the first player u nable to make a m ove loses (mis ` ere an nihilation g ames h av e be en co nsidered in [2]). Fraenkel con sidered in [4] a generalization of cellular-automata games to two- player games and p rovided a strategy for such cases. In particular, if for each vertex there is at most one outgo ing arc then it is possible to derive a polyno mial-time strategy [4]. Sin ce the formulation of th e g ame is equiv alen t to the one mentioned above, th is result can be directly applied for the annihilation game. Fraenkel in [3] st udied the con nections between annihilation gam es and error- correcting co des. The au thors in [ 6] gave an algo rithm for co mputing error-corre cting 1 codes. The algor ithm is p olynom ial in the size of the cod e and uses the theory o f two-player cellular -automata games. In the following we are interested in gene ralizations of the annih ilation gam e, where there is mo re than one type of to ken and / or there is a di ff erent interactio n be- tween the tokens. Assume that r ≥ 2 typ es of to kens are g iv en and each ty pe o f token can be moved along a subset of th e edg es. Given a co nfiguratio n of tokens in a gr aph, deciding wh ether the current player has a winning strategy is PSP AC E-comp lete for acyclic graphs [5]. A mo dification called hit , wher e r ≥ 2 types of to kens and edges are disting uished was considered in [5]. A mo ve co nsists of selecting a token of type i and moving alon g an arc o f type i ∈ { 1 , . . . , r } . The target vertex v cann ot be occup ied by a token o f type i , but if v contain s token o f other type then it is rem oved (so , when the move ends v is occupied by the token of type i ). The complexity of determining the outcom e of this game is PSP A CE-complete fo r acyclic graphs an d r = 2 [5]. A m odification of hit called ca ptur e has the same rules except th at each token can travel along any edge. Capture is PSP A CE-com plete fo r acyclic and EXPTIME-comp lete for gen eral grap hs [10]. In a n ode blocking e ach token is o f one of the two types. Each vertex can contain at most o ne to ken. Player i can move the tokens of typ e i , i = 1 , 2 . All to kens can move along a ll arcs. A playe r i makes a move, by selecting on e token of type i (occu pying a vertex v ∈ V ) and an unoccu pied vertex u ∈ V such that ( v , u ) ∈ E and moving the token from v to u . T he first player unable to make a move loses and h is opponent wins the game. There is a tie if there is no last move. First, the game was p roved to be NP-hard [8], then PSP A CE- hard for g eneral grap hs [5]. The comp lexity for g eneral graphs has been finally proved in [10] to be EXPTIME-com plete. In an ed ge blo cking all tokens ar e ide ntical, i.e. each p layer can move any token, while each arc is of type 1 or 2 and a player i makes his move b y moving a to ken along an arc o f type i , i = 1 , 2. Similar ly as b efore, the first p layer who can not make a move loses. A tie occurs if there is no last move. T his game is PSP A CE-com plete for dags. The following table summarizes the co mplexity of all the men tioned two-player annihilation games. W e list only the strong est known results. Game: dag general Annihilation PSP A CE-co mplete [5] ? ∗ Hit PSP A CE-co mplete [5] ? ∗ Capture PSP A CE-co mplete [10] EXPTIME-co mplete [10 ] Node blocking ? EXPTIME-co mplete [10 ] Edge blocking PSP A CE-co mplete [5] ? ∗ Note that for the entries labeled as “? ∗ ” can b e replaced by “PSP A CE-hard” (which can be concluded from the co rrespond ing results for acyclic g raphs), but the q uestion re- mains whether the games a re in PSP A CE. In this paper we are interested in the proble m marked by “?”, listed also in [1 ] as one of the open pr oblems. In Section 3 we prove PSP A CE-co mpleteness of this game. 2 2 Definitions In the following a token of type 1 (resp ecti vely 2 ) will be called a white to ken ( bla ck token , resp.) and den oted by symbol W t ( B t , resp.). The player moving the white (black) tokens will be denoted by W ( B , respectiv ely). Let G = ( V ( G ) , E ( G )) be a directed gr aph. For v ∈ V ( G ) define deg + G ( v ) = |{ u ∈ V ( G ) : ( u , v ) ∈ E ( G ) }| , d eg − G ( v ) = | { u ∈ V ( G ) : ( v , u ) ∈ E ( G ) }| . A notatio n u → p v is used to denote a move made by p layer, p ∈ { W , B } , in wh ich the token has b een removed from u an d p laced at th e vertex v . Given the p ositions o f tokens, d efine f ( v ) for v ∈ V ( G ) to be one of th ree possible values W t , B t , ∅ in dicating that a white or b lack token is at the vertex v o r th ere is n o token at v , respec ti vely . In the latter case we say that v is empty . Note that if f ( u ) = ∅ or f ( v ) , ∅ the n the move u → p v is incorre ct. Let us recall a PSP AC E-comp lete Quantified Boolean Formula ( QBF ) problem [11]. The input for the problem is a formula Q in th e form Q 1 x 1 . . . Q n x n F ( x 1 , . . . , x n ) , where Q i ∈ {∃ , ∀} for i = 1 , . . . , n . Decide whethe r Q is tru e. In our case we u s a restricted case of this problem where Q 1 = ∃ , Q i + 1 , Q i for i = 1 , . . . , n − 1, n is even, and F is a 3CNF formula, i.e. F = F 1 ∧ F 2 ∧ · · · ∧ F m , where F i = ( l i , 1 ∨ l i , 2 ∨ l i , 3 ) and each literal l i , j is a v ariable or the negation of a variable, i = 1 , . . . , m , j = 1 , 2 , 3. 3 PSP A CE-hardness of node blocking Define a variable compone nt G i correspo nding to x i as follows: V ( G i ) = { s , t , x , y } ∪ { v 1 , . . . , v 4 } , E ( G i ) = { ( s , v 1 ) , ( v 1 , v 2 ) , ( v 2 , v 3 ) , ( v 3 , t ) , ( v 4 , t ) , ( v 4 , v 2 ) , ( x , v 4 ) , ( y , v 4 ) } for i = 2 j − 1, and V ( G i ) = { s , t , x , y } ∪ { v 1 , . . . , v 8 } , E ( G i ) = { ( s , v 1 ) , ( v 1 , v 2 ) , ( v 2 , v 3 ) , ( v 3 , t ) , ( v 4 , t ) , ( v 4 , v 2 ) , ( v 5 , v 4 ) , ( v 6 , v 4 ) , ( v 7 , v 5 ) , ( v 8 , v 6 ) , ( x , v 7 ) , ( y , v 8 ) } for i = 2 j , where j = 1 , . . . , n / 2. Fig. 1 d epicts these subgraphs. If i is odd then G i is called a white compo nent and in this case an initial placement of tokens in G i is f ( s ) = f ( v 4 ) = f ( x ) = f ( y ) = W t , f ( v 3 ) = ∅ and f ( v 1 ) = f ( v 2 ) = f ( t ) = B t (see also Fig. 1( a )). In a bla ck com ponent G i , where i is ev en, we ha ve f ( s ) = f ( v 4 ) = . . . = f ( v 8 ) = B t , f ( v 3 ) = ∅ and f ( v 1 ) = f ( v 2 ) = f ( x ) = f ( y ) = f ( t ) = W t (see also Fig. 1( b )). In bo th cases the above configur ation of tokens will be called the initial state of G i . Removing a token fr om a graph with out placing it on an other verte x is an in valid operation . Howe ver , assume fo r now that, given an initial state o f G i , the first move is a deletion of a token occupying the verte x t (we will assume in Lemma 1 that the game starts in this way). Then, W (respectively B ) be comes the curren t player in the white (black, resp. ) compo nent G i . Furthermo re, we assume that th e gam e in G i ends w hen f ( s ) becomes ∅ . 3 v 4 v 3 v 2 t s ( b ) ( a ) v 4 v 3 v 2 y t s v 7 v 5 v 6 v 8 x x y v 1 v 1 Figure 1: The graphs G i for ( a ) i = 2 j − 1 an d ( b ) i = 2 j , j = 1 , . . . , n / 2 Lemma 1 If G i is a white ( r espectively black ) compo nent th en W ( B, r esp. ) has a winning strate gy . At the end of the game we have that if G i is a white compo nent then exactly on e o f the vertices x , y is empty , and if G i is a black compon ent then e xactly one of the vertices x , y , v 5 , v 6 is empty . Proof: First assume th at G i is a wh ite component. Let f ( t ) = ∅ and W is the current player . The first two moves are v 4 → W t , v 2 → B v 3 . Then there are two possibilities: x → W v 4 or y → W v 4 . (1) In both cases the game continues as follows: v 1 → B v 2 , s → W v 1 . The thesis follows. Let G i be a black c ompon ent w ith f ( t ) = ∅ and B is the curren t player . Similarly as before we hav e v 4 → B t , v 2 → W v 3 . The th ird move is v 5 → B v 4 or v 6 → B v 4 . Since they are symmetrical, assume in th e f ollowing that th e first case o ccurred. W e h a ve v 1 → W v 2 . Then B has a choice: v 7 → B v 5 or s → B v 2 . ( 2) If the first move occurred then we have x → W v 7 . Then, s → B v 2 , which en ds th e game and the vertex x is emp ty amon g th e vertices listed in the lemma . If B selected the second move in (2) then the game ends with f ( v 5 ) = ∅ .  Now we define a g raph G F , correspon ding to the Boolean formu la F . In o rder to distinguish a vertex v ∈ V ( G i ) from the vertice s of the other variable compo nents we will write v ( G i ). G F contains disjoint white com ponents G 2 i − 1 for i = 1 , . . . , n / 2 and d isjoint b lack c ompon ents G 2 i , i = 1 , . . . , n / 2, co nnected in such a way that s ( G i ) = t ( G i + 1 ) fo r i = 1 , . . . , n − 1. T he grap h G F contains addition ally the ver - tices w , v ( F 1 ) , . . . , v ( F m ), an arc ( w , t ( G n )), the arcs ( v ( F i ) , w ) for i = 1 , . . . , m , and ( x ( G i ) , v ( F j )) ∈ E ( G F ) i ff F j contains x i , wh ile ( y ( G i ) , v ( F j )) ∈ E ( G F ) i ff F j contains x i , a negation o f the v a riable x i . Initially , all the subgra phs G i are in the initial state, except that f ( t ( G 1 )) = ∅ . Let f ( w ) = W t , f ( v ( F j )) = B t for j = 1 , . . . , m . Before we prove the main theorem , let us demo nstrate the above red uction by gi ving an example Q = ∃ x 1 ∀ x 2 ∃ x 3 ∀ x 4 ( x 2 ∨ x 3 ∨ x 4 ) ∧ ( x 1 ∨ x 2 ∨ x 4 ) ∧ ( x 1 ∨ x 2 ∨ x 4 ) . (3) 4 x ( G 1 ) y ( G 1 ) x ( G 2 ) y ( G 2 ) x ( G 3 ) y ( G 3 ) x ( G 4 ) y ( G 4 ) w v ( F 1 ) v ( F 2 ) v ( F 3 ) Figure 2: A complete instance of the graph G F correspo nding to (3) Fig. 2 shows the corresponding graph G F . For brevity we in troduce a notation: we say that the game arrives a t a co mpone nt G i (and leaves the co mponen t G i − 1 , i > 1) if f ( t ( G i )) = ∅ (note that for i > 1 this is equiv alent to f ( s ( G i − 1 )) = ∅ in th e graph G F ). The g ame is in G i if it arrived at G i but did not lea ve G i . Theorem 1 Node blocking is PSP A CE -complete for dir ected acyclic graphs. Proof: First we prove b y an induction on i = 1 , . . . , n that we ma y without loss of generality assume that if the game arriv es at the component G i then (i) for ea ch j < i exactly on e o f the vertices x ( G j ) , y ( G j ) (if G j is a wh ite comp o- nent) o r exactly one of th e vertices x ( G j ) , y ( G j ) , v 5 ( G j ) , v 6 ( G j ) ( if G j is a b lack compon ent) is empty , (ii) all tokens in compon ents G j , for j = i , . . . , n are in the initial state, excep t that f ( t ( G i )) = ∅ . The cases for i = 1 and i > 1 are ana logous. If the game is in G i then (by the induction hypoth esis) all possible moves are th e ones along the ar cs in G i , v 2 ( G j ) → p v 3 ( G j ) for j > i and v 7 ( G j ) → B v 5 ( G j ) o r v 8 ( G j ) → B v 6 ( G j ) fo r a black c ompon ent G j , j < i . In the latter case W respo nds x ( G j ) → W v 7 ( G j ) o r y ( G j ) → W v 8 ( G j ), respectively , so we consider the first two cases. Let G j be a white compon ent (the other case is analogous) and B moves a token along an arc which does not belong to E ( G i ), i.e. v 2 ( G j ) → B v 3 ( G j ) , j > i . (4) For each mov e (4) W responds v 4 ( G j ) → W v 2 ( G j ) . (5) For other moves of B , W r esponds as in th e proof of Lemma 1. Consider the case when the game arrives a t the co mponen t wh ich is not in th e initial state, because the m oves (4) 5 x ( G j ) y ( G j ) s ( G j ) t ( G j ) x ( G j ) y ( G j ) s ( G j ) t ( G j ) x ( G j ) y ( G j ) s ( G j ) t ( G j ) ( b ) ( a ) ( c ) Figure 3: ( a ) the game arriv es at G j , ( b ) the game lea ves G j , ( c ) W wins the ga me and ( 5) have been perfo rmed. T his situatio n is given in Fig. 3( a ). Since W is the curren t player, the first move in G j is x ( G j ) → W v 4 ( G j ) or y ( G j ) → W v 4 ( G j ). In b oth cases the remainin g seq uence of moves is identical: v 3 ( G j ) → B t ( G j ), v 2 ( G j ) → W v 3 ( G j ), v 1 ( G j ) → B v 2 ( G j ), s ( G j ) → W v 1 ( G j ). The result is shown in Fig. 3( b ). Th is proves that if B perfo rms a move along an arc which is n ot in G i when the game is in G i then W decid es amo ng one of th e moves x ( G j ) → W v 4 ( G j ) or y ( G j ) → W v 4 ( G j ) wh en the game is in G j . Th is, ho wev er is only true un der th e assump tion that after (4) and (5) W p lays ac cording to the schema g iv en in the pr oof o f L emma 1. If the white player managed to p lace a token at the verte x v 4 ( G j ) before th e game arrived at G j then the move v 4 ( G j ) → W t ( G j ) gives a situation de picted in Fig. 3 ( c ) — t he b lack player cannot make a move in G j . So , if the game is in G i and a move (4) occurred, then either the game creates the s ame configuration of tokens in v ariable compon ents (restricted to th e vertices x ( G k ) , y ( G k ) , k = 1 , . . . , n ), or B loses the game. Thus, w .l.o.g. we may assume that if the game is in G i then the compo nents G j , j > i are in the initial state, i.e. (ii) is true. Assuming the play ers make only mov es along the arcs of G i , if the g ame arri ves at G i + 1 then Lemma 1 implies that (i) is satisfied. Now we can prove the theo rem. Assume that Q is true and we show that W has a winning strategy . If x i is true (respectively false), i = 2 k − 1, k = 1 , . . . , n / 2, the n W plays i n G i in such a w ay that if the game leaves G i then f ( x ( G i )) = W t ( f ( y ( G i )) = W t , respectively). Assume th at the game leaves G n . Then we have w → W s ( G n ) an d v ( F j ) → B w , for some j ∈ { 1 , . . . , m } . Sinc e Q is true, ther e is a tru e literal l j , k in F j , k ∈ { 1 , 2 , 3 } . If l j , k = x t then f ( x ( G t )) = W t and W can make the mo ve x ( G t ) → W v ( F j ). If l j , k = x t then f ( y ( G t )) = W t and the move y ( G t ) → W v ( F j ) is p ossible. Note that if x ( G t ) or y ( G t ) belongs to a black componen t, then (b ecause Q is true) W a lw ays has a possibility to make the above move in such a way that it hold s f ( v 5 ( G t )) = B t or f ( v 6 ( G t )) = B t , respectively . If B can make a m ove then it m ust be v 7 ( G j ) → B v 5 ( G j ) or v 8 ( G j ) → B v 6 ( G j ), but then W r esponds x ( G j ) → B v 7 ( G j ) or y ( G j ) → B v 8 ( G j ). No other moves are possible, so W wins the game. The above holds for each index j . Let now W h av e a winning strategy . If the values of x 1 , . . . , x i , i = 2 k hav e b een set then let x i + 1 = tru e if we have th e m ove y ( G i + 1 ) → W v 4 ( G i + 1 ) durin g the g ame in G i + 1 , and let x i + 1 = false if ther e is a move x ( G i + 1 ) → W v 4 ( G i + 1 ) during th e game in G i + 1 . The game lea ves G n and we ha ve the moves w → W s ( G n ), v ( F j ) → W w for some j ∈ { 1 , . . . , m } . The black play er chooses j ar bitrarily and since W ha s a winning strategy ther e is p ossible a m ove x ( G k ) → W v ( F j ) or y ( G k ) → W v ( F j ). From the 6 construction of the strategy for W we hav e that there is the literal x k = true in F j or the literal x k = true in F j , respectively . Observe th at | V ( G F ) | = 7 n / 2 + 11 n / 2 + m + 2, so this is a polyno mial red uction. This proves PSP A CE-hardn ess of node blocking. One can argum ent that G F is acyclic which implies that the game is in PSP A CE.  Refer ences [1] E .D. Demaine. Playing games with algorithms: Algorith mic comb inatorial game theory . In MFCS ’01: Pr oceeding s of the 2 6th In ternationa l Sy mposium on Math- ematical F oundations of Computer Science, Lectur e Notes in Comp. Sci. , volume 2136, pages 18–32 , Londo n, UK, 200 1. Springer-V erlag. [2] T .S. Fer guson. Mis ` ere annihilation g ames. J. Comb. Theory , Ser . A , 37(3):20 5– 230, 1984. [3] A. S. Fraenkel. Error-correctin g codes derived from combinato rial ga mes. In Games of No Chance, Pr oc . MSRI W orkshop on Combinato rial Games, Berkele y , CA (R. J . Nowakowski, Ed.) , volume 29, pages 417–431. MSRI Publ., Cambridg e University Press, 1994. [4] A. S. Fraenkel. T wo-player games on cellu lar automata. In Mor e Games of No Chance, Pr oc. MSRI W o rkshop Combinato rial Games (R.J. Nowakowski,Ed.) . Cambridge Uni v . Press, 2002. [5] A. S. Fraen kel and E. Gold schmidt. Pspace -hardn ess o f som e combin atorial games. J. C omb. Theory Ser . A , 46(1):21 –38, 1987. [6] A. S. Fraenkel and O. Rahat. Complexity of error-correcting code s derived fro m combinato rial games. In Lectur e Notes in Comp. Sci. , v o lume 28 83, pag es 20 1– 212, 2003. [7] A. S. Fraenkel and Y . Y esha. Theor y of annih ilation games. B ulletin of the Amer - ican Mathematical Society , 82(5) :775–7 77, 1 976. [8] A. S. Fraenkel and Y . Y esha. Comp lexity of problems in games, graphs and alge- braic equations. Discr e te Appl. Math. , 1(1-2 ):15–3 0, 19 79. [9] A. S. Fraenkel and Y . Y esha. Theor y of annihilation games. J . Comb. Theory Ser . B , 33:60– 86, 1982 . [10] A.S. Goldstein and E.M. Reingold. The complexity of pur suit on a graph. Theor . Comput. Sci. , 143(1 ):93–11 2, 1995 . [11] L.J. Stockm eyer an d A.R. Meyer . W ord prob lems requir ing exponential time. In STOC ’73 : Pr oceedings of the fifth annu al ACM Symposium on Theory of Computing , pages 1–9, Ne w Y or k, NY , USA, 1973. A CM. 7

Original Paper

Loading high-quality paper...

Comments & Academic Discussion

Loading comments...

Leave a Comment