Abstract Milling with Turn Costs
The Abstract Milling problem is a natural and quite general graph-theoretic model for geometric milling problems. Given a graph, one asks for a walk that covers all its vertices with a minimum number of turns, as specified in the graph model by a 0/1…
Authors: M. Fellows, P. Giannopoulos, C. Knauer
Abstract Milling with T urn Costs ⋆ M. F ello ws 1 ⋆⋆ , P . Giannop oulos 2 ⋆ ⋆ ⋆ , C. Knauer 2 , Christophe P aul 3 † , F. Rosamond 1 ‡ , S. Whitesides 4 § , and N. Y u 4 1 PCR U , Office of DV C(Research), Universit y of New castle, A u s t ra lia 2 Institut f¨ ur Informatik, F reie Un i versit¨ at, Berlin, German y 3 CNRS - LIRMM, Mon tp ellier, F rance 4 McGill Universi ty , Sc hool of Computer Science, Canada. Abstract. The Abstra ct Milling problem is a natural and quite general graph-theoretic mod el for geometric milling problems. Given a graph, one asks for a walk th at cov ers all its vertices with a minim u m num b er of turns , as sp ecified in th e graph mod el by a 0/1 turncost func- tion f x at eac h vertex x gi v ing, for eac h ordered pair of edges ( e, f ) incident at x , t h e turn c ost at x of a w alk t hat enters the vertex on edge e and departs on edge f . W e d escribe an initial study of the p arame- terized complexity of the problem. Our main p ositive result show s that Abstra ct Milling , parameterized by: num b er of tu rns, t reewidth and maximum degree, is fixed- parameter tractable, W e also sh o w th at Ab- stra ct Milling p arameterized by (only) the number of turns and the pathwidth, is hard for W [1] — one of the few parameterized intractabilit y results for boun ded pathwi d th. 1 In tro duction W e consider the follo wing problem: Abstract Mill ing Instanc e: A simple graph G = ( V , E ) and for eac h vertex x , a turnc ost function f x indicating whether a turn is requir ed , w ith f x : E ( x ) × E ( x ) → { 0 , 1 } , where E ( x ) is the set of edges inciden t on x . Question: Is there a w alk making at most k tur ns that visits every v ertex of G ? ⋆ Researc h initiated at the 6th McGill - I NRIA Barbados W orkshop on Computational Geometry in Computer Graph ics, 2007. ⋆⋆ Researc h sup p orted by the Australian Research Council t h rough t h e ARC Centre of Excellence in Bioinformatics and Disco very Pro ject DP0773331. ⋆ ⋆ ⋆ Researc h supp orted by the German Science F oundation (DFG) under grant Kn 591/3-1. † Researc h conducted while the author was on sabb atical at McGill Un iversi ty , School of Computer Science, Canada. S upp orted by the pro ject ANR-06-BLAN- 0148. ‡ Researc h su p p orted b y the Australian Research Council. § Researc h su p p orted b y NS ERC and F QR NT. The Grid Milling problem r estricts the input to grid gr aphs , that is, rectilinearly plane-em b edd ed graphs that are sub graphs of the int egral grid, w ith the obvious and n atural tur n cost fu nctions. Results. Our basic starting p oint is an FPT algorithm for Grid Milling , parameterized b y the num b ers of tur ns. Generalizing this, we give an FPT result f or Abstract Milling , parameterized by ( k , t, d ), w here k is the n u m b er of turns, t is the tree-width of the input graph G , and d is the maxim um degree of G . Next, we exp lore w hether this p ositiv e result can b e further s tr engthened. Ho wev er: the Abstract Milling problem is W [1]-hard w hen parameterized by ( k , p ), where k is the num b er of tur ns and p is the p ath-wid th of G (and th er efore also when parameterized by ( k , t )). (Th is hardn ess r esu lt is actually sh o wn for a r estricted ve r sion of the problem, called Discr ete Milling , s ee b elo w). Significance. The Abstr act Milling problem is motiv ate d b y (and generalizes) similar graph-theoretic mo dels of geometric milling p roblems in tro duced by Arkin et al. [1], and our results are concretely in teresting as the first in vestig ation of the p arameterized complexit y of these problems. Recen tly , there has b een increasing atten tion to the complexit y of “highly structured graph p roblems” parameterized by treewidth or pathwidth. Our nega tiv e r esult p ro vides one of th e few natur al pr oblems kno wn to b e W [1]-hard when th e parameter includes a p ath width b ound. Metho d and Practicalit y . Our FPT r esults are b ased on a general form of Courcelle’s Theorem ab out d ecidability of MSO p rop erties of r elational structures of bou n ded tree w idth [2], a n d are not p ractical, alt h ough, of course leaving op en th e p ossib ility that these FPT classifications ma y b e su p erseded by practical FPT algorithms, as has often o ccurred in the study of fi xed parameter algorithms [7]. Previous and Related W ork. Ge om e tric mil ling is a common prob- lem in manufacturing applications such as numerically control led p o ck et mac hining and automatic to ol path generation; s ee Held [6] for a su rv ey . The Discrete Milling p roblem introdu ced b y Ar kin et al. [1] uses a graph m o del to study milling problems with turn costs and other con- strain ts. A solutio n p ath must visit a set of v ertices that are connected b y edges representing the different d irections (“c hannels”) that the “cut- ter” can tak e. In the mo del introduced by Arkin et al., in ciden t edges to a v ertex x are p air e d in the cost fu nction f x in the sense that for eac h in- ciden t edge e there is at most one incident edge f su c h that f x ( e, f ) = 0, and symmetric: if f x ( e, f ) = 0 then f x ( f , e ) = 0. W e consider here the more general Abstract Milling pr oblem, that allo ws an arbitrary 0/1 turncost f unction at eac h verte x . Arkin et al. [1] show ed th at Discre te Milling is NP-hard (ev en for grid graphs ) and describ ed a constan t-factor appro ximation algorithm for minimizing the num b er of tur ns in a solution wa lk. They also describ ed a PT AS for the case wh ere the cost is a linear com b ination of the length of the walk and the num b er of turns. Definitions and Preliminaries. W e w ill assume that the b asic ideas of parameterized complexit y theory an d b ou n ded tree-width algorithmics up through th e b asic form of C ou r celle’s T heorem and monadic second-order logic (MSO) are kno w n to the reader; some basic definitions are provided in Section 2 and in App en dix B. Details of routine deplo yments of MSO in the pro ofs of our theorems (that can b e lab orious in fu ll formalit y) are relegated to App end ix A due to space limitations. F or bac kground on these topics, s ee [3, 5]. F or a graph G , let t w( G ) b e its treewidth. W e assume that all graphs G are simple (no lo ops or multiple edges). A walk W = [ x 0 , . . . , x l ] on a graph G = ( V , E ) is a sequence of v ertices suc h th at eve r y pair x i , x i +1 of consecutiv e vertic es of the sequence are adjacen t (we use x i x i +1 to r efer to th e edge b et ween them). Th e turn c ost of a walk W is defi n ed as tc( W ) = l − 1 X i =1 f x i ( x i − 1 x i , x i x i +1 ) . A w alk that visits ev ery vertex of a graph is termed a c overing walk . Note that in Abstract Mill ing a solution cov ering w alk may visit a vertex many times . The pap er is organized as foll ows: Section 2 reviews the basic ideas of MSO (and its extensions) that we need for proving our FPT results for Grid Milling (Section 3) and Abs tract Milling (Section 4). The in tractabilit y r esult for Discrete Milling is sho w n in S ection 5. W e conclude with some op en p roblems. 2 Monadic Second Order Logic The usual MSO lo gic of graphs can b e extended to digraph s and mixed graphs (some edges are orien ted and some are n ot), wh ere the vertic es and edges (or arcs) ha ve a fixed num b er of t yp es. Th is w as prov ed in full generalit y first by C ou r celle [2], and is exp osited w ell in [5] in terms of relational structures of b ound ed treewidth . W e refer to suc h a mixed graph with a fi xed num b er of types of edges, arcs and v ertices as an annotate d graph. The treewidth of an annotated graph is the treewidth of the u nderlying u ndirected graph. In this pap er, w e will asso ciate to eac h input graph an annotated graph, in such a wa y that the p rop erty of b eing a yes-instance of the problem und er consideration can b e exp ressed as an MSO pr op ert y of the asso ciated ann otated graph. The form al means that MSO logic (as w e will use it here) pr o vides us with, and Courcelle’s T h eorem can b e found in Ap p end ix B. 3 Grid Milling is Fixed-P arameter T ractable W e prov e here our starting p oint: that Grid Milling is FPT for pa- rameter k , the num b er of turns. W e fir st argue th at in stances w ith large tree-width are no-instance s . Then w e show ho w to express the problem in (extended) MSO for an annotated graph M ( G ) that we asso ciate to a Grid Milling instance G . Th at is, we describ e an MSO form u la φ , such that the prop ert y expressed by φ holds for M ( G ) if and only if G is a y es-instance f or the Grid Milling pr oblem. Lemma 1. L et G = ( V , E ) b e a c onne cte d grid gr a ph with tw ( G ) > 6 k − 5 . Then G do es not c ontain a ( k − 2) -turn c overing walk. Pr o o f. W e show that G cont ains k vertices that ha v e pairwise differen t x - and y -co ordinates. Then, any co v ering walk needs to tak e at least one turn b et wee n any t wo suc h v ertices, and thus it needs at least k − 1 turn s in total. Since G is p lanar and tw( G ) > 6 k − 5, by the Excluded Grid Theorem for planar graphs (c.f. [5]), it has a ( k × k )-grid H as a minor. H con- tains k/ 2 ve rtex-disjoin t n ested cycles. Since taking m inors can d estro y or merge cycles bu t not create completely new ones, in th e “pre-images” (under the op eration taking minor) of th ese cycles th ere must b e k / 2 v ertex-disjoint sub grap h s in G , eac h con taining a cycle. Thus, G con tains a set C of k / 2 verte x-disjoin t cycles, wh ic h must also b e nested. C on s ider a straigh t line L of un it slop e th at intersects the inn ermost cycle of C at t wo vertices (g r id p oint s ). L m u st a lso intersect ev ery other cycle at at least t wo ve r tices. T his pro duces a set o f at least k intersectio n v ertices in G w ith the claimed p r op erty . ⊓ ⊔ W e asso ciate to th e grid graph G a (closely related) ann otated graph M ( G ): we simp ly r egard the horizonta l edges as b eing of one typ e, an d the ve r tical edges as b eing of a second typ e. Equiv alen tly , w e can think of G as presented to us with a partition of the edge set: G = ( V , E h , E v ). Then, in tuitivel y , G has a k -co ve r ing w alk if and only if there exist a start ve r tex v 0 , turn vertices v 1 ,. . . , v k , an end vertex v k +1 , and sets of v ertices S 0 ,. . . , S k , suc h th at: (i) th e graph induced by S i , i = 0 , . . . , k , is a mono c hromatic path, i.e. a path w hose edges are all either in E h or in E v , (ii) the p ath in d uced b y S i starts at v i and ends at v i +1 , and (iii) V = ∪ S i , i.e. all vertic es of G are co ve r ed. This is s tr aigh tforwa r dly f ormalized in MSO (see App endix A). Lemma 2. L et G = ( V , E h , E v ) b e a grid gr aph . The pr op e rty of having a k -c overing walk on G is expr essible in MSO. T rivially , the mo del graph M ( G ) has treewidth b ound ed as a func- tion of the treewidth of the original graph G . F r om Lemmata 1, 2 and Courcelle’s T heorem we hav e: Theorem 1. Grid Milling i s FPT with r esp e ct to k (numb er of turns). 4 Extending T ractabilit y What m ak es the Grid Milling pr ob lem FPT? A few prop erties of grid graphs migh t lead us to tractable generalizations: (i) Y es-instances must ha ve b ounded treewidth, (ii) ve r tices in grid grap h s h a v e b ounded degree, and (iii) the turn-cost fun ction is pairing and s y m metric, as in th e more general Discre te Mill ing pr oblem. W e are naturally led to three questions, b y relaxing these conditions: • What is the complexit y of Abs tract Mill ing parameterized b y ( k , t, d ), where k is the num b er of turns, t is a treewidth b ound, and d is a b oun ded on maximum d egree? • What is the complexit y of Discrete Mill ing parameterized by ( k , t )? • What is th e complexity of Discrete Milling parameterized by ( k , d )? In the remainder of this pap er , we answ er the first tw o. Th e third question remains op en. Theorem 2. Ab stract Milling is FPT for p ar ameter ( k , t, d ) , wher e k is the nu mb er of turns, t the tr e e-width of the gr aph G and d is the maximum de gr e e of G . Pr o o f. W e d escrib e ho w an instance of th e Abstract Mi l ling pr ob- lem, consisting of G and the turn cost functions, can b e repr esented b y an annotated digraph M ( G ), that allo ws us to use MSO lo gic to exp ress a prop erty that corresp onds to the qu estion that the Abstract Milling problem asks. The pro of therefore consists of three parts: (1) a d escrip tion of M ( G ), (2) some crucial argum en ts that establish necessary and suffi - cien t criteria regarding M ( G ), for the instance of Abstract Milling to b e a y es-instance, and (3) the exp r ession of these criteria in MSO logic. Let G = ( V , E ) b e the graph of the Abstr act Milling instance. The v ertex set of the digraph M ( G ) is V = V 1 ∪ V 2 where V 1 = { l [ v ] : v ∈ V } and V 2 = { t [ e ] : e ∈ E } ∪ { t ′ [ e ] : e ∈ E } In tu itiv ely (see Figure 1), w e “ke ep a cop y” of th e v ertex set V of G , mnemonically “ l [ v ]” for v , as a ve r tex lo cation w e migh t b e du ring a solution wa lk in G . Eac h edge e of G is replaced by t w o v ertices t [ e ] and t ′ [ e ] that represen t a “state” in a solution w alk: tra versing e in one direction or the other. In order to distinguish the directions, consider that the v ertex s et V of G is lin early ord ered. Let e = uv ∈ E with u < v in the ordering. Our con ve ntion will b e that t [ e ] r epresen ts a trav ersal of e from u to v , and that t ′ [ e ] represents a trav ersal of e in the d ir ection from v to u . Thus eac h edge e of G is repr esented by tw o vertic es in M ( G ). In describing arcs of the digraph mo del M ( G ) w e will use the notatio n x · y to den ote an arc from x to y . T he arc set of the digraph M ( G ) is A = A 1 ∪ A 2 ∪ A 3 ∪ A 4 ∪ A 5 where A 1 = { t [ e ] · l [ v ] : e = { u, v } ∈ E with u < v } A 2 = { l [ u ] · t [ e ] : e = { u, v } ∈ E with u < v } A 3 = { t ′ [ e ] · l [ u ] : e = { u, v } ∈ E with u < v } A 4 = { l [ v ] · t ′ [ e ] : e = { u, v } ∈ E with u < v } Let A ′ denote the union of these four sets of arcs. I n tuitively , the arcs of A ′ just “attac h” the vertice s o f the d igraph that repr esent edges in G to the vertices of the digraph th at represent the endp oin ts of the edge, so that the orientat ions of the arcs are compatible with the interpretatio n of a v ertex of V 2 as represent in g, sa y , a tra v ersal of the edge uv in the direction from u to v ; th e verte x therefore has an arc to it from l [ u ] and an arc fr om it to l [ v ]. An ins p ection of Figure 1 will help to clarify . The arc set A 5 is more complica ted to write do wn formally . Its mission is to record the p ossibilities for cost-free passages through v ertices of a solution w alk in G . S upp ose a is an arc in A ′ . Then a is to or fr om either a t [ e ] v ertex, for some e , or a t ′ [ e ] v ertex f or some e . Let ǫ ( a ) b e defi n ed to b e this ed ge e of G . This is we ll-defi n ed. W e can then defin e A 5 = { x · y : x, y ∈ V 2 , ∃ z = l [ v ] ∈ V 1 and ∃ a, b ∈ A ′ with a = x · z and b = z · y and f v ( ǫ ( a ) , ǫ ( b )) = 0 } W e regard M ( G ) as an annotated digraph, in the sense that there are t wo kin d s of vertice s , those of ⊑ 1 and those of ⊑ 2 , and tw o kind s of arcs, those of A ′ and those of A 5 . The arrows here represent turn-cost-free passages. 1 3 2 5 4 G M (G) The arrows here represent turn-cost-free passages. 1 3 2 5 4 1 3 2 5 4 G M (G) Fig. 1. The arro ws drawn near the G vertices represent the tu rncost functions, in d i- cating the zero-cost possibilities. These b ecome arcs in the digraph M ( G ). The r est of the pro of will show th at that the qu estion of wh ether G admits a co ve r ing walk making at most k tur ns is represente d by a prop- ert y of the ann otated d igraph M ( G ) that can b e expressed in MSO logic . Ho w ev er, b efore proceeding to that, it is imp ortan t to ve r ify that if the treewidth of G is b ounded by t , then the treewidth of M ( G ) is b oun ded b y a fun ction of the parameter. This dep ends crucially on the f act that the maxim u m d egree of G is part of our comp ound parameterization. Supp ose T ( G ) is a tree- d ecomp osition of G of width at most t . W e can describ e a b oun d ed wid th tree-decomp osition T ′ of M ( G ) as follo ws. Without confusion, henceforth in th is argumen t consid er M ( G ) as an undirected graph by forgetting all arc orien tations. Use the same bag- indexing tree for T ′ as for T ( G ). Sup p ose B ⊆ V is a bag of T ( G ). Replace B with the un ion of the closed neigh b orho o d s of the v er tices o f V 1 corresp ondin g to the ve r tices of B , in M ( G ). It is easy to chec k that all the axioms for a tree- d ecomp osition hold, and that the treewidth of M ( G ) is th erefore b oun d ed b y 2 dt . In a digraph D = ( V , A ), by a purp oseful set of ar cs ( S, s, t ) w e refer to a set of arcs S ⊆ A , together with tw o distin gu ish ed vertic es s, t ∈ V . W e sa y that a pu rp oseful set of arcs ( S, s, t ) is walkable if there is a directed w alk W in D from s to t such that th e set of arcs tra ve r sed by W (p ossibly rep eatedly) is S . No w consider how the inform ation ab out G and its turncost functions is rep resen ted in M ( G ). A k -tur n co v erin g walk W in G that starts at a v ertex s and ends at a ve r tex t is describ ed b y the in formation: (1) a sequen ce of k + 2 v ertices: s = x 0 , x 1 , ..., x k +1 = t , and (2) a sequ ence of k + 1 subw alks W 0 , ..., W k where for i = 0 , ..., k , W i is a tu r ncost-free w alk from x i to x i +1 , that h as th e p rop erty that ev ery v ertex of G is visited on at least one of the subw alks. Let D ( G ) b e the sub digraph of M ( G ) indu ced by the vertice s o f V 2 . A turncost-free walk in G co r resp ond s to a directed w alk in D ( G ), and vice versa, by the d efi nition of A 5 . Claim 1. G admits a k -tur n co v erin g wa lk if and only if: (1) there are k + 2 v ertices x 0 , ..., x k +1 of V 1 in M ( G ), and (2) k + 1 p urp oseful sets of arcs ( S i , s i , t i ) in D ( G ), 0 ≤ i ≤ k , suc h th at (i) ( S i , s i , t i ) is walk able in D ( G ) for i = 0 , . . . , k , (ii) there is an arc in A ′ from t i to x i +1 ∈ V 1 = V , and fr om x i to s i , for i = 0 , . . . , k , and (iii) for ev ery v ertex x ∈ V 1 = V , there is some index j , 0 ≤ j ≤ k , and an arc a = u · v ∈ S j , su ch th at there is an arc in A ′ in either direction, b et we en x and u or v . In one direction, the claim is easy: giv en a k -turn co vering walk W in G , it is naturally factored in to k + 1 turncost-free subw alks W i , and eac h tra ve r sal of an edge of G in a subw alk W i corresp onds in M ( G ) to a visit to a vertex of V 2 , thus the sequence of edge transve rsals of W i in G corresp onds 1:1 with a sequence ( y 0 , ..., y m +1 ) of vertice s of V 2 in M ( G ). Because W i is turn cost-free, by the definition of A 5 , there is an arc in D ( G ) from y i to y i +1 for i = 0 , ..., m . W e tak e the set of arcs to b e S i , s i = y 0 and t i = y m +1 , giving us (1) and (2) in a w ell-defined manner. It is str aigh tforwa r d to c heck that the conditions h old. F or examp le, the assumption that W is a co ve r ing walk in G yields the last condition. Con versely , supp ose we hav e (1) and (2) in M ( G ) . By the second condition, eac h S i is w alk able. By the definition of A 5 , a directed w alk for S i in D ( G ) corresp ond s to a turncost-free w alk W i in G . The third condition insures that the su b walks W i in G can b e sequenced into a k -turn w alk W , where th e turns o ccur at the v ertices x i b y the first condition. W is co ve r ing in G by th e fourth condition, y ieldin g Claim 1. Claim 2. Cons id er a digraph D = ( V , A ) equipp ed with distinguished v ertices s and t (al lowing s = t ). T he prop ert y: “ ther e exists a dir e cte d walk fr om s to t that tr averses (al lowing r ep e tition) ev ery ar c in A ” (that is, ( A, s , t ) is wa lk able) is expressib le in MSO logic. W e fi r st argue that ( A, s, t ) is w alk able if and only if there is a directed path P in D from s to t , such that ev ery arc a ∈ A either is an arc of P , or b elongs to a strongly conn ected sub digraph D a that includes a v ertex of P . W e then argue (in App endix A) that this p r op erty is expressible in MSO logic in a str aigh tforwa r d manner. Giv en suc h a d irected path P = ( s = x 0 , ..., x m = t ) in D , w e can describ e a w alk W that tra verses ev er y arc of A as follo ws. By the ar cs of P w e r efer to the set of arcs A [ P ] = { x 0 x 1 , x 1 x 2 , ..., x m − 1 x m } The wa lk has m phases, one f or eac h v ertex x i of the path P . Pa r tition the arcs of A − A [ P ] into m classes A 0 , ..., A m where for i = 1 , ..., m ev ery arc a = uv ∈ A i b elongs to a strongly connected sub digraph D a that includes the vertex x i . Su c h a partition exists, b y the sup p osed p rop erty of P . There is a dir ected path in D a from x i to u , and from v to x i , b y the strong connectivit y of D a , and so there is a directed cycle in D a that includes b oth a and x i . Includ e this cycle in W , starting fr om x i and returning to x i , for eac h arc a ∈ A i . Increment i , take the arc fr om x i to x i +1 and rep eat th is for i = 0 , ..., m . No w supp ose that there is a directed w alk W in D from s to t th at tra ve r ses ev ery arc in A . I f there is a vertex v that is visited m ore than once, then we can find a shorter w alk W ′ that, considered as a s equence of arc transv ersals, is a subs equence of the sequence of arc transve r sals of W . Therefore, by do wnw ard indu ction, th ere is a d irected path P from s to t , with n o rep eated internal v ertex visits, that considered as a sequence of arc transv ersals, is a subsequence of the sequence of arc transversals of W . But then , ev ery arc a tra versed in the w alk W (that is, eve r y arc a ∈ A ), that is n ot an arc of P , m u st b elong to a subw alk W ′ of W that b egins and ends at a v ertex of P . The v ertices v isited b y W ′ therefore induce a strongly connected sub digraph con taining a vertex of P . The second part of the pr o of of Claim 2 is to argue the prop ert y we ha ve iden tified is expressible in MS O logic. This is f airly routine for MSO (see App endix A). Based on Claims 1 and 2, the remainder of th e pr o of of Theorem 3 is also straight f orw ard (App end ix A). 5 Discrete Milling is Hard for Bounded P ath width In this section, we see that the maximum degree restriction implicit in the parameterizat ion for our p ositiv e result in the last section is one of the k eys to tractabilit y for this problem. Recall that in the Discrete Milling problem the turncost functions are assu med pairing and sym- metric. This is a significan t assump tion, but the outcome is still negativ e, and the follo win g resu lt v ery muc h s tr engthens, in the parameterized set- ting, th e NP-completeness result of Ar kin, et al. [1]. Theorem 3. Discre te M illing is har d for W [1] , when p ar ameterize d by ( k , p ) , wher e k is the numb er of turns and p is a b ound on p athw i dth. Pr o o f. The fpt-reduction is from Mul ticolor Clique , usin g an edge represent ation strategy , such as describ ed, for example, in [4, 8]. S upp ose G = ( V , E ) h as V partitioned in to color classes C i , i = 1 , ..., r . Th e Mul- ticolor Clique pr oblem asks whether G cont ains a r -clique consisting of one v ertex from eac h color class C i . W e can assu m e that eac h color class of G has the same size n [4]. The color-class partition of V ind uces a partition of E int o r 2 classes E { i,j } , for 1 ≤ i 6 = j ≤ r : E { i,j } = { e ∈ E : ∃ u ∈ C i and ∃ v ∈ C j with e inciden t on u and v } . W e can also assu me that all these edge-partitio n classes E { i,j } ha ve the same size m . W e index the vertic es and edges of G as follo ws: C i = { v ( i, q ) : 1 ≤ q ≤ n } for i = 1 , ..., r E { i,j } = { e ( { i, j } , l ) : 1 ≤ l ≤ m } for 1 ≤ i 6 = j ≤ r . T o refer to the incidence structure of G , we defi n e fu nctions π i { i,j } ( l ) and π j { i,j } ( l ) as f ollo ws: π i { i,j } ( l ) = q : the edge e ( { i, j } , l ) is inciden t on v ( i, q ) π j { i,j } ( l ) = q the edge e ( { i, j } , l ) is inciden t on v ( j, q ) , so the edge e ( { i, j } , l ) is incident to v ( i, π i { i,j } ( l )) and v ( j, π j { i,j } ( l )). W e describ e the construction of a graph G ′ , tog ether with the sets S v of turn-free pairs of edges f or the v ertices v of G ′ . W e first describ e the vertic es of G ′ , and then sp ecify a set of paths on these vertic es. Th e edge s et of the multi-graph G ′ is the (abstract) disjoin t un ion of th e sets of edges of these abstractly-defined paths, and it is u ndersto o d that eac h path is turn-free, so th at (for the most part), the sets S v of tu r n-free p airs of v -incident edges for the v er tices v of G ′ are implicit in these gene r ating p ath s of G ′ . The vertex set V ′ for G ′ is th e union of the sets V 0 ∪ V 1 ∪ V 2 ∪ V 3 ∪ V 4 , V 0 = { σ, τ } V 1 = { t [ i, j ] : 1 ≤ i 6 = j ≤ r } V 2 = { s [ i, j ] : 1 ≤ i 6 = j ≤ r } V 3 = { c [ i, j, u ] : 1 ≤ i 6 = j ≤ r , 1 ≤ u ≤ n } V 4 = { p [ i, j, l ] : 1 ≤ i 6 = j ≤ r, 1 ≤ l ≤ m } . Th us | V 1 | = | V 2 | = 2 r 2 , | V 3 | = 2 n r 2 and | V 4 | = 2 m r 2 . The edge set of G ′ is (implicitly) describ ed b y a generating set of paths P (t w o paths for eac h ed ge of G ), together with a f ew more ed ges: P = { P [ i, j, e ( { i, j } , l )] : 1 ≤ i 6 = j ≤ r , 1 ≤ l ≤ m , } , where the path P [ i, j, e ( { i, j } , l )] (1) starts at the ve r tex p [ i, j, l ]; (2) next visits s [ i, j ]; (3) then visits the v ertices c [ i, j, u ], except for u = π i { i,j } ( l ) (the exc eptional vertex of th is blo ck) , in c onse cutive or der , meaning that the v ertices are visited by increasing ind ex u , modified by skipp ing the exceptional ve r tex; (4) then visits the v ertex c [ i, j ∗ , π i { i,j } ( l )], where j ∗ is defined to b e j + 1, un less j + 1 = i , w h en j ∗ = j + 2, or j = r and i 6 = 1, when j ∗ = 1, or j = r and i = 1, when j ∗ = 2; and then (5) end s at the v ertex t [ i, j ]. In tu itiv ely , there are t w o paths in P corresp onding to eac h edge of G . If we fix i and consid er that there are r − 1 blo c ks of v ertices (eac h blo c k consisting of n vertice s, c orresp ond ing to the v ertices of C i ), then what a path P [ i, j, e ( { i, j } , l )] (corresp ond in g to the l th edge of E { i,j } ) do es is “hit” ev ery v ertex of its “o wn” { i, j } th blo c k, except the vertex c [ i, j ∗ , π i { i,j } ( l )] of the blo c k corresp onding to the v ertex of C i to whic h the indexing ed ge of G is inciden t, and in the “next blo ck” in a circular ordering of th e r − 1 blo c ks established b y the definition of j ∗ , do es the complemen tary thing: in this “next blo ck” it h its only the vertex corre- sp ond ing to the ve r tex of C i to which the in dexing edge is incident in G , and then ends at t [ i, j ]. A t this s tage of the construction, th e edges of G ′ are partitioned in to (turn-free) paths that ru n b et we en ve r tices of V 1 and v ertices of V 4 , where the latter h a ve d egree 1 (so far) an d the v ertices of V 1 ha ve d egree m (so far). W e complete the constru ction of G ′ b y adding a few more edges, sp ecifying a few more turn-fr ee pairs as w e do so. (A) Add edges b etw een the pairs of v ertices p [ i, j, l ] and p [ j, i, l ] for all 1 ≤ i 6 = j ≤ r and 1 ≤ l ≤ m . After these edges are add ed, we ha ve reac hed a stage wh ere all vertice s in V 4 ha ve degree 2 (and they will hav e degree 2 in G ′ ). F or eac h v ertex of V 4 w e mak e the pair of incident edges a turn-free pair. Note that for an y in stance of the Discre te Milling , the edge set is naturally and u niquely partitioned int o maximal turn-fr ee paths. At this stage of the construction, these paths all ru n b et w een t [ i, j ] and t [ j, i ] for 1 ≤ i < j ≤ r . (B) Add s ome ed ges b et we en the v ertices of V 0 ∪ V 1 . Let ≤ lex denote the lexicog r aphic order on the set (of pairs of ind ices) I = { [ i, j ] : 1 ≤ i < j ≤ r } . L et [ i, j ] ∗ denote the immediate successor of [ i, j ] in the ord ering of I b y ≤ lex . F or [ i, j ] ∈ I , let r ev [ i, j ] = [ j, i ]. W e add the edges (using the notation u · v to denote the creation of an edge b et ween u and v ): (B.1) t [ r ev [ i, j ]] · t [[ i, j ] ∗ ] for 1 ≤ i < j ≤ r and [ i, j ] 6 = [ r, r − 1], (B.2) σ · t [1 , 2], and (B.3) t [ r , r − 1] · τ . W e d o not sp ecify any further tu rn-free pairs of ve r tex co-incident edges b ey ond those sp ecified in (A) or implicit by b eing internal to the generating paths P of G ′ . That completes the d escrip tion of G ′ . T o complete the pro of, we need to show th at: (1) the graph G ′ will admit a k -turn co v ering walk, where k = 2 r 2 , if and only if G has a m ulticolor r -clique; and (2) G ′ has path-width at most 6 r 2 + 4. (See App end ix A) 6 Op en Pr oblems W e ha ve studied the p arameterized complexit y of (sev eral ve r sions of ) the abstract milling p roblem with turn costs and ga ve an initial classi- fication with resp ect to sev eral parameterizatio n s. Our FPT results are impractical, but can they b e improv ed? In particular, it w ou ld b e inte r - esting to kno w if Abstract Milling parameterized b y ( k , t, d ) admits a p olynomial kernel. O ur negativ e result p ro vides one of th e very few natural examples of a parameterize d graph problem that is W [1]-hard, parameterized by pathwidth. Another n otable op en question is whether Discrete Milling p arameterized by ( k , d ), is FPT or W[1]-hard. References 1. E. Arkin, M. Bender, E. Demaine, S. F ek ete, J. Mitchell , and S. Sethia. Optimal co vering tours with turn costs. SIAM J. Computing , 35(3):531–566 , 2005. 2. B. Courcelle. Graph rewriting: an algebraic and logic ap p roac h . In Handb o ok of the or etic al c omputer scienc e (vol. B): formal mo dels and semantics , pages 193–242. MIT Press, 1990 . 3. R.G. Do wney and M.R. F ello ws. Par a m eterize d Complexity . Springer, 1999. 4. M. F ello ws, F. F omi n , D. Lokshtano v, F. R osamond, S. Saurabh, S. S zeider, and C. Thomassen. On the complexit y of some colorful problems parameterized b y treewidth. I n COCOA , vol u me 4616 of LNCS , pages 366–377. S pringer, 2007. 5. J. Flum and M. Grohe. Par ameterize d C omplexity The ory . Springer, 2006. 6. M. Held. On the Comput ational Ge ometry of Po cke t M achining , v olume 500 of LNCS . S pringer-V erlag, 1991. 7. R. Niedermeier. Invi tation to Fixe d Par ameter Algorithms , volume 31. Oxford Universit y Press, 2006. 8. S. Szeider. Not so easy problems for tree d ecomp osable graphs. I n I nternational Confer enc e on Di scr ete Mathematics (ICDM) , pages 161–17 1, 2008. Invited talk. App endix A Pr o of of L emma 2: T esting wh ether th e graph in duced by a s et S of vertice s is a m ono c hr o- matic path in the grid graph G b et wee n tw o d istinct ve r tices u and v of S ca n b e done by the follo wing form u la: LinP ath( u, v , S ) = (1) n ∃ x : ˙ S x ∧ x 6 = u ∧ E ux ¸ ∧ ˙ ∀ x ′ : ( S x ′ ∧ x 6 = x ′ ∧ x 6 = u ) → ¬ E ux ′ ¸ o (2) ^ n ∃ y : ˙ S y ∧ y 6 = v ∧ E v y ¸ ∧ ˙ ∀ y ′ : ( S y ′ ∧ y 6 = y ′ ∧ y ′ 6 = v ) → ¬ E v y ′ ¸ o (3) ^ n ˙ ∃ e = y x : ( S x ∧ S y ∧ E h e ) ¸ → ˙ ∀ e ′ = x ′ y ′ : ( S x ′ ∧ S y ′ ) → E h e ′ ¸ o (4) ^ n ˙ ∃ e = y x : ( S x ∧ S y ∧ E v e ) ¸ → ˙ ∀ e ′ = x ′ y ′ : ( S x ′ ∧ S y ′ ) → E v e ′ ¸ o (5) ^ n ∀ S 1 , S 2 : ˙ ∀ x : S x → [( S 1 x ↔ ¬ S 2 x ) ∧ ( S 1 x ∨ S 2 x )] ¸ → (6) ˙ ∃ x 1 , ∃ x 2 : ( S 1 x 1 ∧ S 2 x 2 ∧ E x 1 x 2 ) ¸ o . (7) Lines (2, (3) assert that u and v h a ve only one neigh b or in S . Lines (4), (5) resp ectiv ely c h ec k whether all th e edges of G with b oth endp oint s in S are h orizon tal or v ertical (actually only one of the t wo lines is needed). Note that when no edge in G has b oth endp oin ts in S , b oth lines (3) and (4) b ecome tru e, ho wev er this is tak en care of by th e n ext implication whic h c hec k s connectivit y . The imp lication (6) → (7) guaran tees that for an y bipartition ( S 1 , S 2 ) of S there is an edge f rom S 1 to S 2 , i.e. S induces a connected subgraph. T ogether with (2), (3), (4) and (5) this im p lies that the graph in duced b y S is a connected subgraph of G with eit h er v ertical or horizonta l edges, wh ere b oth u and v ha ve d egree one. Since G is a grid graph, eac h ve r tex has at most t wo horizon tal and at most t wo v ertical inciden t edges. Hence, the graph induced by S is a path with extremities u an d v . Finally , a k -co v erin g w alk exists if and only if there are k + 1 subsets of v ertices co vering the v ertex set of the inp ut graph s uc h that eac h in duces a mono c hromatic path and su ch that these linear paths are joined en d to end: Φ = ∃ v 0 , . . . , v k +1 , ∃ S 0 , . . . , S k : (8) ` ^ 0 6 i 6 k +1 V v i ´ ∧ ` ∀ v : V v ↔ _ 0 6 i 6 k S i v ´ ∧ ` ^ 0 6 i 6 k S i v i ´ (9) ∧ ` ^ 0 6 i 6 k S i v i +1 ´ (10) ∧ ` ^ 0 6 i 6 k LinP ath( v i , v i +1 , S i ) ´ . (11) Pr o of of The or e m 2 : (MSO ) Let D = ( V , A ) b e a digraph , and s , t vertic es of D (allo wing s = t ). The first subtask (to fi nish the pro of of Claim 2) is to describ e an MSO predicate that expresses that th er e is a directed path P in D from s to t , quantified on the sets of ve r tices and arcs that form the path. dipath ( s, t ) = ∃ U ( ⊆ V ) ∃ B ( ⊆ A ) : ... Where th e r emainder of the predicate expresses that in th e su b d igraph D ′ = ( U, B ): • s h as outdegree 1 and ind egree 0 • t h as ind egree 1 and outdegree 0 • ev ery vertex of U not s or t has indegree 1 and outdegree 1 • for ev ery partition of U in to U 1 and U 2 suc h th at s ∈ U 1 and t ∈ U 2 , there is a ve r tex u ∈ U 1 and a vertex v ∈ U 2 with an arc in B from u to v The formalizati on is completed in a ve r y similar manner to the details of the p ro of of Lemma 2 (r e: Linpath) ab o ve in this App endix. Being able to express that there is a directed path from s to t leads easily to an MSO pred icate for strong connectivit y of a sub digraph de- scrib ed b y a set of vertic es and a s et of arcs. An MSO pr edicate for walkability of a set of arcs A relativ e to s and t is easily (but somewhat tediously) constructed on the basis of the structural c haracterization of Claim 2 , using the pred icates for the existe n ce of an s - t p ath, and for strongly connected su b digraph s. An MSO form u la to complete the pr o of of Theorem 3 is then trivial to constru ct b y wr iting ou t Claim 1 in the formalism. Pr o of of The or e m 3: (Correctness) Figure 2 sho ws ho w the “coherence” gadgets for th e reduction f rom Mul - ticolor Clique work in our construction. Supp ose G ′ has a k -turn co ve r ing w alk W that visits all the v ertices of G ′ . (Recall that k = 2 r 2 .) Note that eve r y visit to a vertex of V 0 ∪ V 1 en tails a turn. S ince | V 0 ∪ V 1 | = k + 2, this implies that th e walk W m u st b egin and end at ve r tices of V 0 ∪ V 1 , and must visit eac h of the vertice s in this set, internal to W , exactly on ce. W e can fur th er conclude that we can view W as necessarily b eginning at the vertex σ o f G ′ and endin g at the v er tex τ , as otherwise, W would ha ve to visit t [1 , 2] or t [ r, r − 1] more than once, in order to visit σ a nd τ . coherence gadget for red r r ’... r r ’... r r ’... red to blue red to green red to yellow blue to red blue to green blue to yellow 2 2 k selection gadgets ... r b r b ’ r ’ b ’’ r ’’ b v r ’’ b iv r ’’ b ’’’ r ’ g r ’ g ’ r ’ y ’’ ... coherence gadget for red r r r r r r blue green yellow red green yellow 2 k ’ r ’ b ’’ r ’’ b r ’’ b r ’’ b ’’’ r ’ g r ’ g ’ r ’ y ’’ . . . c o h e r e n c e g a d g e t f o r b l u e coherence gadget for red r r ’... r r ’... r r ’... red to blue red to green red to yellow blue to red blue to green blue to yellow 2 2 k selection gadgets ... r b r b ’ r ’ b ’’ r ’’ b v r ’’ b iv r ’’ b ’’’ r ’ g r ’ g ’ r ’ y ’’ ... coherence gadget for red r r r r r r blue green yellow red green yellow 2 k ’ r ’ b ’’ r ’’ b r ’’ b r ’’ b ’’’ r ’ g r ’ g ’ r ’ y ’’ . . . coherence gadget for blue Fig. 2. The choice and coherence gadgets for th e reduct ion from Mul ticolor Clique . F o r th is example, r = 4 and the v ertex color classes C i are called r e d , blue , etc. Since the tur n s of the solution wa lk W o ccur (in eac h case exactly once) at the vertice s of V 1 , w e ma y conclude that W m ust consist of the edges add ed in (B), tog ether with exactly r 2 maximal tur n-free p aths b et ween t [ i, j ] a n d t [ j, i ] for 1 ≤ i < j ≤ r . By the in d exing of the paths in P in the construction of G ′ , W therefore corresp ond s to a set of r 2 edges of G , where for eac h i , exactly r − 1 of these edges are incident on a v ertex of C i . W e m ust argue that, for a giv en i , these r − 1 edges of G are inciden t on the same ve r tex of C i . (This is the job of what is sometimes called the c oher enc e gadget for a reduction from Mul ticolored Clique using the edge-representa tion strategy — which we are emplo yin g here.) It is easy to c hec k that the circularly int erlo c king path stru cture (for fixed i ) of the paths in P , together with the fact that the solution walk W visits all the ve r tices of V 3 (in particular, for the sub set of V 3 formed by fixing i ), in sures that this is the case. The con ve r se dir ection is essent ially trivial. W e n ext argue that the pathwidth of G ′ is b ounded by a function of r . Let G ′′ b e the s u bgraph of G ′ formed by deleting from G ′ the vertic es of V 0 ∪ V 1 ∪ V 2 ∪ { c [ i, j, n ] : 1 ≤ i 6 = j ≤ r } . Note that we are deleting only the last v ertices of th e 2 r 2 blo c ks of n v ertices (in eac h blo c k) of the coherence gadgets of the construction (see Figure 2). The total num b er of ve rtices d eleted is 6 r 2 + 2. It is easy to c hec k th at G ′′ has p ath width at most 2, and therefore G ′ has pathwidth at m ost 6 r 2 + 4. App endix B P arameterized complexit y A problem is fixe d-p ar am eter tr actable with resp ect to a parameter k if it can b e solv ed in O ( f ( k ) · n O (1) ) time, wher e n is the size of the inp ut and f is a computable function dep ending only on k ; suc h an algorithm is (inf or- mally) said to run in fpt-time. The class of all fixed-parameter tractable problems is denoted by FPT. F or establishing fixed-parameter intracta b il- it y , a h ierarc hy of classes, the W-hierarc hy , has b een in tr o duced: a pa- rameterized problem that is hard for s ome lev el of W is not in FPT under standard complexit y theoretic assumptions ab out the difficulty of quan tified forms of the Hal ting Problem for nondeterministic T u ring mac hines [3]. Hardness is sough t via fpt-reductions: an fpt-r e duction is an fpt-time T u ring r ed uction f rom a pr oblem Π , parameterize d with k , to a pr ob lem Π ′ , parameterize d with k ′ , suc h that k ′ ≤ g ( k ) for some computable function g . T ree decomp ositions and graph minors Definition 1. A tree decomp osition of a gr ap h G = ( V , E ) is a p a i r ( T , X ) , wher e T is a tr e e and X is a family of subsets (b ags) of V such that: 1) for any vertex x ∈ V , ther e e xists X ∈ X such that x ∈ X ; 2) for any e dge e = ( x, y ) ∈ E , ther e exists X ∈ X such that { x, y } ⊆ X ; and 3) for any vertex x ∈ V , the set of b ags c ontaining x induc es a subtr e e T x of T . The tree-width of a gr aph is: tw ( G ) = min ( T , X ) width ( T , X ) = min ( T , X ) max X ∈X ( | X | − 1) . The notions of path decomp osition and path-width are d efi ned sim - ilarly by c hanging th e tr ee T in th e ab o ve definition to a path P . The path-width of a graph is alw a ys larger than or equal to its tree-width. Computing th e tree-width of a graph G is NP-hard, but d eciding whether the tree-width of G is at m ost k (and computing a tree-decomp osition of width at most k in the p ositiv e case) is fixed-parameter tractable (c.f. [5]). F or an edge e = xy of a graph G , con tr acting e results in replacing the v ertices x and y , whose neigh b orh o o ds are den oted by N ( x ) and N ( y ) resp ectiv ely , b y a new v ertex z whose neigh b orho o d is N ( x ) ∪ N ( y ), excluding x and y . A graph H is a minor of a graph G if H can b e obtained from G b y a series of edge or v ertex remo v als and edge con tractions. Monadic seco nd order logic MSO logic f or ann otated graphs give s us: – v ariables denoting individual vertice s ( s, t, u, v , ... , p ossibly with sub- scripts) and v a r iables denoting sets of v ertices ( S, T , U, V , ... , p ossibly with subscripts). W e will u s e the notation T t to denote that the ve rtex t be- longs to th e set of vertic es T , and similarly in general. – v ariables denoting individ u al arcs and edges ( a, b, ..., e, f , ... ) and sets of arcs and edges ( A, B , ..., E , F , ... ) – logica l quan tification o ver these v ariables, logical connectiv es ( ∧ , ∨ , = ⇒ , ⇐ ⇒ , ¬ , ... ) and equalit y ( u = v , E = F , ... ) – pr edicates ( inc ( e, u ) , ad j ( u, v ) , in ( a, u ) , out ( a, v ) ... ) ind icating incidence of edges and vertic es, and arcs ente r ing or lea ving v ertices – predicates su c h as A r a ( a is an arc of type r ) and shorthands su c h as ∃ a = uv (there exists an arc a f r om u to v ). Theorem 4 ( Courcelle [2]). Any pr op erty of annotate d gr ap hs that c an b e expr esse d in MSO, i s line ar-time, finite-state r e c o gnizable for annotate d gr aph s wher e the tr e ewidth of the underlying gr aphs is b ounde d .
Original Paper
Loading high-quality paper...
Comments & Academic Discussion
Loading comments...
Leave a Comment