Toward a Dichotomy for Approximation of $H$-coloring
Akbar Rafiey, Arash Rafiey, and Thiago Santos

TL;DR
This paper advances the understanding of approximating the minimum cost homomorphism problem (MinHOM(H)) by providing a dichotomy classification for graphs and constant factor algorithms for specific classes of digraphs, highlighting the complexity landscape.
Contribution
It offers a dichotomy classification for approximating MinHOM(H) on graphs and introduces constant factor approximation algorithms for bi-arc and k-arc digraphs, advancing the theoretical framework.
Findings
MinHOM(H) is inapproximable if H contains a digraph asteroidal triple.
A 2|V(H)|-approximation exists for graphs with a conservative majority polymorphism.
A |V(H)|^2-approximation algorithm is provided for bi-arc and k-arc digraphs.
Abstract
Given two (di)graphs G, H and a cost function , in the minimum cost homomorphism problem, MinHOM(H), goal is finding a homomorphism (a.k.a H-coloring) that minimizes . The complexity of exact minimization of this problem is well understood [34], and the class of digraphs H, for which the MinHOM(H) is polynomial time solvable is a small subset of all digraphs. In this paper, we consider the approximation of MinHOM within a constant factor. For digraphs, MinHOM(H) is not approximable if H contains a digraph asteroidal triple (DAT). We take a major step toward a dichotomy classification of approximable cases. We give a dichotomy classification for approximating the MinHOM(H) when H is a graph. For digraphs, we provide constant factor approximation algorithms for two important…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Toward a Dichotomy for Approximation of H-coloring††thanks: An extended abstract of this work appeared in ICALP 2019 [50]
Akbar Rafiey Department of Computing Science, Simon Fraser University; [email protected]. Supported by NSERC
Arash Rafiey Department of Math and Computer Science, Indiana State University; [email protected]. Department of Computer Science, Simon Fraser University; [email protected]. Supported by NSF 1751765.
Thiago Santos Department of Math and Computer Science, Indiana State University; [email protected]
Abstract
Given two (di)graphs , and a cost function , in the minimum cost homomorphism problem, MinHOM(), we are interested in finding a homomorphism (a.k.a -coloring) that minimizes . The complexity of exact minimization of this problem is well understood [35], and the class of digraphs , for which the MinHOM() is polynomial time solvable is a small subset of all digraphs.
In this paper, we consider the approximation of MinHOM within a constant factor. In terms of digraphs, MinHOM() is not approximable if contains a digraph asteroidal triple (DAT). We take a major step toward a dichotomy classification of approximable cases. We give a dichotomy classification for approximating the MinHOM() when is a graph (i.e. symmetric digraph). For digraphs, we provide constant factor approximation algorithms for two important classes of digraphs, namely bi-arc digraphs (digraphs with a conservative semilattice polymorphism or min-ordering), and -arc digraphs (digraphs with an extended min-ordering). Specifically, we show that:
- •
Dichotomy for Graphs: MinHOM() has a -approximation algorithm if graph admits a conservative majority polymorphims (i.e. is a bi-arc graph), otherwise, it is inapproximable;
- •
MinHOM() has a -approximation algorithm if is a bi-arc digraph;
- •
MinHOM() has a -approximation algorithm if is a -arc digraph.
Our constant factors depend on the size of . However, the implementation of our algorithms provides a much better approximation ratio. It leaves open to investigate a classification of digraphs , where MinHOM() admits a constant factor approximation algorithm that is independent of .
1 Introduction
For a digraph , let denote the vertex set of , and let denote the arcs of . We denote the number of vertices of by . Instead of , we use the shorthand or simply .
A graph is a symmetric digraph, that is, if and only if . An edge is just a symmetric arc.
A homomorphism of a digraph to a digraph (a.k.a -Coloring) is a mapping such that for each arc of , is an arc of . We say the map does not satisfy arc , if is not an arc of . The homomorphism problem for a fixed target digraph , HOM(), takes a digraph as input and asks whether there is a homomorphism from to . Therefore, by fixing the digraph we obtain a class of problems, one for each digraph . For example, HOM(), when is an edge, is exactly the problem of determining whether the input graph is bipartite (i.e., the 2-Coloring problem). Similarly, if , then HOM() is exactly the classical 3-Coloring problem. More generally, if is a clique on vertices, then HOM() is the -Coloring problem. The HOM() problem can be considered within a more general framework, the constraint satisfaction problem (CSP). In the CSP associated with a finite relational structure , the question is whether there exists a homomorphism of a given finite relational structure to . Thus, the -Coloring problem is a particular case of the CSP in which the involved relational structures are digraphs. A celebrated result due to Hell and Nesetril [32], states that, for graph , HOM() is in P if is bipartite or contains a looped vertex, and that it is NP-complete for all other graphs . See [9] for an algebraic proof of the same result, and [12, 56] for a dichotomy for CSP().
There are several natural optimization versions of the HOM() problem. One is to find a mapping that maximizes (minimizes) the number of satisfied (unsatisfied) arcs in . This problem is known under the name of Max 2-CSP (Min 2-Csp). For example, the most basic Boolean Max 2-CSP problem is Max Cut where the target graph is an edge. This line of research has received a lot of attention in the literature and there are very strong results concerning various aspects of approximability of Max 2-CSP and Min 2-CSP [2, 22, 28, 42, 46]. See [48] for a recent survey on this and approximation of Max -CSP and Min -CSP. We consider another natural optimization version of the HOM() problem, i.e., we are not only interested in the existence of a homomorphism, but want to find the ”best homomorphism”. The minimum cost homomorphism problem to , denoted by MinHOM(), for a given input digraph , and a cost function , seeks a homomorphism of to that minimizes the total cost . The cost function can take non-negative rational values and positive infinity, that is . MinHOM was introduced in [25], where it was motivated by a real-world problem in defence logistics. MinHOM problem offers a natural and practical way to model and generalizes many optimization problems.
Example 1.1** ((Weighted) Minimum Vertex Cover).**
This problem can be seen as MinHOM() where and , for every . Note that and are graphs in this example.
Example 1.2** (List Homomorphism (LHOM)).**
LHOM(), seeks, for a given input digraph and lists , a homomorphism from to such that for all . This is equivalent to MinHOM() with if , otherwise . This problem is also known as List -Coloring and its complexity is fully understood due to series of results [5, 8, 10, 11, 18, 34].
The MinHOM problem generalizes many other problems such as (Weighted) Min Ones [1, 15, 41], Min Sol [40, 54], a large class of bounded integer linear programs, retraction problems [19], Minimum Sum Coloring [4, 21, 45], and various optimum cost chromatic partition problems [27, 38, 39, 44].
A special case of MinHOM problem is where the cost function is choosen from a fixed set . This problem is denoted by MinHOM() [13, 54, 55]. The Valued Constrained Satisfaction Problems (VCSPs) is a generalization of this special case of the MinHOM problem. An instance of the VCSP is given by a collection of variables that must be assigned labels from a given domain with the goal to minimize the objective function that is given by the sum of cost functions, each depending on some subset of the variables [14]. Interestingly, a recent work by Cohen et al. [13] proved that VCSPs over a fixed valued constraint language are polynomial-time equivalent to MinHOM() over a fixed digraph and a proper choice of .
Exact Minimization
The complexity of exact minimization of MinHOM() was studied in a series of papers, and complete complexity classifications were given in [23] for undirected graphs, in [35] for digraphs, and in [52] for more general structures. Certain minimum cost homomorphism problems have polynomial-time algorithms [23, 24, 25, 35], but most are NP-hard. We remark that, the complexity of exact minimization of VCSPs is well understood [43, 53].
Approximation
For a minimization problem, an -approximation algorithm is a (randomized) polynomial-time algorithm that finds an approximate solution of cost at most times the minimum cost. A constant ratio approximation algorithm is an -approximation algorithm for some constant . The approximability of MinHOM is fairly understood when we restrict the cost function to a fixed set , and further, we restrict it to take only finite values (not ). This setting is a special case of finite VCSPs, and there are strong approximation results on finite VCSPs. For finite VCSPs, Raghavendra [51] showed how to use the basic SDP relaxation to obtain a constant approximation. Moreover, he proved that the approximation ratio cannot be improved under Unique Game Conjecture (UGC). This constant is not explicit, but there is an algorithm that can compute it with any given accuracy in doubly exponential time. In another line of research, the power of so-called basic linear program (BLP) concerning constant factor approximation of finite VCSPs has been recently studied in [16, 17]. However, the approximability of VCSPs for constraint languages that are not finite-valued remains poorly understood, and [31, 40] are the only results on approximation of VCSP for languages that have cost functions that can take infinite values.
Hell et al., [31] proved a dichotomy for approximating MinHOM() when is a bipartite graph by transforming the MinHOM() to a linear program, and rounding the fractional values to get a homomorphism to .
Theorem 1.3** (Dichotomy for bipartite graphs [31]).**
For a fixed bipartite graph , MinHOM() admits a constant factor approximation algorithm if admits a min-ordering (complement of is a circular arc graph), otherwise MinHOM() is not approximable unless P = NP.
Beyond this, there is no result concerning the approximation of MinHOM(). We go beyond the bipartite case and present a constant factor approximation algorithm for bi-arc graphs (graphs with a conservative majority polymorphism). Designing an approximation algorithm for MinHOM() when is a digraph is much more complex than when is a graph. We improve the state of the art by providing constant factor approximation algorithms for MinHOM() where belongs to two important classes of digraphs, namely bi-arc digraphs (digraphs with a conservative semilattice polymorphism a.k.a min-ordering), and k-arc digraphs (digraphs with a -min-ordering). To do so, we introduce new LPs that reflect the structural properties of the target (di)graph as well as new methods to round the fractional solutions and obtain homomorphisms to . We will show our randomized rounding procedure can be de-randomized, and hence, we get a deterministic polynomial algorithm. Furthermore, we argue that our techniques can be used towards finding a dichotomy for the approximation of MinHOM().
1.1 Our Contributions
We say that a problem is not approximable if there is no polynomial-time approximation algorithm with a multiplicative guarantee unless P = NP. Most of the minimum cost homomorphism problems are NP-hard, therefore we investigate the approximation of MinHOM().
Approximating Minimum Cost Homomorphism to Digraph :
Input: A digraph and a vertex-mapping costs ,
Output: A homomorphism of to with the total cost of , where is a constant.
Here, denotes the cost of a minimum cost homomorphism of to . Moreover, we assume that the size of is constant. Recall that we approximate the cost over real homomorphisms, rather than approximating the maximum weight of satisfied constraints, as in, say, Max CSP. One can show that if LHOM() is not polynomial-time solvable then there is no approximation algorithm for MinHOM() [31, 49].
Observation 1.4**.**
If LHOM() is not polynomial-time solvable, then there is no approximation algorithm for MinHOM().
The complexity of the LHOM problems for graphs, digraphs, and relational structures (with arity two and higher) have been classified in [18, 34, 10] respectively. LHOM() is polynomial-time solvable if the digraph does not contain a *digraph asteroidal triple (DAT)*111The definition of DAT (Definition 2.4) is rather technical and it is not necessary to fully understand in this paper. as an induced sub-digraph, and NP-complete when contains a DAT [34].
MinHOM() is polynomial-time solvable when digraph admits a -min-max-ordering, a subclass of DAT-free digraphs, and otherwise, NP-complete [35, 36].
In this paper, we take an important step towards closing the gap between DAT-free digraphs and the ones that admit a -min-max-ordering. First, we consider digraphs that admit a min-ordering. Digraphs that admit a min-ordering have been studied under the name of bi-arc digraphs [37] and signed interval digraphs [29, 30]. Deciding if digraph has a min-ordering and finding a min-ordering of is in P [37]. We provide a constant factor approximation algorithm for MinHOM() where admits a min-ordering.
Theorem 1.5** (Digraphs with a min-ordering).**
If digraph admits a min-ordering, then MinHOM() has a constant factor approximation algorithm.
Sections 4, 5 are dedicated to the proof of Theorem 1.5. In section 6, we turn our attention to digraphs with -min-orderings, for integer . They are also called digraphs with extended -underbar [3, 26, 47]. It was shown in [26] that if has the -underbar property, then the HOM() problem is polynomial-time solvable. In Lemmas 6.2 and 6.1, we show that if admits a -min-ordering, then is a DAT-free digraph, and provide a simple proof that LHOM() is polynomial-time solvable. Note that in general if is a DAT-free digraph, then LHOM() is polynomial-time solvable [34]. Finally, we have the following theorem.
Theorem 1.6** (Digraphs with a -min-ordering).**
If digraph admits a -min-ordering for some integer , then MinHOM() has a constant factor approximation algorithm.
Considering graphs, Feder et al., [18] proved that LHOM() is polynomial-time solvable if is a bi-arc graph, and is NP-complete otherwise. In the same paper ([18], Theorem 4.2), they mentioned that a graph is a bi-arc graph if and only if it admits a conservative majority polymorphism. In Section 7, we show that the same dichotomy classification holds in terms of approximation.
Theorem 1.7** (Dichotomy for graphs).**
There exists a constant factor approximation algorithm for MinHOM(H) if is a bi-arc graph, otherwise, MinHOM(H) is inapproximable unless P = NP.
By combining the approach for obtaining the dichotomy in the graph case, together with the idea of getting an approximation algorithm for digraphs admitting a min-ordering, we might be able to achieve a constant factor approximation algorithm for MinHOM() when is DAT-free.
Conjecture 1.8**.**
MinHOM() admits a constant factor approximation algorithm when is a DAT-free digraph, otherwise, MinHOM() is not approximable unless P = NP.
Our constant factors depend on the size of . However, the implementation of the LP and the ILP would yield a small integrality gap (Section 8). This indicates perhaps a better analysis of the performance of our algorithm is possible.
Open Problem 1.9**.**
For which digraphs MinHOM() is approximable within a constant factor independent of size of ?
2 Definitions and Preliminaries
Complexity and approximation of the minimum cost homomorphism problems, and in general the constraint satisfaction problems, are often studied under the existence of polymorphisms [6]. A polymorphism of of arity is a mapping from the set of -tuples over to such that if for , then . If is a polymorphism of we also say that admits . A polymorphism is idempotent if it satisfies for all , and is conservative if . A conservative semilattice polymorphism is a conservative binary polymorphism that is associative, idempotent, commutative. A conservative majority polymorphism of is a conservative ternary polymorphism such that for all .
A conservative semilattice polymorphism of naturally defines a binary relation on the vertices of by if and only if ; by associative, the relation is a linear order on , which we call a min-ordering of .
Definition 2.1**.**
The ordering of is a
- –
min-ordering* if and only if and implies that ;*
- –
max-ordering* if and only if and implies that ;*
- –
min-max-ordering* if and only if and implies that .*
For a bipartite graph let be the digraph obtained by orienting all the edges of from to . If admits a min-ordering then we say admits a min-ordering. This is equivalent to the following definition of min-ordering for bipartite graphs. We say admits a min-ordering if there is an ordering of the vertices in and an ordering of the vertices in , so that whenever and (with and ) are edges of then is an edge of . Min-max-ordering for bipartite graphs is defined similarly.
It is worth mentioning that, a bipartite graph admits a conservative majority if and only if it admits a min-ordering [31]. Moreover, the complement of is a circular arc graph with clique cover two [18].
Definition 2.2**.**
Let be a digraph that admits a homomorphism (here is the induced directed cycle on ( i.e., arc set ). Let , .
- –
A -min-ordering of is a linear ordering of the vertices of , so that is a min-ordering on the subgraph induced by any two circularly consecutive (subscript addition modulo ).
- –
A -min-max-ordering of is a linear ordering of the vertices of , so that is a min-max-ordering on the subgraph induced by any two circularly consecutive (subscript addition modulo ).
We close this section by giving a formal definition of a digraph asteroidal triple (DAT). The definition is rather technical and it is not necessary to fully understand it in this paper. We give a brief discussion on DAT for the sake of completeness.
Definition 2.3** (Invertible Pair).**
Let be a digraph. Define to be the digraph with the vertex set and the arc set
.
We say is an invertible pair if belong to the same strong component of .
Definition 2.4** (DAT).**
A digraph asteroidal triple of is an induced sub-digraph of , on three directed paths where goes from to , goes from to , and goes from to and is an invertible pair.
If contains a DAT then all three pairs are invertible. Note that an invertible pair is an obstruction to existence of min-orderings [18, 31]. Moreover, does not admit a conservative majority polymorphism because of the directed path , , and because of , , and finally because of , . Therefore, the value of can not be any of the [34].
3 LP for Digraphs with a min-max-ordering
Before presenting the LP, we give a procedure to modify the lists associated to the vertices of . To each vertex , we associate a list that initially contains . Think of as the set of possible images for in a homomorphism from to . Apply the arc consistency procedure as follows. Take an arbitrary arc () and let . If there is no out-neighbor (in-neighbor) of in then remove from . Repeat this until a list becomes empty or no more changes can be made. Note that if we end up with an empty list after arc consistency then there is no homomorphism of to .
Let be a min-max-ordering of the target digraph . Define to be the smallest subscript such that is an out-neighbor of , if such exists. Furthermore, define to be the smallest subscript such that is an in-neighbor of , if such exists.
Consider the following linear program. For every vertex of and every vertex of define a variable . We also define a variable for every whose value is set to zero.
[TABLE]
Let us denote the set of constraints of the above LP by . In what follows, we prove that there is a one-to-one correspondence between integer solutions of and homomorphisms from to when admits a min-max-ordering.
Theorem 3.1**.**
If digraph admits a min-max-ordering, then there is a one-to-one correspondence between homomorphisms of to and integer solutions of .
Proof.
For homomorphism , if we set for all , otherwise we set . We set and for all . Now all the variables are nonnegative and we have . Note that if then and we have . It remains to show that for every arc in . Suppose for contradiction that and and let and . This implies that , whence ; and , whence . Since and both are arcs of with and , the fact that has a min-ordering implies that must also be an arc of , contradicting the definition of . The proof for is analogous.
Conversely, if there is an integer solution for , we define a homomorphism as follows: we let when is the largest subscript with . We prove that this is indeed a homomorphism by showing that every arc of is mapped to an arc of . Let be an arc of and assume , . We show that is an arc in . Observe that and , therefore we must have . Since and are the largest subscripts such that then and . Since and are arcs of , we must have the arc , as admits a max-ordering.
Furthermore, if and only if and , so, contributes to the sum if and only if . ∎
We have translated the minimum cost homomorphism problem to a linear program. In fact, this linear program corresponds to a minimum cut problem in an auxiliary network, and can be solved by network flow algorithms [23, 49]. In [31], a similar result to Theorem 3.1 was proved for the MinHOM(H) problem on undirected graphs when target the graph is bipartite and admits a min-max-ordering. We shall enhance the above system to obtain an approximation algorithm for the case where is only assumed to have a min-ordering.
4 LP for Digraphs with a min-ordering
In the rest of the paper assume lists are not empty. Moreover, non-empty lists guarantee a homomorphism when admits a min-ordering. For the sake of completeness we present the proof of the following lemma. The argument is simple and perhaps could have appeared in earlier literature.
Lemma 4.1** ([33]).**
Let be a digraph that admits a min-ordering. If all the lists are non-empty after arc consistency, then there exists a homomorphism from to .
Proof.
Let be a min-ordering of . For every vertex of , define where is the smallest element (according to the ordering) in . We show that is a homomorphism from to . Let be an arc of . Suppose and . Because of the arc-consistency, there exist in such that and there exists such that . Note that and . Since is a min-ordering, then and . ∎
Suppose is a min-ordering of . Let denote the set of all the pairs such that is not an arc of , but there is an arc of with and an arc of with . Let and define to be the digraph with vertex set and arc set . Note that and are disjoint sets.
Observation 4.2**.**
The ordering is a min-max-ordering of .
Proof.
We show that for every pair of arcs and in , with and , both and are in . If both and are in , and .
If only one of the arcs , say , is in , there is a vertex with and , and a vertex with and . Now, and are both in , so . We may assume that , otherwise . If , then because ; and if , then because .
If both edges are in , then the earliest out-neighbor of and earliest in-neighbor of in imply that , and the earliest out-neighbors of and earliest in-neighbor of in imply that . ∎
Observation 4.3**.**
Let . Then does not have any out-neighbor in after , or does not have any in-neighbor in after .
Observation 4.3 easily follows from the fact that has a min-ordering. Since has a min-max-ordering, we can form system of linear inequalities , for as described in Section 3. Homomorphisms of to are in a one-to-one correspondence with integer solutions of , by Theorem 3.1. However, we are interested in homomorphisms of to , not . Therefore, we shall add further inequalities to to ensure that we only admit homomorphisms from to , i.e., avoid mapping arcs of to the arcs in . These inequalities ensure the arc consistency and pair consistency constraints. Also in finding a list homomorphism from to , they also allow us (if necessary) to shift the image of vertex to an element to a smaller element in its list, using the min-ordering properties.
For every arc and every arc , by Observation 4.3, if has an in-neighbor after then inequalities 4 and 4 are added, else if has an out-neighbor after then inequalities 4 and 4 are added. If neither of the previous cases happens then 4 and 4 are added.
Additionally, for every pair consider a list initially to be .
Perform pair consistency procedure as follows. Consider three vertices . For if there is no such that and then remove from . Repeat this until a pair list becomes empty or no more changes can be made.
[TABLE]
Here, we assume that after pair consistency procedure no pair list is empty, as otherwise there is no homomorphism of to . Therefore, by pair consistency, add the following constraints for every in and :
[TABLE]
Let the system of linear equation together with constraints 4, 4, 4, 4, and 4 be denoted by .
Lemma 4.4**.**
If admits a min-ordering, then there is a one-to-one correspondence between homomorphisms of to and the integer solutions of .
Proof.
In the proof of Theorem 3.1 we shown that from an integer solution for , one can obtain a homomorphism from to . Let be such a homomorphism. We show that is a homomorphism from to . Let be an arc of and let . We have , , , , and for all with we have . We show that . If it is not the case, then one constrain among 4 and 4 must hold. If is the first in-neighbor of after , then we will also have , and so inequality 4 fails. Else, if has no in-neighbor after , then inequality 4 fails.
Conversely, suppose is a homomorphism from to (i.e., maps each edge of to an edge of ). We show that the additional constraints hold.
We first show that inequality 4 holds (the reasoning for other inequalities is similar). Let , and let . Now if or then 4 holds. Hence, we may assume and . Note that is the first in-neighbor of after . Now, according to the way we define when we have homomorphism from to , we have and is before or equal to in the min-ordering.
Notice that . Now if then and min-ordering implies that . On the other hand, if then . Therefore, and . Now the sum of over all such that is in and is an in-neighbor of is one. Therefore, the inequality 4 holds.
Note that if there is a homomorphism from to then inequality 4 is a necessary condition for having such a homomorphism. ∎
5 Approximation for Digraphs with a min-ordering
In what follows, we describe our approximation algorithm for MinHOM where the fixed digraph has a min-ordering. We start off with an overview of our algorithm, Algorithm 1. The proofs of the correctness and approximation bound are postponed to later subsections.
Let be the input digraph together with a costs function , and let be a fixed target digraph , let be a min-ordering of the vertices of . Algorithm 1, first constructs digraph from as explained in Section 4. By Observation 4.2, is a min-max-ordering for . By Lemma 4.4, the integral solutions of are in one-to-one correspondence to homomorphisms from to . At this point, our algorithm will minimize the cost function over extended in polynomial-time using a linear programming algorithm. This will generally result in a fractional solution (Even though the original system is known to be totally unimodular [23, 49] and hence has integral optima, we have added inequalities, thus losing this advantage). We will obtain an integer solution by a randomized procedure called rounding. Choose, uniformly at random, a random variable , and define the rounded values when ( is the returned value by the ) and otherwise. It is easy to check that the rounded values satisfy the original inequalities, i.e., correspond to a homomorphism of to .
Now the algorithm will modify the solution to become a homomorphism from to , i.e., to avoid mapping the arcs of to the arcs in . This will be accomplished by another randomized procedure, which we call Shift, Algorithm 2. We choose, uniformly at random, another random variable , which will guide the shifting. Let denote the set of all arcs in to which some arcs of are mapped by . If is empty, we need no shifting. Otherwise, let be an arc of where is maximum. Since , Observation 4.3 implies that either has no in-neighbor after or has no out-neighbor after . Suppose the first case happens (the shifting process is similar in the other case).
Consider a vertex in such that (i.e. and ) and has an in-neighbor in with (i.e. and ). For such a vertex , let be the set of all vertices with such that and . We will show in Lemma 5.2 that is not empty. Suppose consists of with subscripts ordered as . The algorithm now selects one vertex from this set as follows. Let where
[TABLE]
Note that because one among the constraints 4 and 4 holds. Then is selected if . Thus a concrete is selected with probability , which is proportional to the difference of the fractional values . When the selected vertex is , we shift the image of the vertex from to , and set if , else set . Note that is before in the min-ordering222The images are always shifted towards smaller elements.. Now we might need to shift images of the neighbors of . In this case, repeat the shifting procedure for neighbors of . Let be an out-neighbor of and the case with being an in-neighbor of is handled similarly. First suppose is an arc of . If has an out-neighbor after then by min-ordering property is an arc of and hence, the image of does not need to be changed. If has no out-neighbor after in , then all the out-neighbors of are before and an out-neighbor of in is selected according to random variable as explained above. Moreover, constraints 4 ensures that . If is not an arc of , then is an arc of . Now, we change the image of from by selecting a vertex in that is an out-neighbor of in according to random variable . Again in this case, constraints 4 or 4 ensure that .
This processes continues in a Breadth-first search (BFS) like manner, until no more shift is required. See Figure 1 for an illustration and Example 5.1 for detailed explanation. Note that a vertex might be visited multiple times in procedure shift while a pair is considered at most one time.
Example 5.1** (Examples for Algorithm 1).**
Here, we provide detailed explanation on the examples given in Figure 1. In the right example, the target digraph is and the input is . The right digraphs () both can be viewed as bipartite graphs and is a min-ordering of . When is mapped to and is mapped to then the algorithm should shift the image of from to and since is an arc there is no need to shift the image of . In the left example, the target digraph is and the input is . In , is a min-ordering and is a missing arc. Suppose is mapped to , to , to , to , to and to . Then we should shift the image of to and then to and to and then to and to one of the .
Lemma 5.2**.**
During procedure Shift, the set of indices considered in Line 6 of the Algorithm 1 is non-empty.
Proof.
In procedure Shift, consider such that and and . We have , and together with constraint 4, this implies
[TABLE]
Therefore, there must be an index such that . It remains to show that there exists such an appearing before in the min-ordering. There are two cases to consider. First is is set to in rounding step (Line 5). Second is image of was shifted from to in procedure Shift.
For the first case, note that, since is a homomorphism from to , . Arc is mapped to in rounding step (Line 5) according to the random variable . Note that, during procedure Shift, we do not map any arc of to edges in . Therefore, we have . Consider the situation where has no in-neighbor after . Let be the first out-neighbor of after , then we have . This together with inequality 4 implies that
[TABLE]
Hence, there exists an index as we wanted. The argument for the case where has no out-neighbor after is similar.
For the second case, before mapping to , there was an index such that . There are two cases regarding . Either it is in or it is in . In both cases, must appear before as otherwise, min-max-ordering implies , contradicting our assumption. ∎
Theorem 5.3**.**
Algorithm 1, runs in polynomial time, returns a homomorphism of to .
Proof.
It it easy to see that, if there exists a homomorphism from to , then there is a homomorphism from to that maps every vertex of to the smallest vertex in its list (Lemma 4.1). We show that a sequence of shifting, either stops at some point, or it keeps shifting to a smaller vertex in each list. Lemma 5.2 allows us to apply the shifting as long as it is necessary. Therefore, on the latter case, after finite (polynomially many) steps, we end up mapping every vertex of to the smallest vertex in its list.
Consider an arc . Suppose and and is an arc of . Assume that we have shifted the image of from to where is before in the min-ordering. If is in then we do not have to shift the image of . Note that, since is in then it has to have an out-neighbor in . Let say is an out-neighbor of . If is after in the min-ordering then it implies . Else, is before in the min-ordering and we shift the image of to a smaller vertex in its list.
Thus, the above argument shows that the shifting modifies the homomorphism , and hence, the corresponding values of the variables. Namely, are reset to [math], keeping all other values the same. It is important to note that these modified values still satisfy the original set of constraints , i.e., the modified mapping is still a homomorphism from to . Moreover, during the shifting, the number of arcs in that are mapped to arcs in does not increase.
We repeat the same process for the next with these properties, until no arc of is mapped to an arc in . Each iteration involves at most shifts. After at most iterations, no edge of is mapped to an arc in and we no longer need to shift (See Figure 1 for an example). ∎
5.1 Analyzing the Approximation Ratio
We now claim that, the cost of this homomorphism is at most times the minimum cost of a homomorphism. Let denote the value of the objective function with the fractional optimum , and denote the value of the objective function with the final values , after the rounding and all the shifting. Also, let be the minimum cost of a homomorphism of to . Obviously, .
We now show that the expected value of is at most a constant times . Let us focus on the contribution of one summand, say , to the calculation of the cost.
In any integer solution, is either [math] or . The probability that contributes to is the probability of the event that and . This can happen in the following situations:
is mapped to by rounding, and is not shifted away. In other words, we have and after rounding, and these values do not change by procedure Shift. 2. 2.
is first mapped to some , by rounding, and then re-mapped to by procedure Shift.
Lemma 5.4**.**
The expected contribution of one summand, say , to the expected cost of is at most .
Proof.
Vertex is mapped to in two cases. The first case is where is mapped to by rounding (Line 5) and is not shifted away. In other words, we have and after rounding, and these values do not change by procedure Shift. Hence, for this case we have:
[TABLE]
Whence this situation occurs with probability at most , and the expected contribution is at most .
Second case is where is set to during procedure Shift. The algorithm calls Shift if there exists such that (Line 10). Let us assume it calls Shift. Procedure Shift modifies images of vertices . Consider the last time that Shift changes image of . Note that is an oriented walk, meaning that there is an arc between every two consecutive vertices of the sequence and the s are not necessarily distinct.
Base case
We first compute the contribution for a fixed , that is the contribution of shifting from a fixed to . We use induction on . Consider the simplest case where . In this case is first mapped to , by rounding, and then re-mapped to during procedure Shift. This happens if there exist and such that is an arc of mapped to with being the maximum, and then the image of is shifted to ( in the min-ordering), where . In other words, we have and after rounding (Line 5); and then is shifted from to . According to the algorithm and the way we process the arcs in , we may assume that has not been shifted because of some and some in-neighbor of at the moment. Moreover, note that many in-neighbors of could cause such a shift. However, we have the corresponding inequality for each of them. That is we must have for every in-neighbor of . To see this, consider the case where has some out-neighbor before , then is also an arc in . In this case we must have for every in-neighbor of , otherwise, we have being mapped to by the rounding which is a contradiction to the choice of . Now suppose has no out-neighbor before . In this case according to constraint 3 we have (and in particular for every other in-neighbor of , we have ), and hence, . This argument implies that we only need to consider one in-neighbor for , namely to compute the probability of one arc of being mapped to .
First assume that has some out-neighbor after . Then we have
[TABLE]
where in the first inequality is the first out-neighbor of after and due to 3, and the last inequality follows from inequality 4.
Second, for the case where has no out-neighbor after , we have
[TABLE]
where the last inequality follows from inequality 4.
Having mapped to in the rounding step, we shift to with probability . Note that the upper bound is independent from the choice of and . Therefore, for a fixed , the probability that is shifted from to is at most .
Inductive step
For , consider the oriented walk . Before calling Shift, this walk is mapped to some vertices in . Without loss of generality, let us assume these vertices are . Note that s may not be distinct. Once again we compute the contribution for a fixed , that is the contribution of shifting from a fixed to .
The algorithm calls Shift and, in procedure Shift, images of are changed in this order. We are interested in probability of mapping from fixed to . Analyzing the situation for is the same as the case for . As induction hypothesis, assume for , the probability that the algorithm shifts image of to some is at most . At this point and . Without loss of generality, assume and the case where is handled similarly. Note that is not an arc in as otherwise no change is required for image of . Define set of indices
[TABLE]
The algorithm chooses where and with probability
[TABLE]
Let assume previous image of was and it shifted to . There are two cases to consider, namely is an arc of and it is an arc in .
First suppose is an arc of when . Now we observe that does not have any out-neighbor with . This is because and the min-ordering implies which contradicts our assumption. Thus, by inequality 4 or 4 we get
[TABLE]
Therefore, by the induction hypothesis and the above inequality, the probability that our algorithm shifts the image of from to is at most
[TABLE]
In the second case suppose is not an arc of , and hence, is an arc of . Notice that has an out-neighbor (in-neighbor) before and has an in-neighbor before . If has no out-neighbor (in-neighbor) after , thus by inequality 4, we get
[TABLE]
Therefore, by the induction hypothesis and the above inequality, the probability that our algorithm shifts the image of from to is at most
[TABLE]
Hence, we may assume that has an out-neighbor after , and therefore must be before as otherwise the min-ordering property would imply is an arc in . Hence, in this case, is an arc in . Notice that we had . Thus, the probability that this situation occurs is at most (due to inequality 3). Now by inequality 4, we get
[TABLE]
Therefore, by the above inequality, the probability that our algorithm shifts the image of from to is at most
[TABLE]
This completes this part of the proof.
Let . Clearly, during procedure Shift, image of can be shifted to from any of vertices . For any fixed , this shift is initiated from vertices in that are incident with some edges in , and reaches to to shift image of . Shifting of image of happens because of missing edges from that is at most ( and are out-degree and in-degree of respectively). Therefore, the contribution of and to the expected value of is at most where is the upper bound on the probability provided before. Recall that is the value of the objective function with the final values , after the rounding and all the shifting. ∎
Theorem 5.5**.**
Algorithm 1 returns a homomorphism with the expected cost times the optimal cost. The algorithm can be de-randomized to obtain a deterministic - approximation algorithm.
Proof.
By Lemma 5.4 the expected value of is
[TABLE]
At this point we have proved that Algorithm 1 produces a homomorphism whose expected cost is at most times the minimum cost. It can be transformed to a deterministic algorithm as follows. There are only polynomially many values (at most ). When lies anywhere between two such consecutive values, all computations will remain the same. Thus we can de-randomize the first phase by trying all these values of and choosing the best solution. Similarly, there are only polynomially many values of the partial sums (again at most ), and when lies between two such consecutive values, all computations remain the same. Thus we can also de-randomize the second phase by trying all possible values and choosing the best. Since the expected value is at most times the minimum cost, this bound also applies to this best solution. ∎
6 Approximation for Digraphs with a k-min-ordering
Digraphs admitting -min-ordering () do not admit a min-ordering or a conservative majority polymorphism. However, this does not rule out the possibility of a constant factor approximation algorithm. We show that they are in fact DAT-free digraphs and the List Homomorphism problem is polynomial-time solvable for this class of digraphs.
It turns out that digraphs admitting a -min-ordering do not contain a DAT. Furthermore, List Homomorphism problem is polynomial-time solvable for this class of digraphs (Lemmas 6.2 and 6.1).
In the rest of this section denotes an induced directed cycle with vertices and the arc set .
Lemma 6.1**.**
*Let be a digraph that admits a -min-ordering. Then LHOM() is polynomial-time solvable. *
Proof.
Let be an instance of LHOM() where is the input digraph and is the set of lists, i.e. for every , . We run the arc consistency procedure and suppose the lists are not empty after the arc consistency procedure. Let be the sets of vertices of according to the -min-ordering . We also note that if there exists a homomorphism , then must be homomorphic to because is homomorphic to . This means the vertices of are partitioned into where the arcs of go from some to , (sum modulo ). For simplicity we may assume that is weakly connected; i.e. the underlying graph of is connected. Moreover, without loss of generality let be an arbitrary vertex in ( is not empty). Now the vertices of are mapped to some , for some . In other words, .
Now for every and every , set to be the smallest element in according to . Observe that the restriction of on , , is a min-ordering. Suppose is an arc of with and . We show that is an arc of . Suppose and . Since we run the arc-consistency procedure, there exists some element such that , and there exists some so that . The ordering on is a min-ordering, and hence, is an arc of . ∎
Lemma 6.2**.**
*Let be a digraph that admits a -min-ordering. Then does not contain a DAT. *
Proof.
It was shown in [34] that digraph is DAT-free if and only if can be partitioned into two sets where there exist two polymorphisms over such that is a semilattice on and is a majority over . Let be the vertices of according to the -min-ordering . Define the binary polymorphism over as follows.
when and (in the ordering ), 2. 2.
, when and , , 3. 3.
for every .
First we show that is a polymorphism on and it is semilattice on . Let where and . Now because between we have a min-ordering, implying that is a polymorphism. It is also easy (since is min-ordering) to see that is associative. Now, define the ternary polymorphism over as follows :
when , 2. 2.
when , , and are all distinct, 3. 3.
when , (in the ordering ), and , , 4. 4.
when and , , 5. 5.
for all .
We show that is a polymorphism over , and therefore, it is a majority polymorphism over the pairs in . By definition, we need to show that
[TABLE]
Case 1: If all belong to the same , then , and hence, by definition
[TABLE]
Case 2: If belong to three different partite sets, then belong to three distinct partite sets, and hence,
[TABLE]
Case 3: If belong to (possibly ) and , then and . When and , then by definition . Now suppose that and . Since is a min-ordering on , we have , and hence,
[TABLE]
By symmetry, the other remaining cases can be handled similarly. ∎
Theorem 6.3**.**
There is a -approximation algorithm for MinHOM() when the target digraph admits a k-min-ordering, .
Proof.
Let be a partition of the vertices of according to the k-min-ordering; i.e. every arc of is from a vertex in to a vertex in , (sum module ). Clearly a mapping with when , , is a homomorphism from to
Let be the input digraph together with the costs. Observe that if is homomorphic to , then must be homomorphic to . We may assume that is weakly connected. Otherwise, each weakly connected component of is treated separately.
Let be a fixed vertex in and let be a homomorphism from to where , . We design an approximation algorithm for MinHOM() in which is mapped to of . In order to find the approximation algorithm for MinHOM() for the given digraph , we consider each homomorphism , and find an approximation algorithm from to corresponding to and output the one with best performance. For simplicity of notations we work with . Let be the partition of the vertices in under , i.e. .
Consider the following LP with set of constraints called . For every and every , define a variable . For every vertex , , let be the first index such that in the ordering such that and let be the first in the ordering such that .
[TABLE]
Let be the vertices in according to the -min-ordering , and let be the vertices in according to .
Let and define to be the digraph with vertex set and arc set . Here is the set of arcs added into so that the resulting digraph admit a -min-max-ordering. Note that and are disjoint sets. Let denote the set of all the pairs such that is not an arc of , but there is an arc of with and an arc of with . Observe that .
For every arc and every arc , three of the following set of inequalities is added to (i.e. either 6, 6 or 6, 6 or 6,6).
[TABLE]
Moreover, by pair consistency, we can add the following constraints for every and every in and :
[TABLE]
Let the extended of be denoted by .
By an argument similar to that in the previous section, one can show the following that there is a one-to-one correspondence between the homomorphisms from to and integer solutions to .
In what follows we outline the process of rounding the fractional solutions of the LP to obtain an integral solution, and hence, a homomorphism from to (see 2). In the first stage of the algorithm, we use a random variable and round the fractional values according to . This means, if then is set to zero, otherwise we set .
The intention is to map to the vertex of when and . However, we may set , where , , and , i.e. is not an arc of but it is one of the added arcs into . In other words, what we have obtained would not be a homomorphism, and hence, we have to fix this partial integral assignment. To keep track of fixings, we may assume sum is maximum.
We may assume that does not have any in-neighbor in after . Now we use a random variable to select an out-neighbor of before (in the ordering ) and shift the image of from to . The vertex is selected according to random variable with the same rule as the one described in Section 5 (see the description after Lemma 5.2). However, this could force us to shift the image of some out-neighbor of , say (subscript in modulo ). Therefore, we deploy a BFS search (applying a version of shift procedure in Algorithm 1 ) to fix the images of the vertices of that may need to be changed because of the initial change in shifting the image of to (see the Figure 2). We use the same strategy as used in the case of the min-ordering to round the values of and obtain an integral solution. The calculation to obtain the approximation ratio is almost identical to ones in proof of Lemma 5.4. ∎
7 A Dichotomy for Graphs
Feder and Vardi [20] proved that if a graph admits a conservative majority polymorphism, then LHOM(H) is polynomial-time solvable. Later, Feder et al., [18] showed that LHOM(H) is polynomial-time solvable if and only if is a bi-arc graph. Bi-arc graphs are defined as follows.
Let be a circle with two specified points and on . A bi-arc is an ordered pair of arcs on such that contains but not , and contains but not . A graph is a bi-arc graph if there is a family of bi-arcs such that, for any , not necessarily distinct, the following hold:
- –
if and are adjacent, then neither intersects nor intersects ;
- –
if and are not adjacent, then both intersects and intersects .
We shall refer to as a bi-arc representation of . Note that a bi-arc representation cannot contain bi-arcs such that intersects but does not intersect and vice versa. Furthermore, by the above definition a vertex may have a self loop.
Theorem 7.1** ([7, 18]).**
A graph admits a conservative majority polymorphism if and only if it is a bi-arc graph.
Definition 7.2** ().**
Let be a graph. Let be a bipartite graph with partite sets where is a copy of . Two vertices , and of are adjacent in if and only if is an edge of .
A circular arc graph is a graph that is the intersection graph of a family of arcs on a circle. We interpret the concept of an intersection graph literally, thus any intersection graph is automatically reflexive (i.e. there is a loop at every vertex), since a set always intersects itself. A bipartite graph whose complement is a circular arc graph, is called a co-circular arc graph. Note that co-circular arc graphs are irreflexive, meaning that no vertex has a loop. Let be a bipartite graph with partite sets and , and edge set . Recall that we say admits a min-ordering, if there is an ordering and ordering so that when and with and then is an edge of . With this definition, if we oriented all the edges of from to , then we obtain digraph for with it is easy to see that the ordering is a min-ordering.
Lemma 7.3**.**
Let be the bipartite graph constructed from a bi-arc graph , according to Definition 7.2. Then the following hold.
- –
* is a co-circular arc graph.*
- –
* admits a min-ordering.*
Proof.
It is easy to see that is a co-circular arc graph. From a bi-arc representation of , we obtain a co-circular arc representation of by choosing, for , the arc for vertex and the arc for vertex . A bipartite graph admits a min-ordering if and only if it is co-circular arc graph [31]. is a co-circular arc graph, and hence, it admits a min-ordering. ∎
Let be a bi-arc graph, with vertex set , and let be the bipartite graph constructed from having vertices according to Definition 7.2. Let be an ordering of the vertices in and be an ordering of the vertices of . Note that each has a copy in where is a permutation on . By Lemma 7.3, let us assume is a min-ordering for .
Let be the input graph with vertex set and let be a given cost function. Construct from with vertex set as in Definition 7.2. Now construct an instance of the MinHOM() for the input graph and set for , .
Lemma 7.4**.**
There exists a homomorphism with cost if and only if there exists homomorphism with cost such that, if then with .
We first perform the arc-consistency and pair-consistency procedures for the vertices in . Note that if contains the element then contains and when contains some then contains . Next, we define the system of linear equations with the same construction as in Sections 3, 4. Equivalently, one can use the LP formulation in [31]. However, for the sake of completeness we present the entire LP in this section.
Consider the following linear program. For every vertex from and every vertex from define a variable . For every vertex from and every vertex from define a variable . We also define the variables for every whose value is set to zero. Now the goal is to solve the following linear program :
[TABLE]
Here is the first index , such that is an edge of , and is the first index such that is an edge of .
Let denote the set of all the pairs such that is not an edge of , but there is an edge of with and an edge of with . Let and define to be the digraph with vertex set and edge set . Note that and are disjoint sets. For every edge and every edge , by Observation 4.3, three of the following set of inequalities will be added to (i.e. either 7, 7 or 7, 7 or 7, 7).
[TABLE]
Lemma 7.5**.**
If is a bi-arc graph, then there is a one-to-one correspondence between homomorphisms from to and integer solutions of .
Proof.
For a homomorphism , if we set for all , otherwise, we set , we also set for all and where . We set , and for all . Now all the variables are non-negative and we have and . Note that constraint 7 is satisfied by this assignment. We first show that for every edge Suppose for contradiction that and and let and . This implies that , whence ; and , whence . Since both and are edges of with and , the fact that has a min-ordering implies that must also be an edge of , contradicting the definition of . The proof for is analogous. Therefore, constraints 7 and 7 are satisfied. It is also easy to see that (similar to the case for digraphs) that constraints 7, 7, 7, and 7 also satisfied by this assignment.
Conversely, suppose there is an integer solution for . First we define a homomorphism as follows : let where is the largest subscript with , and when is the largest subscript with . We prove that this is indeed a homomorphism by showing that every edge of is mapped to an edge of . Let be an edge of and assume , We show that is an edge in . Observe that, by 7 and 7, and , therefore we must have . Since and are the largest subscripts such that then and . Since and are edges of , we must have the edge in because admits a min-ordering. Furthermore, if and only if and , so, contributes to the sum if and only if and contributes to the sum if and only if .
Now let when . We show that if is an edge of then is an edge of . Since is a homomorphism from to , Suppose . This implies and . Now by constraint 7, we have , and , and hence, we have . Now by definition of , is an edge of because is an edge of . Furthermore, if and only if and , so, contributes to the sum if and only if . ∎
Once again we round an optimal fractional solution of , using a random variable . Let be a mapping from to obtained by rounding. We give an algorithm that modifies so that is a homomorphism (i.e. an integral solution that satisfies ).
Theorem 7.6**.**
There exists a randomized algorithm that modifies and obtain a homomorphism from to . Moreover, the expected cost of the homomorphism returned by this algorithm is at most .
Proof.
For every variable , , set if else . Similarly for every , , set if else . The algorithm has two stages after rounding the fractional solution using the random variable .
Stage 1. Fixing the edges of that have been mapped to non-edges of : Suppose for some edge of , , , , . By Observation 4.3, either has no in-neighbor after or has no out-neighbor after . Suppose the former is the case. We also note that because of the constrains 7, 7, is one of the edges that should be added into in order to obtain a min-max-ordering for . Suppose, for edge of , where ; i.e. . We may assume that is the last such non-edge in ( is maximum) when we look at the min-ordering of .
Choose a random variable , which will guide us to shift the image of from to some where , and appears before in the min-ordering of . Consider the set of such s ( by definition of the min-ordering of , this set is non-empty), and suppose it consists of with subscripts ordered as . Let with . Select the vertex if . Thus, a concrete is selected with probability , which is proportional to the difference of the fractional values . Observe that there is no need to shift the image of some vertex which is an in-neighbor of from its current value to some other vertex (because of shifting the image of ).
Now we note that the probability of shifting the image of some from to is at most . Note that as long as such edges exists, we repeat the shifting procedure. At the end of this stage we have obtained a homomorphism from to .
Stage 2. Making the assignment consistent with respect to both orderings: We say a vertex of is unstable if , where . Now we start a BFS in and continue as long as there exists an unstable vertex in . At each step, we start from the greatest subscripts for which there exists an unstable with . During the BFS, one of the following is performed:
shift the image of from to . 2. 2.
shift the image of from to .
As a consequence of the above actions we would have the following cases:
Case 1: We change the image of from to (with ), and there exists some such that with and .
We note that is an edge because is an edge, and hence, is an edge of . This would mean there is no need to shift the image of from to something else (see the Figure 3(a)).
Case 2: We change the image of from to (with ), and there exists some edge of with and with .
Such vertex is added into the queue, and once we retrieve from the queue we do the following: moving the image of from to (see the Figure 3(b)).
Note that because is an edge of , and hence is an edge of .
Case 3: We change the image of from to some (with ) and there exists some such that and . We note that because is an edge, and hence, is an edge of . This would mean there is no need to shift the image of to something else.
Case 4: We change the image of from to some (with ). Let be a greatest subscript such that there exists some where and with , . Such vertex is added into the queue, and once we retrieve from the queue we do the following: moving the image of from to .
Note that because is also an edge of . Hence, is an edge of .
When Case 2 occurs, we continue the shifting. This would mean we may need to shift the image of some -neighbor of accordingly. We continue the BFS from , and modify the images of neighbors of , say , to be consistent with new image of . This means we encounter either Case 3 or Case 4. Suppose or Then there is no need to change the image of . Otherwise, we change the image of from to where is an edge of and we need to consider Cases 3,4 for the current vertex . When we are in Case 4, then consider Cases 1,2 and proceed accordingly.
Note that during the BFS, if we encounter a vertex (or ) that has been visited before, then we would be at Case 1 or 3 and hence, no further action is needed for in-neighbors (out-neighbors) of . We also note that at each step an unstable vertex is associated to some where is decreasing. Therefore, this procedure would eventually stop, and we will no longer have unstable vertices in .
Estimating the ratio
Vertex (, resp.) is mapped to (, resp.) in three situations. The first scenario is where is mapped to by rounding (according to random variable in Stage 1) and is not shifted away. In other words, we have and (i.e. ) and these values do not change by the shifting procedure. Hence, for this case we have:
[TABLE]
Whence this situation occurs with probability at most , and the expected contribution is at most .
The second scenario is where is set to according to the random variable in Stage 1.
In this case is first mapped to , by rounding according to variable and then re-mapped to during the shifting according to variable . We first compute the expected contribution for a fixed , that is the contribution of shifting from a fixed to .
This happens if there exist and such that is an edge of mapped to , and then the image of is shifted to ( in the min-ordering), where . In other words, we have and after rounding; and then is shifted from to . Therefore,
[TABLE]
The last inequality is because has no out-neighbor after and it follows from inequality 7. Having mapped to in the rounding step, we shift to with probability . Note that the upper bound is independent from the choice of and . Therefore, for a fixed , the probability that is shifted from to is at most . There are at most of such ’s, (causing the shift to ) and hence, the expected contribution of to the objective function is at most .
The third scenario is when the image of is shifted from some to in the second Stage of the shifting . More precisely, when one of the actions 1,2 occurs.
This happens because the image of has been shifted from to in Stage 2 according to variables or (i.e. BFS). As we argued, in the previous scenarios, the overall expected value of shifting from to is . Since , the overall expected value of shifting to is . In conclusion, the expected contribution of to the objective function is . ∎
We remark that, as in the proof of Theorem 5.5, the above algorithm can be de-randomized. By Lemma 7.3 and Theorem 7.6 we obtain the following classification theorem.
Theorem 7.7**.**
If admits a conservative majority polymorphism, then MinHOM(H) has a (deterministic) -approximation algorithm, otherwise, MinHOM(H) is inapproximable unless P=NP.
8 Experiments
8.1 Finding a solution using GNU GLPK
GLPK extends for GNU Linear Programming Kit, and it is an open source software package, written in C. It is intended for solving large-scale linear programming problems(LP). GLPK is a well-designed algorithm to solve LP problems, at a reasonable time. It implements different algorithms, such as the simplex method and the Interior-point method for non-integer problems and branch-and-bound together with Gomory’s mixed integer cuts for integer problems. With GLPK we can add each constraint of our problem as a new row of a matrix. Before calculating the minimum cost, we have to set the type of solution we are looking for, integral only or if we allow a continuous solution.
8.2 Experimental Results
For our experiments, we have used graphs from four different classes namely, digraphs with a majority polymorphism, balanced digraphs with a min-ordering, bipartite digraphs with a min-ordering, and DAT-free digraphs. For each class, we have used a variety of target digraphs and sizes, ranging from to . For a particular digraph in each class, we use a variety of input digraphs , created randomly, with size from to . The cost of mapping an edge from digraph to an edge in digraph is randomly assigned, with values ranging from to . For each instance of MinHOM() with input digraph , we run our program twice, once for finding optimal fractional solution, and once for an integral solution. To calculate the ratio, for a single digraph of size , we run our algorithm for each digraph of size , times. We then get the ratio by calculating the average of fractional solution and integral solution, for every instance of different sizes of . The target digraphs that we have examined are given next to the charts. All of the experiments indicate a very small integrality gap.
9 Conclusion
In this paper we study the approximation of MinHOM problem. We present several positive results proving that for digraphs which admit a min-ordering or a -min-ordering MinHOM() admits a constant factor approximation algorithm. Moreover, we obtain a complete classification of graphs for which MinHOM is approximable within a constant factor.
We complement our theoretical results with an empirical study of the performance of our algorithm. We have implemented and run our algorithm on several examples of bipartite graphs and digraphs with min-ordering as well as on digraphs without min-ordering. The weights have been randomly chosen from a much larger range than the number of vertices of input digraph . The implementation of our algorithms provides a much better approximation ratio than our theoretical bounds. It leaves open to investigate a classification of digraphs , where MinHOM() admits a constant factor approximation algorithm that is independent of .
Acknowledgement: We are thankful to Andrei Bulatov for proofreading several drafts of the work and many valuable discussions that significantly improved the paper and its presentation.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] S. Arora, L. Babai, J. Stern, and Z. Sweedyk. The hardness of approximate optima in lattices, codes, and systems of linear equations. Journal of Computer and System Sciences , 54(2):317–331, 1997.
- 2[2] P. Austrin. Towards sharp inapproximability for any 2-csp. SIAM Journal on Computing , 39(6):2430–2463, 2010.
- 3[3] G. Bagan, A. Durand, E. Filiot, and O. Gauwin. Efficient enumeration for conjunctive queries over x-underbar structures. In International Workshop on Computer Science Logic , pages 80–94. Springer, 2010.
- 4[4] A. Bar-Noy, M. Bellare, M. M. Halldórsson, H. Shachnai, and T. Tamir. On chromatic sums and distributed resource allocation. Information and Computation , 140(2):183–202, 1998.
- 5[5] L. Barto. The dichotomy for conservative constraint satisfaction problems revisited. In Logic in Computer Science (LICS), 2011 26th Annual IEEE Symposium on , pages 301–310. IEEE, 2011.
- 6[6] L. Barto, A. Krokhin, and R. Willard. Polymorphisms, and how to use them. In Dagstuhl Follow-Ups , volume 7. Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik, 2017.
- 7[7] R. C. Brewster, T. Feder, P. Hell, J. Huang, and G. Mac Gillivray. Near-unanimity functions and varieties of reflexive graphs. SIAM Journal on Discrete Mathematics , 22(3):938–960, 2008.
- 8[8] A. A. Bulatov. Tractable conservative constraint satisfaction problems. In Logic in Computer Science (LICS) , 2003. Proceedings. 18th Annual IEEE Symposium on , pages 321–330. IEEE, 2003.
