The complexity of the list homomorphism problem for graphs
We completely classify the computational complexity of the list H-colouring problem for graphs (with possible loops) in combinatorial and algebraic terms: for every graph H the problem is either NP-complete, NL-complete, L-complete or is first-order …
Authors: Laszlo Egri, Andrei Krokhin, Benoit Larose
Symposium on Theoretical Aspects of Computer Science 2010 (Nancy , Fr ance), pp. 335-346 www .st acs-conf .org THE COMPLEXITY OF THE LIST HOMOMORPHISM PR OBLEM FOR GRAPHS L ´ ASZL ´ O EGRI 1 AND AND REI KROKHIN 2 AND BENOIT LAROSE 3 AND P ASCAL TESSON 4 1 School of Computer Science, McGill Universi ty , Montr ´ eal, Canada E-mail addr ess : laszlo.egr i@mail.mcgi ll.ca 2 School of Engineering and Computing Sciences, Durh am Universit y , Du rham, UK E-mail addr ess : andrei.kro khin@durham .ac.uk 3 Department of Mathematics and S t atistics, Concordia Universit y , Montr ´ eal, Canada E-mail addr ess : larose@mat hstat.conco rdia.ca 4 Department of Computer Science, Lav al Universit y , Queb ec City , Canada E-mail addr ess : pascal.tes son@ift.ula val.ca Abstra ct. W e completely classify th e compu tational complexity of the list H -colouring problem for graph s (with p ossible lo ops) in combinatorial and algebraic terms: for every graph H the problem is either NP-complete, NL-complete, L-complete or is first- order de- finable; descriptive complexit y eq uiv alents are giv en as well via Datalog an d its fra gments. Our algebraic c haracterisations match important conjectures in the study of constraint satisfactio n prob lems. 1. In t ro duction Homomorp hisms of gr aphs , i.e. edge- preserving mappings, generalise graph colourings, and can mo del a wide v ariet y of combinatorial problems dealing with mappings and assign- men ts [17]. Because of the ric h ness of the homomorphism f ramew ork, many computational asp ects of graph homomorphisms h a ve r ecen tly b ecome th e fo cu s of muc h atten tion. In the list H - c olouring p roblem (for a fi xed graph H ), one is giv en a graph G and a list L v of ve rtices of H for eac h verte x v in G , and the goal is to determine wh ether there is a homomorphism h from G to H such that h ( v ) ∈ L v for all v . The complexit y of suc h problems has b een stu died by combinatoria l metho d s, e.g., in [13, 14]. In this pap er, w e study th e complexit y of the list homomorphism problem for graph s in the wider con text of classifying the complexity of constrain t satisfaction problems (CSP), s ee [3, 15, 18]. It is w ell kn own that the CSP can b e viewe d as the problem of deciding whether th ere exists a homomorphism fr om a relatio nal structure to another, thus naturally extendin g th e graph homomorphism problem. Key wor ds and phr ases: graph homomorphism, constraint satisfactio n p roblem, complexity , universal algebra, Datalog. c L. Egri, A. Krokhin, B. Larose, and P . T esso n CC Creative Commons Attribution- NoDerivs License 336 L. EGRI, A. KROKHIN, B. LAR OSE, AND P . TESSON One line of CSP researc h studies the non-uniform CSP , in whic h the target (or template) structure T is fixed and the q u estion is whether there exists a homomorphism fr om an input structur e to T . Ov er the last y ears, muc h work has b ee n done on classifying the complexit y of this problem, denoted Hom( T ) or CSP( T ), with resp ect to the fixed target structure, see surveys [6, 7, 8, 18]. Cla ssification here is un dersto o d with r esp ect to b oth computational complexit y (i.e. memb ership in a giv en complexit y class suc h as P , NL, or L, mo dulo standard assump tions) and descriptiv e complexit y (i.e. d efinabilit y of the class of all p ositiv e, or all nega tiv e, instances in a given logic) . The b est-kno wn classification results in th is directio n concern the distin ction b etw een p olynomial-time solv able and NP-complete CSPs. F or example, a cla ssical result of Hell and Ne ˇ set ˇ ril (see [17, 18]) shows that, for a graph H , Hom( H ) (ak a H -colo uring) is tractable if H is b ipartite or admits a lo op, and is NP-complete otherwise, while Sc haefer’s d ic hotomy [24] pro v es that an y Bo olean CSP is either in P or NP-complete. Recen t w ork [1] established a more precise classification in the Bo olean case: if T is a str ucture on { 0 , 1 } then CS P( T ) is either NP-complete, P-complete , NL-c omplete, ⊕ L -complete, L-co mplete or in A C 0 . Muc h of the w ork concernin g the descriptive complexity of CSPs is cen tred around the d atabase-inspired logic programming language Datalo g a nd its fragmen ts (see [6, 9, 12, 15, 2 0]). F eder and V ardi initially s h o wed [15 ] that a num b er of imp ortan t tractable cases of CSP( T ) corresp ond to structures for whic h ¬ CS P( T ) (the complement of CSP( T )) is definable in Datalog. Similar ties w ere uncov ered m ore recen tly b et w een the t wo fragmen ts of Datal og kno wn as linear and symmetric Datalog an d stru ctures T for whic h CSP( T ) b elongs to NL and L, resp ectiv ely [9, 12]. Algebra, logic and com binatorics pro vide thr ee angles of attac k whic h ha v e f ueled progress in this classification effort [6, 7, 8, 17, 18, 20]. The algebraic approac h (see [7, 8]) links the complexit y of CS P( T ) to the set of fu nctions that preserve the relations in T . In this framewo rk, on e asso ciates to eac h T an algebra A T and exploits the fact that the prop erties of A T completely determine the complexit y of CSP( T ). This angle of attac k wa s crucial in establishing k ey resu lts in the field (see, for exa mple, [2, 5 , 7]). T ame Congruence Theory , a d eep univ ersal-algebraic framewo rk fir st dev elop ed by Hobb y and McKenzie in the mid 80’s [19], classifies the lo cal b eha viour of fi nite alg e- bras into fiv e typ es (unary , affine, Bo olean, latti ce and semilatt ice.) It w as rece nt ly sho wn (see [6, 7, 22]) that there is a strong connection b et w een the compu tational and d escriptiv e complexit y of CSP( T ) and the set of typ es that app ear in A T and its su b algebras. There are strong conditions inv olving t yp es whic h are sufficient for NL-hardness, P-hard ness and NP- hardness of C SP( T ) as well as for inexpressibilit y of ¬ CS P( T ) in Datalog, linear Datalo g and symmetric Da talog. Th ese su fficien t conditions are also susp ected (and in some cases pro v ed) to b e n ecessary , u nder natural complexit y-theoretic assumptions. F or example, (a) the presence of un ary typ e is kn own to imply NP-completeness, while its absence is conjec- tured to imply tractabilit y (see [7]); (b) the absence of u n ary and affine t yp es was recen tly pro v ed to b e equiv alen t to definabilit y in Datalog [2]; (c) the absence of unary , affine, and semilattice t yp es is pro v ed necessary , and susp ec ted to b e sufficient, for mem b ersh ip in NL and defin abilit y in linear Datalog [22]; (d) the absence of all typ es but Bo olean is pr ov ed necessary , and susp ected to b e su fficien t, for mem b ersh ip in L and definabilit y in symmet- ric Datalog [22]. The strength of evidence v aries from case to case and, in particular, the conjectured algebraic co nditions concerning CSPs in NL and L (and, as men tioned ab o v e, linear and sy m metric Datalo g) still rest on r elativ ely limited evidence [6, 9, 11 , 10, 22 ]. THE COMPLEXITY OF THE LIST HOMOMO RPHISM PROBLEM FOR GRAPHS 337 The aim of the p resen t pap er is to sho w that these algebraic cond itions are indeed sufficien t and nece ssary in the sp ecial ca se of list H -c olouring for undir ected graphs (with p ossible lo ops), and to c haracterise, in this sp ecia l case, the dividing lines in graph-theoretic terms (b oth via forbidden subgrap h s and th r ough an inductiv e definition). O ne can view the list H -colo uring problem as a CSP where the template is the structure H L consisting of th e binary (edge) relation of H and all un ary relations on H (i.e. ev ery subset of H ). T ractable list h omomorphism pr oblems for general s tructures w ere c h aracterised in [5 ] in algebraic terms. The tractable cases for graph s were describ ed in [14] in b oth com bin atorial and (more sp ecific) algebraic terms; the latter imp lies, when com bined with a recent result [10], that in these cases ¬ CS P( H L ) definable in linear Datalog and therefore CS P( H L ) is in fact in NL. W e complete the picture b y refining this classificati on and s h o win g that CSP( H L ) is either NP-complete, or NL-complete, or L-complete or in A C 0 (and in f act fi rst-order definable). W e also remark that th e p roblem of recognising in to which case the problem CSP( H L ) falls can b e solved in p olynomial time. As w e men tioned ab o ve, the distinction b et ween NP-complete cases and those in NL follo ws from earlier w ork [14], and the situatio n is similar with d istinction b et we en L-hard cases and those leading to mem b ership in A C 0 [21, 22]. Therefore, the main b o dy of tec hnical w ork in the pap er concerns the distinction b et w een NL-hardness and mem b ersh ip in L. W e giv e t wo equiv alent c h aracterisations of the class of graphs H suc h that CSP( H L ) is in L . One c haracterisation is via forbidden su bgraphs (for example, the reflexiv e graphs in this class are exac tly the ( P 4 , C 4 )-free graphs, while the irreflexiv e ones are exactly the bipartite ( P 6 , C 6 )-free graphs), wh ile the other is via an inductiv e definition. The fir st c haracterisation is used to sho w that graphs outside of this class giv e rise to NL-hard problems; w e d o this by pr o vidin g constru ctions witnessing the presence of a non-Bo olean t yp e in the alge bras asso ciated with the grap h s. The second c haracterisation is u sed to pro v e p osit iv e r esults. W e first pro vide op eratio ns in the asso ciated algebra whic h satisfy certain iden tities; this allo ws u s to sh ow that the necessary condition on t yp es is also sufficien t in our case. W e also us e the inductiv e definition to demonstrate that the class of negativ e in s tances of the corresp onding CSP is definable in symmetric Data log, which implies member s hip of the CSP in L. 2. Preliminaries 2.1. Graphs and relational structures In the follo wing we denote th e und erlying universe of a structure S , T , ... by its roman equiv alen t S , T , etc. A signature is a (fin ite) set of relation symbols w ith asso ciated arities. Let T b e a stru cture of signature τ ; for eac h relation sym b ol R ∈ τ we denote the corresp ondin g relation of T by R ( T ). Let S b e a s tr ucture of the same signatur e. A homo- morphism from S to T is a map f fr om S to T such that f ( R ( S )) ⊆ R ( T ) f or eac h R ∈ τ . In this case we write f : S → T . A structure T is called a c or e if ev er y homomorphism from T to itself is a p ermutation on T . W e denote by CSP( T ) th e class of all τ -structures S that admit a h omomorphism to T , and by ¬ CSP( T ) th e complemen t of this class. The dir e ct n -th p ower of a τ -st ructure T , denoted T n , is defined to hav e u niv erse T n and, for an y (say m -ary) R ∈ τ , ( a 1 , . . . , a m ) ∈ R ( T n ) if and only if ( a 1 [ i ] , . . . , a m [ i ]) ∈ R ( T ) for eac h 1 ≤ i ≤ n . F or a subset I ⊆ T , the su bstructur e ind uc e d by I on T is the structure I with un iv erse I and such that R ( I ) = R ( T ) ∩ I m for ev er y m -ary R ∈ τ . 338 L. EGRI, A. KROKHIN, B. LAR OSE, AND P . TESSON F or the pur p oses of this p ap er, a gr aph is a relational structure H = h H ; θ i where θ is a symmetric b inary relation on H . The graph H is r eflexive ( irr eflexive ) if ( x, x ) ∈ θ (( x, x ) 6∈ θ ) for all x ∈ H . Giv en a graph H , let S 1 , . . . , S k denote all subsets of H ; let H L b e the relational structure obtained f rom H b y adding all th e S i as unary relations; more pr ecisely , let τ b e th e signature that consists of one bin ary relational sym b ol θ and unary symb ols R i , i = 1 , . . . , k . The τ -structure H L has universe H , θ ( H L ) is the edge relation of H , and R i ( H L ) = S i for all i = 1 , . . . , k . It is easy to see that H L is a core. W e call CSP( H L ) th e list homom orphism pr oblem for H . Note that if G is an instance of this problem then θ ( G ) can b e considered as a digraph, but the d irections of the arcs are unimp ortan t b ecause H is undir ected. Also, if an element v ∈ G is in R i ( G ) then this is equiv alen t to v ha ving S i as its list, so G can be thought of as a d igraph with H -lists. In [14], a dic hotom y result w as pr o ved, identifying bi-arc graphs as those whose list homomorphism problem is tractable, and others as giving rise to NP-complete problems. Let C b e a circle with tw o sp ecified p oin ts p and q . A bi-arc is a pair of a rcs ( N , S ) suc h that N contai ns p bu t not q and S cont ains q but not p . A graph H is a bi-ar c gr aph if there is a family of b i-arcs { ( N x , S x ) : x ∈ H } su c h that, for ev ery x, y ∈ H , the follo wing hold: (i) if x and y are adjacent , then neither N x in tersects S y nor N y in tersects S x , and (ii) if x is not adj acen t to y then b oth N x in tersects S y and N y in tersects S x . 2.2. Algebra An n -ary op er ation on a set A is a m ap f : A n → A , a pr oje ction is an op eration of the form e i n ( x 1 , . . . , x n ) = x i for some 1 ≤ i ≤ n . Given an h -ary relatio n θ and an n -ary op eration f on the same set A , we sa y that f pr eserves θ or that θ is invariant under f if the fol lo win g holds: giv en an y matrix M of size h × n whose columns are in θ , applyin g f to the rows of M will pro duce an h -tuple in θ . A p olymor phism of a structure T is an op eration f that preserves eac h relatio n in T ; in this case we also say that T adm its f . In other w ords, an n -ary p olymorphism of T is simply a homomorph ism f rom T n to T . With an y structure T , one asso cia tes an alge bra A T whose unive rse is T and whose op erations are all p olymorphisms of T . Giv en a graph H , w e let H denote the a lgebra associated with H L . An operation on a set is called c onservative if it preserv es all subs ets of the set (as u nary r elations). S o, the op erations of H are the conserv ativ e p olymorphisms of H . P olymorphisms can pro vid e a con v enien t language when defining cla sses of graphs. F or example, it was sho wn in [4 ] that a graph is a bi-arc graph if and only if it admits a conserv ativ e m a jorit y op eratio n wh ere a majority op eration is a ternary op eration m sati sfying th e identit ies m ( x, x, y ) = m ( x, y , x ) = m ( y , x, x ) = x . In ord er to state some of our results, we will n eed the notions of a v ariet y and a term op eration. Let I b e a signature, i.e. a s et of op eratio n sym b ols f eac h of a fixed arit y (w e use the term “signature” for b oth structures and algebras, this will cause no confusion). An algebr a of sig nature I is a pair A = h A ; F i where A is a non-empty set (the u niverse of A ) and F = { f A : f ∈ I } is the set of b asic op erations (for eac h f ∈ I , f A is a n op eration on A of the co rresp onding arit y). The term op er ations of A are the op erations built f rom the op erations in F and pro jections b y usin g comp osition. An algebra all of whose (basic or term) op erations are conserv ativ e is call ed a c onservative algebr a . A class of similar alge bras (i.e. algebras w ith the same signature) wh ic h is closed und er formation of homomorphic images, subalgebras and direct pro d ucts is called a variety . The variety gener ate d by an THE COMPLEXITY OF THE LIST HOMOMO RPHISM PROBLEM FOR GRAPHS 339 algebra A is denoted b y V ( A ), and is the smallest v ariet y co n taining A , i.e. the cla ss of all homomorphic images of subalgebras of p o wers of A . T ame Congruence Theory , as dev elop ed in [19], is a p o werful to ol for the analysis of finite algebras. Every finite algebra has a typ eset , which describ es (in a certain sp eci fied sense) the lo cal b eha viour of the algebra. It con tains one or more of the foll o w ing 5 typ es : (1) the unary type, (2) the affine t yp e, (3) the Bo ole an t yp e, (4) the lattic e t yp e and (5) the semilattic e type. The n u m b ering of th e t yp es is fixed, and they are often referred to b y their n umbers. S im p le alge bras, i.e. algebras with ou t non-trivial prop er homomorphic images, admit a un ique type; the protot ypical examples are: any 2- elemen t algebra whose basic op erations are all unary h as t yp e 1. A fi nite vecto r space h as t yp e 2. The 2- elemen t Bo olean algebra h as t yp e 3. The 2-eleme nt lattice is the 2-elemen t algebra w ith t w o b inary op erations h{ 0 , 1 } ; ∨ , ∧i : it has t yp e 4. The 2-elemen t semilatti ces are the 2-elemen t alg ebras with a single bin ary op eration h{ 0 , 1 } ; ∧i and h{ 0 , 1 } ; ∨i : they h a ve t yp e 5. The t yp eset of a v ariet y V , denoted ty p ( V ), is s im p ly the union of t yp esets of the algebras in it. W e will b e mostly in terested in t yp e-omitting conditions for v arieties of the form V ( A T ), and Corollary 3.2 of [25] sa ys that in this case it is enough to consider the t yp esets of A T and its sub algebras. On the in tuitiv e lev el, if T is a core structure th en the typeset ty p ( V ( A T )) conta ins crucial information ab out the kind of relatio ns that T can or cannot sim ulate, thus implying lo wer/upp er b ound s on the complexit y of CSP( T ). F or our purp oses here, it will not b e necessary to delv e furth er in to the tec hnical asp ects of t yp es and t yp esets. W e only n ote that there is a v ery tight connection b et w een the kind of equations that are satisfied by the algebras in a v ariety an d the types th at are admitte d or omitte d by a v ariety , i.e . th ose t yp es that do or d o not app ea r in the typ esets of algebras in the v ariety [19 ]. In this pap er, we u se ternary op erations f 1 , . . . , f n satisfying the f ollo wing iden tities: x = f 1 ( x, y , y ) (2.1) f i ( x, x, y ) = f i +1 ( x, y , y ) f or al l i = 1 , . . . n − 1 (2.2) f n ( x, x, y ) = y . (2.3) The follo win g lemma co nt ains some t yp e-omitting results that w e u s e in this p ap er. Lemma 2.1. [19] A finite algebr a A has term op er ations f 1 , . . . , f n , for some n ≥ 1 , satisfying identities (2 .1)–(2.3) if and only if the variety V ( A ) omits typ es 1, 4 and 5. If a finite algebr a A ha s a majority term op er ation then V ( A ) omits typ es 1, 2 and 5. W e r emark in p assing that op erations satisfying id en tities (2.1)–(2 .3) are also kno wn to c haracterise a certain algebraic (congruence) condition called ( n + 1)- p ermutabilit y [19]. 2.3. Datalog Datalo g is a query and rule language for d eductiv e databases (see [20]). A Datalog program D o ver a (relational) signature τ is a finite s et of rules of the form h ← b 1 ∧ . . . ∧ b m where h and eac h b i are atomic formulas R j ( v 1 , ..., v k ). W e say that h is the he ad of th e rule and that b 1 ∧ . . . ∧ b m is its b o dy . Relational p redicates R j whic h app ear in the head of some rule of D are called intensional datab ase pr e dic ates ( IDB s) and are not part of the signature τ . All other relational predicates are called extensional datab ase pr e dic ates ( EDB s) and are in τ . So, a Datalog p rogram is a recursiv e sp ecifica tion of IDB s (fr om EDBs). 340 L. EGRI, A. KROKHIN, B. LAR OSE, AND P . TESSON A rule of D is line ar if its b o dy con tains at most one IDB an d is non-r e cursive if its b o d y conta ins only EDBs. A linear b ut recurs iv e rule is of the form I 1 ( ¯ x ) ← I 2 ( ¯ y ) ∧ E 1 ( ¯ z 1 ) ∧ . . . ∧ E k ( ¯ z k ) where I 1 , I 2 are IDBs and the E i are EDBs (note that the v ariables o ccurring in ¯ x, ¯ y , ¯ z i are not necessarily d istinct). Eac h such ru le has a symmetric I 2 ( ¯ y ) ← I 1 ( ¯ x ) ∧ E 1 ( ¯ z 1 ) ∧ . . . ∧ E k ( ¯ z k ) . A Datalo g program is non-r e cursive if all its rules are non- recursiv e, line ar if all it s rules are linear and symmetric if it is linear and if th e sy m metric of eac h recursiv e rule of D is also a r ule of D . A Datalog program D tak es a τ -structure A as inp ut and r etur ns a s tr ucture D ( A ) o ver the signature τ ′ = τ ∪ { I : I is an IDB in D } . T he relations corresp onding to τ are the same as in A , while the n ew relations are recursively computed b y D , with seman tics naturally obtained via least fi xed-p oint of monotone op erators. W e also wa n t to view a Datalo g pr ogram as b eing able to accept or reject an in put τ -structure and this is ac hieve d b y c ho osing one of the IDBs of D as the go al pr e dic ate : the τ -structure A is ac c epte d by D if the goal pred icate is n on-empt y in D ( A ). Thus every Data log program with a goal predicate defines a class of structures - those that are accepted b y th e program. When using Datalo g to stu d y CS P( T ), one us ually s p eaks of the definabilit y of ¬ CSP( T ) in Datalog (i.e. b y a Data log pr ogram) or its fragmen ts (b eca use an y class d efinable in Dat- alog must b e closed under extension). Examples of CSPs d efi nable in Datalog and its fragmen ts can b e found, e.g., in [6, 12]. As we men tioned b efore, an y problem CSP( T ) is tractable if its complemen t is definable in Datalog, and all suc h s tr uctures w ere recen tly iden- tified in [2]. Definabilit y of ¬ CSP( T ) in linear (symm etric) Datalog implies that CSP( T ) b elongs to NL and L, resp ectiv ely [9, 12]. As w e discussed in Section 1, th ere is a connection b et w een definabilit y of CSPs in Datalog (and its f r agmen ts) and the presence/absence of t yp es in the corresp onding algebra (o r v ariet y). Note that it follo ws from Lemma 2.1 and from th e r esults in [22, 26] th at if, for a core structure T , ¬ C SP( T ) is definable in symmetric Datalog then T m u st admit, for s ome n , op erations satisfying iden tities (2.1 )–(2.3). Moreo ver, with th e result of [2], a conjecture from [22] can b e restated as follo ws : f or a core structure T , if ¬ C SP( T ) is definable in Datalo g and, for some n , T admits operations s atisfying (2.1)–(2.3), then ¬ CSP( T ) is definable in sym m etric Datalog. Th is conjecture is pr o ved in [11] for n = 1. 3. A class of graphs In this section, we giv e combinato rial c haracterisations of a class of graphs whose list homomorphism problem w ill turn ou t to b elong to L. Let H 1 and H 2 b e b ip artite irreflexiv e graphs , with colour classes B 1 , T 1 and B 2 and T 2 resp ectiv ely , with T 1 and B 2 non-empt y . W e define the sp e cial sum H 1 ⊙ H 2 (whic h dep end s on the choic e of the B i and T i ) as follo ws : it is the graph obtai ned from th e disjoin t union of H 1 and H 2 b y add in g all possib le edges b et w een the v ertices in T 1 and B 2 . Notice that w e can often decompose a bipartite graph in sev eral w a ys, and even c ho ose B 1 or T 2 to b e empt y . W e s a y that an irreflexive graph H is a sp e cial sum or expr esse d as a sp e cial sum if there exist t wo bipartite graphs and a c hoice of colour classes on eac h su c h that H is isomorphic to the special su m of these tw o graphs . Definition 3.1. L et K denote the s m allest class of irreflexiv e graphs con taining the one- elemen t graph and closed under (i) sp ecia l su m and (ii) disjoin t union. W e call the graphs in K b asic irr eflexive . THE COMPLEXITY OF THE LIST HOMOMO RPHISM PROBLEM FOR GRAPHS 341 B1 B2 B3 B4 B5 B6 c b a c b a d c b a e d c b a a ′ b ′ c ′ a b c a ′ b ′ c ′ a b c Figure 1: The forbidden mixed graph s . The follo wing result giv es a c haracterisation of basic irreflexive graph s in terms of forbidden sub graphs: Lemma 3.2. L et H b e an irr eflexive gr aph. Then the fol lowing c onditions ar e e quiv alent: (1) H is b asic irr eflexive; (2) H is bip artite, c ontains no induc e d 6-cycle, nor any induc e d p ath of length 5. W e shall now describ e our main family of graphs, fir s t by forbidd en indu ced subgrap h s, and then in an inductiv e m an n er. Definition 3.3. Define the class L of graphs as follo ws: a graph H b elongs to L if it con tains none of the follo wing as an induced su bgraph: (1) the reflexiv e path of length 3 and th e reflexiv e 4-c ycle; (2) the irreflexiv e cycles of length 3, 5 an d 6, and the irreflexive path of length 5; (3) B1 , B2 , B3 , B4 , B5 and B6 (see Figure 1.) W e will no w c haracterise the class L in an ind uctiv e manner. Definition 3.4. A connected graph H is b asic if either (i) H is a single lo op, or (ii) H is a basic ir reflexiv e graph, or (iii) H is obtained from a basic irr eflexiv e graph H 1 with colour classes B and T b y ad d ing ev er y edge (including lo ops ) of th e form { t, t ′ } where t, t ′ ∈ T . Definition 3.5. Giv en tw o v ertex-disjoin t graphs H 1 and H 2 , the adjunction o f H 1 to H 2 is the graph H 1 ⊘ H 2 obtained by taking the d isj oin t union of the t wo graphs, and addin g ev ery edge of the form { x, y } wh er e x is a lo op in H 1 and y is a vertex of H 2 . Lemma 3.6. L et L R denote the class of r eflexive gr aphs in L . Then L R is the smal lest class D of r eflexive gr aphs such that: (1) D c ontains the one-element gr aph; (2) D is close d under disjoint union; (3) if H 1 is a single lo op and H 2 ∈ D then H 1 ⊘ H 2 ∈ D . Lemma 3.6 states that the reflexive graphs a voiding the path of length 3 and the 4- cycle are p recisely th ose constructed fr om the one-elemen t lo op using disjoint union and adjunction of a u niv ersal v ertex. These graphs can also b e describ ed b y the follo win g prop erty: ev ery connected indu ced subgraph of size at m ost 4 has a un iversal v ertex. These graphs ha ve b een stud ied p r eviously as those with NLCT w idth 1, which w ere pro v ed to b e exactly the trivially p erfect graphs [16]. O u r result pro vides an alternativ e pro of of the equiv alence of these cond itions. Theorem 3.7. The class L i s the smal lest class C of gr aphs such that: 342 L. EGRI, A. KROKHIN, B. LAR OSE, AND P . TESSON (1) C c ontains the b asic gr aphs; (2) C is close d under disjoint union; (3) if H 1 is a b asic gr aph and H 2 ∈ C then H 1 ⊘ H 2 ∈ C . Pr o of. W e start by sho wing that ev ery basic graph is in L , i.e. that a basic graph do es not con tain an y of the forbidden graph s. If H is a sin gle lo op or a b asic ir reflexiv e graph, then this is immediate. Otherwise H is obtained from a basic irreflexiv e graph H 1 with colour classes B and T by adding eve ry edge of the f orm ( t 1 , t 2 ) where t i ∈ T . In particular, the lo ops form a clique and no ed ge connects t wo n on-lo ops; it is clear in that case that H con tains none of B1 , B2 , B3 , B4 . On the other hand if H contai ns B5 or B6 , th en H 1 con tains the path of length 5 or the 6-cycle, co n tradicting th e fact that H 1 is basic. Next w e s h o w th at L is closed u n der disj oint u nion and adju nction of b asic graph s. It is ob vious that the disjoin t union of grap h s that a void the forbidd en graph s w ill also a voi d these. So supp ose that an adj unction H 1 ⊘ H 2 , w here H 1 is a basic graph, con tains an ind uced forbidd en graph B whose vertice s are neither all in H 1 nor H 2 ; without loss of generalit y H 1 con tains at least one lo op, its lo ops form a clique an d n one of its edges connects t wo non-lo ops. I t is then easy to verify that B con tains b oth lo op s and non-lo ops. Because th e other cases are similar, w e pro ve only that B is n ot B3 : since verte x d is not adjacen t to a it m ust b e in H 2 , and similarly for c . Since b is n ot adjacen t to d it m ust also b e in H 2 ; since non-lo ops of H 1 are not adjacen t to elemen ts of H 2 it follo ws that a is in H 2 also, a con tradiction. No w we m ust show that ev ery graph in L can b e obtained from the basic graphs by disjoin t union and adj unction of basic graphs. Supp ose th is is n ot the case. If H is a coun terexample of minim um size, then obvio usly it is connected, and it con tains at least one lo op for otherwise it is a basic irr eflexiv e graph. By Lemma 3.6, H also con tains at least one non-lo op. F or a ∈ H let N ( a ) denote its set of neighbours . Let R ( H ) denote the subgraph of H induced by its s et R ( H ) of loops, and let J ( H ) denote the sub grap h in d uced b y J ( H ), the set of non-lo ops of H . Since H is connected and neither B1 nor B2 is an induced subgraph of H , the graph R ( H ) is also connected, and further m ore every vertex in J ( H ) is adjacen t to some verte x in R ( H ). By Lemma 3.6, we kno w that R ( H ) con tains at least one u niv ersal v ertex: let U d en ote th e (non-empt y) set of univ ers al v ertices of R ( H ). Let J denote the set of all a ∈ J ( H ) su c h that N ( a ) ∩ R ( H ) ⊆ U . Let us s ho w that J 6 = ∅ . F or ev ery u ∈ U , there is w ∈ J ( H ) not adjacen t to u b ecause otherwise H is obtained b y adj oining u to the rest of H , a con tradiction with the c hoice of H . If this w has a n eighb ou r r ∈ R ( H ) \ U then there is some s ∈ R ( H ) \ U n ot adjacen t to r , and the graph induced by { w, u, s , r } con tains B2 or B3 , a con trad iction. Hence, w ∈ J . Let S denote the su bgraph of H indu ced b y U ∪ J . Th e graph S is connected. W e clai m that the follo wing prop erties also hold: (1) if a and b are adjacen t non-loops, then N ( a ) ∩ U = N ( b ) ∩ U ; (2) if a is in a connected comp onent of the sub graph of S indu ced b y J with more than one v ertex, then f or an y other b ∈ J , one of N ( a ) ∩ U, N ( b ) ∩ U con tains the other. The fir st statemen t holds b ecause B1 is forbid den, and the second follo w s from the fi rst b ecause B4 is also forbidd en. Let J 1 , . . . , J k denote th e differen t co nnected components of J in S . By (1) we ma y let N ( J i ) d en ote the set of common neigh b ours of m em b ers of J i in U . By (2), we can re-order the J i ’s so that for some 1 ≤ m ≤ k w e h av e N ( J i ) ⊆ N ( J j ) for all i ≤ m and all j > m , and, in addition, we ha ve m = 1 o r | J i | = 1 for all 1 ≤ i ≤ m . Let B denote the sub grap h of S indu ced by B = S m i =1 ( J i ∪ N ( J i )), and let C b e the su bgraph THE COMPLEXITY OF THE LIST HOMOMO RPHISM PROBLEM FOR GRAPHS 343 of H induced by H \ B . W e claim that H = B ⊘ C . F or this, it suffices to sho w that every elemen t in S m i =1 N ( J i ) is adjacen t to eve ry non-lo op c ∈ C . By construction th is holds if c ∈ J ∩ C . No w supp ose this do es not hold: then some x ∈ J ( H ) \ J is not adjacen t to some y ∈ N ( J i ) f or some i ≤ m . Since x 6∈ J we ma y find some z ∈ R ( H ) \ U adjacen t to x ; it is of cours e also adjacen t to y . Since z 6∈ U there exists some z ′ ∈ R ( H ) \ U that is not adjacen t to z , bu t it is of course adjacent to y . If x is adjacen t to z ′ , then { x, z , z ′ } ind uces a subgraph isomorphic to B2 , a con tradiction. Otherw ise, { x, z , y , z ′ } induces a su bgraph isomorphic to B3 , also a co n tradiction. If ev ery J i with i ≤ m con tains a single elemen t, notice that B is a b asic graph: indeed, remo vin g all edges b et w een its lo ops yields a bipartite irreflexiv e graph wh ic h con tains neither the path of length 5 nor the 6-cycle, since B con tains neither B5 nor B6 . Since this con tradicts our hyp othesis on H , we conclude that m = 1. But this means that N ( J 1 ) is a set of un iv er s al ve rtices in H . Let u b e suc h a v ertex and let D denote its complement in H : clearly H is obtained as the adjunction of th e sin gle loop u to D , con tradicting our h yp othesis. T h is concludes th e p ro of. 4. Classification results Recall the standard num b ering of t y p es: (1) unary , (2) affine , (3) Bo ole an , (4) lattic e and (5) semilattic e . W e will n eed the follo wing auxiliary result (whic h is well kno wn ). Note that the assumptions of this lemma effectiv ely sa y th at CSP( T ) can sim ulate the graph k -colouring p roblem (with k = | U | ) or the d irected st -connectivit y problem. Lemma 4.1. L et S , T b e structur es, let s 1 , s 2 ∈ S , and let R = { ( f ( s 1 ) , f ( s 2 )) | f : S → T } . (1) If R = { ( x, y ) ∈ U 2 | x 6 = y } for some subset U ⊆ T with | U | ≥ 3 then V ( A T ) admits typ e 1. (2) If R = { ( t, t ) , ( t, t ′ ) , ( t ′ , t ′ ) } for some distinct t, t ′ ∈ T then V ( A T ) admits at le ast one of the typ es 1, 4 , 5. Pr o of [sketc h]: The assumption of this lemma implies that A T has a sub algebra (induced by U and { t, t ′ } , resp ectiv ely) suc h that all o p erations of the subalgebra pr eserv e the relation R . It is w ell-kno wn (see, e.g., [17]) that all op erations preservin g the disequalit y relation on U are essentially unary , while it is easy to chec k that the order relation on a 2-elemen t set cannot admit operations satisfying iden tities (2.1 )–(2.3), so on e can use Lemma 2.1. The follo win g lemma connects the c haracterisation of bi-arc graphs giv en in [4] with a t yp e-omitt ing co ndition. Lemma 4.2. L et H b e a gr aph. Then the fol lowing c onditions ar e e q u ivalent: (1) the variety V ( H ) omits typ e 1; (2) the gr aph H admits a c onservative majority op er ation; (3) the gr aph H is a bi-ar c gr aph. The results su mmarised in the follo wing theorem are kno wn (or easily follo w from kno wn results, with a little help from Lemma 4.2). Theorem 4.3. L et H b e a gr aph. • If ty p ( V ( H )) admits typ e 1, then ¬ CSP( H L ) i s not expr e ssib le in Datalo g and CSP( H L ) is NP -c omplete (under first-or der r e ductions); 344 L. EGRI, A. KROKHIN, B. LAR OSE, AND P . TESSON • if t y p ( V ( H )) omits typ e 1 but admits typ e 4 then ¬ CS P( H L ) is not expr essible in symmetric Datalo g but is expr essib le in line ar Datalo g, and CSP( H L ) is NL -c omplete (under first-or der r e ductions.) Pr o of. The fi rst statement is sh o wn in [22]. If th e v ariet y omits t yp e 1, then H L admits a ma jorit y op eration b y Lemma 4.2 and then ¬ CS P( H L ) is expressible in lin ear Datalo g b y [10]; in particular the problem is in NL. If, furthermore, the v ariet y admits t yp e 4, then ¬ CS P( H L ) is not expressible in symmetric Datalo g and is NL-hard by r esu lts in [22]. By Lemma 2 .1, the presence of a ma jorit y op eration in H implies that ty p ( V ( H )) can con tain only t yp es 3 and 4. Typ e 4 is dealt with in Th eorem 4.3, s o it remains to inv estigate graphs H with t y p ( V ( H )) = { 3 } . The next theorem is the main result of this pap er. Theorem 4.4. L et H b e a gr aph. Then the fol lowing c onditions ar e e quivalent: (1) H a dmits c onservative op er ations satisfying (2.1)–(2.3) for n = 3 ; (2) H a dmits c onservative op er ations satisfying (2.1)–(2.3) for some n ≥ 1 ; (3) ty p ( V ( H )) = { 3 } ; (4) H ∈ L ; (5) ¬ CSP( H L ) is definable in symmetric Datalo g. If th e ab ove holds th en CSP( H L ) i s in the c omplexity class L . Pr o of [sk etc h]: (1) ⇒ (2) is trivial. If (2) holds then b y Lemma 2.1 V ( H ) omits t yp es 1, 4, and 5. By Lemma 4.2, H admits a ma jorit y op eration, so Lemma 2.1 implies that V ( H ) also omits t yp e 2; h ence (3) holds. Imp lication (3) ⇒ (4) is the con tent of Lemma 4.5 b elo w, and (5) implies (3) by a result of [22]. By using Theorem 3.7, one can sho w that (4) im p lies b oth (1) and (5). Finally , d efinabilit y in symmetric Datalo g implies members hip in L b y [12]. Lemma 4.5. If H 6∈ L then ty p ( V ( H )) 6 = { 3 } . Pr o of. By Th eorem 9.15 of [19], ty p ( V ( H )) = { 3 } if and only if H admits a sequence of conserv ativ e op erati ons satisfying certain identitie s (in the spirit of (2.1)–(2.3)). By conserv ativit y , su c h op erations can b e restricted to an y su bset of H w h ile satisfying the same ident ities, so the pr op ert y ty p ( V ( H )) = { 3 } is inherited by ind u ced subgraphs. It follo ws that it is enough to pro ve this lemma for the forbidd en graphs from Definition 3 .3. F or the ir r eflexiv e o dd cycles, the lemma follo ws immediately from the main results of [3, 23]. T he pro of of Theorem 3.1 of [13] sho ws that th e conditions of Lemma 4.1(1) are satisfied b y (some S , s 1 , s 2 and) T = F L where F is the irreflexiv e 6-cycle. One can c hec k that the r eflexiv e 4-c ycle is not a bi-arc graph, so we can app ly Lemma 4.2 in this case. F or the remaining forbidden graphs F from Definition 3.3, w e use Lemma 4.1(2) with T = F L . In eac h case, the b inary relation of the s tructure S will b e a s h ort un directed path, and s 1 , s 2 will b e the endp oints of the path. W e will represent suc h a structure S by a sequence of sub sets of F (indicating lists assigned to v ertices of the path). It can b e easily c heck ed that, in eac h case, the relation R defined as in Lemma 4.1 is of the requ ired form. If F is the reflexive path of length 3, sa y a − b − c − d , then S = ac − bc − ad − ac . If F is th e irreflexive path of length 5, sa y a − b − c − d − e − f then S = ae − bd − ce − bf − ae . F or g raphs B1 − B6 , we us e notation fr om Fig. 1 . F or B1 , S = bc − bc − ab − ab − bc . F or B2 , S = bc − ac − ab − bc . F or B3 , S = bc − ad − bd − bc . F or B4 , S = ae − bd − cd − ae . Finally , for b oth B5 an d B6 , S = ac − b ′ c ′ − ab − a ′ c ′ − ac . THE COMPLEXITY OF THE LIST HOMOMO RPHISM PROBLEM FOR GRAPHS 345 F or completeness’ sak e, we describ e graphs wh ose list h omomorphism problem is de- finable in first-order logic (equiv alen tly , is in AC 0 , see [6].) By results in [22], an y problem CSP( T ) is either fi rst-order defin ab le or L-hard under F O reductions. Hence, it follo ws from Th eorem 4.4 that, f or a graph H ∈ L , the list homomorphism p roblem for H is either first-order defi nable or L-complete. W e need the follo wing c haracterisation of structures whose CSP is fi rst-order d efinable [21]. Let T b e a relational structure and let a, b ∈ T . W e sa y that b dominates a in T if for an y rela tion R of T , and any tup le t ∈ R , replacemen t of any o ccurr ence of a b y b in t will yield a tu p le of R . Recall the d efinition of a d irect p o w er of a structure fr om Sub section 2.1. If T is a r elational stru cture, we s a y that th e structur e T 2 dismantles to the diagonal if there exists a sequence of elemen ts { a 0 , . . . , a n } = T 2 \ { ( a, a ) : a ∈ T } suc h that, for all 0 ≤ i ≤ n , a i is d ominated in T i , where T 0 = T 2 and T i is the s ubstructur e of T 2 induced b y T 2 \ { a 0 , . . . , a i − 1 } for i > 0. Lemma 4.6 ([21]) . L et T b e a c or e r elational structur e. Then CSP( T ) is first-or der defin- able if and only if T 2 dismantles to the diagonal. Theorem 4.7. L et H b e a gr aph. Then CSP( H L ) is first-or der definable if and only if H has the fol lowing form: H is the disjoint union of two sets L and N such that (i) L is the set of lo ops of H and induc es a c omplete gr aph, (i i ) N is the set of non-lo ops of H and induc es a gr aph with no e dges, and (iii ) N = { x 1 , . . . , x m } c an b e or der e d so that the neighb ourho o d of x i is c ontaine d in the neighb ourho o d of x i +1 for al l 1 ≤ i ≤ m − 1 . Pr o of. W e first p ro ve that conditions (i) and (ii) are n ecessary . Notice that if CSP( H L ) is first-order definable then so is CSP( K L ) f or an y induced substructure K of H . Let x and y b e distinct v ertices of H and let K L b e the substr u cture of H L induced by { x, y } . If x and y are n on-adjacen t lo ops, then θ ( K ) = { ( x, x ) , ( y, y ) } the equalit y rela tion on { x, y } ; if x and y are adjacen t non-lo ops, then θ ( K ) = { ( x, y ) , ( y , x ) } , the adjacency relation of the complete graph on 2 vertices. It is we ll kn o wn (and can b e easily deriv ed fr om Lemma 4.6) that neither of these classes CSP( K L ) is fir st-order definable. It follo ws that the lo op s of H induce a complete graph and the non-lo ops indu ce a graph with no ed ges. No w we pr o ve (iii) is n ecessary . Supp ose for a con tradiction that there exist distin ct elemen ts x and y of N and elemen ts n and m of L such that m is adj acent to x but not to y , and n is adj acen t to y but not to x . Then CSP( G ) is first-order definable, where G is the substr u cture of H L induced by { x, y , m, n } . By L emm a 4.6, G 2 disman tles to the diagonal. Then ( x, y ) must b e dominated b y one of ( x, x ), ( y , x ) or ( y , y ), since domin ation resp ects the unary r elation { x, y } 2 (on G 2 ). But ( m, n ) is a neigh b our of ( x, y ) and none of the other three, a contradicti on. F or the con verse: we sho w that we can disman tle ( H L ) 2 to the diagonal. Let x ∈ H : then ( x 1 , x ) and ( x, x 1 ) are d ominated by ( x, x ). Supp ose that w e ha v e d isman tled eve ry elemen t cont aining a co ordinate equal to x i with i ≤ j − 1: if x is any ele men t of H such that the elemen ts ( x j , x ) and ( x, x j ) r emain, then either x is a loop or x = x k with k ≥ j ; in any case the element s ( x j , x k ) and ( x k , x j ) are dominated b y ( x, x ). In this w a y we can remo ve all pairs ( x, y ) with one of x or y a n on-lo op. F or the r emaining p airs, notice that if u and v are an y lo ops then ( u, v ) is dominated (in wh at remains of ( H L ) 2 ) by ( u, u ). Finally , give n a graph H , it can b e decided in p olynomia l time wh ic h of the differen t cases delineated in Theorems 4.3, 4.4, 4.7 the list homomorphism problem for H sat isfies. Indeed, it is known that bi-arc graphs can b e recognised in p olynomial time (see [14]). Assume that H is a bi-arc graph: the forbidden substru cture definition of the class L giv es 346 L. EGRI, A. KROKHIN, B. LAR OSE, AND P . TESSON an AC 0 algorithm to recognise them; and th ose graphs whose list h omomorphism problem is first-order d efinable can b e recognised in p olynomial time b y results of [21]. References [1] E. Allender, M. Bauland, N. Immerman, H. Schnoor, and H. V ollmer. The complexity of satisfiabilit y problems: R efining Schaef er’s theorem. Journal of Computer and Syst em Scienc es , 75(4):245–254, 2009. [2] L. Barto and M. Kozik. Constraint satisfaction probllems of b ounded width . In FOCS’09 , 2009. [3] L. Barto, M. Kozik, and T. Niven. The CSP dichotom y holds for digraphs with no sources and no sinks (A p ositive answer to a conjecture of Bang-Jensen an d Hell). SIAM J. Comput. , 38(5):1782 –1802, 2009. [4] R. Brew ster, T. F eder, P . Hell, J. Huang, and G. MacGi lla vray . Near-u nanimity functions and v arieties of reflexive graphs. SIAM J. Discr ete M ath. , 22:938–960 , 2008. [5] A. Bulatov. T ractable conserv ative constraint satisfaction problems. In LICS’03 , pages 321–330, 2003. [6] A. Bulato v, A . K rokhin, and B. Larose. Dualities for constraint satisfa ction p roblems. In Complexity of Constr aints , vo lume 5250 of LNCS , pages 93–124 . 2008. [7] A. Bulatov and M. V aleriote. Recent results on the algebraic approac h to the CSP. In Complexity of Constr aints , vo lume 5250 of LNCS , pages 68–92. 2008. [8] D. Cohen and P . Jeav ons. The comp lex ity of constraint languages. In F. Rossi, P . v an Beek, and T. W alsh, editors, Handb o ok of Constr aint Pr o gr amming , chapter 8. Elsevier, 2006. [9] V. Dalmau. Linear Datalog and bound ed p ath dualit y for relational structures. L o gic al Metho ds in Computer Scienc e , 1(1), 2005. (electronic). [10] V . Dalmau and A. Krokhin. Ma jorit y constraints hav e b ounded pathwidth duality . Eur op e an Journal of Combinatorics , 29(4):821–837, 2008. [11] V . Dalmau and B. Laros e. Mal tsev + Datalog ⇒ Symmetric Datalo g. In LICS’08 , pages 297–306, 2008. [12] L. Egri, B. Larose, and P . T esson. Symmetric Datalog and constrain t satisfaction problems in Logspace. In LICS’ 07 , pages 193–2 02, 2007. [13] T. F eder, P . Hell, and J. Huang. List homomorphisms and circular arc graphs. Combinatoric a , 19:487– 505, 1999. [14] T. F eder, P . Hell, and J. Huang. Bi-arc graphs and the complexity of list homomorphisms. Journal of Gr aph The ory , 42:61–80, 2003. [15] T. F eder and M.Y. V ardi. The computational structu re of monotone monadic SNP and constrain t satisfactio n: A stu dy th rough Datalog and group theory . SIAM J. Comput. , 28:57–104, 1998. [16] F. Gurski. Characterizations of co-graphs defin ed by restricted NLC-width or clique-width op erations. Discr ete Mathematics , 306(2):271 –277, 2006. [17] P . H ell and J. Ne ˇ set ˇ ril. Gr aphs and Homomorphisms . Oxford U niversit y Press, 2004. [18] P . Hell and J. Ne ˇ set ˇ ril. Colouring, constrai nt satisfaction, and complexity . Computer Scienc e R eview , 2(3):143–1 63, 2008. [19] D . Hobby and R .N. McKenzie. The Structur e of Finite Algebr as . AMS, Pro v idence, R .I., 1988. [20] Ph .G. Kolaitis and M.Y. V ardi. A logical approac h to constrain t satisf action. In Complexity of Con- str aints , vol ume 5250 of LNCS , pages 125–15 5. 2008. [21] B. Larose, C. Loten, and C. T ardif. A characteris ation of first-order constraint satisfaction problems. L o gic al Metho ds in Computer Scienc e , 3(4), 2007. (electronic). [22] B. Larose and P . T esson. Universal algebra and h ardn ess results for constrain t satisfaction p roblems. The or etic al Computer Scienc e , 410(18):1629–1 647, 2009. [23] M. Mar´ oti and R. McKenzie. Ex istence theorems fo r w eakly symmetric op erations. Algebr a Univ. , 59(3 - 4):463–4 89, 2008. [24] T.J. Schaefer. The complexity of satisfiabilit y problems. In STOC’ 78 , pages 216–226 , 1978. [25] M. V aleriote. A subalgebra inters ection property for congruence-distributive v arieties. Canadian Journal of Mathematics , 61(2):451–464, 2009. [26] L´ as zl´ o Z´ adori and Benoit Larose. Bound ed width problems and algebras. Algebr a Univ. , 56(3-4):439– 466, 2007. This work is licensed u nder the Creative Commons Attribution -NoDer ivs License. T o view a copy of this license, visit http: //crea tivecommons.org/licenses/by- nd/3.0/ .
Original Paper
Loading high-quality paper...
Comments & Academic Discussion
Loading comments...
Leave a Comment