Minimum 0-Extension Problems on Directed Metrics
Abstract
For a metric on a finite set , the minimum 0-extension problem 0-Ext is defined as follows: Given and , minimize subject to , where the sum is taken over all unordered pairs in . This problem generalizes several classical combinatorial optimization problems such as the minimum cut problem or the multiterminal cut problem. Karzanov and Hirai established a complete classification of metrics for which 0-Ext is polynomial time solvable or NP-hard. This result can also be viewed as a sharpening of the general dichotomy theorem for finite-valued CSPs (Thapper and Živný 2016) specialized to 0-Ext.
In this paper, we consider a directed version -Ext of the minimum 0-extension problem, where and are not assumed to be symmetric. We extend the NP-hardness condition of 0-Ext to -Ext: If cannot be represented as the shortest path metric of an orientable modular graph with an orbit-invariant “directed” edge-length, then -Ext is NP-hard. We also show a partial converse: If is a directed metric of a modular lattice with an orbit-invariant directed edge-length, then -Ext is tractable. We further provide a new NP-hardness condition characteristic of -Ext, and establish a dichotomy for the case where is a directed metric of a star.
1 Introduction
A metric on a finite set is a function that satisfies and for every , and for every . For a rational-valued metric on , the minimum 0-extension problem 0-Ext on is defined as follows:
(1.1) |
where denotes the set of all unordered pairs of , and denotes the unordered pair consisting of . The minimum 0-extension problem was introduced by Karzanov [13], and also known as the multifacility location problem in facility location theory [17]. Note that the formulation (1) of 0-Ext is different from but equivalent to that of [13].
The minimum 0-extension problem generalizes several classical combinatorial optimization problems: If , then 0-Ext is nothing but the minimum - cut problem in an undirected network. If and , then 0-Ext is the -terminal cut problem. Similarly, 0-Ext can formulate the -terminal cut problem. Moreover, 0-Ext appears as a discretized LP-dual problem for a class of maximum multiflow problems [12, 13] (also see [8, 9]).
The computational complexity of 0-Ext depends on metric . In the above examples, the minimum - cut problem is in P and the -terminal cut problem is NP-hard. In [13], Karzanov addressed the classification problem of the computational complexity of 0-Ext with respect to . After [5, 15], the complexity dichotomy of 0-Ext was fully established by Karzanov [14] and Hirai [10], which we explain below.
A metric on is called modular if for every , there exists an element , called a median, such that holds for every . The underlying graph of is defined as the undirected graph , where . We say that an undirected graph is orientable if it has an edge-orientation such that for every 4-cycle , the edge is oriented from to if and only if the edge is oriented from to .
The dichotomy theorem of the minimum 0-extension problem is the following:
Theorem 1.1 ([14]).
Let be a rational-valued metric. 0-Ext is strongly NP-hard111A problem is called strongly NP-hard if is still NP-hard when all numbers of the instance are bounded by some polynomial in the length of the instance. if
-
(i)
is not modular, or
-
(ii)
is not orientable.
Theorem 1.2 ([10]).
Let be a rational-valued metric. If is modular and is orientable, then 0-Ext is solvable in polynomial time.
The minimum 0-extension problem constitutes a fundamental class of valued CSPs (valued constraint satisfaction problem) [10] — a minimization problem of a sum of functions having a constant number of variables. More concretely, 0-Ext is precisely the finite-valued CSP generated by a single binary function that is a metric. Thapper and Živný [19] established a P-or-NP-hard dichotomy theorem for finite-valued CSPs in terms of a certain fractional polymorphism, and moreover, gave a polynomial time algorithm for the meta problem of deciding whether a given template (meaning in the case of 0-Ext) defines tractable valued CSPs. Their framework is so general and powerful as to be applicable to 0-Ext, which also provides the complexity dichotomy property of 0-Ext and a polynomial time checking of a tractable metric for 0-Ext. On the other hand, it does not unravel which combinatorial or geometric properties of metric are connected to the tractability of 0-Ext. Although the proof of Theorem 1.2 also utilized a related polymorphism condition obtained by Kolmogorov, Thapper, and Živný [16], it required a deep study on modular metric spaces to verify this condition. In addition to geometric insights, such an explicit tractability characterization as in Theorems 1.1 and 1.2 brings an efficient combinatorial algorithm checking the 0-Ext-tractability of metric , i.e., the meta problem for 0-Ext. Indeed, we can verify modularity of by checking whether is a median of triple for every . We can also verify the orientability of by orienting each edge in depth first order with respect to an adjacency relation such that edges and in each 4-cycle are said to be adjacent. It is an -time algorithm. On the other hand, a polynomial time algorithm obtained by the framework of [19] requires repeated uses of the ellipsoid method. So it is a natural direction to seek such an efficient combinatorial characterization for a more general binary function for which the corresponding valued CSP is tractable.
Motivated by these facts, in this paper, we consider a directed version of the minimum 0-extension problem, aiming to extend the above results. Here, by “directed” we mean that symmetry of and is not assumed. A directed metric on a finite set is a function that satisfies and for every , and for every . For a rational-valued directed metric on , the directed minimum 0-extension problem -Ext on is defined as follows:
The minimum - cut problem on a directed network is a typical example of -Ext in the case of and . Also, the directed minimum 0-extension problem contains the undirected version. Hence, the complexity classification of the directed version is an extension of that of the undirected version.
In this paper, we explore sufficient conditions for which -Ext is tractable, and for which -Ext is NP-hard. Our first contribution is an extension of Theorem 1.1 to the directed version:
Theorem 1.3.
Let be a rational-valued directed metric. -Ext is strongly NP-hard if one of the following holds:
-
(i)
is not modular.
-
(ii)
is not orientable.
-
(iii)
is not directed orbit-invariant.
The modularity and the underlying graph of a directed metric are natural extensions of those of a metric. In 0-Ext, the condition (i) in Theorem 1.1 contains the condition (iii) in Theorem 1.3. See Section 3 for the precise definitions of the terminologies.
We next consider the converse of Theorem 1.3. It is known [1] that a canonical example of a modular metric is the graph metric of the covering graph of a modular lattice with respect to an orbit-invariant edge-length. Moreover, a tractable metric in Theorem 1.2 is obtained by gluing such metrics of modular lattices [10]. It turns out in Section 3 that a directed metric excluded by (i), (ii), and (iii) in Theorem 1.3 also admits an amalgamated structure of modular lattices. Our second contribution is the tractability for the building block of such a directed metric.
Theorem 1.4.
Let be a rational-valued directed metric. Suppose that is the covering graph of a modular lattice and is directed orbit-invariant. Then -Ext is solvable in polynomial time.
The converse of Theorem 1.3 is not true: Even if is a tree (that is excluded by (i), (ii), and (iii) in Theorem 1.3), -Ext can be NP-hard. On the other hand, 0-Ext for which is a tree is always tractable (see [17]). This is a notable difference between 0-Ext and -Ext. Our third contribution is a new hardness condition capturing this difference. For , let , which is called the interval from to . We denote if is clear in the context. For , the ratio from to is defined by (if , then ). A pair is called a biased pair if holds for every , or holds for every . A triple is called a non-collinear triple if holds for every (the indices of are taken modulo 3). A non-collinear triple is also called a biased non-collinear triple if is a biased pair for every . We now state an additional NP-hardness condition of -Ext:
Theorem 1.5.
Let be a rational-valued directed metric on . If there exists a biased non-collinear triple for , then -Ext is strongly NP-hard.
Figure 1 (a) is an example of a directed metric satisfying the condition in Theorem 1.5, as described below. Suppose that is the directed metric such that the underlying graph of is the undirected graph described in Figure 1 (a). Then, we have for every . Since and , is a biased pair. Similarly, and are biased pairs. Hence, is a biased non-collinear triple.
Our fourth contribution says that the non-existence of a biased non-collinear triple implies tractability, provided the underlying graph is a star.
Theorem 1.6.
Let be a rational-valued directed metric on . If is a star and there exists no biased non-collinear triple for , then -Ext is solvable in polynomial time.
Figure 1 (b) is an example of a directed metric satisfying the condition in Theorem 1.6, as and are not biased pairs in the directed metric of Figure 1 (b) (the directed metric of Figure 1 (b) is defined in the same way as that of Figure 1 (a)). The directed metric of Figure 1 (c) also satisfies the condition in Theorem 1.6.
The organization of this paper is as follows. Section 2 provides preliminary arguments which are necessary for the proofs. Section 3 introduces some notions and shows several properties in directed metric spaces. Section 4 proves the tractability results of -Ext. To show Theorem 1.4 and 1.6, we utilize the tractability condition of valued CSPs by Kolmogorov, Thapper, and Živný [16], as was utilized in [10] to prove Theorem 1.2. Section 5 shows the hardness results of -Ext. We prove Theorem 1.3 and 1.5 by use of the MC condition in [6], which is similar to the hardness proof of the multiterminal cut problem [7], and the proof of Theorem 1.1 in [13, 14].
A preliminary version [11] of this paper has appeared in Proceedings of the 45th International Symposium on Mathematical Foundations of Computer Science (MFCS 2020).
Notation.
Let , and denote the sets of reals, rationals, integers, and positive integers, respectively. We also denote the sets of nonnegative reals and rationals by and .
2 Preliminaries
2.1 Valued CSP
Let be a finite set. For a positive integer , a function is called a -ary cost function on . Let denote the arity of . The valued constraint satisfaction problem (VCSP) on is defined as follows [21]:
In an instance of VCSP, cost functions are extensionally represented; we are given all possible values of all cost functions. Hence, the size of an instance is exponential in the arity of each cost function.
A set of cost functions on is called a constraint language on . Unless specifically said otherwise, we assume that all constraint languages are finite. Let be a constraint language on . The instance of VCSP is called a -instance if all cost functions in the instance belong to . Let VCSP denote the class of the optimization problems whose instances are restricted to -instances.
Let be a directed metric on . The directed minimum 0-extension problem -Ext is viewed as a subclass of VCSP. Indeed, let
and let
(2.1) |
Then we can conclude that -Ext is exactly VCSP on .
Kolmogorov, Thapper, and Živný [16] discovered a criterion for a constraint language such that VCSP is tractable. To describe this, we need some definitions. A function is called an -ary operation on . We denote by the set of -ary operations on . A vector is called a fractional operation of arity on if
(2.2) |
is satisfied. We denote the support of by
(2.3) |
Let be a constraint language on . A fractional operation is called a fractional polymorphism of if for every cost function and vectors ,
(2.4) |
where indicates
(2.8) |
We now state a powerful theorem on the relation between fractional polymorphisms and tractability of VCSP by Kolmogorov, Thapper, and Živný [16]:
Theorem 2.1 ([16]).
Let be a constraint language. If admits a fractional polymorphism with a semilattice operation in its support, then VCSP can be solved in polynomial time.
Here a semilattice operation on is a binary operation which satisfies , and for every .
Remark 2.2.
Thapper and Živný [18] showed that the tractability of finite-valued CSP VCSP is completely characterized by the existence of a certain fractional polymorphism for . The existence of this fractional polymorphism reduces to the feasibility of a linear program over the space of binary fractional polymorphisms. Via a version of Farkas’ lemma, the infeasibility of the LP leads to instances that can solve maximum cut problems. They showed that by using the ellipsoid method (i.e., the machinery of separation-optimization equivalence), the feasibility of this LP can be checked in polynomial time provided the constraint language is a ‘core’. Here a constraint language is called a ‘core’ if every unary fractional polymorphism of consists of injective operations in its support.
Our constraint language defined in (2.1) is a ‘core’. Indeed, contains and , and hence every operation in a unary fractional polymorphism must be an identity map (since implies ).
Cohen et al. [6] discovered a sufficient condition for a constraint language such that VCSP is NP-hard. We describe this condition with some definitions. For a constraint language , let denote the set of all functions such that for some instance of VCSP with objective function , we have
(2.9) |
For a constraint language on , we define the following condition (MC):
(MC) There exist distinct such that contains a binary cost function satisfying .
Cohen et al. [6] revealed the relation between the condition (MC) and NP-hardness of VCSP (also see [19]).
Proposition 2.3 ([6, Proposition 5.1]; see [19, Lemma 2]).
If a constraint language on satisfies the condition (MC), then VCSP is strongly NP-hard.
Let be a constraint language on satisfying (MC). In [6], only the NP-hardness of VCSP was shown, whereas the “strongly” NP-hardness was not explicitly shown. However, the strongly NP-hardness easily follows from the proofs of Proposition 5.1 and Theorem 3.4 in [6].
Remark 2.4.
Let be a constraint language satisfying (MC). The proof of NP-hardness of VCSP in [6] was based on the reduction from the maximum cut problem (MAX CUT). This reduction is an extension of the hardness proofs of the multiterminal cut problem [7] and 0-Ext [13, 14] (Theorem 1.1). We prove NP-hardness of -Ext with the aid of NP-hardness of VCSP in Section 5. Thapper and Živný [19] also showed the complete characterization of constraint languages for which finite-valued CSPs are NP-hard, see [19] for details.
2.2 Modular graphs
Let be a connected undirected graph. The graph metric is defined as follows:
(2.10) |
We denote simply by if is clear in the context. We say that is modular if its graph metric is modular (remember that a metric on is called modular if for every , there exists a median , which satisfies for every ). We show examples of a modular graph and a nonmodular graph in Figure 2.
Lemma 2.5 ([2]).
A connected undirected graph is modular if and only if the following two conditions hold:
-
(i)
is a bipartite graph.
-
(ii)
For every pair of vertices and neighbors of with , there exists a common neighbor of with .
By Lemma 2.5, we can easily check (non)modularity of the graphs in Figure 2. The graph in Figure 2 (b) satisfies . However, there exists no common neighbor of with , which implies that this graph is not modular. On the other hand, the graph in Figure 2 (a) has common neighbor of with . By similar arguments, we can easily verify that the graph in Figure 2 (a) satisfies the condition (ii) of Lemma 2.5. It is also easy to verify that this graph satisfies the condition (i) of Lemma 2.5. Hence, the graph in Figure 2 (a) is modular.
Let be a metric space. For , we denote the interval of by . We denote if is clear in the context. A subset is called a convex set if for every . A subset is called a gated set if for every , there exists , called the gate of at , such that for every . The gate of at is unique. Chepoi [4] showed the following relation between convex sets and gated sets:
Lemma 2.6 ([4]).
Let be a modular graph. For the metric space and a subset , the following conditions are equivalent:
-
(i)
is convex.
-
(ii)
is gated.
2.3 Modular lattices
Let be a partially ordered finite set with a partial order . By we mean and . For , we denote by the minimum element of the set and , and denote by the maximum element of the set and . If for every there exist and , then is called a lattice. A lattice is called modular if for every with it holds that . For , we let denote the interval . For , a sequence is called a chain from to if holds for all . Here the length of a chain is . We denote by the length of the longest chain from to . For a lattice , let 0 denote the minimum element of , and let 1 denote the maximum element of . The rank of an element is defined by .
Lemma 2.7 (see [3, Chapter II]).
Let be a modular lattice. For , the following condition (called Jordan–Dedekind chain condition) holds:
(2.11) |
By Lemma 2.7, we can see that for a modular lattice and , is equal to the length of a maximal chain from 0 to . A modular lattice is also characterized by rank as follows:
Lemma 2.8 (see [3, Chapter II]).
A lattice is modular if and only if for every , holds.
For a poset and , we say that covers if holds and there is no with . The covering graph of is the undirected graph obtained by linking all pairs of such that covers , or covers . Here we have the following relation between modular lattices and modular graphs:
Lemma 2.9 ([20]).
A lattice is modular if and only if the covering graph of is modular.
Let be a lattice. A function is called submodular if holds for every . If are covered by , then the pair is called a 2-covered pair. We have the following characterization of submodular functions on modular lattices:
Lemma 2.10.
Let be a modular lattice. A function is submodular if and only if holds for every 2-covered pair .
Proof.
The only if part is obvious. We prove the if part. Take and maximal chains and . First we show that covers . Note that covers . Since is modular, we have and. Hence, we can conclude that covers by Lemma 2.4. Similarly, covers . Also, by modularity we have and . Then we conclude that is a 2-covered pair. Let . Then we have . Thus, we conclude that is submodular. ∎
3 Directed metric spaces
3.1 Modular directed metrics
We first extend the notions of modularity, medians, and underlying graphs to directed metric spaces. Let be a directed metric on . We say that is modular if and only if for every , there exists an element , called a median, such that for every . See Figure 3 (a) for an example of modular directed metrics. We define the underlying graph of as the undirected graph , where
(3.1) |
For a directed metric on and , we say that a sequence is -shortest if . Bandelt [1] showed that for a modular (undirected) metric , a -shortest sequence is also -shortest. We have the following directed version of this property:
Lemma 3.1.
Let be a modular directed metric on , and let .
-
(1)
If a sequence is -shortest, then the inverted sequence is also -shortest.
-
(2)
If a sequence is -shortest, then this sequence is also -shortest.
Proof.
In this proof, we denote . We first show (1) by induction on . Suppose that is -shortest. If then is -shortest and (1) holds. Suppose that . Since is modular, there exists a median of . There exists no element , since otherwise a sequence is -shortest, which is impossible by . Hence, we have . Then a sequence is -shortest. Therefore, it suffices to show that a sequence is -shortest, which is implied by induction. Hence, we can conclude that is -shortest.
Next we show (2). We denote for simplicity. Suppose that is -shortest. Without loss of generality, we may assume that for any . If , then is obviously -shortest. Suppose that . If , then has the edge . However, this contradicts and the definition of because of (1). Hence, it suffices to consider the case when . In the case of with and , the underlying graph has the edges and . Then the edge is not contained in , and hence is -shortest. In the case of with , there exists an element . Then the case of is reduced to the case of . Similarly, the case of with is reduced to the case of .
Thus, it suffices to consider the case of . We show by induction on that is -shortest. Let be a shortest path in from to (). Since is modular, there exists a median of . Then we have . We may assume that is -shortest by induction hypothesis. Then is also -shortest. Since is -shortest, is also -shortest. Suppose that . In this case, is -shortest by induction hypothesis. This implies that is -shortest, because is -shortest. We may also assume that is -shortest by induction hypothesis. Hence, we conclude that is -shortest.
Consider the case when . In this case, is -shortest. Then we have . We next apply the similar argument to , which we apply to above. Since is modular, there exists a median of . Then we may assume that is -shortest by induction hypothesis. Hence, is also -shortest. Since is -shortest, is also -shortest. Suppose that . In this case, is -shortest by induction hypothesis, which implies that is -shortest. We may also assume that is -shortest by induction hypothesis. Hence, we conclude that is -shortest. Thus, it suffices to consider the case when . In this case, since is -shortest, we have . Thus, we have (recall that ). This is a contradiction. ∎
For a modular directed metric on , let be a median of in . Then, by Lemma 3.1 is also a median of in . Hence, we have the following lemma:
Lemma 3.2.
If a directed metric is modular, then is also modular.
3.2 Directed orbits and directed orbit invariance
Let be an undirected graph. Let , and . An element of is called an oriented edge of . For a path from to in , we orient each edge of along the direction of , and we denote by the corresponding path in . Let and be paths in such that the end point of and the start point of are identified. Then we denote by the path obtained by concatenating and in this order. In particular, if consists of one oriented edge , then we simply denote and . For , we say that and are projective if there exists a sequence such that is a 4-cycle in for each . An equivalence class of the projectivity relation is called a directed orbit. Then we have the following lemma about the number of oriented edges of each directed orbit included in a shortest path. This is a sharpening of the result for undirected graphs due to Bandelt [1], and is similarly shown by the proof of the undirected version.
Lemma 3.3 ([1]).
Let be a modular graph, and let be a directed orbit. For , let be a path from to , and let be a shortest path from to . Then we have
(3.2) |
Let be an undirected graph. If a function satisfies for every belonging to the same directed orbit, then we say that is directed orbit-invariant. Let be a directed metric on with the underlying graph . We say that is directed orbit-invariant if holds for every belonging to the same directed orbit in . A 4-cycle in is called a directed orbit-varying modular cycle if . The cycle in Figure 3 (b) is an example of a directed orbit-varying modular cycle.
Bandelt [1] showed that a metric is orbit-invariant if is modular. A directed metric is not necessarily directed orbit-invariant even if is modular. For example, if is a directed orbit-varying modular cycle, then is modular but not directed orbit-invariant. The name “directed orbit-varying modular cycle” is motivated by this fact. We now have the following sufficient condition of a directed metric to be directed orbit-invariant.
Lemma 3.4.
Let be a modular directed metric. Suppose that has no directed orbit-varying modular cycle. Then, is directed orbit-invariant.
Proof.
It suffices to show that for any 4-cycle in . Suppose to the contrary that a 4-cycle in satisfies . Let . Since is modular, the triple has a median . The underlying graph has edges and , which implies . Hence, the sequence is -shortest. Similarly, is -shortest. Then we have . Hence, we have . Similarly, sequences and are -shortest, then we have . Hence, we have . Similarly, sequences and are -shortest, then we have . Hence, we have . Therefore, we have , then we conclude that the cycle is a directed orbit-varying modular cycle. This is a contradiction. ∎
We now consider a sufficient condition for the converse of Lemma 3.1 (2) to hold. For an undirected metric , Bandelt [1] showed that if is orbit-invariant and is modular, then a -shortest sequence is also -shortest. The similar property also holds for a directed metric as follows:
Lemma 3.5.
Let be a directed metric on , and let . If is directed orbit-invariant and is modular, then the following condition holds:
(3.3) |
Proof.
Without loss of generality, we may assume that is a shortest path from to in . Also, by the definition of we see that there is a path in with . Hence, by Lemma 3.3 and directed orbit-invariance of , we have
(3.4) |
Thus, we have . ∎
As we obtain Lemma 3.2 from Lemma 3.1, we also obtain the following property from Lemma 3.5 by applying a similar argument:
Lemma 3.6.
Let be a directed metric. If is directed orbit-invariant and is modular, then is also modular.
4 Proof of tractability
In this section, we give proofs of Theorem 1.4 and Theorem 1.6. Let be a directed metric on , and be the constraint language defined in (2.1). Then, as we see in Section 2.1, -Ext is exactly VCSP. Hence, by Theorem 2.1 we can prove the tractability of -Ext by constructing a fractional polymorphism with a semilattice operation in its support. In the proof of Theorem 1.4, we construct a fractional polymorphism that characterizes submodularity of . To show submodularity, we imitate the proof of submodularity of metric functions on modular semilattices in the undirected version [10]. In the proof of Theorem 1.6, we also construct fractional polymorphisms that are similar to the fractional polymorphisms characterizing submodularity.
4.1 Proof of Theorem 1.4
Note that the underlying graph of is the covering graph of a modular lattice with a partial order . We define a partial order on by and . Then is also a modular lattice. If is a submodular function on , then by Theorem 2.1 we can conclude that -Ext is solvable in polynomial time. Hence, the following property completes the proof:
Theorem 4.1.
Let be a directed metric. Suppose that is the covering graph of a modular lattice and is directed orbit-invariant. Then the function is submodular.
Proof.
Note that is a modular lattice. By Lemma 2.10, is a submodular function on if and only if holds for every 2-covered pair . Thus, it suffices to show that holds for any 2-covered pair . Let . Then, it suffices to consider the following two cases:
-
(i)
, and covers .
-
(ii)
covers , and covers .
We first consider the case (i). It suffices to show that . Let . Then, for every , it holds that covers and covers , because of Lemma 2.7 and Lemma 2.8. Hence, is a convex set in the metric space (in this proof, we denote for simplicity). Since is modular, by Lemma 2.9 is modular. Then, by Lemma 2.6 is a gated set. Hence, there exists such that holds for every . Therefore, by Lemma 3.5, is -shortest for every . If , then we have
(4.1) |
Furthermore, since is directed orbit-invariant, we have . In addition, by Lemma 3.5 we have . Hence, we have . Therefore, we obtain . Similarly, if , we obtain . If , then we have
(4.2) |
Since is directed orbit-invariant, we have . Hence, by (4.1) we obtain . Similarly, if , then we obtain . Thus, it suffices to consider the case when . In this case, we have
(4.3) |
Hence, we have .
For the next, we consider the case (ii). The submodularity is . Since is bipartite, is equal to either or or . If is equal to or , then by Lemma 3.5 we have . Thus, it suffices to consider the case when . In this case, is equal to either or . Suppose that . Then, by Lemma 3.5 we have . Hence, we obtain . Consider the case when . Similarly, is equal to either or , and by the similar argument, we may assume that . Let be a shortest path in from to . Let be the vertex in that is adjacent to . Then, we have . Hence, by Lemma 2.5, there exists a common neighbor of with . Then, we have and . Furthermore, since covers , we see that covers . Hence, we can apply the same argument to which we apply to above. By repeating this argument, we can see that covers , but this is a contradiction. ∎
4.2 Proof of Theorem 1.6
To prove the tractability, we construct fractional polymorphisms which satisfy the property of Theorem 2.1. Let denote the internal node of a star . A subset is called unbiased if holds for every . Note that if is unbiased and , then holds for any , since holds for . We divide into the minimum number of disjoint unbiased sets, and denote by the family of them. From the assumption that there exists no biased non-collinear triple, the family consists of at most two sets. Hence, it suffices to consider the following three cases:
-
(i)
, and .
-
(ii)
, and .
-
(iii)
.
We first consider the case (i). It suffices to consider the case when , since fractional polymorphisms for this case work for the other cases. Let and . Let be a partial order on defined by (see Figure 4 (a)). For , we extend to by adding relation . Then each pair of two elements in a partially ordered set has a unique meet, denoted by ().
For , similar to , we also extend to by adding relation . Then each pair of two elements in has a unique join, denoted by (). Since and are unbiased, the lengths of the edges in can be written as
(4.4) |
Since are semilattice operations, by Theorem 2.1 it suffices to show that for any ,
(4.5) |
Let and . If a pair has both meet and join in for all , then (4.5) reduces to Theorem 1.4. Suppose that a pair has no meet or has no join for some in . Without loss of generality, we may assume that and . If (), then we have
(4.6) |
Thus, (4.5) holds. Suppose that and for . Then we have and for . Hence, we have
(4.7) |
Thus, it suffices to consider the case when or . We first consider the case when . If , then (4.5) holds trivially, since the both sides of (4.5) are 0. If , then we have
(4.8) |
where we use and . Thus, (4.5) holds. We next consider the case when . If , then (4.5) holds trivially, since the right hand side of (4.5) is 0. If , then we have
(4.9) |
Thus, (4.5) holds. This completes the proof of the case (i).
We next consider the case (ii). Let and (). Let be a partial order on defined by (see Figure 4 (b)). Similar to the case (i), for , we extend to by adding relation . Then each pair of two elements in has a unique meet, denoted by (). Let . Let be the set of all functions that satisfy for any . Then, for , let be a binary operation on defined by for , and for , where is a unique join in . By , it holds that for any . Since is unbiased, the lengths of the edges in can be written as
(4.10) |
Since is a semilattice operation, by Theorem 2.1 it suffices to show that for any ,
(4.11) |
Note that . Let and . If , then (4.11) reduces to the case (i). Consider the case when . Without loss of generality, we may assume that . If (), then we have
(4.12) |
(The second inequality is strict when .) If , then we have
(4.13) |
If , then we have
(4.14) |
If , then we have
(4.15) |
This completes the proof of the case (ii).
5 Proof of hardness
In this section, we give proofs of Theorem 1.3 and Theorem 1.5. We prove them with the aid of Proposition 2.3; for a directed metric satisfying the condition in Theorem 1.3 or Theorem 1.5, and the corresponding constraint language defined in (2.1), we show that satisfies the condition (MC). To prove this, we construct a “gadget” which is a counterexample to submodularity of the objective function of -Ext (in a certain sense). This type of hardness proof using a gadget and the condition (MC) originates from the hardness proof of the multiterminal cut problem [7]. Karzanov [13, 14] also adopted the similar approach to show the hardness results of 0-Ext (Theorem 1.1). We apply this type of hardness proof to the directed version -Ext. We first describe the sufficient condition for defined in (2.1) to satisfy the (MC) condition in Section 5.1. For the next, we prove NP-hardness of -Ext by using this sufficient condition in Section 5.2.
5.1 Approach
Let be a rational-valued directed metric on . Suppose that we are given and as an instance of -Ext. For and , we denote by the optimal value of -Ext subject to . We simply denote if is clear in the context. Let be the optimal value of -Ext. Similar to the constructions in [7, 13, 14], we desire a pair (called gadget) satisfying the following properties (in other words, “violates submodularity,” cf. [7]) for specified elements and .
(5.1) | ||||
Let be a constraint language defined in (2.1). We show that the existence of a gadget satisfying (5.1) implies NP-hardness of VCSP. Suppose that there exists a gadget satisfying (5.1) for and . Then, we define a function as follows:
(5.2) |
We have and . Hence, satisfies the condition (MC), which implies that VCSP is strongly NP-hard by Proposition 2.3.
5.2 Proofs
In this section, we show Theorem 1.3 and Theorem 1.5 by constructing gadgets satisfying (5.1). We can state Theorem 1.3 in the following equivalent form:
Theorem 5.1.
Let be a rational-valued directed metric. -Ext is strongly NP-hard if one of the following conditions holds:
-
(i)
is not modular.
-
(ii)
is modular and not directed orbit-invariant.
-
(iii)
is modular and directed orbit-invariant, and is not orientable.
5.2.1 Proof of Theorem 5.1 for the case (i)
Lemma 5.2.
Let be a rational-valued directed metric on . If there exists a pair which satisfies the following properties for a non-collinear triple in and distinct elements , then -Ext is strongly NP-hard.
(5.3) |
where the indices of are taken modulo 3.
Proof.
Let be a pair which satisfies (5.2) with respect to a non-collinear triple in and distinct elements . We show NP-hardness of -Ext by constructing a gadget based on which satisfies (5.1). Let and for (the indices of are taken modulo 3). Then we define a function as follows (see Figure 5):
(5.4) |
Here the indices of are taken modulo 6, and the indices of are taken modulo 3. Also we define for all other pairs (undefined values of other functions below are also 0). Let be a sufficiently large positive rational (for example, ). We define a function by . Let . We now show that the pair satisfies (5.1) with respect to . For , the value is so large that a map with is not optimal or nearly optimal, since satisfies (5.2) and is sufficiently large. We call such a map infeasible. Therefore, it suffices to consider the case when for every . Let . Without loss of generality, we may assume that . In the case of and , we have
(5.5) |
where is the optimal value of -Ext with respect to . Similarly, in the case of and , we have
(5.6) |
On the other hand, in the case of , we have
(5.7) |
Also, in the case of , we have
(5.8) |
Let denote the value of the objective function of -Ext with a map , where the input is . We simply denote if is clear in the context. To finish the proof, we show that if a map is distinct from the assignments in (5.2.1) and (5.6). Let be the contribution to the value from . The value is represented by a sum of . Let be the contribution to the value from and for each . We have the following four cases:
-
(i)
,
-
(ii)
,
-
(iii)
,
-
(iv)
.
We have in the cases of (i), (ii), (iii), (iv), respectively. We call a pair slanting if and satisfy (iii) or (iv). If is not slanting for any with respect to , then corresponds to the assignment in (5.2.1) or (5.6). If is slanting for some , then is also slanting for another . Hence, contains in its representation. Also, focusing on the pairs and , we can see that includes in its representation when , and includes when . Similarly, we can see that or includes for each . This completes the proof. ∎
We now show Theorem 5.1 for the case (i) by use of Lemma 5.2. The proof we describe below is a directed version of that of Theorem 1.1 (i) in [14]. Let be a nonmodular rational-valued directed metric on . For , we denote . Let be a medianless triple such that is minimum. Let . Take six elements , and let . Let and for , where the indices of and are taken modulo 3. Then we define a function as follows:
(5.9) |
where the indices of are taken modulo 6. Also we define a function as follows:
(5.10) |
Let be a sufficiently large positive rational. We define a function by . We now show that the pair satisfies (5.2). We first observe that is not the optimal or nearly optimal value if for some . Consider the case when holds for each . We show the following claim:
Claim 1.
Let . Then at least one of the following conditions holds:
-
(i)
Both of sequences and are -shortest.
-
(ii)
Both of sequences and are -shortest.
Proof.
For each , let be the contribution to the value from , , , , , . If , then we have . Similarly, we have when or . We next consider the case when . Let and . By Claim 1, we may assume that holds. Hence, we have
(5.12) |
Note that we have
(5.13) |
Hence, we have . Similarly, for each , we have if . Hence, the gadget satisfies (5.2).
5.2.2 Proof of Theorem 5.1 for the case (ii)
Since is modular and not directed orbit-invariant, contains a directed orbit-varying modular cycle by Lemma 3.4. Let be a directed orbit-varying modular cycle in . Take eight elements , and let . Without loss of generality, we may assume that . We define a function as follows (also see Figure 6):
(5.14) |
Let and . We next define a function as follows:
(5.15) |
Then we define a function as follows:
(5.16) |
Also we define a function as follows:
(5.17) |
Finally, we define a function as follows:
(5.18) |
Let be a sufficiently large positive rational. In addition, let be a sufficiently large positive rational with respect to for . We define a function by . We now show that the pair satisfies (5.1) with respect to . Focusing on the contribution from , we see that is infeasible if for some . Similarly, is infeasible if holds for some , or holds, or holds. Hence, it suffices to consider the case when and hold for each , or the case when and hold. In addition, is infeasible if . Note that is modular by Lemma 3.2, which implies that edges and are not contained in due to the condition of Lemma 2.5 (i). If and , then by Lemma 3.1 (2), has edges for . However, this contradicts the condition of Lemma 2.5 (i). Therefore, it suffices to consider the case when . We next focus on the contribution from . Let be the contribution to the value from , , , . If , then we have
(5.19) |
If , then we have
(5.20) |
If , then we have
(5.21) |
If , then we have
(5.22) |
Hence, we see that the value in the case of is smaller than that in the case of . Therefore, it suffices to consider the case when . Similar to , let be the contribution to the value from , , , . If , then we have
(5.23) |
If , then we have
(5.24) |
If , then we have
(5.25) |
If , then we have
(5.26) |
Hence, we see that the value in the case of is smaller than that in the case of . Therefore, it suffices to consider the case when . Recall that we consider the case when and . Focus on the contribution from . Then we see that the value is not optimal or nearly optimal if and , or if and . Hence, it suffices to consider the case when and hold, or the case when and hold. We next focus on the contribution from . Then we see that a map is infeasible if and hold. Similarly, we see that a map is infeasible if and hold. Hence, we only consider the case when and hold, or the case when and hold. Applying the similar argument to , , and , we see that it suffices to consider the case when and hold, or the case when and hold. We finally focus on the contribution from . Let be the contribution to from . Consider the case when , , . Then we have for any . Similarly, if , , , then we have for any . On the other hand, if , , , , then takes the minimum value when and . Similarly, if , , , , then takes the minimum value when and . Thus, the pair satisfies the condition (5.1).
5.2.3 Proof of Theorem 5.1 for the case (iii)
We extend the proof of Theorem 1.1 for the case (ii) in [14] to that of Theorem 5.1 for the case (iii). Since the underlying graph is not orientable, there exists a sequence ( is an oriented edge of for each ) such that contains a 4-cycle for each , and . Then we have , and , for , since is directed orbit-invariant. Take elements , and let . We now define a function as follows:
(5.27) |
where the indices of and are taken modulo . We also define a function as follows (see Figure 7):
(5.28) |
where the indices of are taken modulo .
Let be a sufficiently large positive rational. We define a function by . Then we show that the pair satisfies (5.1) with respect to . Let , and the indices of are taken modulo below. We first observe that is infeasible if for some , due to the contribution from . Thus, it suffices to consider the case when for every . Let be the contribution to from , and be the contribution from and for each . If or , then we have . Otherwise, we have . Consider the case when and . In this case, if holds for , then we have for each , and . Similarly, in the case of and , we have if for . Consider the case when . In this case, there exist two or more integers for any such that holds, and exactly two integers for some . Hence, the minimum value of is . In the case of , we also see that the minimum value of is by the similar argument.
5.2.4 Proof of Theorem 1.5
Let be a biased non-collinear triple in . For , since is a biased pair, holds for every , or holds for every , where the indices of are taken modulo 3. Take six elements , and let . We define a function as follows:
(5.29) |
We next define a function as follows. For each ,
-
•
if holds for every , then
(5.30) -
•
if holds for every , then
(5.31)
Let be a sufficiently large positive rational. We define a function by . We now show that the pair satisfies the condition (5.2) with respect to . Focusing on the contribution from , we see that a map is infeasible if holds for some . Thus, it suffices to consider the case when holds for each . We next focus on the contribution from . Consider the case when holds for every . Let be the contribution to from and . If , then we have . If , then we have
(5.32) |
Consider the case when holds for every . Let be the contribution to from and . Similar to the above case, we have if , and we have if . Thus, satisfies the condition (5.2). This completes the proof.
Acknowledgments
We thank the referees for helpful comments. The first author was supported by JSPS KAKENHI Grant Numbers JP17K00029 and JST PRESTO Grant Number JPMJPR192A, Japan.
References
- [1] Hans-Jürgen Bandelt. Networks with condorcet solutions. European Journal of Operational Research, 20(3):314–326, 1985.
- [2] Hans-Jürgen Bandelt, Marcel van de Vel, and Eric R. Verheul. Modular interval spaces. Mathematische Nachrichten, 163:177–201, 1993.
- [3] Garrett Birkhoff. Lattice Theory. American Mathematical Society, third edition, 1967.
- [4] Victor Chepoi. Classification of graphs by metric triangles. Metody Diskretnogo Analyza, 49:75–93, 1989.
- [5] Victor Chepoi. A multifacility location problem on median spaces. Discrete Applied Mathematics, 64(1):1–29, 1996.
- [6] David A. Cohen, Martin C. Cooper, Peter G. Jeavons, and Andrei A. Krokhin. The complexity of soft constraint satisfaction. Artificial Intelligence, 170:983–1016, 2006.
- [7] Elias Dahlhaus, David S. Johnson, Christos H. Papadimitriou, Paul D. Seymour, and Mihalis Yannakakis. The complexity of multiterminal cuts. SIAM Journal on Computing, 23(4):864–894, 1994.
- [8] Hiroshi Hirai. Tight spans of distances and the dual fractionality of undirected multiflow problems. Journal of Combinatorial Theory, Series B, 99(6):843–868, 2009.
- [9] Hiroshi Hirai. Folder complexes and multiflow combinatorial dualities. SIAM Journal on Discrete Mathematics, 25(3):1119–1143, 2011.
- [10] Hiroshi Hirai. Discrete convexity and polynomial solvability in minimum 0-extension problems. Mathematical Programming, 155(1-2):1–55, 2016.
- [11] Hiroshi Hirai and Ryuhei Mizutani. Minimum 0-extension problems on directed metrics. In 45th International Symposium on Mathematical Foundations of Computer Science, MFCS 2020, volume 170 of LIPIcs, pages 46:1–46:13. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2020.
- [12] Alexander V. Karzanov. Metrics with finite sets of primitive extensions. Annals of Combinatorics, 2:213–243, 1998.
- [13] Alexander V. Karzanov. Minimum 0-extensions of graph metrics. European Journal of Combinatrics, 19(1):71–101, 1998.
- [14] Alexander V. Karzanov. Hard cases of the multifacility location problem. Discrete Applied Mathematics, 143(1-3):368–373, 2004.
- [15] Alexander V. Karzanov. One more well-solved case of the multifacility location problem. Discrete Optimization, 1:51–66, 2004.
- [16] Vladimir Kolmogorov, Johan Thapper, and Stanislav Živný. The power of linear programming for general-valued csps. SIAM Journal on Computing, 44(1):1–36, 2015.
- [17] Barbaros C. Tansel, Richard L. Francis, and Timothy J. Lowe. Location on networks: A survey. part i, ii. Management Science, 29(4):482–511, 1983.
- [18] Johan Thapper and Stanislav Živný. The power of linear programming for valued csps. In 53rd Annual IEEE Symposium on Foundations of Computer Science, FOCS 2012, pages 669–678. IEEE Computer Society, 2012.
- [19] Johan Thapper and Stanislav Živný. The complexity of finite-valued csps. Journal of the ACM, 63(4):37:1–37:33, 2016.
- [20] M.L.J. van de Vel. Theory of Convex Structures. North Holland, 1993.
- [21] Stanislav Živný. The Complexity of Valued Constraint Satisfaction Problems. Springer, 2012.