Digraphs Homomorphism Problems with Maltsev Condition
DDigraphs Homomorphism Problems with Maltsev Condition
Jeff Kinne ∗ Ashwin Murali † Arash Rafiey ‡ Abstract
We consider a generalization of finding a homomorphism from an input digraph G to a fixed digraph H , HOM( H ). In this setting, we are given an input digraph G together with a list function from G to2 H . The goal is to find a homomorphism from G to H with respect to the lists if one exists.We show that if the list function is a Maltsev polymorphism then deciding whether G admits ahomomorphism to H is polynomial time solvable. In our approach, we only use the existence of theMaltsev polymorphism. Furthermore, we show that deciding whether a relational structure R admits aMaltsev polymorphism is a special case of finding a homormphism from a graph G to a graph H and a listfunction with a Maltsev polymorphism. Since the existence of Maltsev is not required in our algorithm,we can decide in polynomial time whether the relational structure R admits Maltsev or not.We also discuss forbidden obstructions for the instances admitting Maltsev list polymorphism. Wehave implemented our algorithm and tested on instances arising from linear equations, and other typesof instances. CSP Motivation
The constraint satisfaction problem (CSP) involves deciding, given a set of variables anda set of constraints on the variables, whether or not there is an assignment to the variables satisfying all ofthe constraints. This problem can be formulated in terms of homomorphims as follows. Given a pair ( G , H )of relational structures , decide whether or not there is a homomorphism from the first structure to the secondstructure. A common way to restrict this problem is to fix the second structure H , so that each structure H gives rise to a problem CSP( H ). The most effective approach to the study of the CSP( H ) is the so-calledalgebraic approach that associates every H with its polymorphisms . Roughly speaking, the presence of niceenough polymorphisms leads directly to polynomial time tractability of CSP( H ), while their absence leads tohardness. Beside decision CSPs, polymorphisms have been used extensively for approximating CSPs, robustsatisfiability of CSPs, and testing solutions (in the sense of property testing) [8, 7, 19, 24, 27].An interesting question arising from these studies, in particular the CSP Dichotomy Theorem [1, 28], isknown as the meta-question . Given a relational structure H , decide whether or not H admits a polymorphismfrom a class–for various classes of polymorphims. For many cases hardness results are known. Semmilattice,majority, Maltsev, near unanimity, and weak near unanimity, are among the popular polymorphisms whenit comes to study of CSP. Having one or more of these polymorphisms on relation H , would make theCSP( H ) (or variation) instance tractable. Therefore, knowing structural characterization and polynomialtime recognition for these polymorphisms would help in designing efficient algorithm for CSP.It was shown in [6] that deciding if a relational structure admits any of the following polymorphism is NP-complete; a semilattice polymorphism, a conservative semilattice polymorphism, a commutative, associativepolymorphism (that is, a commutative semigroup polymorphism). However, when H is a digraph thendeciding whether H admits a conservative semmilattice is polynomial time solvable [21]. Relational structureand digraphs with majority/ near unanimity function have studied in [4, 6, 15, 20, 23, 25]. ∗ Indiana State University, IN, USA, [email protected], supported by NSF 1751765 † Indiana State University, IN, USA, [email protected], supported by NSF 1751765 ‡ Indiana State University, IN, USA arash.rafi[email protected] and Simon Fraser University, BC, Canada, [email protected],supported by NSF 1751765 a r X i v : . [ c s . D S ] A ug owever, deciding whether a relational structure R admit a Maltsev proven to be more challenging.Some very interesting works, using algebraic techniques, have been developed on the complexity of decidingwhether an idempotent algebra has Maltsev term [14, 22, 26].One remaining open question is an efficient procedure to recognize whether an input relational structureadmits a Maltsev polymorphism (not necessarily conservative).The presence of Maltsev polymorphisms lead to several positive results. As an example, it is now aclassic theorem in the area that for any structure H having a Maltsev polymorphism, the problem CSP( H )is polynomial time decidable [2]. Graph Theory Motivation A homomorphism of a digraph G to a digraph H is a mapping g of thevertex set of G to the vertex set of H so that for every arc uv of G , g ( u ) g ( v ), the image of uv , is an arc of H .A natural decision problem is whether for given digraphs G and H there is a homomorphism from G to H .If we view (undirected) graphs as digraphs in which each edge is replaced by two opposite directed arcs, wemay apply the definition to graphs as well. An easy reduction from the k -coloring problem shows that thisdecision problem is N P -hard: a graph G admits a 3-coloring if and only if there is a homomorphism from G to K , the complete graph on 3 vertices. As a homomorphism is easily verified if the mapping is given,the homomorphism problem is contained in N P and is thus
N P -complete.For a fixed digraph H the problem HOM ( H ) asks if a given input digraph G admits a homomorphismto H . Note that while the above reduction shows HOM ( K ) is NP-complete, HOM ( H ) can be easy (in P ) for some graphs H : for instance if H contains a vertex with a self-loop, then every graph G admits ahomomorphism to H . Less trivially, for H = K (or more generally, for any bipartite graph H ), there is ahomomorphism from G to K if and only if G is bipartite. A very natural goal is to identify precisely forwhich digraphs H the problem HOM ( H ) is polynomial time solvable.The list homomorphism problem for digraph H , LHOM( H ) is a generalization of the homomorphismproblem. We are given an input digraph G together with the lists, L where for every x ∈ V ( G ), L ( x ) ⊆ V ( H ),and the goal is to find a homomorphism G to H with respect to the lists; the image of each vertex of G mustbe in its list. List homomorphism problems are known to have nice dichotomies [10, 12, 13, 20]. However,in our general setting H itself may not have any of the special polymorphisms, and hence, we can not usedthose results in our approach.The existence of conservative polymorphisms is a hereditary property (if H has a particular kind of con-servative polymorphism, then so does any induced subgraph of H ). Thus, these questions present interestingproblems in graph theory. In terms of obstruction for various polymorphism. There are forbidden obstruc-tion characterizations for existence of conservative majority [20] and conservative Maltsev polymorphismsin digraphs [5, 20]. In fact, if a digraph admits a Maltsev polymorphism, it must also admit a majoritypolymorphism [23]. Our main result is the following theorem.
Theorem 2.1
Let G and H be two digraphs and let L : V ( G ) → H . Then HOM ( H ) for G with respect to L , is polynomial time solvable (in terms of both G, H ) when G × L H admits a Maltsev polymorphism andwithout knowing the actual Maltsev polymorphism. We will show that the algorithm does not require being given the Maltsev list polymorphism; existenceis sufficient. We also will see that the algorithm is polynomial regardless of whether H admits a Maltsevpolymorphism, and the algorithm is correct as long as there is a Maltsev list polymorphism on G × L H .Using Theorem 2.1 we prove the following theorem which is another main results of this paper. Theorem 2.2
Let R be a relational structure. Then deciding whether R admits a Maltsev polymorphism ispolynomial time solvable. R admits a Maltsevpolymorphism then CSP( R ) is polynomial time solvable. We will show examples where digraph H itselfdoes not admit a Maltsev while G × L H admit a Maltsev polymorphism. Let G be a digraph. We let V ( G ) and A ( G ) denote the vertices and arcs (or edges) of G . In place of( u, v ) ∈ A ( G ) we use the shorthand - uv ∈ A ( G ) or uv ∈ G . In place of u ∈ V ( G ) we use the shorthand - u ∈ G . Let | G | denote the number of vertices in G .For k digraphs G , G , . . . , G k , let G × G ×· · ·× G k be the digraph with vertex set { ( x , x , . . . , x k ) | x i ∈ G i , ≤ i ≤ k } and arc set { ( x , x , . . . , x k )( x (cid:48) , x (cid:48) , . . . , x (cid:48) k ) | x i x (cid:48) i ∈ A ( G i ) , ≤ i ≤ k } . Let H k = H × H × . . . H , k times. Definition 3.1 (polymorphism, conservative polymorphism)
For a digraph H , a polymorphism φ ofarity k on H is a homomorphism from H k to H . For a polymorphism φ , φ ( a , a , . . . , a k ) φ ( b , b , . . . , b k ) is an arc of H whenever ( a , a , . . . , a k )( b , b , . . . , b k ) is an arc of H k . We say φ is conservative if φ ( a , a , . . . , a k ) ∈ { a , a , . . . , a k } for every a , a , . . . , a k ∈ V ( H ) . Definition 3.2 (Semilattice, Majority, Maltsev polymorphisms)
A binary polymorphism f on di-graph H is called semilattice if f ( a, b ) = f ( b, a ) , and f ( a, a ) = a , f ( a, f ( a, c )) = f ( f ( a, b ) , c ) for every a, b, c ∈ V ( H ) . A ternary polymorphism g on H is majority if g ( a, a, b ) = g ( a, b, a ) = g ( b, a, a ) = a . A poly-morphism h of arity is Maltsev if for every a, b ∈ V ( H ) , (i) h ( a, a, a ) = a , (ii) h ( a, b, b ) = h ( b, b, a ) = a . The problem we consider is the generalization of the digraph list homomorphism problem.
Definition 3.3 (list homomorphism)
Let G and H be digraphs, and L : G → H be a set of lists. The list homomorphism problem for H , LHOM( H ), asks if there exists a homomorphism f from G to H suchthat (i) ∀ uv ∈ A ( G ) , f ( u ) f ( v ) ∈ A ( H ) (adjacency property) and (ii) ∀ u ∈ G, f ( u ) ∈ L ( u ) (list property). It is known that if H admits a Maltsev polymorphism then the core of H is an induced directed path oris an induced directed cycle and hence the HOM( H ) is polynomial time solvable [5].Our algorithm remains correct even if H does not admit a Maltsev polymorphism but does admit whatwe call a Maltsev list polymorphism on G × H respecting L . Definition 3.4 (list polymorphism)
Given digraphs
G, H , and L : G → H , h is a list polymorphism ofarity k on G × H k respecting the lists L if(i) h : G × H k → H , a homomorphism from G × H k to H , i.e., ∀ x, y ∈ G and a , ..., a k ∈ L ( x ) , b , ..., b k ∈ L ( y ) , if xy ∈ G , a b ∈ A ( H ) , .., a k b k ∈ A ( H ) , then h ( x ; a , ..., a k ) h ( y ; b , ..., b k ) ∈ A ( H ) .(ii) ∀ x ∈ G and a , ..., a k ∈ L ( x ) , h ( x ; a , ..., a k ) ∈ L ( x ) ,In this situation, we say L admits a polymorphism h on G × H k , i.e. h is a polymorphism on G × H k respecting the lists L . As the list is key, we denote the list homomorphism h by G × L H k → H , and say h is a list polymorphism on G × L H k .Polymorphism h on G × L H is called Maltsev if for every x ∈ G, a, b ∈ L ( x ) , (i) h ( x ; a, a, a ) = a , (ii) h ( x ; a, b, b ) = h ( x ; b, b, a ) = a . Note that if H admits a Maltsev polymorphism h of the normal kind, then for any G , h yields a triviallist polymorphism h (cid:48) on G × H respecting lists L , for L such that L ( x ) = V ( H ) for all x ∈ V ( G ) (by setting h (cid:48) ( x ; a , a , a ) = h ( a , a , a ) for every x ∈ G ; a , a , a ∈ L ( x )).However, the converse is not true – that a Maltsev list polymorphism implies the existence of a Maltsevpolymorphism of the usual kind. In the Figure 1, there exists a Maltsev list polymorphism on G × H , but H itself does not admit a Maltsev (in the figure, for H to have a Maltsev the arc aj must be present).3 y wz abd c efijG In H L ( x ) = { , } L ( y ) = { a,b,c,d } L ( w ) = { e,f } L ( z ) = { i,j } h ( y,p,q,r ) = s for { p,q,r,s } = { a,b,c,d } e.g h ( y,a,b,c ) = d Figure 1: Example of an instance that admits a Maltsev list polymorphism from G to H , but where H does not admit a majority polymorphism. See Example 3.5.The polymorphism g on G × L H , is called majority if for every x ∈ G, a, b ∈ L ( x ), (i) g ( x ; a, a, a ) = a ,(ii) g ( g ; a, b, b ) = g ( x ; b, b, a ) = g ( x ; b, a, b ) = b . It is known that in the usual setting, if digraph H admitsa Maltsev polymorphism then it also admits a majority polymorphism [23]. However, we note with thefollowing example that there exist G, H, L such that (i) G × L H admits a Maltsev but (ii) G × L H doesnot admit a majority list polymorphism (and therefore also does not admit a majority polymorphism in theusual sense, or indeed a Maltsev polymorphism in the usual sense). Example 3.5
Let G and H be as in Figure 1 so that V ( G ) = { x, y, z, w } , V ( H ) = { , , a, b, c, d, e, f, i, j } ,and the edge sets and lists of G and H are as in the figure. h as indicated in the figure is a Maltsev polymorphism on G × L H . Suppose there exists a majority listpolymorphism g for H . Now g ( x ; 1 , , g ( y ; a, b, c ) ∈ A ( H ), and hence, g ( y ; a, b, c ) ∈ { b, c } . Moreover, g ( y ; a, b, c ) g ( w ; e, e, f ) ∈ A ( H ) and hence g ( y ; a, b, c ) ∈ { a, b } . These would imply that g ( y ; a, b, c ) = b . Onthe other hand, g ( y ; a, b, c ) g ( z, i, j, i ) ∈ A ( H ), and hence, g ( y ; a, b, c ) ∈ { a, c } , a contradiction. We concludethat G × H does not admit a majority list polymorphism. A hypergraph G on set X , consists of a set of hyperedges where each hyperedge e is an ordered tuple( x , x , . . . , x k ) (for some k ), x , x , . . . , x k ∈ X . Here k is called the size of the hyperedge . Notice thatdifferent hyperedges could have different sizes. A hypergraph is called uniform if all its hyperedges have thesame size. We denote the vertices of the hypergraph G by V ( G ).For two hypergraphs G , H , a homomorphism f : G → H , is a mapping from V ( G ) to V ( H ) such that forevery hyperedge ( x , x , . . . , x k ) ∈ G , ( f ( x ) , f ( x ) , . . . , f ( x k )) ∈ H .An instance of a constraint satisfaction problem, (CSP) also called hypergraph list homomorphism prob-lem, consists of two hypergraphs G , H together with lists L . Each hyperedge α ∈ G has a list of possiblehyperedges (with the same size as α ) in H , denoted by L ( α ). The goal is to find a homomorphism f : G → H such that for every hyperedge α = ( x , x , . . . , x k ) ∈ G , ( f ( x ) , f ( x ) , . . . , f ( x k )) ∈ L ( α ). In other words, ifwe think of the vertices of G as variables and the vertices of H as values, and hyperedge α (cid:48) s ∈ G , L ( α )’s asconstraints, then the existence of f means that there is way of assigning values to the variables so that allconstraints are satisfied simultaneously.Not that for hyperedge α ∈ G , L ( α ) is a uniform hypergraph and is a subset of H . Definition 3.6 (Signature)
For every two hyperedges α , α from G ( or H ) we associate a signature S α ,α = { ( i, j ) | α [ i ] = α [ j ] } ( α [ i ] is the element in coordinate i -th of α ). H be a hypergraph on set A . Let H , H , . . . , H l be the partition of H into l uniform hypergraphs.A mapping h : A r → A is a polymorphism of arity r on H if h is closed under each H i , 1 ≤ i ≤ l . In otherwords, for every r hyperedges τ , τ , . . . , τ r ∈ H i , h ( τ , τ , . . . , τ r ) ∈ H i ( h is applied coordinate wise). Theorem 3.7
Let G , H , L be an instance of hypergraph list homomrphism problem (CSP). Then there existgraphs G, H with lists L such that :1. There is an L -homomorphism from G to H if and only if there is an L -homomorphism from G to H .2. If there exists a polymorphism h of arity r on H consistent with the lists L ( h is closed in each L ( α ) , α ∈ G ) then there exists a polymorphism φ on G × L H r .3. If there exists a Maltsev polymorphism h on H consistent with the lists L ( h is closed in each L ( α ) , α ∈ G ) then there exists a Maltsev polymorphism φ on G × L H . Proof:
We construct a list homomorphism instance
G, H, L as follows.1. For each hyperedge α ∈ G consider a new vertex α in graph G .2. For each hyperedge τ in L ( α ) we consider a new vertex τ in graph H .3. The list of α ∈ G is L ( α ) = { τ | τ ∈ L ( α ) } .4. There is an edge in G between α and β if S α,β (cid:54) = ∅ .5. There is an edge from vertex τ ∈ L ( α ) to ω ∈ L ( β ) if αβ is an edge of G , and S α,β ⊆ S τ,ω .The signature of edge αβ in G is defined to be S α,β , and the signature of edge τ ω in H is defined to be S τ,ω . Claim 3.8
There is an L -homomorphism from G to H if and only if there is an L -homomorphism from G to H . Suppose there exists an L -homomorphism f : G → H that maps each hyperedge α ∈ G to L ( α ). Now wedefine a mapping ψ : G → H as follows: set ψ ( x , x , . . . , x k ) = ( f ( x ) , f ( x ) , . . . , f ( x k )). We show that φ is a homomorphism. Consider two hyperedges α = ( x , x , . . . , x k ) and β = ( y , y , . . . , y (cid:96) ) in G , where αβ is an edge of G . Thus, S α,β (cid:54) = ∅ . Let τ = ( f ( x ) , f ( x ) , . . . , f ( x k )) and ω = ( f ( y ) , f ( y ) , . . . , f ( y (cid:96) )). Since f is an L - homomorphism, we have τ ∈ L ( α ), and ω ∈ L ( β ). This means that τ ∈ L ( α ) and ω ∈ L ( β ).Suppose α [ i ] = β [ j ]. Since f is a homomorphism, τ [ i ] = ω [ j ], and hence, S α,β ⊆ S τ,ω . Therefore, by theconstruction of H , ψ ( α ) ψ ( β ) is an edge in H , implying that ψ is a list homomorphism from G to H .Conversely, suppose g : G → H is an L -homomorphism. Define the mapping h : V ( G ) → V ( H ) asfollows. For vertex α ∈ G with the corresponding hyperedge α = ( x , x , . . . , x k ), define h ( x i ) = b i ,1 ≤ i ≤ k where g ( x , x , . . . , x k ) = ( b , b , . . . , b k ). We need to show that for every element x ∈ V ( G ), h ( x ) is uniquely defined. Suppose x appears in two hyperedges, α = ( x , x , . . . , x i , x, x i +2 , . . . , x k ) and β = ( y , y , . . . , y j , x, y j +2 , . . . , y (cid:96) ). Note that αβ is an edge of G , and since g is a list homomorphism, τ = g ( α ) ∈ L ( α ), and ω = g ( β ) ∈ L ( β ) are adjacent in H . Now according to the construction of G, H, L , this means S α,β is a subset of S τ,ω . Therefore, τ [ i ] = ω [ j ], and hence, h ( x ) gets only one uniquevalue. By definition, it follows that for every hyperedge γ = ( x , x , . . . , x k ) ∈ G , g ( γ ) ∈ L ( γ ), and hence,( h ( x ) , h ( x ) , . . . , h ( x k )) is in L ( γ ). (cid:5) Proof of 2.
For every r , hyperedges τ , τ , . . . , τ r from the the same list L ( α ) we have τ = h ( τ , τ , . . . , τ r ) ∈L ( α ) (here h is applied coordinate wise). Now by definition we have τ ∈ L ( α ).Now define the mapping φ : G × L H r → H as follows. For every α ∈ G and every r hyperedges τ , τ , . . . , τ r ∈ L ( α ), τ , . . . , τ r ∈ L ( α ), set φ ( α ; τ , . . . , τ r ) = h ( τ , . . . , τ r ). We show that φ preserve adja-cency. Consider edge αβ of G , and suppose τ , . . . , τ r ∈ L ( α ) and ω , . . . , ω r ∈ L ( β ), where τ l ω l ∈ E ( H ),1 ≤ l ≤ r . Then φ ( x ; τ , . . . , τ r ) φ ( y ; ω , . . . , ω r ) is an edge of H .5o see that we need to observe that by the construction of H , S α,β ⊆ S τ l ,ω l , 1 ≤ l ≤ r . Therefore, if a = α [ i ] = β [ j ] for some i, j , we have τ [ i ] = τ [ i ] = · · · = τ r [ i ] = a and ω [ j ] = ω [ j ] = · · · = ω r [ j ] = a . Let τ = h ( τ , . . . , τ r ) and ω = h ( ω , ω , . . . , ω r ). Thus, τ [ i ] = a and ω [ j ] = a , and hence, ( i, j ) ∈ S τ,ω , and then τ ω ∈ E ( H ). This would mean φ preserve adjacency and consequently is a polymorphism consistent with thelists L . Proof of 3 . According to (2) for r = 3, φ defined in (2) is a polymorphism on G × L H . Now it easy to seethat φ ( x ; α, α, α ) = h ( α, α, α ) = α , and φ ( x ; α, α, β ) = h ( α, α, β ) = β , and φ ( x ; β, α, α ) = h ( β, α, α ) = β . (cid:5) Theorem 3.9
Let H be a hypergraph. Then the problem of deciding whether H admits a Maltsev polymor-phism is polynomial time solvable. Proof:
Let H , . . . , H k be the partitioned of H into uniform hypergraphs.We construct graph G, H and lists L . The vertices of G are triples x = ( α, β, γ ) where α, β, γ ∈ H l ,1 ≤ l ≤ k . The vertices of H are τ where τ is a hyperedge of H .For x = ( α, β, γ ), L ( x ), consists of all τ , τ ∈ H l satisfying the following conditions. • If α [ i ] = β [ i ] = γ [ i ] = a then τ [ i ] is a . • If α [ i ] = β [ i ] then γ [ i ] = τ [ i ]. • If β [ i ] = γ [ i ] then α [ i ] = τ [ i ].Two vertices x = ( α, β, γ ), and y = ( α (cid:48) , β (cid:48) , γ (cid:48) ) from G with α, β, γ ∈ H l , α (cid:48) , β (cid:48) , γ (cid:48) ∈ H t are adjacent if S α,α (cid:48) ∩ S β,β (cid:48) ∩ S γ,γ (cid:48) (cid:54) = ∅ .Two vertices τ ∈ L ( x ) and ω ∈ L ( y ) in H are adjacent if S α,α (cid:48) ∩ S β,β (cid:48) ∩ S γ,γ (cid:48) ⊆ S τ,ω . Here x = ( α, β, γ ),and y = ( α (cid:48) , β (cid:48) , γ (cid:48) ). Claim 3.10 H has a Maltsev polymorphism if and only if there is an L -homomorphism from G to H . Proof:
Suppose H admits a Maltsev polymorphism. For every vertex x = ( α, β, γ ) ∈ G where α, β, γ ∈ H l ,define mapping g : G → H with g ( x ) = h ( α, β, γ ) , where h is applied coordinate wise. Let y = ( α (cid:48) , β (cid:48) , γ (cid:48) ) andsuppose xy is an edge of G . By definition, τ ∈ L ( x ) where τ = h ( α, β, γ ) and ω ∈ L ( y ) where ω = h ( α (cid:48) , β (cid:48) , γ (cid:48) ).Moreover, if ( i, j ) ∈ S α,α (cid:48) , S β,β (cid:48) , S γ,γ (cid:48) then the value of i -th coordinate of τ is h ( a , a , a ) ( a , a , a are the i -th coordinate of α, β, γ respectively) and the value of the j -th coordinate of ω is h ( a , a , a ) ( a , a , a arethe j -th coordinate of α (cid:48) , β (cid:48) , γ (cid:48) respectively). Therefore, ( i, j ) ∈ S τ,ω , and hence, there is an edge from τ to ω in H . Therefore, g is a homomorphism from G to H .Conversely, suppose g is an L -homomorphism from G to H . Suppose τ = g ( x ) for x = ( α, β, γ ). Then,for every a , a , a that are the i -th coordinate of α, β, γ , respectively, set h ( a , a , a ) = a where a is the i -th coordinate of τ (recall τ is a ordered hyperedge corresponding to τ = g ( x )).Notice that if a = a then because of the way we construct the lists, h ( a , a , a ) = a , and similarlywhen a = a , h ( a , a , a ) = a . Consider vertex y ∈ G with y = ( α (cid:48) , β (cid:48) , γ (cid:48) ). Suppose the j -coordinateof α (cid:48) , β (cid:48) , γ (cid:48) are a , a , a respectively. Let ω = g ( y ). By definition, h ( a , a , a ) is a (cid:48) where a (cid:48) is the j -thcoordinate of ω . We show that a = a (cid:48) . Observe that ( i, j ) ∈ S α,α (cid:48) ∩ S β,β (cid:48) ∩ S γ,γ (cid:48) where a appears in i -thcoordinate of α and in the j -th coordinate of α (cid:48) ; a is an element appearing in i -th coordinate of β and inthe j -th coordinate of β (cid:48) ; and finally a appears in the i -th coordinate of γ and in the j -th coordinate of γ (cid:48) .Therefore, x, y are adjacent in G , and since g is a homomorphism, τ and ω must be adjacent in H . By theconstruction of the lists, the i -th coordinate of τ is the same as the j -th coordinate of ω , i.e. a = a (cid:48) . Noticethat since g is a list homomorphism, τ ∈ L ( x ) where τ = h ( α, β, γ ), and hence, τ belongs to H . (cid:5) Claim 3.11 If H admits a Maltsev polymorphism then G × L H admits a Maltsev polymorphism. roof: For each vertex x = ( α, β, γ ), let L ( α, β, γ ) = { τ ∈ H | τ ∈ L ( x ) } . Now it is easy to observe thateach list L ( α, β, γ ) is closed under Maltsev polymorphims h . Indeed, if no pair of α, β, γ shares an element,then L ( α, β, γ ) = H l and by definition H l is closed under h . If α [ i ] = β [ i ] for some i then all hyperedgesin L ( α, β, γ ) have γ [ i ] in their i -th coordinate, and since the projection of H l on the i -th coordinate stillhas Maltsev polymorphism h , L ( α, β, γ ) is closed under h . Similarly when β, γ or α, γ share elements, weconclude that L ( α, β, γ ) is closed under h .By observation above for lists L and similar argument from the proof of 3.7 (3), it is easy to see that theexistence of polymorphism h on H implies the existence of a Maltsev polymorphism f on G × L H . Noticethat f is closed under the list because L ( α, β, γ ) is closed under Maltsev polymorphims h . (cid:5) By the above claim, G × L H admits a Maltsev polymorphism, and hence, according to Theorem 2.1finding a homomorphism from G to H with respect to lists L is polynomial time solvable. Therefore, we canobtain a Maltsev polymorphism for H if one exists. (cid:5) Let A be a finite set. By a k -ary relation R on set A we mean a subset of the k -th cartesian power A k ; k is said to be the arity of the relation. A constraint language Γ over A is a set of relations over A . Aconstraint language is finite if it contains finitely many relations.The following theorem shows that finding a Maltsev polymorphism for a given relational structure R ispolynomial time solvable. Theorem 3.12
Let R be a relational structure on set A . Then the problem of deciding whether R admits aMaltsev polymorphism is polynomial time solvable. Proof:
It is easy to see that R is just a hypergraph, and hence, by Theorem 3.9 finding a Maltsev polymor-phism for R (if one exists) is a polynomial time task. (cid:5) Preprocessing
One of the common ingredients in the
CSP algorithms is the use of consistency checksto reduce the set of possible values for each variable (see, for example the algorithm outlined in [18]). Ouralgorithm includes such a consistency check as a first step. We keep pair lists , L ( x, y ) for each pair of vertices x, y ∈ G where ( a, b ) ∈ L ( x, y ) indicates that a, b ∈ H , a ∈ L ( x ), b ∈ L ( y ), and the algorithm considersa simultaneous assignment of x → a and y → b as possible (at the moment). We ensure the pair lists are(2,3)-consistent [16] to enforce the following. (i) Arc consistency – if xy ∈ A ( G ) and ( a, b ) ∈ L ( x, y ) then ab ∈ A ( H ). (ii) Pair consistency – if ( a, b ) ∈ L ( x, y ) and z ∈ V ( G ) then there must exist c ∈ L ( z ) with( a, c ) ∈ L ( x, z ) and ( c, b ) ∈ L ( z, y ). We call the procedure to enforce these conditions, Preprocessing . Asimple iterative procedure to consider all pairs of vertices and remove items from the lists that do not meetthe conditions is easily polynomial time.
Definition 4.1 (connected component ) By connected component of G × L H we mean a weakly con-nected component C of digraph G × L H (i.e. a connected component of G × L H when we ignore the directionof the arcs) which is closed under (2 , -consistency. That means, for every ( x, a ) , ( y, b ) ∈ C , and every z ∈ G there is some c ∈ L ( z ) such that ( a, c ) ∈ L ( x, z ) , ( b, c ) ∈ L ( y, z ) . Algorithm main loop
Let
G, H, L be an instance of the list homomorphism problem. After performingPreprocessing, we assume the instance is connected, otherwise, we consider each connected component of G × L H separately. Next at each step in the main loop, the algorithm considers a vertex x of G and twovertices a, b ∈ L ( x ) with the goal of eliminating either a or b from L ( x ). To decide whether to remove a or b we construct a smaller instance of the problem with respect to a , say ( G (cid:48) , H, L (cid:48) ), and solve this instancerecursively; i.e. performing a small test. G (cid:48) is an induced sub-digraph of G , and for every y ∈ G (cid:48) , L (cid:48) ( y ) isthe set of all the elements e so that ( a, e ) ∈ L ( x, y ). Notice that by definition, L (cid:48) ( x ) = { a } .7 z ab cd In G In list of vertices in G Figure 2: Example G , H , and lists with rectangle property. ( a, b ) in L ( x ) lies on a rectangle with ( c, d ) in L ( z ). See Definition 4.2.Note that we could certainly remove a form L ( x ) if this instance does not have a solution.After all the smaller tests, if both a, b remained in the list of x then we remove b from L ( x ). To provecorrectness we must also show that if the smaller instances have solutions then we can remove b from L ( x )and maintain the presence of a homomorphism that satisfies the lists. After the main loop of the algorithm,we are left with singleton lists and check whether the singleton lists are a homomorphism.An oriented walk (path) is obtained from a walk (path) by orienting each of its edges. The net-length of awalk W , is the number of forward arcs minus the number of backward arcs following W from the beginningto the end. An oriented cycle is obtained from a cycle by orienting each of its edges. We say two orientedwalks X, Y are congruent if they follow the same patterns of forward and backward arcs.
Rectangle Property
Algorithms for graphs that admit Maltsev polymorphisms often rely on the so-calledrectangle property of these instances. Adapted to the list homomorphism setting, we have Definition 4.2and Lemma 4.3.
Definition 4.2 (rectangle property)
Let
G, H, L be an instance of the list homomorphism problem. Twovertices a, b ∈ L ( x ) lie on a rectangle if there exists y ∈ V ( G ) , and two distinct elements c, d ∈ L ( y ) suchthat for any oriented path Y from x to y in G , there exist congruent walks A (from a to c ), A (from b to d ), B (from a to d ) and B (from b to c ) all in L ( Y ) , i.e. ( a, c ) , ( a, d ) , ( b, c ) , ( b, d ) ∈ L ( x, y ) . In Figure 2, a, b from L ( x ) lies on a rectangle with c, d in L ( z ) . For an oreinted path X in G , let L ( X ) denote the list of the vertices in X . Lemma 4.3 (rectangle property)
Let
G, H, L be an instance of the list homomorphism problem such that G × L H admits a Maltsev polymorphism h .Let X be an oriented path in G and let B, C, D be three walks in L ( X ) all congruent to X where B isfrom a to c , C is from b to c , and D is from b to d . Then there exists a walk E from a to d in L ( X ) whichis congruent with X . Proof:
Let b , b , ..., b (cid:96) be the vertices in B with b = a and b (cid:96) = c and similarly let C : c , c , . . . , c (cid:96) (with c = b , c (cid:96) = c ), D : d , d , . . . , d (cid:96) (with d = b , d (cid:96) = d ), and X : x , x , . . . , x (cid:96) . Because h is apolymorphism we know that E : h ( x ; b , b , d ), ..., h ( x (cid:96) ; b (cid:96) , b (cid:96) , b (cid:96) ) is a walk in L ( X ) that is congruent to X . By the definition of the walks and the Maltsev property of h , h ( x ; b , c , d ) = h ( x ; a, b, b ) = b = c ,and h ( x (cid:96) ; b (cid:96) , b (cid:96) , d (cid:96) ) = h ( x (cid:96) ; c, c, d ) = d = d (cid:96) . E is the walk claimed in the lemma. (cid:5) Observation 4.4
Let α, β, γ ∈ L ( x ) before Preprocessing. Then h ( x ; α, β, γ ) stays in L ( x ) after Preprocess-ing. Proof:
Since α, β, γ ∈ L ( x ) after Preprocessing, for every out-neighbor (in-neighbor) y of x , there exist α (cid:48) , β (cid:48) , γ (cid:48) ∈ L ( y ) (after Preprocesssing) such that αα (cid:48) , ββ (cid:48) , γγ (cid:48) ∈ A ( H ). Therefore, by definition h ( x ; α, β, γ ) h ( y ; α (cid:48) , β (cid:48) , γ (cid:48) ) ∈ A ( H ), and hence, we conclude h ( x ; α, β, γ ) ∈ L ( x ). (cid:5) Now Lemma 4.3 implies the following corollary. 8 y wz abdc efijG In H g
Figure 3: Example G and H such that the rectangle property of Definition 4.2 holds, but there is no Maltsevlist polymorphism from G to H . Here we have lists: L ( x ) = { , } , L ( y ) = { a, b, c, d, g } , L ( z ) = { i, j } , L ( w ) = { e, f } . See Example 4.6. Corollary 4.5
Let
G, H, L be an instance of the list homomorphism problem such that G × L H admits aMaltsev polymorphism h . Suppose after Preprocessing ( a, c ) , ( b, c ) , ( b, d ) ∈ L ( x, y ) . Then ( a, d ) ∈ L ( x, y ) . Proof: If x and y are disconnected in G then the statement is trivially true. Otherwise, let W be a walkfrom x to y in G . ( a, c ) ∈ L ( x, y ) after Preprocessing implies the existence of a walk AC congruent to W from a to c in L ( W ). Similarly, ( b, c ) , ( b, d ) ∈ L ( x, y ) imply the existence of a walk BC (from b to c ), and awalk BD (from b to d ) in L ( W ) that are congruent to W .By Observation 4.4, the existence of a Maltsev polymorphism with respect to the new lists, is preserved.Therefore, by applying Lemma 4.3, there exists a walk in L ( W ) from a to d which is congruent to W .Therefore ( a, d ) ∈ L ( x, y ). (cid:5) We note that in the usual setting the existence of a Maltsev polymorphism for H is equivalent to therectangle property holding for H . In the list setting this is not true in general, with the next example givinga counter example. Example 4.6
Consider
G, H, L from Figure 3. These satisfy the rectangle property (Definition 4.2) but donot admit a Maltsev list polymorphism.
It can be verified that the example satisfies the rectangle property (Definition 4.2) for all pairs of vertices.However, there cannot be a Maltsev list polymorphism consistent with the lists given in the figure, asfollows. If h were a Maltsev list polymorphism then because yz ∈ A ( G ), aj, bj, ci ∈ A ( H ), we must have : h ( y ; a, b, c ) h ( z ; j, j, i ) ∈ A ( H ), and hence, h ( y ; a, b, c ) ∈ { d, c } . Moreover, since xy ∈ A ( G ), 1 a, b, c ∈ A ( H )we have h ( x ; 1 , , h ( y ; a, b, c ) ∈ A ( H ), and hence, h ( y ; a, b, c ) ∈ { a, d, e } . Therefore, h ( y ; a, b, c ) = d . Onthe other hand, since yw ∈ A ( G ), ae, be, cf ∈ A ( H ), we have ( y ; a, b, c )( w ; e, e, f ) as an arc of G × L H ,implying h ( y ; a, b, c ) h ( w ; e, e, f ) to be an arc of H , and consequently, df ∈ A ( H ), a contradiction.After performing Preprocessing, the algorithm separates G × L H into weakly connected components. Soin what follows we may assume that G × L H is a single weakly connected component. Definition 4.7
For vertex x ∈ V ( G ) and a ∈ L ( x ) , let L x,a be the restriction of L when the list of x hasonly element a . In other words, for every y ∈ V ( G ) , L x,a ( y ) = { d | ( a, d ) ∈ L ( x, y ) } .The pair list of L x,a ( u, v ) for u, v ∈ V ( G ) is the set of ( c, d ) that are (2 , - consistent within L x,a . Inother words, ( c, d ) ∈ L x,a ( u, v ) when c ∈ L x,a ( u ) , d ∈ L x,a ( v ) , and for every w ∈ V ( G ) there exists some e ∈ L x,a ( w ) such that ( e, c ) ∈ L x,a ( w, u ) , and ( e, d ) ∈ L x,a ( w, v ) . Definition 4.8 (Identical Vertices)
We say two vertices a, b ∈ L ( x ) are identical with respect to set B ⊆ V ( G ) if(1) For every y ∈ B , L x,a ( y ) = L x,b ( y ) . b c c d d x uv In H In G we e y(cid:96) (cid:96) Figure 4: Pair lists are different in L x,a ( u, v ), and L x,b ( u, v ) (2) For every u, v ∈ B , and every c, d ∈ V ( H ) , ( c, d ) ∈ L x,a ( u, v ) if and only if ( c, d ) ∈ L x,b ( u, v ) . If in the above definition, (1) occurs, but a, b ∈ L ( x ) are not identical w.r.t. B , then there exist u, v ∈ B and c , c ∈ L x,a ( u ) and d , d ∈ L x,a ( v ) such that ( c , d ) , ( c , d ) ∈ L x,a ( u, v ) but ( c , d ) , ( c , d ) (cid:54)∈ L x,a ( u, v ), and ( c , d ) , ( c , d ) ∈ L x,b ( u, v ), but ( c , d ) , ( c , d ) (cid:54)∈ L x,b ( u, v ).We say u and c , c ∈ L x,a ( u ) witness x, a, b . (see Figure 4) at v, d , d . Similarly we can say v, d , d witness x, a, b at u, c , c . Definition 4.9 ( G L,xa,b ) For a, b ∈ L ( x ) , initially G L,xa,b is the induced sub-digraph of G with vertices y suchthat L x,a ( y ) \ L x,b ( y ) (cid:54) = ∅ . Let B be the set of vertices of G \ G L,xa,b with out-neighbor (in-neighbor) to avertex in G L,xa,b . Add the vertices of B into G L,xa,b together with their connecting arcs. We call the set B , the boundary vertices in G L,xa,b and denote it by B ( G L,xa,b ) . Note that by rectangle property, B ( G L,xa,b ) = B ( G L,xb,a ) . An overview of the main part of the algorithm
The core of the Algorithm is the construction of thesmaller instance, i.e. the induced subgraph; (cid:91) G L,xa,b of G . This is done in function Sym-Dif (.) We start with G L,xa,b according to the definition 4.9. If a, b ∈ L ( x ) are identical then G (cid:48) = (cid:91) G L,xa,b = G L,xa,b , and L (cid:48) = L x,a .If a, b ∈ L ( x ) are not identical then the algorithm continues adding other vertices into G (cid:48) . The reasonis that, if the instance G L,xa,b , H, L (cid:48) has a solution, then by removing b from L ( x ) we may loose the optimalsolution, and this is because of the existence of a vertex u in the boundary of G L,xa,b , say B (cid:48) , and two vertices c , c ∈ L ( u ) that witness x, a, b . The Sym-Dif , adds the vertices of G L,uc ,c into G (cid:48) . The boundary verticesof G L,uc ,c are added into B (cid:48) ; and we remove the vertices from B (cid:48) that are in G L,uc ,c \ B ( G L,uc,d ). Now the recentfrontier for identical measure are u, c , c with respect to the new boundary.If there are no non-identical pairs left then we stop, otherwise, we continue finding new witnesses andgrow G (cid:48) accordingly. In the Figure 4 we proceed adding y, w as the boundary vertices of the (cid:91) G L,xa,b .10 lgorithm 1
RemoveMinority – Using Maltsev Property function RemoveMinority ( G, H, L ) Preprocessing ( G, H, L ) and if a list becomes empty then return ∅ Consider each connected component of G × L H separately (cid:46) we assume G × L H is connected for all x ∈ V ( G ) , a, b ∈ L ( x ) with a (cid:54) = b do ( (cid:91) G L,xa,b , L (cid:48) ) =
Sym-Dif ( G, H, L, x, a, b ) g xa,b = RemoveMinority ( (cid:91) G L,xa,b , H, L (cid:48) ) if g xa,b is empty then remove a from L ( x ) Preprocessing (
G, H, L ) while ∃ x ∈ V ( G ) , a (cid:54) = b ∈ L ( x ) do Remove b from L ( x ) Preprocessing(
G, H, L ) Set ψ to be an empty homomorphism. if ∃ x ∈ V ( G ) with L ( x ) is empty then return ∅ . else for all x ∈ V ( G ) do ψ ( x ) = L ( x ) (cid:46) in this case the lists are singletons return ψ function Sym-Dif ( G, H, L, x, a, b ) Set (cid:91) G L,xa,b = G L,xa,b , and B (cid:48) = B ( G L,xa,b ) Set S to be empty (cid:46) S is a stack Set L = L x,a push x, a, b into S while S is not empty do pop ( x (cid:48) , a (cid:48) , b (cid:48) ) from S for all u ∈ B (cid:48) and c , c ∈ L ( u ) s.t. u, c , c witness x (cid:48) , a (cid:48) , b (cid:48) at v, d , d do Update B (cid:48) by adding new boundary vertices from B ( G L ,uc ,c ) and removing the old boundaryvertices from B (cid:48) that become internal vertices. Add G L ,uc ,c into (cid:91) G L,xa,b push ( u, c , c ) into S Initialize new lists L (cid:48) ∀ y ∈ (cid:91) G L,xa,b , set L (cid:48) ( y ) = L x,a ( y ) (cid:46) in the next call we make sure the L (cid:48) lists are (2 , Set B ( (cid:91) G L,xa,b ) = B (cid:48) (cid:46) this setting is for referring in the proof return ( (cid:91) G L,xa,b , L (cid:48) ) 11 β γδ λθ µπ τωα : Z + Y = 0 β : Y + X βγ + X βδ = 0 γ : X βγ + X γδ + X γλ + X γθ = 0 δ : X βδ + X γδ + X δθ + X δλ = 0 λ : X βδ + X γδ + X δθ + X δλ = 0 θ : X γθ + X δθ + X θµ + X θπ = 0 µ : X θµ + X λµ + X µτ + X µω = 0 π : X θπ + X λπ + X πτ + X πω = 0 τ : X µτ + X πτ = 0 ω : X µω + X πω = 0 Y X βδ X βγ X γδ X γθ X δλ X γλ X δθ X λπ X θµ X θπ X λµ X µω X πτ X µτ X πω Figure 5: The graph corresponding to the equation with unique solution
Example : System of linear equations :
Consider the following system of linear equations in Z .This system of equations has a solution in Z . For Y = Z = 1, the system does not have a solutionbecause of the parity reason and when Y = Z = 0 the system has several solutions. Each equation isconsidered as a vertex of the graph G depicted in Figure 5. Two vertices are adjacent if they share avariable. The list of each vertex v ∈ V ( G ); L ( v ), consists of all the solutions for equation v . For ex-ample, L ( α ) = { , } = { , } where 0 , Y, Z respectively.Here we index 00 by 0 and 11 by 1. L ( β ) = { , , , } = { , , , } , 000 ∈ L ( β ) is given in-dex 2, 011 index 3 and so on. L ( γ ) = { , , , , , , } = { , , , , , , , } , L ( δ ) = { , , , , , , } = { , , , , , , , } , L ( θ ) = { , , , , , , } = { , , , , , , , } , L ( λ ) = { , , , , , , } = { , , , , , , , } , where for example, 1100represents a potential assignment for X γλ = 1 , X δλ = 1 , X λθ = 0 , X λπ = 0. L ( µ ) = { , , , , , , } = { , , , , , , , } , L ( π ) = { , , , , , , } = { , , , , , , , } , L ( τ ) = { , } = { , } , L ( ω ) = { , } = { , } .There is an edge from vertex a a . . . a p in L ( u ) to vertex a (cid:48) a (cid:48) . . . a (cid:48) q in L ( v ) when uv is an edge of G and a i = a (cid:48) j , i ∈ [1 , p ] , j ∈ [1 , q ] ( here a i , a (cid:48) j represent the same variable in both equations u, v and have thesame value 0 or 1). Note that a a . . . a p is a binary sequence corresponding to the variables in equation u ,and a (cid:48) a (cid:48) . . . a (cid:48) q is a binary sequence representing the variables in equation v .For example, there is an edge from 1100 in L ( λ ) to vertices 1111 , , , L ( δ ); the last bit in L ( δ ) corresponds to variable X δλ and the second bit in L ( λ ) corresponds to variable X δλ and they both are1 (see Figure 6 ). One can define a Maltsev polymorphism h ( x ; a, b, c ) = a + b + c (sum is applied coordinatewise in Z ). Suppose the Algorithm 1 calls function Sym-Dif ( G, H, L, x = α, a = 1 , b = 0). Initially G L,xa,b includes the vertices { α, β, γ, δ } from G . The boundary set of G (cid:48) = G L,xa,b is { γ, δ } . Looking at vertex γ wewould have : L α, ( γ, δ ) = { (6 , , (6 , , (9 , , (9 , , (11 , , (11 , , (12 , , (12 , , (7 , , (7 , , (8 , , (8 , , (10 , , (10 , , (13 , , (13 , } .L α, ( γ, δ ) = { (6 , , (6 , , (9 , , (9 , , (11 , , (11 , , (12 , , (12 , , (7 , , (7 , , (8 , , (8 , , (10 , , (10 , , (13 , , (13 , } (see Figure 6 right).Let L (cid:48) = L α, . Since L α, ( γ, δ ) (cid:54) = L α, ( γ, δ ), the Sym-Dif continues adding the vertices of say G L (cid:48) ,δ , into instance G (cid:48) . Here according to the algorithm, δ with 20 ,
18 would witness α ∈ G , and 1 , ∈ L ( α ) (seeFigure 7). Notice that in this situation (12 , ∈ L (cid:48) ( γ, δ ) but (12 , (cid:54)∈ L α, ( γ, δ ) (as depicted in Figure 7).12
25 6789101112131415161718192021 1 34 6789101112131415161718192021 α β L ( α ) L ( β ) L ( γ ) δ λ π ωγ θ µ τ L ( β ) L ( γ ) L ( δ ) L ( δ ) L ( α ) Figure 6: The graph shows the list of vertices in L ( α ) , L ( β ) , L ( γ ) , L ( δ ), and their adjacency. The left figureshows L α, and the right figure shows L α, L ( θ ) L ( µ ) L ( α ) L ( β ) L ( γ )401 1820 3133 4647484950515253 L ( π ) L ( λ ) δ λ π ωγ θ µ τα β L ( δ ) Figure 7: Setting L (cid:48) ( γ ) = { } , δ and 18 , ∈ L (cid:48) ( δ ) as a witness14 L ( π ) L ( λ )26 5755 L ( τ ) L ( ω ) L ( θ ) L ( µ ) L ( γ ) L ( δ ) δ λ π ωγ θ µ τα β Figure 8: 52 , ∈ L ( π ) as a witness for 20 , ∈ L ( δ )This means that G (cid:48) would include the vertices θ, λ, µ, π . Let L be the restriction of L (cid:48) when L (cid:48) ( γ ) = { } ,i.e. L = L (cid:48) γ, . Now vertex µ with 44 ∈ L ( µ ) and vertex π with two vertices 52 , ∈ L ( π ) witness δ with20 , ∈ L ( δ ). Thus we add τ, ω into G (cid:48) (see Figure 8 ).Therefore, G (cid:48) includes all the vertices of G . It is not difficult to see that there is no solution for G (cid:48) , L (cid:48) ,and hence eventually 1 is going to be removed from L ( α ).15 Proofs and Analysis
In this section we prove the main result, Theorem 2.1. The proof is by induction on (cid:80) x ∈ V ( G ) | L ( x ) | . A keypart of the algorithm is constructing sub-instances of the problem (on line 5 of the algorithm) and using acorrect solution for these sub-instances to prune the lists ( lines 7, 10 of the algorithm). Claim 5.2 is for thebase case of the induction. The main lemma needed to prove the algorithm correct is the following, whichwill be proved building on a number of claims. Lemma 5.1
Let
G, H, L be an instance of the list homomorphism problem just after line 8 of Algorithm 1,i.e. after running the
Sym-Dif () for all x and a, b ∈ L ( x ) . If there is an L -homomorphism g from G to H with g ( x ) ∈ { a, b } before line 6, then there is an L -homomorphism from G to H after removing a or b from L ( x ) . Proof:
The proof if based on the induction on (cid:80) x ∈ V ( G ) | L ( x ) | . The base case for the Algorithm 1 is correctaccording to following claim. Claim 5.2
Algorithm 1 is correct for the following base cases: | L ( x ) | = 1 for all x ∈ V ( G ) . Next we show that if we remove a from L ( x ) in line 7 then there is no homomorphism from G to H thatmaps x to a . Claim 5.3
Let
G, H, L be an instance of the list homomorphism problem just before line 7 of Algorithm 1.If g xa,b does not exist, then there is no homomorphism from G to H that maps x to a . Proof of Claim 5.3.
By induction hypothesis, we may assume that the algorithm returns a correct answerfor the smaller instance G (cid:48) , L (cid:48) , H , provided that this instance has Maltsev polymorphism with respect tothe lists L (cid:48) . Note that G (cid:48) = (cid:91) G L,xa,b returned from
Sym-dif is an induced sub-digraph of G , and that for each y ∈ G (cid:48) , L (cid:48) ( y ) contains all c ∈ L ( y ) such that ( a, c ) ∈ L ( x, y ). Thus, it is easy to see that G (cid:48) , L (cid:48) , H admits aMaltsev polymorphism with respect to the lists.Suppose there were an L -homomorphism g from G to H with g ( x ) = a . For each y ∈ G (cid:48) , ( a, g ( y )) ∈ L ( x, y ) and also ( a, g ( y )) ∈ L (cid:48) ( x, y ). Observe that if there exists such a g , then g would lie within the L (cid:48) lists.If RemoveMinority is correct on G (cid:48) , H, L (cid:48) then the claim is proved. Note that (cid:80) y ∈ V ( G (cid:48) ) | L (cid:48) ( y ) | < (cid:80) y ∈ V ( G ) | L ( y ) | . By Claim 5.2, RemoveMinority is correct for G with a singleton list vertex, and thusthe claim is proved by induction. (cid:5) Remark :
According to the algorithm, in performing the steps on a smaller instance we don’t deal withvertex x anymore. Thus, removing an element from L ( x ) in lines 7, 10 would not affect the outcome of thesub-routine Sym-Dif .Suppose before removing b from L ( x ) on line 10 of Algorithm 1, there exists an L -homomorphism g from G to H with g ( x ) = b . We will show that after removing b , there remains an L -homomorphism ψ from G to H with ψ ( x ) = a . The construction of ψ is broken into two different cases based on the lists in G L,xa,b , andthe image of g over G , namely whether there exists a certain rectangle/sub-graph between the two or not. If no rectangle exists :
This means there is no vertex z ∈ (cid:91) G L,xa,b so that ( a, g ( z )) ∈ L ( x, z ) (note thatsince g is a homomorphism, ( b, g ( z )) ∈ L ( x, z )). Therefore, (cid:91) G L,xa,b extends all over G . In this case since g xa,b ( y )exists, g xa,b ( y ) is an L -homomorphism from G to H that maps x to a .16 here exists a rectangle: The argument is based on the following claims, and the structure of the proofis as follows. In order to prove the statement of the Lemma 5.1 we use Claim 5.5. The proof of Claim 5.5 isbased on the induction on the size of the lists, and using the assumption that the statement of Lemma 5.1is correct on a smaller instance.
Claim 5.4
For every two vertices z, z ∈ B (cid:48) = B ( (cid:91) G L,xa,b ) defined in line 31 of the function Sym-Diff , wehave ( g xa,b ( z ) , g ( z )) ∈ L x,a ( z , z ) . Claim 5.5
Consider the lists L after line 8. Let G = (cid:92) G L,x c ,c when g x c ,c exists. Let a , b ∈ L x ,c ( y ) , andsuppose there exists an L -homomorphism g ya ,b from (cid:92) G L,ya ,b to H . Let ( G (cid:48) , L (cid:48) ) = Sym-Dif ( G , H, L x ,c , y, a , b ).Then RemoveMinority ( G (cid:48) , H, L (cid:48) ) returns a non-empty homomorphism. In other words, if a small testpasses for ( G, L, H ) it also passes for G , L x ,c , H . Collapsing the list on the boundaries:
Suppose Claim 5.5 holds. Now we let G = (cid:91) G L,xa,b , x = x , and c = a in Claim 5.5. If G \ (cid:91) G L,xa,b = ∅ then g xa,b is a homomorphism from G to H and we are done. Otherwise,let z be a vertex in B ( (cid:91) G L,xa,b ). We may assume z is chosen such that g ( z ) = c (cid:54) = g xa,b ( z ) = d . If there is nosuch z then we define φ ( y ) = g xa,b ( y ) for every y ∈ (cid:91) G L,xa,b , and φ ( y ) = g ( y ) for every y ∈ G \ (cid:91) G L,xa,b . It is easy tosee that φ is a L-homomorphism from G to H with φ ( x ) = a . Thus, we proceed by assuming the existence ofsuch a z . Since G, L x,a is smaller than the original instance (and the small test passes for
G, L x,a by Claim5.5), we may assume that if there exists an L x,a -homomorphism from (cid:91) G L,xa,b to H that maps z to d (and x to a ) then there exists an L x,a -homomorphism g : (cid:91) G L,xa,b → H that maps z to c .Thus, we may reduce the lists L x,a by collapsing the lists in (cid:91) G L,xa,b by identifying c and d in L x,a ( z ) into c . This would mean we remove d from L x,a ( z ). Notice that by removing d , and applying Preprocessing, theremaining lists which are L x,a,z,c , have the property that the small tests pass inside them. This follows fromClaim 5.5, because we are restricting the lists by setting L ( x ) = { a } , and L ( z ) = { c } . The key observation:
We need to observe that according to the construction of (cid:91) G L,xa,b , for every othervertex z ∈ B ( (cid:91) G L,xa,b ), we have ( c, g ( z )) ∈ L x,a ( z, z ). This follows from Claim 5.4.Next, consider another vertex z from B ( (cid:91) G L,xa,b ). If for every z ∈ B ( (cid:91) G L,xa,b ) \ { z } , g ( z ) = g xa,b ( z ) then wedefine the desired homomorphism ψ : G → H , as follows, ψ ( y ) = g ( y ) for every y ∈ (cid:91) G L,xa,b and ψ ( y ) = g ( y )for every y ∈ G \ G L,xa,b .Thus, we continue by assuming c = g ( z ) (cid:54) = d = g xa,b ( z ). By the observation, ( c, c ) ∈ L x,a ( z, z ).Consider the lists L = L x,a,z,c . By Claim 5.5, since there exists an L -homomorphism, g from (cid:91) G L,xa,b to H , then there exists an L -homomorphism g that maps x to a and z to c and z to c . This would meanwe remove d from L lists. Therefore, g agrees with g on z, z . By this procedure, we continue collapsingthe rest of the list of the vertices on the boundary of (cid:91) G L,xa,b accordingly. At the end, if there is no boundaryvertex left then as we argued, there exists a homomorphism ψ from G to H with ψ ( x ) = a . Proof of Claim 5.4.
We use induction on the size of G (cid:48) = (cid:91) G L,xa,b . If B (cid:48) = B ( G L,xa,b ) then by def-inition of B ( G L,xa,b ), for every z, z ∈ B (cid:48) , ( c (cid:48) , d (cid:48) ) ∈ L x,a ( z, z ) iff ( c (cid:48) , d (cid:48) ) ∈ L x,b ( z, z ) and the claim isproved. Otherwise, there must exist two vertices u, v and c , c ∈ L ( u ) and d , d ∈ L ( v ) so that u, c , c would witness x, a, b at v, d , d . This would imply that ( c , d ) , ( c , d ) ∈ L x,a ( u, v ) \ L x,b ( u, v ), and17 y zc a b cg ya ,b shown by green L x ,c shown by blue x a b d In G In H and lists c a (cid:48) b (cid:48) Figure 9: Illustration that the small test passes in L x ,c ( c , d ) , ( c , d ) ∈ L x,b ( u, v ) \ L x,a ( u, v ). Let L = L x,a . We may assume that g ( u ) = c . Let c = g xa,b ( u ). Ac-cording to the algorithm, if both z , z belong to ( (cid:92) G L ,uc ,c ∩ G (cid:48) ) \ ( G L,xa,b \ B ( G L,xa,b )) then by induction hypothesis,starting at u and c , c ∈ L ( u ), we conclude that ( g xa,b ( z ) , g ( z )) ∈ L ( z , z ). Similarly if both z , z belongto ( G (cid:48) ∩ (cid:92) G L ,vc ,c ) \ ( G L,xa,b \ B ( G L,xa,b )) then ( g xa,b ( z ) , g ( z )) ∈ L ( z , z ). If z ∈ ( (cid:92) G L ,uc ,c ∩ G (cid:48) ) \ ( G L,xa,b \ B ( G L,xa,b ))and z ∈ ( (cid:92) G L ,vc ,c ∩ G (cid:48) ) \ ( G L,xa,b \ B ( G L,xa,b )) then because c , c ∈ L x,a ( u ) and d , d ∈ L x,a ( v ), we have,( g xa,b ( z ) , g ( z )) ∈ L ( z , z ). (cid:5) Proof of Claim 5.5.
Note that there exists an L -homomorphism g ya ,b from (cid:92) G ya ,b to H . Let L = L x ,c .Now for every z ∈ G , let L ( z ) = { g ya ,b ( z ) } if g ya ,b ( z ) ∈ L . Otherwise, set L ( z ) = { a (cid:48) | a (cid:48) ∈ L ( z ) , ( a (cid:48) , a ) ∈ L ( z , y ) } ∪ { g ya ,b ( z ) } . Note that L ( y ) = { a } . If L = L then we are done. Otherwise,suppose L ⊂ L . We use induction (cid:80) y ∈ G | L ( y ) | . Notice that (cid:92) G L,ya ,b ∩ G = (cid:92) G L ,ya ,b ∩ G . This is because both of these instances are constructed based onthe existence of the rectangles. So ( L ) y,a ( u ) (cid:54) = ∅ for u ∈ (cid:92) G L ,ya ,b ∩ G .Let Y be an oriented path from x to y , and let x be a vertex on Y so that b = g ya ,b ( x ) (cid:54)∈ L ( x ).We may assume c = g ya ,b ( x ). Now by definition x , c , c and y, a , b induce a rectangle in Y and L ( Y ).Let a ∈ L ( x ), and note that by definition a exists, because ( c , a ) ∈ L ( x , y ) (see Figure 9).By assumption, g x a ,b exists. First suppose g x a ,b ( x ) = c . Let a (cid:48) = g x a ,b ( y ) (note that a (cid:48) ∈ L ( y )because g x a ,b ( x ) = c ). Now consider the lists L (cid:48) = ( L ) x ,a . Suppose a (cid:48) (cid:54) = a (see Figure 10). Observethat g ya ,a (cid:48) exists (otherwise a wouldn’t be in L ( y )). By induction hypothesis, for instance G = (cid:92) G L,x a ,b ∩ G and L (cid:48) (notice that L (cid:48) ⊂ L ; i.e. the total elements inside the lists L (cid:48) is strictly smaller than the totalelements of L , and G is a subset of G ), all the small tests pass.Notice that for the instance G , L (cid:48) , by applying the collapsing argument (on the L (cid:48) lists ), we conclude,there exists L (cid:48) -homomorphism, g from G to H such that g ( y ) = a , and hence, g ( Y ) lies in L .By applying this argument, we consider other vertices of G , say z for which g ( z ) (cid:54)∈ L ( z ), and byinduction hypothesis for L (cid:48) , we further modify g so its image lies in L .Next suppose c (cid:48) = g x a ,b ( x ) (cid:54) = c . We may assume x is in such a way that there is no other rectangle18 y zc a b cg ya ,b shown by green L x ,c shown by blue x a b d In G In H and lists c a (cid:48) b (cid:48) a (cid:48) g x a ,b shown by brown Figure 10: Second Illustration that the small test passes in L x ,c in Y, L ( Y ), involving x , x with c , c (cid:48) ∈ L ( x ) and a , a (cid:48) ∈ L ( x ) ( a (cid:54) = a (cid:48) ). Notice that this can bedone by just taking the last rectangle containing x , c on Y and L ( Y ). Notice that since c ∈ L ( x ),the homomorphism g x c ,c (cid:48) exists. By the assumption about x , it is easy to see that g x c ,c (cid:48) ( x ) = a . Let g = g x c ,c (cid:48) and consider the lists L (cid:48) = L x ,c ,x ,a . Now as in the previous case we continue consideringother vertices of G , say, z for which g ya ,b ( z ) (cid:54)∈ L x ,c ( z ), and by induction hypothesis for L (cid:48) we wouldfurther alter g so that its image lies in L .Since the choice of x was arbitrary, we conclude that the small tests on instance Sym-Dif ( G , L , y, a , b )would pass. Thus, we may again use the collapsing argument, and assume that g ya ,b maps x to c , and bydoing so, as we argued for g , we continue modifying g ya ,b until its images lies in L . (cid:5) Lemma 5.6
The Algorithm 1 runs in polynomial time. More precisely, the running time of the algorithmis O ( | G | | H | ) . Proof:
When the lists are singletons, it takes O ( | G | ) to verify whether there is a homomorphism from G to H . Moreover, we handle each connected component of G × L H independently. This means the running timeof the instance is the sum of the running time of each connected component. So if T ( G, L ) is the runningtime of the instance
G, L, H then we can express T ( G, L ) as (cid:80) ti =1 T ( G, L i ) where L = ∪ ri =1 L i , and L i ’s aredisjoint. The following claim would give a structural property of the pair lists on the boundary vertices. Weuse the existence of the Maltsev polymorphism yet again. Claim 5.7
For every u, v ∈ B ( G L,xa,b ) , and every two distinct elements c , c ∈ L x,a ( u ) ∩ L x,b ( u ) , exactly oneof the following occurs.1. { d , d | ( c , d ) , ( c , d ) ∈ L x,a ( u, v ) } = { d , d | ( c , d ) , ( c , d ) ∈ L x,b ( u, v ) } { d , d | ( c , d ) , ( c , d ) ∈ L x,a ( u, v ) } ∩ { d , d | ( c , d ) , ( c , d ) ∈ L x,b ( u, v ) } = ∅ . Proof:
Let P be an arbitrary oriented path from x to u in G L,xa,b . By definition of B ( G L,xa,b ), L x,a ( u ) = L x,b ( u ).Let Q be an arbitrary oriented path from x to v in G L,xa,b . Let y be a vertex in the intersection of P, Q . Since( a, c ) , ( a, c ) ∈ L x,a ( x, u ), there exist a , a ∈ L x,a ( y ) such that ( a , c ) , ( a , c ) ∈ L x,a ( y, u ).19et b ∈ L x,b ( y ) so that ( b , c ) ∈ L x,b ( y, u ). Let b ∈ y such that h ( y, a , a , b ) = b . This means that( b , c ) ∈ L x,b ( y, u ) (note that when x is the only intersection of P, Q we have a = a = a , and b = b = b ).Observe that x, a, b, u, c , c induce a rectangle in L ( P ).Let N ( a ) = { d | ( a , d ) ∈ L x,a ( y, v ) } , N ( a ) = { d | ( a , d ) ∈ L x,a ( y, v ) } , and let N ( b ) = { d | ( b , d ) ∈ L x,b ( y, v ) } , N ( b ) = { d | ( b , d ) ∈ L x,b ( y, v ) } . By the rectangle property, either N ( c (cid:48) ) ∩ N ( c (cid:48)(cid:48) ) = ∅ or N ( c (cid:48) ) = N ( c (cid:48)(cid:48) ) for every c (cid:48) , c (cid:48)(cid:48) ∈ { a , a , b , b } . Suppose d ∈ N ( a ), d ∈ N ( a ). Thus ( c , d ) , ( c , d ) ∈ L x,a ( u, v ).Up to symmetry, there are three possibilities :a) d ∈ N ( b ) or d ∈ N ( b )b) d ∈ N ( b ) or d ∈ N ( b )c) ( N ( a ) ∪ N ( a )) ∩ ( N ( b ) ∪ N ( b )) = ∅ Case a. d ∈ N ( b ) or d ∈ N ( b ). Suppose the first situation occurs. First suppose d ∈ N ( b ). Nowby applying the polymorphism definition on the oriented path in L x,a ∪ L x,b ( Q ) we conclude that there isan oriented path from b to d in L x,b . This implies that ( d , c ) , ( d , c ) ∈ L x,a ( u, v ) and ( d , c ) , ( d , c ) ∈ L x,b ( u, v ).Now suppose d ∈ N ( b ). Let b (cid:48) = h ( y, a , a , b ). By applying the polymorphism definition on theoriented path in L x,a ∪ L x,b ( P ), we observe that ( b, b (cid:48) ) ∈ L x,b ( x, y ) and ( b (cid:48) , c ) ∈ L x,b ( y, u ). Now by applyingthe polymorphism definition on the oriented path in L x,a ∪ L x,b ( Q ), we conclude that there is an orientedpath from b (cid:48) to d in L x,b . This implies that ( d , c ) , ( d , c ) ∈ L x,a ( u, v ) and ( d , c ) , ( d , c ) ∈ L x,b ( u, v ).Finally, when N ( a ) = N ( b ), then by applying the polymorphism definition on the path in L x,a ∪ L x,b ( Q ),we observe that ( b (cid:48) , d ) , ( b (cid:48) , d ) , ( b , d ) , ( b , d ) ∈ L x,b ( x, y ). Therefore, ( c , d ) , ( c , d ) , ( c , d ) , ( c , d ) ∈ L x,a ( u, v ) as well as ( c , d ) , ( c , d ) , ( c , d ) , ( c , d ) ∈ L x,b ( u, v ), and hence, { d ∈ L x,a ( v ) | ( c , d ) ∈ L x,a ( u, v ) } = { d ∈ L x,b ( v ) | ( c , d ) ∈ L x,b ( u, v ) } . This proves (1). Case b. d ∈ N ( b ) or d ∈ N ( b ). We may assume that N ( a ) ∩ N ( a ) = ∅ , as otherwise, situation inCase 1 occurs. Analogously, we assume that N ( b ) ∩ N ( b ) = ∅ , as otherwise, situation 1 occurs. In thiscase ( c , d ) , ( c , d ) ∈ L x,a ( u, v ), and ( c , d ) , ( c , d ) ∈ L x,b ( u, v ). Thus, { d , d ∈ L x,a ( v ) | ( c , d ) , ( c , d ) ∈ L x,a ( u, v ) } ∩ { d , d ∈ L x,b ( v ) | ( c , d ) , ( c , d ) ∈ L x,a ( u, v ) } = ∅ . This proves (2). Case c.
Since ( N ( a ) ∪ N ( a )) and ( N ( b ) ∪ N ( b )) have no intersection, none of the situations in Case 1occurs, and hence, (2) holds. (cid:5) By Claim 5.7, the following hold. • Suppose u ∈ B ( G L,xa,b ), and c , c ∈ L x,a ( u ) witness x, a, b in v ∈ B ( G L,xa,b ). Then { d , d | ( c , d ) , ( c , d ) ∈ L x,a ( u, v ) } ∩ { d , d | ( c , d ) , ( c , d ) ∈ L x,b ( u, v ) } = ∅ .Note that the lists in L x,a and L x,b are disjoint for every vertex y ∈ G L,xa,b \ B ( G L,xa,b ).So we can say the instance of the problem contains the rectangles of G × L H , all containing x, a, b or ifit contains some other vertices beyond B ( G L,xa,b ) then the pair lists are partitioned in the vertices of G L,xa,b .It follows from the above observation that in the instance ( (cid:91) G L,xa,b , L x,a , H ), the lists L x,a,u,c ( v ), L x,a,u,c ( v )are disjoint. This means in the next step of algorithm, we further end up with disjoint lists.Therefore, essentially we partition the instances into | G | | L | sub-instances. If the running time of eachinstance ( G , L ) is a polynomial of poly ( | G | ) poly ( | L | ) then the running time of instance G, L would be O ( poly ( | G | ) poly ( | L | )).We run the Preprocessing and it takes O ( | G | | H | ), and it takes O ( | G || H | ) to construct each instance (cid:91) G L,xa,b . So the running time for sub-instance (cid:91) G L,xa,b , L x,a is O ( | G | | H | ).There are | G || H | such instances, and because | L | ≤ | H | , the overall running time is O ( | G | | H | ). (cid:5) Improving the running time
In this section we improve Algorithm 1 by making a decision on how to remove a, b from the list of x . Theargument is slightly more involved but it follows the same logic as in the proof of correctness of Algorithm1. We have implemented Algorithm 2 as well and it gives the same output as Algorithm 1. Algorithm 2
RemoveMinority – Using Maltsev Property function RemoveMinority ( G, H, L ) Preprocessing ( G, H, L ) and if a list becomes empty then return ∅ Consider each connected component of G × L H separately (cid:46) we assume G × L H is connected for all x ∈ V ( G ) , a, b ∈ L ( x ) with a (cid:54) = b do ( (cid:91) G L,xa,b , L (cid:48) ) =
Sym-Dif ( G, H, L, x, a, b ) g xa,b = RemoveMinority ( (cid:91) G L,xa,b , H, L (cid:48) ) if g xa,b is empty then remove a from L ( x ) else remove b from L ( x ) Preprocessing (
G, H, L ) Set ψ to be an empty homomorphism. if ∃ x ∈ V ( G ) with L ( x ) is empty then return ∅ . else for all x ∈ V ( G ) do ψ ( x ) = L ( x ) (cid:46) in this case the lists are singletons return ψ function Sym-Dif ( G, H, L, x, a, b ) Set (cid:91) G L,xa,b = G L,xa,b , and B (cid:48) = B ( G L,xa,b ) Set S to be empty (cid:46) S is a stack Set L = L x,a push x, a, b into S while S is not empty do pop ( x (cid:48) , a (cid:48) , b (cid:48) ) from S for all u ∈ B (cid:48) and c , c ∈ L ( u ) s.t. u, c , c witness x (cid:48) , a (cid:48) , b (cid:48) at v, d , d do Set B (cid:48) = ( B (cid:48) ∩ B ( G L ,uc ,c )) ∪ ( B (cid:48) \ ( G L ,uc ,c \ B ( G L ,uc ,c ))) ∪ ( B ( G L ,uc ,c ) \ (cid:91) G L,xa,b ) Add G L ,uc ,c into (cid:91) G L,xa,b push ( u, c , c ) into S Initialize new lists L (cid:48) ∀ y ∈ (cid:91) G L,xa,b , set L (cid:48) ( y ) = L x,a ( y ) (cid:46) in the next call we make sure the L (cid:48) lists are (2 , Set B ( (cid:91) G L,xa,b ) = B (cid:48) (cid:46) this setting is for referring in the proof return ( (cid:91) G L,xa,b , L (cid:48) ) 21
Implementation and Experimental Results
We have implemented Algorithm 1. We have used our laptop (2017 MacBook Pro, 2.3 GHz Intel Core i5processor, compiler version : Apple LLVM version 10.0.1 (clang-1001.0.46.4)) to test the running time for thefollowing inputs. In these instances, after constructing the corresponding graph H , the vertex 0 of G wouldhave two elements 0 , L (0) = { , } . We wanted to decide whether there is a homomorphismthat maps vertex 0 of G to vertex 1 of H . In all the cases the program shows there is no such homomorphism. Graph G
Vertices 10Edges 32
Graph H
Vertices 58Edges 712
Running Time Graph G
Vertices 12Edges 36
Graph H
Vertices 62Edges 696
Running Time Graph G
Vertices 12Edges 40
Graph H
Vertices 74Edges 968
Running Time Graph G
Vertices 14Edges 48
Graph H
Vertices 90Edges 1224
Running Time Graph G
Vertices 16Edges 56
Graph H
Vertices 106Edges 1480
Running Time Graph G
Vertices 17Edges 64
Graph H
Vertices 132Edges 2176
Running Time Graph G
Vertices 17Edges 64
Graph H
Vertices 126Edges 1928
Running Time Graph G
Vertices 18Edges 64
Graph H
Vertices 122Edges 1736
Running Time Graph G
Vertices 23Edges 88
Graph H
Vertices 174Edges 2696
Running Time Graph G
Vertices 23Edges 94
Graph H
Vertices 234Edges 9496
Running Time Graph G
Vertices 23Edges 96
Graph H
Vertices 306Edges 12168
Running Time
133 seconds elations ( 0 0 0 ) ( 1 0 0 ) ( 0 0 1 ) ( 1 0 1 ) ( 0 0 2 ) ( 1 0 2 ) ( 0 1 0 ) ( 1 1 0 ) ( 0 1 1 ) ( 1 1 1 ) ( 0 1 2 ) ( 1 1 2 ) Graph G
Vertices 1716Edges 772020
Graph H
Vertices 2484Edges 12045600
Running Time
127 seconds Figure 11: Relation and its corresponding graphThe relation in the Figure 11 admits a minority polymorphism f ( y, x, x ) = f ( x, y, x ) = f ( x, x, y ) = x ;namely, f ( x, y,
2) = f ( x, , y ) = f (2 , x, y ) = 2 for x, y in { , } . In any other case f ( x, y, z ) is the minority.We construct graph G according to the constructions in section 3.1.In Figure 12 we construct an instance of the problem according to the construction in [3]. Relation (G)
Relation (H) ( 1 2 3 ) ( 2 0 3 ) ( 2 0 0 ) ( 2 0 2 ) ( 2 3 0 ) ( 3 3 0 ) ( 1 0 0 ) ( 2 0 1 ) ( 1 3 0 ) ( 0 2 3 ) ( 2 2 1 ) ( 1 0 1 ) ( 3 2 0 ) ( 0 3 1 ) ( 1 0 2 ) ( 0 0 0 ) ( 1 1 0 ) ( 2 1 0 ) ( 0 0 1 ) ( 0 0 2 ) ( 0 3 0 ) ( 3 1 0 ) ( 3 3 3 ) Graph G
Vertices 326Edges 364
Graph H
Vertices 174Edges 189
Running Time
946 seconds Figure 12: Relations
G, H and their corresponding digraphs
We say a mapping h : G × L H → H is a triple consistent Maltsev homomorphism, if for every xy ∈ A ( G ),and every a, b, c ∈ L ( x ), a (cid:48) , b (cid:48) , c (cid:48) ∈ L ( y ) with ( a, b (cid:48) ) , ( b, b (cid:48) ) , ( c, c (cid:48) ) ∈ L ( x, y ) the arc h ( x, a, b, c ) h ( y, a (cid:48) , b (cid:48) , c (cid:48) )26s in H . Moreover, h ( x, a, b, b ) = h ( x, b, b, a ) = a . In what follows, we are after finding a triple consistentMaltsev assuming that G × L H admits a Maltsev (list) homomorphism. Definition 8.1 (Weak Rectangle)
Let x ∈ V ( G ) , a (cid:54) = b ∈ L ( x ) . We say ( x, a, b ) induces (is) a weak-rectangle if there exist some y ∈ V ( G ) , c ∈ L ( y ) such that ( a, c ) , ( b, c ) ∈ L ( x, y ) . Definition 8.2 (Strong Rectangle)
Let x, y ∈ V ( G ) , and a (cid:54) = b ∈ L ( x ) , c (cid:54) = d ∈ L ( y ) . We say ( x, y, a, b, c, d ) induces (is) a strong rectangle if ( a, c ) , ( a, d ) , ( b, c ) , ( b, d ) ∈ L ( x, y ) . Definition 8.3 (Distinguisher)
For every x ∈ V ( G ) , a, b ∈ L ( x ) , set DS ( x, a, a, b ) = DS ( x, b, a, a ) = { b } .For every x ∈ V ( G ) , three distinct vertices a, b, c ∈ L ( x ) , let DS ( x, a, b, c ) ⊆ L ( x ) be the set of all vertices d such that : • For every y ∈ V ( G ) , α ∈ L ( y ) , if ( a, α ) , ( b, α ) , ( c, α ) ∈ L ( x, y ) then ( d, α ) ∈ L ( x, y ) ; • For every y ∈ V ( G ) , α, β ∈ L ( y ) , if ( a, α ) , ( b, α ) , ( c, β ) ∈ L ( x, y ) then ( d, β ) ∈ L ( x, y ) ; • For every y ∈ V ( G ) , α, β ∈ L ( y ) , if ( a, β ) , ( b, α ) , ( c, α ) ∈ L ( x, y ) then ( d, β ) ∈ L ( x, y ) ;We call DS ( x, a, b, c ) , the set of distinguishers for ( x, a, b, c ) . Pair consistency on the distinguishers
We further prune the distinguishers as follows. ∀ x, y ∈ V ( G ), ∀ a, b, c ∈ L ( x ), ∀ a (cid:48) , b (cid:48) , c (cid:48) ∈ L ( y ) such that ( a, a (cid:48) ) , ( b, b (cid:48) ) , ( c, c (cid:48) ) ∈ L ( x, y ) do the following :For every d ∈ DS ( x, a, b, c ) if there is no d (cid:48) ∈ DS ( y, a (cid:48) , b (cid:48) , c (cid:48) ) such that ( d, d (cid:48) ) ∈ L ( x, y ) then remove d from DS ( x, a, b, c ). Conjecture 8.4
Suppose DS ( x, a, b, c ) (cid:54) = ∅ for every x ∈ V ( G ) , a, b, c ∈ L ( x ) after performing pair consis-tency on the distinguishers. Then G × L H admit a Maltsev homomorphism to H . Such a homomorphism h can be obtained as follows.1. As long as ∃ x, a, b, c with DS ( x, a, b, a ) = { d } (singleton) then set h ( x, a, b, c ) = d .2. As long as there is some ( x, a, b, a ) , | DS ( x, a, b, a ) | > , set DS ( x, a, b, a ) = { a } and perform pairconsistency on the distinguishers.3. If there exists some x, a, b, c , a (cid:54) = c , and | DS ( x, a, b, c ) | > . Then set h ( x, a, b, c ) = d for some d ∈ DS ( x, a, b, c ) and perform pair consistency on the distinguishers. Remark 8.5
We couldn’t prove the conjecture. But, we have run a computer program and tested the algo-rithm in this section on some random graphs as well on the graphs in the previous section. All support theconjecture.
Acknowledgement :
We would like to thank Akbar Rafiey, and Pavol Hell for so many helpful dis-cussions and their useful comments.
References [1] A. Bulatov. A Dichotomy Theorem for Nonuniform CSPs.
FOCS
SIAM J. Comput. , 36(1):16–27 (2006).[3] J. Bulin, D. Delic, M. Jackson and T. Niven. A finer reduction of constraint problems in digraphs.
Logical Methods in Computer Science , 11 :1–33 (2015).[4] R. Brewster, T. Feder, P. Hell, J. Huang, G.MacGillivray. Near-unanimity functions and varieties ofreflexive graphs.
SIAM Journal on Discrete Mathematics , 22(3) :938–960 (2008).
5] C. Carvalho, L. Egri, M. Jackson, T. Niven. On Maltsev Digraphs.
Electr. J. Comb. , 22(1): 1–47 (2015).[6] H. Chen, B. Larose.
ACM Transactions on Computation Theory (TOCT) , 9 (3): (2017)[7] V. Dalmau, M. Kozik, A.A. Krokhin , K. Makarychev, Y. Makarychev and J. Oprsal. Robust algorithmswith polynomial loss for near-unanimity CSPs.
SODA , 340–357 (2017).[8] H. Chen, and M. Valeriote and Yuichi Yoshida. Testing Assignments to Constraint Satisfaction Problems.
FOCS , 525–534 (2016).[9] L. Egri, P. Hell, B. Larose, and A. Rafiey. Space complexity of List H-coloring : a dichotomy. In
Proceedings of SODA , (2014).[10] T. Feder, P. Hell. List homomorphisms to reflexive graphs.
J. Comb. Theory Ser. , B 72 : 236–250 (1998).[11] T. Feder, P. Hell, J. Huang. List homomorphisms and circular arc graphs.
Combinatorica , 19 : 487–505(1999).[12] T. Feder, P. Hell, J. Huang. Bi-arc graphs and the complexity of list homomorphisms.
J. Graph Theory ,42 : 61–80 (2003).[13] T. Feder, P. Hell, J. Huang. List homomorphisms of graphs with bounded degrees.
Discrete Math. , 307: 386–392 (2007).[14] R. Freese and M. A.Valeriote. On the complexity of some Maltsev conditions.
Internat. J. AlgebraComput. , 19(1):41–77 (2009).[15] T. Feder, P. Hell, B. Larose, C. Loten, M. Siggers, C. Tardif. Graphs admitting k-NU operations. Part1: The reflexive case.
SIAM Journal on Discrete Mathematics , 27 (4) : 1940–1963 (2013).[16] T. Feder and M. Vardi. Monotone monadic SNP and constraint satisfaction. In
Proceedings of STOC ,612–622 (1993).[17] T. Feder and M.Y. Vardi. The computational structure of monotone monadic SNP constraint satisfaction:A study through Datalog and group theory.
SIAM Journal on Computing , 28(1): 57–104 (1998).[18] P. Hell, J. Neˇsetˇril.
Graphs and Homomorphisms , Oxford University Press, 2004.[19] P. Hell, M. Mastrolilli, M.M. Nevisi and A. Rafiey.
Approximation of Minimum Cost Homomorphisms.
ESA : 587–598 (2012).[20] P. Hell and A. Rafiey. The Dichotomy of List Homomorphisms for Digraphs. In
Proceedings of SODA
Internat. J. Algebra Comput. ,23(6):1521–1531 (2013).[23] A. Kazda. Maltsev digraphs have a majority polymorphism.
Eur. J. Comb , 32(3): 390-397 (2011).[24] G. Kun, R. O’Donnell, S. amaki, Y. Yoshida and Y. Zhou. Linear programming, width-1 CSPs, androbust satisfaction.
ITCS , 484–495 (2012).[25] M. Maroti, and R. McKenzie. Existence theorems for weakly symmetric operations.
Algebra Universalis ,59 : 463–489 (2008).[26] P. Mayr. The subpower membership problem for Maltsev algebras.
International Journal of Algebra andComputation,
ICALP (2019).[28] D. Zhuk. A Proof of CSP Conjecture.
FOCS331–342 (2017).