The combined basic LP and affine IP relaxation for promise VCSPs on infinite domains

Convex relaxations have been instrumental in solvability of constraint satisfaction problems (CSPs), as well as in the three different generalisations of CSPs: valued CSPs, infinite-domain CSPs, and most recently promise CSPs. In this work, we extend an existing tractability result to the three generalisations of CSPs combined: We give a sufficient condition for the combined basic linear programming and affine integer programming relaxation for exact solvability of promise valued CSPs over infinite-domains. This extends a result of Brakensiek and Guruswami [SODA'20] for promise (non-valued) CSPs (on finite domains).


Introduction
Constraint satisfaction Constraint satisfaction problems (CSPs) are a wide class of computational decision problems. An instance of a CSP is defined by finitely many relations (constraints) that must hold among finitely many given variables; the computational task is to decide whether it is possible to find an assignment of labels from a fixed set (the domain) to the variables so that all the constraints are satisfied. Many problems in computer science (e.g., from artificial intelligence, scheduling, computational linguistic, computational biology and verification) can be modelled as CSPs by choosing an appropriate set of constraints. However, there are many other problems in which some of the constraints may be violated at a cost or in which there are satisfying assignments which are preferable to others. These situations are captured by valued constraint satisfaction problems.
Valued constraint satisfaction An instance of a valued constraint satisfaction problem (VCSP) is defined by finitely many cost functions (valued constraints) depending on finitely many given variables and a (rational) threshold; the computational task is to decide whether it is possible to find an assignment of labels from the domain to the variables so that the value of the sum of the cost functions is at most the given threshold. In VCSP instances, cost functions can take on rational or infinite values. VCSPs not only capture optimisation problems but are also a generalisation of CSPs: the non-feasibility of an assignment is modelled by allowing the cost functions to evaluate to +∞. A CSP can thus be seen as a VCSP in which the cost functions take values in {0, +∞}.
Finite domains In the case in which the domain (i.e., the fixed set of possible labels for the variables) is a finite set the computational complexity of both CSPs and VCSPs have been completely classified. Moreover, in both frameworks a dichotomy theorem holds: every CSP and VCSP is either in P or is NP-complete, depending on some algebraic condition of the underlying set of allowed relations and cost functions, respectively. A dichotomy theorem for CSPs was conjectured by Feder and Vardi [30]. The attempt to prove the conjecture motivated the introduction of the so-called universal algebraic approach [22] for CSPs, which was later extended to VCSPs in [27] and [43], where an analogue of the complexity dichotomy was conjectured for VCSPs. The dichotomy conjectures for finite-domain CSPs and VCSPs inspired an intensive line of research. A complexity classification of finite-domain VCSPs for sets of cost functions taking finite (rational-only) values was established in [52]. A complexity classification of VCSPs was consequently established in [39], assuming a dichotomy for CSPs, which was proved independently in [21] and [58].
Infinite domains Although most research on CSPs and VCSPs in the past two decades focused on finite-domain problems, the literature is full of problems (studied independently of CSPs and VCSPs) that can be modelled as CSPs or VCSPs only if infinite domains are allowed. For instance, solvability of linear Diophantine equations [26,37] and the modelchecking problem for Kozen's modal µ-calculus [42] are examples of problems that can be modelled as infinite-domain CSPs. Linear Programming, Linear Least Square Regression [16], and Minimum Correlation Clustering [4] are examples of problems that can be modelled as infinite-domain VCSPs. The classes of infinite-domain CSPs and infinite-domain VCSPs are huge! In fact, every computational problem over a finite alphabet is polynomial-time Turingequivalent to an infinite-domain CSP [8]. Therefore, only by focussing on special classes of infinite-domain CSPs (and VCSPs) is it possible to obtain general complexity results. There is a rich literature on the computational complexity of special classes of infinite-domain CSPs, e.g., [11,10,15,36,9,13,14,7].
Promise constraint satisfaction Both infinite-domains CSPs and VCSPs are extensions of the original (finite-domain) CSPs. Promise constraint satisfaction problems (PCSPs) are a third, recently introduced extension of CSPs [17,23,5,31]. Informally, in a PCSP the goal is to find an approximately good solution to a problem under the assumption (the promise) that the problem has a solution. The difference between CSPs and PCSPs is that in a PCSP instance each constraint comes with two relations (not necessarily on the same domain), a "strict" and a "weak" relation. The computational task is then to distinguish between being able to satisfy all the strict constraints versus not being able to satisfy all the weak constraints. A CSP can be seen as a PCSP in which the strict and weak constraints coincide. Perhaps the most well-known example of a PCSP is the approximate graph colouring problem, in which the task is to distinguish k-colourable graphs from graphs that are not c-colourable, for some c > k. (For c = k, we get the standard k-colouring problem.) Kazda recently introduced the framework of promise VCSPs on finite domains [38], where he generalised some of the algebraic reductions from (finite-domain) promise CSPs to (finite-domain) promise VCSPs. As far as we are aware, the only other related work on (finite-domain) promise VCSPs is [3].
Convex relaxations One of the most effective ways to design a polynomial-time algorithm for solving combinatorial and optimisation problems is to employ convex relaxations. The idea of convex relaxations is to transform the original problem to an integer program which is then relaxed to a polynomial-time solvable convex program [16], e.g. a linear program. In the context of CSPs, convex relaxations have been studied for robust solvability [44,29,6,28]. Convex relaxations have been also successfully applied to the study of the three extensions of CSPs. For VCSPs, characterisations of the applicability of the basic linear programming relaxation [40], constant levels of the Sherali-Adams linear programming hierarchy [53], and a polynomial-size semidefinite programming relaxation [54] have been provided for exact solvability. In the PCSP framework, the polynomial-time tractability via a specific convex relaxation has been characterised for the basic linear programming relaxation [23], affine integer programming relaxation [23], and their combination [18,19,20]. For infinite-domain VCSPs, a sufficient condition has been identified for the solvability via a combination of the basic linear programming relaxation and an efficient sampling algorithm (that is, polynomial-time many-one reduction to a finite-domain VCSP) [12,56].

Contributions
We initiate the study of convex relaxations for the three generalisations of CSPs combined; that is, convex relaxations for promise valued constraint satisfaction problems on infinitedomains. We focus on the combined basic linear programming (BLP) and affine integer programming (AIP) relaxation introduced by Brakensiek and Guruswami [19]. This relaxation is stronger than both the BLP and AIP relaxations individually in the sense that if a class of promise VCSPs is solved by, say, the BLP relaxation then it is also solved by the combined relaxation (and the same holds true for the AIP relaxation). The power of the combined relaxation for (finite-domain) promise CSPs was established in [20]. Rather surprisingly, the combined relaxation gives an algorithm that solves all tractable (non-promise) CSPs on Boolean domains, identified in Schaefer's work [50], thus giving a unified algorithm.
By extending the argument from [19], we establish a sufficient algebraic condition on the combined relaxation for the solvability of promise VCSPs in which the domain of the "weak cost functions" is possibly infinite (Theorem 8). The proof of this result draws on ideas introduced in [19] but requires a non-trivial amount of technical machinery to make it work in the infinite-domain valued setting. While our relaxation is inspired by [19], it is appropriately modified to work in the optimisation setting (of valued (P)CSPs). We remark that the condition we give is known to be necessary already in special cases of our setting, namely for finite-domain non-valued PCSPs [20]. As an application of our main result, we derive an algebraic condition under which an infinite-domain promise VCSP admitting an efficient sampling algorithm can be solved in polynomial time using the combined relaxation (Theorem 16). We emphasise that our main results (Theorems 8 and 16) are appreciatively general, and in particular hold for various special cases of our framework; e.g., for finitedomain promise VCSPs and infinite-domain promise CSPs.
Approximability of Max-CSPs PCSPs are approximability problems in which we require that all constraints should be satisfied, although only in a weaker sense. Another very natural and well-studied form of relaxation is to try to maximise the number of satisfied constraints. Convex relaxations have played a crucial role in this research direction on approximability of (finite-domain) Max-CSPs, going back to the work of Goemans and Williamson [33], e.g., [48,55,46,25,24,41,32].

Preliminaries
Throughout the paper, we denote by x i the i-th component of a tuple x. We denote by N, Z, Q, and Q ≥0 the set of whole numbers, integer numbers, rational numbers, and nonnegative rational numbers, respectively. For every m ∈ N , we denote by [m] the set {1, . . . , m} ⊂ N. Finally, for every k ∈ Q we use the ⌈k⌉ and ⌊k⌋ to denote the minimum natural number that is at least k and the maximum natural number that is at most k, respectively.

Valued Constraint Satisfaction Problems
A valued structure Γ (over D) consists of a signature τ consisting of function symbols f , each equipped with an arity ar(f ); a set D = dom(Γ) (the domain); and, for each f ∈ τ , a cost function, i.e., a function f Γ : D ar(f ) → Q ∪ {+∞}. Here, +∞ is an extra element with the expected properties that for all c ∈ Q ∪ {+∞}, we have (+∞) + c = c + (+∞) = +∞ and c < +∞ for every c ∈ Q. Given a valued structure Γ with signature τ , for every f ∈ τ we define dom(f ) : Let Γ be a valued structure with domain D and signature τ . The valued constraint satisfaction problem for Γ, denoted by VCSP(Γ), is the following computational problem.
An instance of VCSP(Γ) is a triple I := (V, φ, u) where V is a finite set of variables; φ is an expression of the form . . , f m ∈ τ and all the v i j are variables from V (each summand is called a τ -term); and u is a value from Q. The task is to decide whether there exists an assignment s : V → D, whose cost, defined as is finite, and if so, whether there is one whose cost is at most u. We remark that, given a valued structure Γ over a finite signature, the representation of the structure Γ is inessential for computational complexity as Γ is not part of the input.

Fractional Homomorphisms and Fractional Polymorphisms
Let X be a set. A discrete probability measure on X is a map µ : P(X) → [0, 1] such that µ(X) = 1 and µ satisfies the countable additivity property; i.e., for every countable collection {X n } n∈N of pairwise disjoint subsets X n ⊆ X, it holds that µ n∈N X n = n∈N µ(X n ).
Given a probability measure µ on a countable set X, we define its support as the set Supp(µ) := {x ∈ X | µ({x}) > 0}. In the reminder, given a probability measure µ on a set X, we use the notation µ(x) := µ({x}). The following proposition is a well-known corollary of countable additivity (proved in Appendix A for completeness).
Proposition 1. Let µ be a discrete probability measure on a set X. Then Supp(µ) is a countable set. Furthermore, if X is countable then x∈Supp(µ) µ(x) = 1; that is, Supp(µ) is non-empty. Proposition 1 will guarantee that all supports in this paper are countable sets. Let µ be a discrete probability measure on a countable set X and let Y be a random variable with countably many possible outcomes y 1 , y 2 , . . . occurring with probabilities µ(x 1 ), µ(x 2 ), . . ., respectively. The expectation of Y associated with µ is E x∼µ [Y ] = n∈N µ(x n )y n .
Let C and D be two sets. A map g : D m → C is called an m-ary operation. For any m ∈ N, we denote by C D m the set of all maps g : D m → C.
Let Γ and ∆ be valued structures with the same signature τ with domains C and D, respectively. A fractional homomorphism [51] from ∆ to Γ is a discrete probability measure χ with a non-empty support on C D such that for every function symbol γ ∈ τ and tuple a ∈ D ar(γ) , it holds that where the functions h are applied component-wise. We write ∆ → f Γ to indicate the existence of a fractional homomorphism from ∆ to Γ. The following proposition, proved for completeness in Appendix A, is adapted from [51], where it was proved in the case of finite-domain valued structure, and appears in [12], where it was stated for valued structures with arbitrary domains and for fractional homomorphisms with finite supports. Proposition 2. Let Γ and ∆ be valued structures over the same signature τ with domains C and D, respectively. Assume ∆ → f Γ. Let V = {v 1 , . . . , v n } be a set of variables and φ a sum of finitely many τ -terms with variables from V . For every u ∈ Q, if there exists an assignment s : V → D such that φ ∆ (s(v 1 , . . . , s(v n )) ≤ u, then there exists an assignment s ′ : Let Γ be a valued structure with domain C and signature τ . An m-ary fractional polymorphism of Γ is a discrete probability measure on C C m with a non-empty support such that for every f ∈ τ and tuples a 1 , . . . , a m ∈ C ar(f ) it holds that

Promise VCSPs
Let Γ and ∆ be two valued structures over the same signature τ with domains C and D, respectively. We say that (∆, Γ) is a promise valued template if there exists a fractional homomorphism from ∆ to Γ. Given a promise valued template (∆, Γ), the promise valued constraint satisfaction problem [38] for (∆, Γ), denoted by PVCSP(∆, Γ), is the following computational problem.
. . , f m ∈ τ and all the v i j are variables from V ; and u is a value from Q.
The task is to output yes if there exists an assignment s : Note that every valued structure Γ is fractionally homomorphic to itself and thus VCSP(Γ) is the same as PVCSP(Γ, Γ).
Let (∆, Γ) be a promise valued template. We remark that if the common signature τ is finite then the representation of the template is inessential for the computational complexity of PVCSP(∆, Γ) as (∆, Γ) is not part of the input.
Let e such that for every f ∈ τ and tuples a 1 , . . . , a m ∈ D ar(f ) it holds that Remark 3. An m-ary fractional polymorphism ω of a valued structure Γ with domain C can be seen as an m-ary promise fractional polymorphism µ = (µ I , µ O ) of (Γ, Γ) such that µ O = ω and µ I (e (m)

Block-Symmetric Maps
Let S m be the symmetric group on {1, . . . , m}. An m-ary map g is fully symmetric if for every permutation π ∈ S m , we have g( ). An m-ary map g is block-symmetric if there exists a partition of the coordinates of g into blocks B 1 ∪ · · · ∪ B k = [m] such that g is permutation-invariant within each block B i . Let P sym (g) be the set of all partitions into symmetric blocks of g. For B 1 ∪ · · · ∪ B k ∈ P sym (m), we define w(g, B 1 ∪ · · · ∪ B k ) := min 1≤i≤k |B i | and we define the width of g to be Block-symmetric operation with width 1 are fully symmetric operations. The next example shows operations that are block-symmetric but not fully symmetric.
Example 4. We consider so-called "moving averages" (see, e.g., [35,49]). For k ∈ N, a k-ary 2-period weighted centred moving average is the operation wMA (k) : Q k → Q defined by It can be verified that a k-ary 2-period weighted centred moving average, where k = 2m+1, is a block-symmetric operation whose symmetric blocks are An m-ary fractional polymorphism ω of a valued structure Γ is block-symmetric if there exists a partition of the coordinates of g into blocks . + x k ) and the 2-period centred moving average (cf. Example 4). Let A valued structure with domain Q containing only (wMA, avg)-convex functions has, for every m ∈ N, a (2m + 1)-ary block-symmetric fractional polymorphism ω (2m+1) defined by ω (2m+1) (g) = 1 if g = wMA (2m+1) and 0 otherwise. △ Given a promise valued template (∆, Γ), an m-ary promise fractional polymorphism ω = is s permutation-invariant within each coordinate block B i , and . . , k}. The proof of the following lemma can be found in Appendix A.
In view of Lemma 6, we will assume without loss of generality that any m-ary blocksymmetric promise fractional polymorphism ω = (ω I , ω O ) is such that ω I assign 1 m to each m-ary projection on the domain of ∆ and we will identify ω with ω O .

The Basic Linear Programming Relaxation
Every VCSP over a finite domain has a natural linear programming relaxation. Let ∆ be a valued structure with finite domain D and signature τ . Let I be an instance of VCSP(∆) with for all j ∈ J (the set J is finite and indexing the cost functions that are summands of φ), and a threshold u ∈ Q. 3 Define the sets of variables as follows: Then the basic linear programming (BLP) relaxation associated to I (see [51], [40], and references therein) is a linear program with variables W and is defined in Figure 1.

Figure 1: BLP
We remark that a solution to the BLP also satisfies the constraints t∈D n j λ j (t) = 1 for all j ∈ J. If there is no feasible solution to the BLP then BLP(I, ∆) = +∞. For a finitedomain VCSP instance, the corresponding BLP relaxation can be computed in polynomial time.
We note that it is not difficult to lift the existing results characterising the power of BLP (in terms of fully symmetric operations) for CSPs [44], VCSPs [40], promise CSPs [23,5], and infinite-domain VCSPs [12,56] to our setting of promise VCSPs with infinite domains, cf. Theorem 20 in Appendix B. Our focus, however, is on the stronger combined relaxation presented in Section 3.

The Affine Integer Programming Relaxation
Let ∆ be a valued structure with finite domain D and signature τ . Let I be an instance of VCSP(∆) with set of variables V = {x 1 , . . . , x d }, and objective function φ(x 1 , . . . , . , x j n j ) ∈ V n j , for all j ∈ J (the set J is finite and indexing the cost functions that are summands of φ), and a threshold u ∈ Q. 4 Define the sets of variables as follows: R 1 := {q j (t) | j ∈ J and t ∈ D n j }, R 2 := {r x i (a) | x i ∈ V and a ∈ D}, and R := R 1 ∪ R 2 . Then the affine integer programming (AIP) relaxation associated to I [18,19] is an integer program with variables R and is defined in Figure 2.

Figure 2: AIP
We remark that a solution to the AIP also satisfies the constraints t∈D n j λ q (t) = 1 for all j ∈ J. If there is no feasible solution to the AIP then AIP(I, ∆) = +∞. For a finitedomain VCSP instance, the corresponding AIP relaxation can be computed in polynomial time. Since the feasibility version of AIP can be solved in polynomial time [37,18], (the optimisation version of) AIP can be solved in (oracle) polynomial time using an oracle for the feasibility version of the problem (see [34,Theorem 6.4.9]).

The Combined BLP and AIP Relaxation for PVCSPs
Let (∆, Γ) be a promise valued template such that the domain of ∆ is a finite set. We may solve PVCSP(∆, Γ) by using a combination of the BLP relaxation and the AIP relaxation of ∆, as proposed (for finite-domain promise non-valued) CSPs in [19], appropriately modified to the valued setting.
To describe such an algorithm, we need the following definition.
• If there exists a relative interior point of the rational feasibility polytope of BLP (I, ∆) with cost at most u, 5 then (λ ⋆ , µ ⋆ ) is such a point; • otherwise, (λ ⋆ , µ ⋆ ) is defined to be a point from the relative interior of the optimal polytope of BLP(I, ∆). 6 The refinement of AIP(I, ∆) with respect to (λ ⋆ , µ ⋆ ) is the integer program AIP ⋆ (I, ∆) obtained by adding to AIP(I, ∆) the constraints q j (t) = 0 for every j ∈ J, t ∈ D n j such that λ ⋆ j (t) = 0, r x i (a) = 0 for every x i ∈ V, a ∈ D such that µ ⋆ x i (a) = 0. 5 There is a polynomial-time algorithm [34,19] that decides the existence of a relative interior point in the rational feasibility polytope of BLP(I, ∆) with cost at most u and, in the case it exists, finds it. 6 Such a point can be found in polynomial time by applying the algorithm in [34,19] to the feasibility linear program defined by adding to the constraints defining the feasibility polytope of BLP(I, ∆) the additional constraint j∈J t∈D n j λj(t)f ∆ j (t) = u. Theorem 8. Let (∆, Γ) be a promise valued template such that ∆ has a finite domain. Assume that for all L ∈ N there exists a block-symmetric promise fractional polymorphism of (∆, Γ) with arity 2L + 1 having two symmetric blocks of size L + 1 and L, respectively. Then Algorithm 1 correctly solves PVCSP(∆, Γ) (in polynomial time).
Note that in Theorem 8 the domain of the valued structure Γ can be finite or (countably) infinite.

Remark 10.
Although we do not need it for our main result, we note that the converse of Lemma 9 holds true. More precisely, let (∆, Γ) be a promise valued template such that ∆ has a finite domain. Let L ∈ N and let B 1 ∪B 2 be a partition of [2L+1] such that |B 1 | = L+1 and  ({a} B 1 , {a} B 2 ). Then, it is easily verified that the discrete probability measure ω on C D m such that is the desired promise fractional polymorphism.
Proof of Theorem 8. Let C be the (possibly infinite) domain of Γ and let D be the finite domain of ∆. Let τ be the common signature of ∆ and Γ. Let I be an instance of PVCSP(∆, Γ) with variables V = {x 1 , . . . , x n }, objective function φ(x 1 , . . . , x n ) = j∈J γ j (x j ) where J is a finite set of indices, γ j ∈ Γ, and x j ∈ V ar(j) , and threshold u. Assume that min D φ ∆ ≤ u. Our goal is to show that Algorithm 1 outputs yes. Since min D φ ∆ ≤ u we have BLP(I, ∆) ≤ u and in particular we have that either BLP(I, ∆) < u, which by linearity implies the existence of a relative interior point in the feasibility polytope of BLP(I, ∆) with value at most u; or BLP(I, ∆) = u = min D φ ∆ . In the first case, each coordinate of (λ ⋆ , µ ⋆ ) is positive if and only if the same coordinate is positive at some point in the feasibility polytope of the BLP. Therefore, the feasibility lattice of AIP ⋆ (I, ∆) includes every possible assignment which is in the support of some feasible solution to BLP(I, ∆), including integral solutions and as a consequence AIP ⋆ (I, ∆) ≤ min D φ ∆ ≤ u. In the second case, each coordinate of (λ ⋆ , µ ⋆ ) is positive if and only if the same coordinate is positive at some point in the optimal polytope of the BLP. Therefore, the feasibility lattice of AIP ⋆ (I, ∆) includes every possible assignment which is in the support of some optimal solution to BLP(I, ∆), including integral solutions and as a consequence AIP ⋆ (I, ∆) ≤ min D φ ∆ = u. Thus, in both cases, BLP(I, ∆) ≤ u and AIP ⋆ (I, ∆) ≤ u and hence Algorithm 1 indeed outputs yes, as required.
We claim that (∆) ≤ 2(M + 1)ℓ 2(M + 1)ℓ + 1 BLP ⋆ (I, ∆) + 1 2(M + 1)ℓ + 1 AIP ⋆ (I, ∆) (6) for all the partitions B 1 ∪ B 2 = [2L + 1] such that |B 1 | = L + 1 and |B 2 | = L. To prove the claim, let us define, for every i ∈ {1, . . . , n} and for every a ∈ D, the following nonnegative integers (To check that W x i ,B 1 (a) and W x i ,B 2 (a) are nonnegative it is enough to observe that if µ ⋆ x i (a) is 0 then, by Definition 7, r ⋆ x i (a) is also 0, otherwise µ ⋆ x i (a) is at least 1 ℓ , and the positivity of that contains W x i ,B 1 (a) many occurrences of a, for every a ∈ D, and β i is the multiset of D L that contains W x i ,B 2 (a) many occurrences of a, for every a ∈ D. Let f j be a k-ary function symbol appearing as a term of the objective function φ. Let us define, for every t ∈ D k , the following nonnegative integers Observe that We write now where ζ 1 , . . . , ζ (M +1)ℓ+1 are defined to be (M + 1)ℓ + 1 elements of D k such that P j,B 1 (t) many of them are equal to t, for every t ∈ D k ; and where ξ 1 , . . . , ξ (M +1)ℓ are defined to be (M + 1)ℓ elements of D k such that P j,B 2 (t) many of them are equal to t, for every t ∈ D k . We obtain where the last equality follows because, for every a ∈ D, the number of a's in ζ h is , and, for every a ∈ D, the number of a's in ξ h is This proves the claim. From Inequalities (5) and (6) it follows that for all partitions B 1 ∪ B 2 = [2L + 1] such that |B 1 | = L + 1 and |B 2 | = L it holds Moreover, since there exists a block-symmetric promise fractional polymorphisms of (∆, Γ) of arity 2L + 1 having two symmetric blocks B 1 and B 2 with respective size L + 1 and L, Lemma 9 implies the existence of a fractional homomorphism from B 2L+1 and this concludes the proof.
We conclude the section with a couple of remarks showing that the number of symmetric blocks and their size do not play a crucial role in the proofs of Theorem 8 and Lemma 9. The notion of bimultiset-structure can be straightforwardly generalised to the notion of kmultiset-structure with blocks of size b 1 , . . . , b k . Remark 11. The proof of Lemma 9 can be easily adapted to the case in which the promise template (∆, Γ) has a block-symmetric promise fractional polymorphism ω of arity L ∈ N with an arbitrary number k of symmetric blocks of size b 1 , . . . , b k (given that the blocks are the same for each map in Supp(ω)). In this case, the k-multiset structure B B 1 ,...,B k (∆) is fractionally homomorphic to Γ. The converse (corresponding to Remark 10) is also true.
Remark 12. Let (∆, Γ) be a promise valued template such that ∆ has a finite domain. Assume that (∆, Γ) has block-symmetric promise fractional polymorphisms with arbitrarily many blocks of arbitrarily large size. Then Algorithm 1 correctly solves PVCSP(∆, Γ). This statement can be proved by a slight modification of the proof of Theorem 8 employing a block-symmetric promise fractional polymorphism whose symmetric blocks B 1 , . . . , B k have each size at least M ℓ 2 and where the coefficients W x i ,B b (a) , and P j,B b (t) are defined as in the proof of [20,Theorem 4.1].
Finally, we point out that for finite-domain PCSPs, the condition of having a blocksymmetric promise polymorphism of arity 2L + 1 is equivalent to the one of having a blocksymmetric promise polymorphism of arity 2L + 1 with two symmetric blocks of arity L + 1 and L, for every L ∈ N [20].

The Combined Relaxation with Sampling for PVCSPs
We use the notion of a sampling algorithm for a valued structure from [12].

Example 14.
A valued structure Γ with domain Q and signature τ is called piecewise linear homogeneous (PLH) if, for every γ ∈ τ , the cost function γ Γ is first-order definable over the structure L = (Q; ≤, 1, {c·} c∈Q ) where • < is a relation symbol (i.e., a {0, ∞}-valued function symbol) of arity 2 and < L is the strict linear order of Q, • 1 is a constant symbol and 1 L := 1 ∈ Q, and • c· is a unary function symbol for every c ∈ Q such that (c·) L is the function x → cx, i.e., the multiplication by c.
If Γ is a PLH valued structure with a finite signature, then it admits an efficient sampling algorithm [12]. △ Let Γ be a valued structure with a finite signature that admits an efficient sampling algorithm. Observe that for every finite-domain valued structure ∆ d computed by such an efficient sampling algorithm, the pair (∆ d , Γ) is a promise valued template. The following lemma follows from the definition of a sampling algorithm for a valued structure.
Proof. It can be verified that (∆ d , Γ 2 ) is a valid promise valued template, for every d ∈ N; that is, the existence of a fractional homomorphism from ∆ d to Γ 1 and a fractional homomorphism from Γ 1 to Γ 2 implies the existence of a fractional homomorphism from ∆ d to Γ 2 , which is obtained by a composition of the two fractional homomorphisms in the same fashion as in the proof of Theorem 16.
Let I := (V, φ, u) be an instance of PVCSP(Γ 1 , Γ 2 ) and let d := |V |. Let C 1 , C 2 and D d be the domains of Γ 1 , Γ 2 and ∆ d , respectively. Assume that there is a polynomial-time algorithm solving PVCSP(∆ d , Γ 2 ). If the output of such an algorithm is no then clearly the answer to PVCSP(Γ 1 , Γ 2 ) is no. Otherwise, if the output of such an algorithm is yes, then by the definition of sampling algorithm the answer to PVCSP(Γ 1 , Γ 2 ) is yes.
Note that in Theorem 16 (and in Lemma 15) both the respective domains of the valued structures Γ 1 and Γ 2 have arbitrary (countable) cardinality, that is, each of Γ 1 and Γ 2 can have a finite or an infinite domain.
Proof. For every positive integer d let ∆ d be the finite-domain valued structure ∆ d computed by an efficient sampling algorithm for Γ 1 on input d. By Lemma 15, to prove that PVCSP(Γ 1 , Γ 2 ) is polynomial-time solvable it is enough to prove that PVCSP(∆ d , Γ 2 ) is polynomial-time solvable for every positive integer d. We claim that for every d, L ∈ N there exists a block-symmetric promise fractional polymorphism of (∆ d , Γ 2 ) with arity 2L + 1 having two symmetric blocks of size L + 1 and L, respectively. By Theorem 8, proving our claim will imply that PVCSP(∆ d , Γ 2 ) is polynomial-time solvable and therefore, by Lemma 15, that PVCSP(Γ 1 , Γ 2 ) is polynomial-time solvable.
We now prove the claim. Let C 1 , C 2 and D d be the domains of Γ 1 , Γ 2 and ∆ d , respectively, and let τ be the signature of Γ 1 and Γ 2 (by the definition of sampling algorithm it is also the signature of ∆ d ). By the definition of sampling algorithm, there exits a fractional homomorphism χ from ∆ d to Γ 1 and, by assumption, there exists a block-symmetric promise fractional polymorphism ω := (ω I , ω O ) of (Γ 1 , Γ 2 ) with two symmetric blocks B 1 and B 2 having size L + 1 and L, respectively. For every h ∈ Supp(χ) ⊆ C D d Observe that g • h is a block-symmetric map with symmetric block B 1 and B 2 , because so is g. We define the discrete probability measure µ O on C Let µ I be the discrete probability measure in J . We now show that µ := (µ I , µ O ) is a promise fractional polymorphism of (∆ d , Γ 1 ) with arity 2L + 1. By definition, µ is block-symmetric with two symmetric blocks of respective size L + 1 and L.
For every f ∈ τ and every a 1 , . . . , a 2L+1 ∈ D ar(f ) d it holds that where Inequality (7) holds because ω is a promise fractional polymorphism of (Γ 1 , Γ 2 ) and Inequality (8) holds because χ is a fractional homomorphism from ∆ d to Γ 1 . We obtained that µ is a promise fractional polymorphism of (∆ d , Γ 2 ) and this concludes the proof.
In the particular case in which Γ 1 = Γ 2 , from Theorem 16 we obtain the following result for infinite-domain (non-promise) VCSPs.
Corollary 17. Let Γ be a valued structure with a finite signature that admits an efficient sampling algorithm. Assume that Γ has a block-symmetric fractional polymorphism of arity 2L + 1 with two symmetric blocks of size L + 1 and L, respectively, for all L ∈ N. Then VCSP(Γ) is polynomial-time solvable.
Corollary 17 and the existence of an efficient sampling algorithm for PLH valued structures (see Example 14) imply the following tractability result for (wMA, avg)-convex PLH valued structures.
Corollary 18. Let wMA be the 2-period centred weighted moving average. Let Γ be a PLH valued structure with a finite signature such that every cost function from Γ is a (wMA, avg)convex cost function (see Example 5). Then VCSP(Γ) is polynomial-time solvable.
Proposition (Proposition 2 restated). Let Γ and ∆ be valued structures over the same signature τ with domains C and D, respectively. Assume ∆ → f Γ. Let V = {v 1 , . . . , v n } be a set of variables and φ a sum of finitely many τ -terms with variables from V . For every u ∈ Q, if there exists an assignment s : V → D such that φ ∆ (s(v 1 , . . . , s(v n )) ≤ u, then there exists an assignment s ′ : V → C such that φ Γ (s ′ (v 1 ), . . . , s ′ (v n )) ≤ u. In particular, it holds that Proof. Let φ(v 1 , . . . , v n ) := j∈J γ j (v j ), where γ j ∈ τ and v j ∈ V ar(γ j ) ; and let u ∈ Q. Let χ be a fractional homomorphism from ∆ to Γ and let s : V → D be an assignment with cost φ ∆ (s(v 1 ), . . . , s(v n )) ≤ u. Then, by the definition of fractional homomorphism, Therefore, there exists at least one map h : Lemma (Lemma 6 restated). Let (∆, Γ) be a promise valued template and let m ∈ N. If ω = (ω I , ω O ) is an m-ary block symmetric promise fractional polymorphism of (∆, Γ), then is an m-ary block-symmetric promise fractional polymorphism of (∆, Γ).
Proof. Let C and D be the domains of Γ and ∆, respectively, and let τ be the common signature of the two valued structures. By the definition of block-symmetric promise fractional polymorphism, there exists a partition B 1 ∪ · · · ∪ B k of [m] such that for every permutation π ∈ S m that preserves the blocks B 1 , . . . , B k , every f ∈ τ and every a 1 , . . . , a m ∈ D ar(f ) it holds that g∈Supp(ω O ) ω O (g)f Γ (g(a 1 , . . . , a m )) ≤ m i=1 ω I (e (m) i )f ∆ (a π(i) ).
By summing the last inequality over all π ∈ S m that preserve all the blocks B 1 , . . . , B k , i.e., over all π = π 1 · · · π k such that π j is a permutation of the elements in B j for 1 ≤ i ≤ k, we obtain Since, by the definition of block-symmetric promise fractional polymorphism, i∈B j ω I (e f ∆ (a ℓ ), that is, ω ′ is a promise fractional polymorphism of (∆, Γ).

B The BLP Relaxation
A fractional polymorphism of a valued structure Γ is fully symmetric if every operation in its support is a fully symmetric map. Given a promise valued template (∆, Γ), a promise fractional polymorphism ω = (ω I , ω O ) of (∆, Γ) is fully symmetric if every map in Supp(ω O ) is fully symmetric.
The following lemma is a corollary of Lemma 6. In view of Lemma 19, we will assume without loss of generality that any m-ary fully symmetric promise fractional polymorphism ω = (ω I , ω O ) is such that ω I assign 1 m to each m-ary projection on the domain of ∆ and we will identify ω with ω O .
Recall the BLP relaxation from Section 2.5. Let (∆, Γ) be a promise valued template such that the domain of ∆ is a finite set. We may solve PVCSP(∆, Γ) by using the following algorithm that computes a BLP relaxation of ∆. We now present a sufficient condition under which Algorithm 2 correctly solves PVCSP(∆, Γ).
Theorem 20. Let (∆, Γ) be a promise valued template such that ∆ has a finite domain.
Assume that for all m ∈ N there exists a fully symmetric promise fractional polymorphisms of (∆, Γ) with arity m. Then Algorithm 2 correctly solves PVCSP(∆, Γ) (in polynomial time).
To prove Theorem 20 we need to use a preliminary lemma and the notion of a multisetstructures.
Let ∆ be a valued τ -structure with domain D and let m ∈ N. The multiset-structure P m (∆) is the valued structure with domain D m i.e., the set whose elements α are multisets of elements from D of size m. For every k-ary function symbol f ∈ τ , and α 1 , . . . , α k ∈ D m the function f P m (∆) is defined as follows for every π 1 , . . . , π k ∈ S m . Equality (9) holds because the maps g ∈ Supp(ω) are fully symmetric and Inequality (10) holds because ω is a promise fractional polymorphism of (∆, Γ). Then, in particular, we obtain Then BLP(I, ∆) = j∈J t∈D ar(f j ) Since we assumed BLP(I, ∆) ≤ u, we obtain min D