Introduction
We study Boolean constraint satisfaction problems (CSPs). An instance consists of a finite set X X X of variables, each taking a value in { 0 , 1 } \{0,1\} { 0 , 1 } , and a finite collection C \mathcal{C} C of constraints. Let d d d be an upper bound on all constraint arities. A constraint C C C of arity r ≤ d r \le d r ≤ d is specified by a tuple ( x 1 , … , x r ) (x_1,\ldots,x_r) ( x 1 , … , x r ) of variables and a relation R C ⊆ { 0 , 1 } r R_C \subseteq\{0,1\}^r R C ⊆ { 0 , 1 } r . We call the positions 1 , … , r 1,\ldots,r 1 , … , r the coordinates of the relation and of the constraint. An assignment τ : X → { 0 , 1 } \tau:X\to\{0,1\} τ : X → { 0 , 1 } satisfies C C C if ( τ ( x 1 ) , … , τ ( x r ) ) ∈ R C (\tau(x_1),\ldots,\tau(x_r))\in R_C ( τ ( x 1 ) , … , τ ( x r )) ∈ R C . We write 0 r \mathbf{0}_r 0 r and 1 r \mathbf{1}_r 1 r for the all-zero and all-one tuples in { 0 , 1 } r \{0,1\}^r { 0 , 1 } r , omitting the subscript when the arity is clear. Throughout this paper, the variables x 1 , … , x r x_1,\ldots,x_r x 1 , … , x r of every constraint C C C are pairwise distinct. This assumption affects the classification; see Remark 2.3. We write sc ( C ) : = { x 1 , … , x r } \operatorname{sc}(C):=\{x_1,\ldots,x_r\} sc ( C ) := { x 1 , … , x r } for the set of variables of C C C and call it the underlying scope set of C C C ; thus ∣ sc ( C ) ∣ = r |\operatorname{sc}(C)|=r ∣ sc ( C ) ∣ = r . A Boolean constraint language Γ \Gamma Γ is a finite set of relations, and an instance is over Γ \Gamma Γ if R C ∈ Γ R_C\in\Gamma R C ∈ Γ for every C ∈ C C\in\mathcal{C} C ∈ C .
The input to Max k k k -Weight CSP is a CSP instance ( X , C ) (X,\mathcal{C}) ( X , C ) together with a nonnegative rational weight w ( C ) w(C) w ( C ) for every constraint C ∈ C C\in\mathcal{C} C ∈ C and a nonnegative integer budget k k k . The Hamming weight wt ( τ ) : = ∣ τ − 1 ( 1 ) ∣ \operatorname{wt}(\tau) := |\tau^{-1}(1)| wt ( τ ) := ∣ τ − 1 ( 1 ) ∣ of an assignment τ \tau τ is the number of variables it sets to 1. The goal is to find an assignment τ \tau τ with wt ( τ ) ≤ k \operatorname{wt}(\tau) \le k wt ( τ ) ≤ k that maximizes the total weight of the constraints it satisfies. The unweighted case has w ( C ) = 1 w(C) = 1 w ( C ) = 1 for every C ∈ C C \in\mathcal{C} C ∈ C . For a constraint language Γ \Gamma Γ , Max k k k -Weight CSP(Γ \Gamma Γ ) is the restriction to instances over Γ \Gamma Γ .
For an instance, let n : = ∣ X ∣ n := |X| n := ∣ X ∣ and m : = ∣ C ∣ m := |\mathcal{C}| m := ∣ C ∣ . All accuracy parameters are rational. Let ℓ i n \ell_{\mathrm{in}} ℓ in be the total number of bits used to encode the input, including the weights, budget, accuracy parameters when present, and any relation descriptions supplied as part of the input. All running times count bit operations.
An efficient parameterized approximation scheme (EPAS) for Max k k k -Weight CSP(Γ \Gamma Γ ), for a fixed Γ \Gamma Γ , parameterized by k k k , is an algorithm that, given an instance and ε ∈ ( 0 , 1 ) \varepsilon\in(0,1) ε ∈ ( 0 , 1 ) , returns an assignment τ \tau τ with wt ( τ ) ≤ k \operatorname{wt}(\tau) \le k wt ( τ ) ≤ k of value at least ( 1 − ε ) (1-\varepsilon) ( 1 − ε ) times the optimum, in time f ( k , ε ) ℓ i n O ( 1 ) f(k,\varepsilon)\ell_{\mathrm{in}}^{O(1)} f ( k , ε ) ℓ in O ( 1 ) for a computable function f f f . When d d d varies, an EPAS parameterized by k + d k+d k + d uses one algorithm running in time f ( k , d , ε ) ℓ i n O ( 1 ) f(k,d,\varepsilon)\ell_{\mathrm{in}}^{O(1)} f ( k , d , ε ) ℓ in O ( 1 ) .
Max k k k -Weight CSP contains Partial Vertex Cover [19 , 23 ] , Maximum Coverage [1 , 29 , 30 ] , cardinality-constrained Max-SAT [16 , 21 ] , and Max Cut with at most k k k vertices on one side [2 ] as special cases (§ 1.2 ). Earlier work also gives approximation schemes for several of these problems through common frameworks [14 , 15 , 16 , 18 ] . Can the parameterized approximability of these problems be determined uniformly by the permitted relations alone? More precisely, for every d ≥ 1 d \ge1 d ≥ 1 , for which Boolean constraint languages Γ \Gamma Γ of arity at most d d d does Max k k k -Weight CSP(Γ \Gamma Γ ) admit an EPAS? Theorem 1.1 gives a complete classification. It also shows that two languages can each admit an EPAS while their union admits none.
Our results
Fix d ≥ 1 d \ge1 d ≥ 1 and a finite Boolean constraint language Γ \Gamma Γ whose relations have arity at most d d d . Throughout, d d d denotes this global arity bound, while r r r denotes the arity of an individual relation. Only the nonempty relations that exclude the all-zero tuple affect the classification.
A relation R ⊆ { 0 , 1 } r R \subseteq\{0,1\}^{r} R ⊆ { 0 , 1 } r is zero-valid if 0 ∈ R \mathbf{0} \in R 0 ∈ R and zero-free otherwise. Let
Γ + : = { R ∈ Γ : R ≠ ∅ , 0 ∉ R } . \Gamma_{+} := \{R \in\Gamma: R \ne\varnothing,\ \mathbf{0} \notin R\}. Γ + := { R ∈ Γ : R = ∅ , 0 ∈ / R } .
Constraints with an empty relation are never satisfied and can be discarded. The all-zero assignment satisfies every constraint whose relation contains 0 \mathbf{0} 0 , although selecting variables may later falsify such constraints. The zero-valid lifting argument handles this possible loss. The dichotomy therefore depends only on Γ + \Gamma_{+} Γ + .
Fix R ∈ Γ + R \in\Gamma_{+} R ∈ Γ + , and let r ≤ d r \le d r ≤ d be its arity. Let e i e_i e i be the tuple whose only 1 is in coordinate i i i . Coordinate i i i is a unit witness if e i ∈ R e_i \in R e i ∈ R and a control otherwise. The classification is determined by two repair rules , that is, two ways of deleting 1s from a satisfying tuple.
R R R is Direct if, for every α ∈ R \alpha\in R α ∈ R and every control coordinate i i i with α i = 1 \alpha_i = 1 α i = 1 , setting α i \alpha_i α i to 0 while leaving all other coordinates unchanged produces another tuple in R R R .
R R R is Rooted if every α ∈ R \alpha\in R α ∈ R has a unit-witness coordinate u u u with α u = 1 \alpha_u = 1 α u = 1 for which the following operation preserves satisfaction. First keep u u u at 1, set every other unit-witness coordinate to 0, and leave all controls unchanged. From this modified tuple, set any subset of its 1-valued controls to 0. Every tuple obtained in this way must belong to R R R .
Both rules can also be described by what they exclude. A control coordinate c c c is helpful if some β ∉ R \beta\notin R β ∈ / R with β c = 0 \beta_c = 0 β c = 0 satisfies β + e c ∈ R \beta+ e_c \in R β + e c ∈ R . A pinned conjunction consists of disjoint sets A , T ⊆ [ r ] A,T \subseteq[r] A , T ⊆ [ r ] , where ∣ A ∣ ≥ 2 |A| \ge2 ∣ A ∣ ≥ 2 and T T T contains only controls: after fixing the coordinates in T T T to 1 and those outside A ∪ T A \cup T A ∪ T to 0, a tuple is accepted exactly when every coordinate in A A A is 1. The set T T T may be empty. Then R R R is Direct exactly when it has no helpful control, and Rooted exactly when it has no pinned conjunction (Lemma 7.3 ). Thus the hard case occurs when Γ + \Gamma_{+} Γ + contains both obstructions, possibly in different relations.
In the hardness part of the following theorem, an instance has multiplicity one if no two of its constraints have the same underlying scope set.
Theorem 1.1 (Fixed-arity dichotomy). Let d ≥ 1 d \ge1 d ≥ 1 , and let Γ \Gamma Γ be a fixed finite Boolean constraint language whose relations have arity at most d d d . The following statements hold.
If every relation in Γ + \Gamma_{+} Γ + is Direct, then Max k k k -Weight CSP(Γ \Gamma Γ ) admits a deterministic EPAS that, for every ε ∈ ( 0 , 1 ) \varepsilon\in(0,1) ε ∈ ( 0 , 1 ) , runs in time
2 O ( d + k log ( 1 + d k / ε ) ) ℓ i n O ( 1 ) . 2^{O(d+k\log(1+dk/\varepsilon))}\ell_{\mathrm{in}}^{O(1)}. 2 O ( d + k l o g ( 1 + d k / ε )) ℓ in O ( 1 ) . If every relation in Γ + \Gamma_{+} Γ + is Rooted, then Max k k k -Weight CSP(Γ \Gamma Γ ) admits a deterministic EPAS that, for every ε ∈ ( 0 , 1 ) \varepsilon\in(0,1) ε ∈ ( 0 , 1 ) , runs in time
2 O ( k log ( 1 + d k / ε ) ) ℓ i n O ( 1 ) . 2^{O(k\log(1+dk/\varepsilon))}\ell_{\mathrm{in}}^{O(1)}. 2 O ( k l o g ( 1 + d k / ε )) ℓ in O ( 1 ) . If neither of the preceding conditions on Γ + \Gamma_{+} Γ + holds, then Max k k k -Weight CSP(Γ \Gamma Γ ) admits no EPAS unless FPT = W[1 ] , even on unweighted multiplicity-one instances.
Remark 1.2. The deterministic algorithms in Theorem 1.1 also apply when relation descriptions are supplied as part of the input and the arity bound d d d varies. Assume that membership in each relation can be tested in time polynomial in ℓ i n \ell_{\mathrm{in}} ℓ in , with a fixed exponent for all inputs. If every relation in Γ + \Gamma_{+} Γ + is Direct, or every relation in Γ + \Gamma_{+} Γ + is Rooted, the corresponding algorithm satisfies the running-time bound in the theorem. This gives an EPAS parameterized by k + d k+d k + d . The algorithm assumes the corresponding condition on Γ + \Gamma_{+} Γ + ; the time needed to check that condition is not included.
The two rules capture two ways in which control coordinates are redundant for satisfaction. In a Direct relation, a 1-valued control can be set to 0 while every other coordinate, including every unit witness currently set to 1, remains unchanged. Since R R R is zero-free, every satisfying tuple must set some unit witness to 1; otherwise, repeatedly deleting its 1-valued controls would produce 0 ∈ R \mathbf{0} \in R 0 ∈ R . In a Rooted relation, the definition explicitly chooses a unit witness set to 1. It keeps this witness, removes all competing unit witnesses, and then permits any subset of the remaining 1-valued controls to be deleted. Call a relation R ∈ Γ + R \in\Gamma_{+} R ∈ Γ + accessible if every tuple in R R R has a 1 in some unit-witness coordinate, and inaccessible otherwise. Thus every Direct relation and every Rooted relation is accessible.
Neither rule implies the other, and the EPAS side requires the same rule for all relations in Γ + \Gamma_{+} Γ + . The relation
R d i r : = { β ∈ { 0 , 1 } 3 : ( β 1 ∨ β 2 ) ∧ ( β 3 → β 1 ∧ β 2 ) } = { ( 1 , 0 , 0 ) , ( 0 , 1 , 0 ) , ( 1 , 1 , 0 ) , ( 1 , 1 , 1 ) } R_{\mathrm{dir}} := \{\beta\in\{0,1\}^{3} : (\beta_{1} \lor\beta_{2}) \land(\beta_{3} \to\beta_{1} \land\beta_{2})\} = \{(1,0,0),(0,1,0),(1,1,0),(1,1,1)\} R dir := { β ∈ { 0 , 1 } 3 : ( β 1 ∨ β 2 ) ∧ ( β 3 → β 1 ∧ β 2 )} = {( 1 , 0 , 0 ) , ( 0 , 1 , 0 ) , ( 1 , 1 , 0 ) , ( 1 , 1 , 1 )}
is Direct but not Rooted. Its unit witnesses are coordinates 1 and 2, and its only control is coordinate 3. It is Direct because ( 1 , 1 , 1 ) (1,1,1) ( 1 , 1 , 1 ) is its only tuple with β 3 = 1 \beta_{3}=1 β 3 = 1 , and setting β 3 \beta_{3} β 3 to 0 gives ( 1 , 1 , 0 ) ∈ R d i r (1,1,0) \in R_{\mathrm{dir}} ( 1 , 1 , 0 ) ∈ R dir . It is not Rooted because of ( 1 , 1 , 1 ) (1,1,1) ( 1 , 1 , 1 ) : keeping coordinate 1 and setting coordinate 2 to 0 gives ( 1 , 0 , 1 ) ∉ R d i r (1,0,1) \notin R_{\mathrm{dir}} ( 1 , 0 , 1 ) ∈ / R dir , and symmetrically ( 0 , 1 , 1 ) ∉ R d i r (0,1,1) \notin R_{\mathrm{dir}} ( 0 , 1 , 1 ) ∈ / R dir . The relation
R r o o t : = { β ∈ { 0 , 1 } 3 : ( β 1 ∨ β 2 ) ∧ ( β 1 ∧ β 2 → β 3 ) } = { ( 1 , 0 , 0 ) , ( 0 , 1 , 0 ) , ( 1 , 0 , 1 ) , ( 0 , 1 , 1 ) , ( 1 , 1 , 1 ) } \begin{aligned}
R_{\mathrm{root}} := \{\beta\in\{0,1\}^{3} : (\beta_{1} \lor\beta_{2}) \land(\beta_{1} \land\beta_{2} \to\beta_{3})\} \\
&= \{(1,0,0),(0,1,0),(1,0,1),(0,1,1),(1,1,1)\}
\end{aligned} R root := { β ∈ { 0 , 1 } 3 : ( β 1 ∨ β 2 ) ∧ ( β 1 ∧ β 2 → β 3 )} = {( 1 , 0 , 0 ) , ( 0 , 1 , 0 ) , ( 1 , 0 , 1 ) , ( 0 , 1 , 1 ) , ( 1 , 1 , 1 )}
is Rooted but not Direct, with the same unit witnesses and control. It is Rooted because every tuple with exactly one of β 1 , β 2 \beta_{1},\beta_{2} β 1 , β 2 equal to 1 lies in R r o o t R_{\mathrm{root}} R root , and for every β ∈ R r o o t \beta\in R_{\mathrm{root}} β ∈ R root , keeping a unit witness u u u with β u = 1 \beta_{u}=1 β u = 1 and setting the other unit witness to 0 produces such a tuple, whatever value the control then takes. It is not Direct because setting the control of ( 1 , 1 , 1 ) (1,1,1) ( 1 , 1 , 1 ) to 0 0 0 gives ( 1 , 1 , 0 ) ∉ R r o o t (1,1,0) \notin R_{\mathrm{root}} ( 1 , 1 , 0 ) ∈ / R root . By Theorem 1.1 , Max k k k -Weight CSP({ R d i r } \{R_{\mathrm{dir}}\} { R dir } ) and Max k k k -Weight CSP({ R r o o t } \{R_{\mathrm{root}}\} { R root } ) each admit an EPAS, whereas Max k k k -Weight CSP({ R d i r , R r o o t } \{R_{\mathrm{dir}},R_{\mathrm{root}}\} { R dir , R root } ) admits none unless FPT = W[1 ] .
The conditions are decidable by finite inspection. For a relation of arity r r r , testing Direct takes O ( r 2 r ) O(r^{2r}) O ( r 2 r ) membership queries and testing Rooted takes O ( r 4 ) O(r^{4}) O ( r 4 ) . Thus O ( ∣ Γ ∣ d 4 ) O(|\Gamma|d^{4}) O ( ∣Γ∣ d 4 ) queries determine the case of the theorem; § 4 gives the tests.
The arity-two boundary. For languages whose relations have arity at most two, Theorem 1.1 depends on a single relation, R A N D : = { ( 1 , 1 ) } R_{\mathrm{AND}} := \{(1,1)\} R AND := {( 1 , 1 )} . It has no unit witness, so it is inaccessible and hence neither Direct nor Rooted. Every other nonempty zero-free relation of arity at most two is both Direct and Rooted (Proposition 8.1 ).
Corollary 1.3 (Arity-two boundary). Let Γ \Gamma Γ be a fixed finite Boolean constraint language of arity at most two. For Max k k k -Weight CSP(Γ \Gamma Γ ) parameterized by the budget k k k :
If R A N D ∉ Γ R_{\mathrm{AND}} \notin\Gamma R AND ∈ / Γ , then there is a deterministic EPAS that, for every rational ε ∈ ( 0 , 1 ) \varepsilon\in(0,1) ε ∈ ( 0 , 1 ) , runs in time 2 O ( k log ( 1 + k / ε ) ) ℓ i n O ( 1 ) 2^{O(k\log(1+k/\varepsilon))}\ell_{\mathrm{in}}^{O(1)} 2 O ( k l o g ( 1 + k / ε )) ℓ in O ( 1 ) .
If R A N D ∈ Γ R_{\mathrm{AND}} \in\Gamma R AND ∈ Γ , then there is no EPAS unless FPT = W[1 ] .
Problems covered by the framework
We briefly survey several special cases of our framework and the known approximation results for these problems. In the problems below, k k k bounds the number of selected vertices, sets, or true variables. All our EPAS consequences use the Rooted case of Theorem 1.1 and its uniform version: they are deterministic, allow nonnegative rational weights, and run in time ( 1 + d k / ε ) O ( k ) ℓ i n O ( 1 ) (1+dk/\varepsilon)^{O(k)}\ell_{\mathrm{in}}^{O(1)} ( 1 + d k / ε ) O ( k ) ℓ in O ( 1 ) , parameterized by k + d k+d k + d . The relations below have polynomial-time membership tests. For graphs, d = 2 d=2 d = 2 .
Partial Vertex Cover. The goal is to select at most k k k vertices maximizing the weight of edges with a selected endpoint. Each vertex is a variable, and each edge gives R O R = { ( 0 , 1 ) , ( 1 , 0 ) , ( 1 , 1 ) } R_{\mathrm{OR}} = \{(0,1),(1,0),(1,1)\} R OR = {( 0 , 1 ) , ( 1 , 0 ) , ( 1 , 1 )} . Both coordinates are unit witnesses, so the relation is both Direct and Rooted. Thus Theorem 1.1 recovers an EPAS for this problem. Marx gave an EPAS [23 ] , and Manurangsi later obtained the faster bound ( 1 / ε ) O ( k ) (1/\varepsilon)^{O(k)} ( 1/ ε ) O ( k ) for the weighted version [19 ] .
Maximum Coverage. Viewing each vertex as the set of its incident edges makes Partial Vertex Cover a coverage problem in which every element belongs to two sets. Allowing arbitrary set systems gives Maximum Coverage: select at most k k k sets maximizing the weight of covered elements. An element belonging to r r r sets gives the relation O R r : = { β ∈ { 0 , 1 } r : ∣ β ∣ ≥ 1 } \mathrm{OR}_r := \{\beta\in\{0,1\}^{r}: |\beta| \ge1\} OR r := { β ∈ { 0 , 1 } r : ∣ β ∣ ≥ 1 } . This relation is both Direct and Rooted, so frequency at most d d d gives an EPAS, recovering the unweighted result of Skowron and Faliszewski [30 ] . For the weighted problem, Sellier’s scheme gives the faster bound ( d / ε ) O ( k ) (d/\varepsilon)^{O(k)} ( d / ε ) O ( k ) [29 ] . Without a frequency bound, the polynomial-time ( 1 − 1 / e ) (1-1/e) ( 1 − 1/ e ) -approximation [27 ] is optimal unless P = NP [12 ] . Under Gap-ETH, for every fixed δ > 0 \delta> 0 δ > 0 , no ( 1 − 1 / e + δ ) (1-1/e+\delta) ( 1 − 1/ e + δ ) -approximation runs in FPT time parameterized by k k k [5 ] ; under randomized Gap-ETH, none runs even in time f ( k ) ℓ i n o ( k ) f(k)\ell_{\mathrm{in}}^{o(k)} f ( k ) ℓ in o ( k ) for any computable f f f [20 ] .
Cardinality-constrained Max-SAT. The OR constraints above are clauses with only positive literals. Allowing negative literals gives cardinality-constrained Max-SAT: maximize the total weight of satisfied clauses with at most k k k variables set to 1. A clause with a negative literal gives a zero-valid relation, while a clause with only positive literals gives O R r \mathrm{OR}_r OR r . Thus, formulas with at most d d d variables per clause admit an EPAS.
More generally, Jain et al. gave an EPAS for unweighted formulas whose variable-clause incidence graph is K t , t K_{t,t} K t , t -free for fixed t t t [16 ] . Faster randomized and deterministic schemes were subsequently obtained independently by Inamdar et al. and Manurangsi [15 , 21 ] . Biclique-freeness can be further weakened to bounded semi-ladder index: Kundu et al. give deterministic schemes for weighted Maximum Coverage and cardinality-constrained Max-SAT in this setting [18 ] . More generally still, bounded VC-dimension suffices for Maximum Coverage [1 ] and unweighted cardinality-constrained Max-SAT [18 ] .
For unrestricted formulas, a polynomial-time ( 1 − 1 / e ) (1 - 1/e) ( 1 − 1/ e ) -approximation is known [31 ] , and the coverage lower bounds above also apply.
Balanced Set Cover. One can also reward leaving some elements uncovered. In a cardinality-constrained, weighted version of Balanced Set Cover [13 Definition 4.6] , select at most k k k sets maximizing covered blue weight plus uncovered red weight. Blue elements give OR constraints, and a red element in r r r sets gives the zero-valid relation { 0 r } \{0^{r}\} { 0 r } . Thus frequency at most d d d gives an EPAS.
Maximum Unique Coverage. Changing the coverage rule to reward only elements contained in exactly one selected set gives Max Unique Coverage [8 , 25 ] . Each element gives E O r : = { β ∈ { 0 , 1 } r : ∣ β ∣ = 1 } \mathrm{EO}_{r} := \{\beta\in\{0,1\}^{r} : |\beta| = 1\} EO r := { β ∈ { 0 , 1 } r : ∣ β ∣ = 1 } . All coordinates are unit witnesses, so these relations are both Direct and Rooted. Frequency at most d d d therefore gives an EPAS. For unweighted instances, the scheme of Cervenjak et al. [4 ] gives ( d log ( d + 1 ) / ε ) O ( k ) (d \log(d + 1)/\varepsilon)^{O(k)} ( d log ( d + 1 ) / ε ) O ( k ) time by enumerating subsets of its approximate kernel.
Graph and hypergraph Max Cut. For a graph G = ( V , E ) G = (V,E) G = ( V , E ) and S ⊆ V S \subseteq V S ⊆ V , an edge crosses the cut ( S , V ∖ S ) (S,V \setminus S) ( S , V ∖ S ) if and only if it has exactly one endpoint in S S S . Thus selecting at most k k k vertices to maximize the total weight of crossing edges gives the cardinality-constrained version of Max Cut [25 ] , with each edge represented by R X O R : = E O 2 = { ( 0 , 1 ) , ( 1 , 0 ) } \mathrm{RXOR} := \mathrm{EO}_{2} = \{(0,1),(1,0)\} RXOR := EO 2 = {( 0 , 1 ) , ( 1 , 0 )} . For unweighted graphs with the requirement ∣ S ∣ = k |S| = k ∣ S ∣ = k , Bonnet et al. gave an EPAS [2 ] , and Fomin et al. later improved the running time to ( 1 / ε ) O ( k ) (1/\varepsilon)^{O(k)} ( 1/ ε ) O ( k ) [14 ] . These schemes also apply to the version with ∣ S ∣ ≤ k |S| \le k ∣ S ∣ ≤ k : after adding k k k isolated vertices, any set of at most k k k original vertices can be extended to a set of exactly k k k vertices without changing the cut value. Conversely, removing the added vertices from a solution preserves its cut value.
In a hypergraph with vertex set V V V and S ⊆ V S \subseteq V S ⊆ V , a hyperedge crosses ( S , V ∖ S ) (S,V \setminus S) ( S , V ∖ S ) if and only if it contains a vertex of S S S and a vertex of V ∖ S V \setminus S V ∖ S . A hyperedge of size r ≥ 2 r \ge2 r ≥ 2 is therefore represented by N A E r : = { β ∈ { 0 , 1 } r : 1 ≤ ∣ β ∣ < r } \mathrm{NAE}_{r} := \{\beta\in\{0,1\}^{r} : 1 \le|\beta| < r\} NAE r := { β ∈ { 0 , 1 } r : 1 ≤ ∣ β ∣ < r } . Every coordinate is a unit witness, so each N A E r \mathrm{NAE}_{r} NAE r is both Direct and Rooted. By Theorem 1.1 , weighted hypergraph Max Cut with at most k k k vertices on one side and hyperedges of size at most d d d admits an EPAS parameterized by k + d k+d k + d .
Threshold coverage. Raising the coverage requirement from one selected set to at least t t t selected sets gives threshold coverage. An element in r r r sets gives the relation T H r , t : = { β ∈ { 0 , 1 } r : ∣ β ∣ ≥ t } \mathrm{TH}_{r,t} := \{\beta\in\{0,1\}^{r} : |\beta| \ge t\} TH r , t := { β ∈ { 0 , 1 } r : ∣ β ∣ ≥ t } . For $2 \le t \le r \le d$, this relation has no unit witness and is inaccessible. Hence threshold coverage with frequency at most d d d and any fixed threshold $2 \le t \le d$ admits no EPAS unless FPT = W[1 ] .
Related CSP classifications
Several earlier classifications of Boolean CSPs concern different objectives. Creignou [6 ] classified the polynomial-time approximability of Max-CSP. Khanna, Sudan, Trevisan, and Williamson [17 ] classified Min-Ones, Max-Ones, and Min-CSP. Max-CSP maximizes the weight of satisfied constraints without limiting the number of ones. Min-Ones minimizes the number of ones while satisfying every constraint. Schaefer’s satisfiability classification [28 ] and later classifications with cardinality constraints [7 ] also require every constraint to be satisfied. Our problem combines the Max-CSP objective with a budget of at most k k k ones, allowing some constraints to remain unsatisfied.
Bonnet, Egri, Lin, and Marx [11 ] gave a parameterized approximation classification for Min-CSP. They determined which finite Boolean languages admit a constant-factor approximation in fixed-parameter time. Min-CSP minimizes the number of unsatisfied constraints, and its parameter bounds that number. Here, the parameter instead bounds the number of ones. The approximation guarantee also differs: they study constant-factor approximation, while we seek an EPAS, which allows arbitrarily small error. Their classification therefore does not determine which languages admit a scheme for our problem.
The distinction between exactly k k k ones and at most k k k ones is also important. Marx [22 ] showed that satisfying all constraints with exactly k k k ones is either fixed-parameter tractable or W[1 ] -complete, depending on the Boolean language. Bulatov and Marx [3 ] studied related questions over finite domains. Under our upper bound of k k k ones, however, satisfying all constraints is fixed-parameter tractable for every fixed arity [22 Section 11, p. 181] . Our classification addresses the remaining optimization question: which languages admit an EPAS for maximizing the satisfied weight when not every constraint can be satisfied within the budget?
Organization. Section 2 gives the notation and preliminaries, and Section 3 explains the main proof ideas. Section 4 develops the classification of zero-free relations and the common ingredients for the algorithms. Sections 5 and 6 give the Rooted and Direct algorithms, respectively. Section 7 proves hardness. Section 8 completes the classification and proves the arity-two boundary. Section 9 concludes with open questions.
Notation and Preliminaries
Throughout this paper, X X X denotes a finite set of Boolean variables.
Assignments and Hamming weight. A truth assignment (or simply an assignment) is a function τ : X → { 0 , 1 } \tau: X \to\{0,1\} τ : X → { 0 , 1 } . The Hamming weight of an assignment τ \tau τ , denoted wt ( τ ) : = ∣ τ − 1 ( 1 ) ∣ \operatorname{wt}(\tau) := |\tau^{-1}(1)| wt ( τ ) := ∣ τ − 1 ( 1 ) ∣ , is the number of variables set to 1. We denote the all-zero assignment by 0 \mathbf{0} 0 . For a subset of variables S ⊆ X S \subseteq X S ⊆ X , its indicator assignment is denoted by τ S \tau_S τ S , where τ S ( x ) = 1 \tau_S(x) = 1 τ S ( x ) = 1 if x ∈ S x \in S x ∈ S and 0 otherwise.
A partial assignment is a function ρ : Y → { 0 , 1 } \rho: Y \to\{0,1\} ρ : Y → { 0 , 1 } for some Y ⊆ X Y \subseteq X Y ⊆ X . If ρ 1 : Y 1 → { 0 , 1 } \rho_1 : Y_1 \to\{0,1\} ρ 1 : Y 1 → { 0 , 1 } and ρ 2 : Y 2 → { 0 , 1 } \rho_2 : Y_2 \to\{0,1\} ρ 2 : Y 2 → { 0 , 1 } are partial assignments with Y 1 ∩ Y 2 = ∅ Y_1 \cap Y_2 = \varnothing Y 1 ∩ Y 2 = ∅ , then ρ 1 ⊔ ρ 2 : Y 1 ∪ Y 2 → { 0 , 1 } \rho_1 \sqcup\rho_2 : Y_1 \cup Y_2 \to\{0,1\} ρ 1 ⊔ ρ 2 : Y 1 ∪ Y 2 → { 0 , 1 } is the partial assignment that agrees with ρ 1 \rho_1 ρ 1 on Y 1 Y_1 Y 1 and with ρ 2 \rho_2 ρ 2 on Y 2 Y_2 Y 2 .
Definition 2.1 (Boolean constraints and constraint languages). For a positive integer r r r , let [ r ] : = { 1 , … , r } [r] := \{1,\ldots,r\} [ r ] := { 1 , … , r } . A Boolean relation of arity r r r is a set R ⊆ { 0 , 1 } r R \subseteq\{0,1\}^r R ⊆ { 0 , 1 } r , and a Boolean constraint language Γ \Gamma Γ is a finite set of Boolean relations.
A constraint C C C over X X X is specified by a relation R C ⊆ { 0 , 1 } r C R_C \subseteq\{0,1\}^{r_C} R C ⊆ { 0 , 1 } r C and an ordered tuple ( x 1 , … , x r C ) (x_1,\ldots,x_{r_C}) ( x 1 , … , x r C ) of pairwise distinct variables from X X X . This tuple is the scope tuple of C C C , and sc ( C ) : = { x 1 , … , x r C } \operatorname{sc}(C) := \{x_1,\ldots,x_{r_C}\} sc ( C ) := { x 1 , … , x r C } is its underlying scope set . The same relation and scope tuple may occur more than once; each occurrence is treated as a separate constraint.
For an assignment τ \tau τ , write
τ [ C ] : = ( τ ( x 1 ) , … , τ ( x r C ) ) . \tau[C] := (\tau(x_1),\ldots,\tau(x_{r_C})). τ [ C ] := ( τ ( x 1 ) , … , τ ( x r C )) . We say that τ \tau τ satisfies C C C , written τ ⊨ C \tau\models C τ ⊨ C , if τ [ C ] ∈ R C \tau[C] \in R_C τ [ C ] ∈ R C . A constraint C C C is a Γ \Gamma Γ -constraint if R C ∈ Γ R_C \in\Gamma R C ∈ Γ . We also write ι C ( i ) : = x i \iota_C(i) := x_i ι C ( i ) := x i for i ∈ [ r C ] i \in[r_C] i ∈ [ r C ] .
The feasibility problem CSP ( Γ ) \operatorname{CSP}(\Gamma) CSP ( Γ ) asks, given a finite variable set X X X and a finite collection C \mathcal{C} C of Γ \Gamma Γ -constraints over X X X , whether there is an assignment satisfying every constraint. We instead maximize the weight of the satisfied constraints subject to a Hamming-weight budget.
Definition 2.2 (Max k k k -Weight CSP( Γ ) (\Gamma) ( Γ ) ). For a fixed Boolean constraint language Γ \Gamma Γ , an instance is a tuple I = ( X , C , w , k ) \mathcal{I} = (X,\mathcal{C},w,k) I = ( X , C , w , k ) , where X X X is a finite set of Boolean variables, C \mathcal{C} C is a finite
collection of Γ \Gamma Γ -constraints over X X X , w : C → Q ≥ 0 w : \mathcal{C} \to\mathbb{Q}_{\ge0} w : C → Q ≥ 0 assigns a nonnegative rational weight to each constraint, and k ∈ Z ≥ 0 k \in\mathbb{Z}_{\ge0} k ∈ Z ≥ 0 is the Hamming-weight budget. A feasible solution is an assignment τ : X → { 0 , 1 } \tau: X \to\{0,1\} τ : X → { 0 , 1 } with wt ( τ ) ≤ k \operatorname{wt}(\tau) \le k wt ( τ ) ≤ k . Its value and the optimum are
F I ( τ ) : = ∑ C ∈ C : τ ⊨ C w ( C ) , OPT ( I ) : = max wt ( τ ) ≤ k F I ( τ ) . F^{\mathcal{I}}(\tau) := \sum_{\substack{C \in\mathcal{C}:\\ \tau\models C}} w(C), \qquad\operatorname{OPT}(\mathcal{I}) := \max_{\operatorname{wt}(\tau) \le k} F^{\mathcal{I}}(\tau). F I ( τ ) := C ∈ C : τ ⊨ C ∑ w ( C ) , OPT ( I ) := wt ( τ ) ≤ k max F I ( τ ) .
The task is to find a feasible assignment of maximum value.
When the instance is clear, we write F ( τ ) F(\tau) F ( τ ) instead of F I ( τ ) F^{\mathcal{I}}(\tau) F I ( τ ) . The support of τ \tau τ is the set { x ∈ X : τ ( x ) = 1 } \{x \in X : \tau(x) = 1\} { x ∈ X : τ ( x ) = 1 } . For S ⊆ X S \subseteq X S ⊆ X , we write F ( S ) : = F ( τ S ) F(S) := F(\tau_S) F ( S ) := F ( τ S ) . Thus a feasible solution can be represented by a set S ⊆ X S \subseteq X S ⊆ X with ∣ S ∣ ≤ k |S| \le k ∣ S ∣ ≤ k .
An instance is unweighted if w ( C ) = 1 w(C) = 1 w ( C ) = 1 for every C ∈ C C \in\mathcal{C} C ∈ C . It has arity at most d d d if r C ≤ d r_C \le d r C ≤ d for every C ∈ C C \in\mathcal{C} C ∈ C . We omit ( Γ ) (\Gamma) ( Γ ) from the problem name when the constraint language is clear from context or when arbitrary Boolean relations are allowed.
Feasible completions and residual instances. Let I = ( X , C , w , k ) \mathcal{I} = (X,\mathcal{C},w,k) I = ( X , C , w , k ) be an instance and let ρ : H → { 0 , 1 } \rho: H \to\{0,1\} ρ : H → { 0 , 1 } be a partial assignment with ∣ ρ − 1 ( 1 ) ∣ ≤ k |\rho^{-1}(1)| \le k ∣ ρ − 1 ( 1 ) ∣ ≤ k . A feasible completion of ρ \rho ρ is an assignment σ : X ∖ H → { 0 , 1 } \sigma: X \setminus H \to\{0,1\} σ : X ∖ H → { 0 , 1 } that selects at most k − ∣ ρ − 1 ( 1 ) ∣ k - |\rho^{-1}(1)| k − ∣ ρ − 1 ( 1 ) ∣ variables. Together, ρ \rho ρ and σ \sigma σ give the feasible assignment ρ ⊔ σ \rho\sqcup\sigma ρ ⊔ σ to the original instance, with value F I ( ρ ⊔ σ ) F^{\mathcal{I}}(\rho\sqcup\sigma) F I ( ρ ⊔ σ ) .
The residual instance under ρ \rho ρ is obtained by substituting the values prescribed by ρ \rho ρ into every constraint and keeping the remaining variables in their original coordinate order. The remaining budget is k − ∣ ρ − 1 ( 1 ) ∣ k - |\rho^{-1}(1)| k − ∣ ρ − 1 ( 1 ) ∣ . Constraints that become always unsatisfied are discarded. The weights of constraints that become always satisfied are kept as a constant contribution to the objective. The remaining constraints keep their original weights. The resulting relations need not belong to Γ \Gamma Γ .
An algorithm can also require its output to extend ρ \rho ρ while keeping the original constraints unchanged. Our algorithms for zero-free constraints use this form, because substituting fixed values need not preserve zero-freeness or the repair rules.
Remark 2.3 (Repeated variables within a constraint). Allowing repeated variables can change whether an EPAS exists. Consider
R : = { ( 1 , 0 , 0 ) , ( 0 , 1 , 0 ) , ( 1 , 0 , 1 ) , ( 0 , 1 , 1 ) , ( 1 , 1 , 1 ) } . R := \{(1,0,0),(0,1,0),(1,0,1),(0,1,1),(1,1,1)\}. R := {( 1 , 0 , 0 ) , ( 0 , 1 , 0 ) , ( 1 , 0 , 1 ) , ( 0 , 1 , 1 ) , ( 1 , 1 , 1 )} .
Its unit-witness coordinates are 1 and 2. Every satisfying tuple has a 1 in at least one of these coordinates. Keeping one such coordinate at 1 and setting the other to 0 gives ( 1 , 0 , c ) (1,0,c) ( 1 , 0 , c ) or ( 0 , 1 , c ) (0,1,c) ( 0 , 1 , c ) , both of which belong to R R R for either value of c c c . Setting the third coordinate to 0 also preserves membership. Thus R R R is Rooted, and Max k k k -Weight CSP({ R } \{R\} { R } ) admits an EPAS by Theorem 1.1 .
If repeated variables are allowed, a constraint with relation R R R and scope tuple ( x , x , y ) (x,x,y) ( x , x , y ) is satisfied exactly when both x x x and y y y are assigned 1. It therefore expresses R A N D R_{\mathrm{AND}} R AND . Replacing each AND constraint in this way preserves its weight and the number of variables assigned 1. Hence the version allowing repeated variables admits no EPAS unless FPT = W[1 ] [1 ] .
For each constraint C C C , delete from its relation every tuple whose entries disagree at positions occupied by the same variable. Then retain only the first position occupied by each variable, obtaining a relation R C ′ R'_C R C ′ on the distinct variables of C C C . Different constraints using the same relation may yield different R C ′ R'_C R C ′ . Let Γ i d \Gamma^{\mathrm{ id}} Γ id be the set of all such relations obtainable from constraints over Γ \Gamma Γ , allowing all possible scope tuples. These replacements work in both directions and preserve weights, budget, and assignment values. Theorem 1.1 therefore gives an EPAS if all nonempty zero-free relations in Γ i d \Gamma^{\mathrm{ id}} Γ id are DIRECT, or all are ROOTED; otherwise, none exists unless FPT = W[1 ] [1 ] .
Multiplicity and instance notation. For S ⊆ X S \subseteq X S ⊆ X , its multiplicity is the number of constraints C ∈ C C \in\mathcal{C} C ∈ C with sc ( C ) = S \operatorname{sc}(C)=S sc ( C ) = S . Constraints are counted separately, regardless of their relations, weights, or the order of variables in their scope tuples. An instance has multiplicity one if no two constraints have the same underlying scope set. The requirement that variables be distinct within each constraint places no restriction on how many constraints may share a scope set.
For an instance I = ( X , C , w , k ) \mathcal{I}=(X,\mathcal{C},w,k) I = ( X , C , w , k ) , let n : = ∣ X ∣ n:=|X| n := ∣ X ∣ be the number of variables and m : = ∣ C ∣ m:=|\mathcal{C}| m := ∣ C ∣ the number of constraints.
Approximation schemes. Let d d d bound the arities of the relations in Γ \Gamma Γ . An EPAS for Max k k k -Weight CSP(Γ \Gamma Γ ), parameterized by k + d k+d k + d , is an algorithm that, given an instance I \mathcal{I} I and a rational ε ∈ ( 0 , 1 ) \varepsilon\in(0,1) ε ∈ ( 0 , 1 ) , returns a feasible assignment τ \tau τ satisfying
F I ( τ ) ≥ ( 1 − ε ) OPT ( I ) F^{\mathcal{I}}(\tau) \ge(1-\varepsilon)\operatorname{OPT}(\mathcal{I}) F I ( τ ) ≥ ( 1 − ε ) OPT ( I )
in time f ( k , d , ε ) ℓ i n O ( 1 ) f(k,d,\varepsilon)\ell_{\mathrm{in}}^{O(1)} f ( k , d , ε ) ℓ in O ( 1 ) for some computable function f f f . The polynomial exponent is independent of k k k , d d d , and ε \varepsilon ε . For fixed Γ \Gamma Γ , the arity bound d d d is constant, so this is an EPAS parameterized by k k k .
The decision version of Max k k k -Weight CSP(Γ \Gamma Γ ) asks, given an instance I \mathcal{I} I and a rational threshold t t t , whether there is a feasible assignment of value at least t t t , equivalently, whether OPT ( I ) ≥ t \operatorname{OPT}(\mathcal{I})\ge t OPT ( I ) ≥ t .
Technical Overview
We explain the proof of Theorem 1.1 in four parts: the treatment of zero-valid constraints, the Rooted algorithm, the Direct algorithm, and the hardness reduction. The full proofs are in § 4 –§ 8 . Selecting a variable means setting it to 1; all other variables are set to 0. For S ⊆ X S\subseteq X S ⊆ X , write τ S \tau_S τ S for the assignment that selects exactly S S S , as in § 2 . Throughout the overview, OPT is the optimum of the original instance. Since weights are nonnegative, the value of any feasible assignment on just the zero-free constraints is also at most OPT.
Zero-valid lifting. A zero-valid constraint accepts the all-zero assignment; a zero-free constraint rejects it. Our treatment of zero-valid constraints adapts Manurangsi’s degree-threshold idea for clauses with negative literals [21 ] . We fix the variables that can affect a large weight of these constraints and bound the loss caused by the others.
If k = 0 k=0 k = 0 , return the all-zero assignment. Otherwise fix ξ ∈ ( 0 , 1 ) \xi\in(0,1) ξ ∈ ( 0 , 1 ) , eventually chosen as ε / 2 \varepsilon/2 ε /2 . Let w 0 w_0 w 0 be the total weight of zero-valid constraints, and let D 0 ( v ) D_0(v) D 0 ( v ) be the total weight of those containing v v v . The all-zero assignment shows that w 0 ≤ OPT w_0\le\operatorname{OPT} w 0 ≤ OPT . Call v v v heavy if D 0 ( v ) > ξ w 0 / ( 2 k ) D_0(v)>\xi w_0/(2k) D 0 ( v ) > ξ w 0 / ( 2 k ) , and let H H H contain these variables. Each constraint contains at most d d d variables, so ∑ v D 0 ( v ) ≤ d w 0 \sum_vD_0(v)\le dw_0 ∑ v D 0 ( v ) ≤ d w 0 . If H H H is nonempty, adding the defining inequalities for all heavy variables gives ∣ H ∣ ξ w 0 / ( 2 k ) < ∑ v ∈ H D 0 ( v ) ≤ d w 0 |H|\xi w_0/(2k)<\sum_{v\in H}D_0(v)\le dw_0 ∣ H ∣ ξ w 0 / ( 2 k ) < ∑ v ∈ H D 0 ( v ) ≤ d w 0 . Dividing by ξ w 0 / ( 2 k ) > 0 \xi w_0/(2k)>0 ξ w 0 / ( 2 k ) > 0 gives ∣ H ∣ < 2 d k / ξ |H|<2dk/\xi ∣ H ∣ < 2 d k / ξ . The same bound holds when H H H is empty; in particular, w 0 = 0 w_0=0 w 0 = 0 implies that there are no heavy variables.
Try every partial assignment ρ : H → { 0 , 1 } \rho:H\to\{0,1\} ρ : H → { 0 , 1 } with ∣ ρ − 1 ( 1 ) ∣ ≤ k |\rho^{-1}(1)|\le k ∣ ρ − 1 ( 1 ) ∣ ≤ k . For each ρ \rho ρ , run the appropriate zero-free algorithm to obtain a feasible completion σ \sigma σ on X ∖ H X\setminus H X ∖ H . Evaluate the combined assignment ρ ⊔ σ \rho\sqcup\sigma ρ ⊔ σ on all original constraints. There are at most ( ∣ H ∣ + 1 ) k (|H|+1)^k ( ∣ H ∣ + 1 ) k guesses, since each is determined by at most k k k selected variables. Keep the best answer. The initial fixing imposes requirements on the returned assignment; it does not substitute values into the Boolean relations, which could destroy their repair properties.
Consider the guess agreeing with an optimal solution. That solution and the returned assignment agree on H H H and each select at most k k k variables. Any constraint whose satisfaction changes contains a variable on which the two assignments differ. Since they agree on H H H , every such variable is nonheavy. Moving from the optimal assignment to the returned assignment can change at most k k k variables from 1 to 0 and at most k k k variables from 0 to 1. Thus at most 2 k 2k 2 k variables change. Each belongs to zero-valid constraints of total weight at most ξ w 0 / ( 2 k ) \xi w_0/(2k) ξ w 0 / ( 2 k ) , so the loss is at most 2 k ⋅ ξ w 0 / ( 2 k ) = ξ w 0 ≤ ξ O P T 2k \cdot\xi w_0/(2k) = \xi w_0 \leq\xi\mathrm{OPT} 2 k ⋅ ξ w 0 / ( 2 k ) = ξ w 0 ≤ ξ OPT . The algorithms below lose at most ε O P T / 2 \varepsilon\mathrm{OPT}/2 ε OPT /2 on the zero-free constraints compared with any feasible assignment that agrees with the guess. Taking ξ = ε / 2 \xi= \varepsilon/2 ξ = ε /2 therefore gives total loss at most ε O P T \varepsilon\mathrm{OPT} ε OPT .
The Rooted case. The Rooted algorithm builds on the branching and exchange ideas of Jain et al. [16 ] . The scores m K m_K m K and the bounds on the loss from adding variables extend these ideas to general Rooted relations, where adding a variable can destroy satisfaction.
Assume every nonempty zero-free relation is Rooted. For a constraint C C C , let U C U_C U C contain its unit-witness variables: selecting any one of them alone satisfies C C C . Let N C N_C N C contain its remaining variables, called controls. These roles depend on C C C . The Rooted rule says that, from every satisfying assignment to C C C , we can keep one of its selected unit witnesses at 1 and set all other unit witnesses to 0. The constraint remains satisfied even if we also set any subset of its selected controls to 0.
Scores and the graph. Write F ( S ) F(S) F ( S ) for the weight of zero-free constraints satisfied by selecting S S S . The single-variable score M ( v ) = F ( { v } ) M(v) = F(\{v\}) M ( v ) = F ({ v }) is the weight satisfied by selecting v v v alone, with every other variable set to 0. It stays fixed throughout the search.
The search maintains a set K K K of variables required to be selected, initially K = ρ − 1 ( 1 ) K = \rho^{-1}(1) K = ρ − 1 ( 1 ) .
A candidate is a variable v v v outside K K K that has not been fixed to 0. Its candidate score at K K K , m K ( v ) m_K(v) m K ( v ) , is the total weight of constraints that would be satisfied with v v v as their only selected unit witness if we added v v v to K K K . For each C C C with v ∈ U C v \in U_C v ∈ U C and K ∩ U C = ∅ K \cap U_C = \varnothing K ∩ U C = ∅ , count w ( C ) w(C) w ( C ) if τ K ∪ { v } ⊨ C \tau_{K \cup\{v\}} \models C τ K ∪ { v } ⊨ C . Every constraint counted by m K ( v ) m_K(v) m K ( v ) is also counted by M ( v ) M(v) M ( v ) , so 0 ≤ m K ( v ) ≤ M ( v ) 0 \leq m_K(v) \leq M(v) 0 ≤ m K ( v ) ≤ M ( v ) .
The candidate score need not equal the actual change F ( K ∪ { v } ) − F ( K ) F(K \cup\{v\}) - F(K) F ( K ∪ { v }) − F ( K ) : it counts only these constraints and does not subtract any weight lost by adding v v v .
We use a directed graph to record pairs of variables that could cause large losses or make us count the same constraint twice. It has one vertex for each variable. Fix a parameter θ > 0 \theta> 0 θ > 0 , to be chosen below. For distinct variables v , x v, x v , x , let I ( v → x ) I(v \to x) I ( v → x ) be the total weight of all constraints counted by M ( v ) M(v) M ( v ) that also contain x x x . Draw an arrow v → x v \to x v → x exactly when I ( v → x ) > θ M ( v ) I(v \to x) > \theta M(v) I ( v → x ) > θ M ( v ) , and give it weight I ( v → x ) I(v \to x) I ( v → x ) . Each sum is defined even when no arrow is drawn. The sums and the graph are computed once before the search.
Suppose we add two distinct candidates v v v and x x x to K K K . Among the constraints counted by m K ( v ) m_K(v) m K ( v ) , only those involving x x x can also be counted by m K ( x ) m_K(x) m K ( x ) or become unsatisfied when x x x is added after v v v . These constraints are also counted by M ( v ) M(v) M ( v ) , so their total weight is at most I ( v → x ) I(v \to x) I ( v → x ) . We call these arrows heavy interactions . They need not be symmetric: v → x v \to x v → x does not necessarily imply x → v x \to v x → v .
Each constraint counted by M ( v ) M(v) M ( v ) contributes to at most d − 1 d-1 d − 1 sums I ( v → x ) I(v \to x) I ( v → x ) , so
∑ x ≠ v I ( v → x ) ≤ ( d − 1 ) M ( v ) . \sum_{x \ne v} I(v \to x) \leq(d-1)M(v). x = v ∑ I ( v → x ) ≤ ( d − 1 ) M ( v ) .
Hence at most d max : = ⌈ ( d − 1 ) / θ ⌉ d_{\max} := \left\lceil(d-1)/\theta\right\rceil d m a x := ⌈ ( d − 1 ) / θ ⌉ arrows leave any variable. If M ( v ) = 0 M(v) = 0 M ( v ) = 0 , all these sums are zero and no arrow leaves v v v . A variable may still receive many arrows.
The search. Set ℓ = k ( 3 d max + 1 ) \ell= k(3d_{\max} + 1) ℓ = k ( 3 d m a x + 1 ) . At state K K K , let T T T contain the ℓ \ell ℓ candidates with largest positive candidate scores m K ( v ) m_K(v) m K ( v ) , or all such candidates if fewer exist. Let E E E contain candidates receiving an arrow from a variable in K K K . There are at most ∣ K ∣ d max ≤ k d max |K|d_{\max} \leq kd_{\max} ∣ K ∣ d m a x ≤ k d m a x such candidates. Record K K K as a possible answer.
When ∣ T ∣ = ℓ |T| = \ell ∣ T ∣ = ℓ , remove E E E from T T T . Since ∣ E ∣ ≤ k d max |E| \leq kd_{\max} ∣ E ∣ ≤ k d m a x , at least ℓ − k d max = k ( 2 d max + 1 ) \ell- kd_{\max} = k(2d_{\max} + 1) ℓ − k d m a x = k ( 2 d m a x + 1 ) candidates remain. Form an undirected graph on T ∖ E T \setminus E T ∖ E , joining two candidates whenever there is an arrow between them in either direction. We seek an independent set of at least k k k candidates, meaning that no two are joined by an edge.
For any set W W W of vertices in this graph, there are at most d max ∣ W ∣ d_{\max}|W| d m a x ∣ W ∣ edges between its vertices, since each vertex has at most d max d_{\max} d m a x outgoing arrows. Thus every nonempty induced subgraph has average degree at most 2 d max 2d_{\max} 2 d m a x and contains a vertex with at most 2 d max 2d_{\max} 2 d m a x neighbors. The standard coloring algorithm [9 , 24 ] therefore uses at most 2 d max + 1 2d_{\max}+1 2 d m a x + 1 colors. Its largest color class gives an independent set Q Q Q of size at least ∣ T ∖ E ∣ / ( 2 d max + 1 ) ≥ k |T\setminus E|/(2d_{\max}+1)\ge k ∣ T ∖ E ∣/ ( 2 d m a x + 1 ) ≥ k . This takes deterministic polynomial time.
Since Q ⊆ T ∖ E Q\subseteq T\setminus E Q ⊆ T ∖ E , no arrow goes from K K K to Q Q Q , and independence excludes arrows between candidates in Q Q Q . By the definition of the arrows,
I ( u → v ) ≤ θ M ( u ) ( u ∈ K ∪ Q , v ∈ Q , u ≠ v ) . I(u\to v)\le\theta M(u)\qquad(u\in K\cup Q,\ v\in Q,\ u\ne v). I ( u → v ) ≤ θ M ( u ) ( u ∈ K ∪ Q , v ∈ Q , u = v ) .
We use this bound below to control losses and repeated counting when adding the replacements.
Choose k k k candidates from the independent set and order them as q 1 , … , q k q_1,\ldots,q_k q 1 , … , q k . At the current call, record K ∪ { q 1 , … , q j } K\cup\{q_1,\ldots,q_j\} K ∪ { q 1 , … , q j } for every 0 ≤ j ≤ k − ∣ K ∣ 0\le j\le k-|K| 0 ≤ j ≤ k − ∣ K ∣ . The case j = 0 j=0 j = 0 records K K K itself.
If ∣ T ∣ < ℓ |T|<\ell ∣ T ∣ < ℓ , the only solution recorded directly at the current state is K K K . In either case, if ∣ K ∣ < k |K|<k ∣ K ∣ < k , the algorithm repeats the entire procedure from K ∪ { v } K\cup\{v\} K ∪ { v } for every v ∈ T ∪ E v\in T\cup E v ∈ T ∪ E . Each call recomputes its candidate scores and sets and, whenever its top set has size ℓ \ell ℓ , constructs its own independent set and records the corresponding solutions. The single-variable scores M ( x ) M(x) M ( x ) and the directed graph are computed once before the search. For the fixed initial guess, the algorithm returns the solution with the largest F F F -value recorded anywhere in the search.
Why the search works. To see why the search suffices, fix a feasible solution S S S agreeing with the fixed initial guess. The algorithm does not know S S S ; we use it only in the proof. The initial set K K K satisfies K ⊆ S K\subseteq S K ⊆ S . Whenever T ∪ E T\cup E T ∪ E contains a variable of S ∖ K S\setminus K S ∖ K , follow a recursive call that adds such a variable. Each call preserves K ⊆ S K\subseteq S K ⊆ S and increases ∣ K ∣ |K| ∣ K ∣ .
Eventually either K = S K=S K = S , in which case S S S has been recorded, or ( S ∖ K ) ∩ ( T ∪ E ) = ∅ (S\setminus K)\cap(T\cup E)=\varnothing ( S ∖ K ) ∩ ( T ∪ E ) = ∅ . It remains to consider the latter case. In this case, every variable of S ∖ K S\setminus K S ∖ K lies outside T T T and receives no arrow from K K K .
We first compare F ( S ) F(S) F ( S ) with F ( K ) F(K) F ( K ) by considering the constraints that become unsatisfied when we remove S ∖ K S\setminus K S ∖ K . We show that each such constraint contributes its weight to m K ( v ) m_K(v) m K ( v ) for some v ∈ S ∖ K v\in S\setminus K v ∈ S ∖ K , or to I ( u → x ) I(u\to x) I ( u → x ) for some u ∈ K u\in K u ∈ K and $x\in S\setminus K.
Consider such a constraint C C C . If K K K contains no unit witness of C C C , the ROOTED rule lets us keep one unit witness v ∈ S ∖ K v\in S\setminus K v ∈ S ∖ K and exactly the controls selected by K K K . Thus τ K ∪ { v } \tau_{K\cup\{v\}} τ K ∪ { v } satisfies C C C , with v v v as its only selected unit witness, so w ( C ) w(C) w ( C ) is counted by m K ( v ) m_K(v) m K ( v ) .
Otherwise, choose a unit witness u ∈ K u\in K u ∈ K of C C C . Selecting u u u alone satisfies C C C , so w ( C ) w(C) w ( C ) is counted by M ( u ) M(u) M ( u ) . Since removing S ∖ K S\setminus K S ∖ K makes C C C unsatisfied, C C C must contain some variable x ∈ S ∖ K x\in S\setminus K x ∈ S ∖ K . Hence w ( C ) w(C) w ( C ) is counted by I ( u → x ) I(u\to x) I ( u → x ) . There is no arrow from K K K to S ∖ K S\setminus K S ∖ K , so I ( u → x ) ≤ θ M ( u ) I(u\to x)\le\theta M(u) I ( u → x ) ≤ θ M ( u ) . For each u ∈ K u\in K u ∈ K , there are ∣ S ∖ K ∣ |S\setminus K| ∣ S ∖ K ∣ choices of x x x , and each term I ( u → x ) I(u\to x) I ( u → x ) is at most θ M ( u ) \theta M(u) θ M ( u ) . Thus the total weight of constraints in this case is at most
∑ u ∈ K ∑ x ∈ S ∖ K I ( u → x ) ≤ θ ∣ S ∖ K ∣ ∑ u ∈ K M ( u ) . \sum_{u\in K}\sum_{x\in S\setminus K} I(u\to x)\le\theta|S\setminus K|\sum_{u\in K}M(u). u ∈ K ∑ x ∈ S ∖ K ∑ I ( u → x ) ≤ θ ∣ S ∖ K ∣ u ∈ K ∑ M ( u ) .
Every constraint lost when passing from S S S to K K K is counted in one of these two cases. Counting a constraint more than once only increases the bound. Therefore,
F ( S ) − F ( K ) ≤ ∑ v ∈ S ∖ K m K ( v ) + θ ∣ S ∖ K ∣ ∑ u ∈ K M ( u ) . F(S)-F(K)\le\sum_{v\in S\setminus K}m_K(v)+\theta|S\setminus K|\sum_{u\in K}M(u). F ( S ) − F ( K ) ≤ v ∈ S ∖ K ∑ m K ( v ) + θ ∣ S ∖ K ∣ u ∈ K ∑ M ( u ) .
If T T T is not full, it contains every candidate with m K ( v ) > 0 m_K(v)>0 m K ( v ) > 0 . Every v ∈ S ∖ K v\in S\setminus K v ∈ S ∖ K therefore has m K ( v ) = 0 m_K(v)=0 m K ( v ) = 0 , and returning K K K loses at most θ k ∑ u ∈ K M ( u ) \theta k\sum_{u\in K}M(u) θ k ∑ u ∈ K M ( u ) . If T T T is full, put s = ∣ S ∖ K ∣ s=|S\setminus K| s = ∣ S ∖ K ∣ and let Q s Q_s Q s be the first s s s candidates in the chosen independent set. Every candidate in T T T has m K m_K m K -score at least as large as that of every variable in S ∖ K S\setminus K S ∖ K : T T T contains the largest positive m K m_K m K -scores, and S ∖ K S\setminus K S ∖ K lies outside T T T . Thus Q s Q_s Q s has total candidate score at least that of the variables in S ∖ K S\setminus K S ∖ K . Since s ≤ k − ∣ K ∣ s\leq k-|K| s ≤ k − ∣ K ∣ , trying every j j j includes j = s j=s j = s . The algorithm therefore records A = K ∪ Q s A=K\cup Q_s A = K ∪ Q s , even though it does not know S S S .
We compare the gain F ( A ) − F ( K ) F(A)-F(K) F ( A ) − F ( K ) with ∑ v ∈ Q s m K ( v ) \sum_{v\in Q_s}m_K(v) ∑ v ∈ Q s m K ( v ) , the sum of the candidate scores before any replacements are added. To do this, consider adding the candidates in Q s Q_s Q s one at a time. The actual gain can be smaller than the sum of their scores for two reasons.
First, consider a constraint C C C counted by m K ( v ) m_K(v) m K ( v ) . It is unsatisfied by τ K \tau_K τ K and satisfied by τ K ∪ { v } \tau_{K\cup\{v\}} τ K ∪ { v } . If C C C contains no candidate from Q s Q_s Q s added before v v v , the preceding additions do not change any variable of C C C , so adding v v v gives a new gain of w ( C ) w(C) w ( C ) .
Thus only constraints containing a candidate x ∈ Q s x\in Q_s x ∈ Q s added before v v v can fail to give the gain counted by m K ( v ) m_K(v) m K ( v ) . Each such constraint is also counted by M ( v ) M(v) M ( v ) , so its weight is included in I ( v → x ) I(v\to x) I ( v → x ) . Since no arrow joins two replacements, I ( v → x ) ≤ θ M ( v ) I(v\to x)\leq\theta M(v) I ( v → x ) ≤ θ M ( v ) . Summing over at most s s s candidates added before each v ∈ Q s v\in Q_s v ∈ Q s , the total weight counted by the scores that may fail to give a new gain is at most θ s ∑ v ∈ Q s M ( v ) \theta s\sum_{v\in Q_s}M(v) θ s ∑ v ∈ Q s M ( v ) .
Second, consider a constraint C ′ C' C ′ that is satisfied before v v v is added but becomes unsatisfied afterwards. The Rooted rule guarantees that, before the addition, C ′ C' C ′ has a selected unit witness u u u , either in K K K or among the candidates from Q s Q_s Q s added before v v v . Selecting u u u alone satisfies C ′ C' C ′ , so its weight is counted by M ( u ) M(u) M ( u ) . Also, C ′ C' C ′ must contain v v v , since only the value of v v v changes. Hence w ( C ′ ) w(C') w ( C ′ ) is counted by I ( u → v ) I(u\to v) I ( u → v ) .
There is no arrow from K K K to Q s Q_s Q s or between replacements, so I ( u → v ) ≤ θ M ( u ) I(u\to v)\leq\theta M(u) I ( u → v ) ≤ θ M ( u ) . For each u ∈ A u\in A u ∈ A , there are at most s s s later additions of candidates v v v . Summing over these additions and then over u u u bounds the total weight lost by θ s ∑ u ∈ A M ( u ) \theta s\sum_{u\in A}M(u) θ s ∑ u ∈ A M ( u ) .
The two bounds for adding Q s Q_s Q s give
F ( A ) − F ( K ) ≥ ∑ v ∈ Q s m K ( v ) − θ s ∑ v ∈ Q s M ( v ) − θ s ∑ z ∈ A M ( z ) . F(A)-F(K)\geq\sum_{v\in Q_s}m_K(v)-\theta s\sum_{v\in Q_s}M(v)-\theta s\sum_{z\in A}M(z). F ( A ) − F ( K ) ≥ v ∈ Q s ∑ m K ( v ) − θ s v ∈ Q s ∑ M ( v ) − θ s z ∈ A ∑ M ( z ) .
Since F ( A ) − F ( S ) = [ F ( A ) − F ( K ) ] − [ F ( S ) − F ( K ) ] F(A)-F(S)=[F(A)-F(K)]-[F(S)-F(K)] F ( A ) − F ( S ) = [ F ( A ) − F ( K )] − [ F ( S ) − F ( K )] , we subtract the upper bound on F ( S ) − F ( K ) F(S)-F(K) F ( S ) − F ( K ) from the lower bound on F ( A ) − F ( K ) F(A)-F(K) F ( A ) − F ( K ) to obtain
F ( A ) ≥ F ( S ) + ∑ v ∈ Q s m K ( v ) − ∑ x ∈ S ∖ K m K ( x ) − θ s ( ∑ u ∈ K M ( u ) + ∑ v ∈ Q s M ( v ) + ∑ z ∈ A M ( z ) ) . F(A)\geq F(S)+\sum_{v\in Q_s}m_K(v)-\sum_{x\in S\setminus K}m_K(x)
-\theta s\left(\sum_{u\in K}M(u)+\sum_{v\in Q_s}M(v)+\sum_{z\in A}M(z)\right). F ( A ) ≥ F ( S ) + v ∈ Q s ∑ m K ( v ) − x ∈ S ∖ K ∑ m K ( x ) − θ s u ∈ K ∑ M ( u ) + v ∈ Q s ∑ M ( v ) + z ∈ A ∑ M ( z ) .
The difference between the two candidate-score sums is nonnegative. Also, K K K and Q s Q_s Q s are disjoint and together form A A A , so the first two sums of single-variable scores add up to ∑ z ∈ A M ( z ) \sum_{z\in A}M(z) ∑ z ∈ A M ( z ) . Therefore,
F ( A ) ≥ F ( S ) − 2 θ s ∑ z ∈ A M ( z ) . F(A)\geq F(S)-2\theta s\sum_{z\in A}M(z). F ( A ) ≥ F ( S ) − 2 θ s z ∈ A ∑ M ( z ) .
We apply this bound only once along the proof’s path, when replacing S ∖ K S\setminus K S ∖ K by Q s Q_s Q s . Earlier calls on this path simply add variables of S S S to K K K .
Bounding the error. For every Q ⊆ X Q\subseteq X Q ⊆ X with ∣ Q ∣ ≤ k |Q|\leq k ∣ Q ∣ ≤ k ,
∑ v ∈ Q M ( v ) ≤ c d OPT , (1) \sum_{v\in Q}M(v)\leq c_d\operatorname{OPT}, \tag*{(1)} v ∈ Q ∑ M ( v ) ≤ c d OPT , (1)
where c 1 = 1 c_1=1 c 1 = 1 and c d = d ( 1 − 1 / d ) − ( d − 1 ) ≤ e d c_d=d(1-1/d)^{-(d-1)}\leq ed c d = d ( 1 − 1/ d ) − ( d − 1 ) ≤ e d for d ≥ 2 d\geq2 d ≥ 2 . For d ≥ 2 d\geq2 d ≥ 2 , retain each variable of Q Q Q independently with probability 1 / d 1/d 1/ d , obtaining Q ′ Q' Q ′ . For a constraint C C C counted by M ( v ) M(v) M ( v ) v ∈ Q v \in Q v ∈ Q , the event Q ′ ∩ sc ( C ) = { v } Q' \cap\operatorname{sc}(C) = \{v\} Q ′ ∩ sc ( C ) = { v } satisfies C C C and has probability
1 d ( 1 − 1 d ) ∣ Q ∩ sc ( C ) ∣ − 1 ≥ 1 c d . \frac{1}{d}\left(1-\frac{1}{d}\right)^{|Q\cap\operatorname{sc}(C)|-1} \ge\frac{1}{c_d}. d 1 ( 1 − d 1 ) ∣ Q ∩ sc ( C ) ∣ − 1 ≥ c d 1 .
For each C C C , these events are disjoint. Hence E [ F ( Q ′ ) ] ≥ ∑ v ∈ Q M ( v ) / c d \mathbb{E}[F(Q')] \ge\sum_{v\in Q} M(v)/c_d E [ F ( Q ′ )] ≥ ∑ v ∈ Q M ( v ) / c d . Since Q ′ Q' Q ′ is feasible, its expected value is at most O P T \mathrm{OPT} OPT . For d = 1 d=1 d = 1 , ∑ v ∈ Q M ( v ) = F ( Q ) ≤ O P T \sum_{v\in Q} M(v)=F(Q)\le\mathrm{OPT} ∑ v ∈ Q M ( v ) = F ( Q ) ≤ OPT . This random choice only proves the bound; the search is deterministic.
Applying the bound to A A A and using s ≤ k s\le k s ≤ k , the replacement loss is at most 2 θ k c d O P T 2\theta k c_d\mathrm{OPT} 2 θ k c d OPT . Choosing θ = ε / ( 4 k c d ) \theta=\varepsilon/(4kc_d) θ = ε / ( 4 k c d ) makes this at most ε O P T / 2 \varepsilon\mathrm{OPT}/2 ε OPT /2 . The same choice bounds the loss when ∣ T ∣ < ℓ |T|<\ell ∣ T ∣ < ℓ by ε O P T / 4 \varepsilon\mathrm{OPT}/4 ε OPT /4 and gives ℓ = O ( d 2 k 2 / ε ) \ell=O(d^2k^2/\varepsilon) ℓ = O ( d 2 k 2 / ε ) .
Each recursive call adds one variable and has O ( k ( d max + 1 ) ) O(k(d_{\max}+1)) O ( k ( d m a x + 1 )) children. The depth is at most k k k , and the running time, including the initial guesses, is 2 O ( k log ( 1 + d k / ε ) ) ℓ i n O ( 1 ) 2^{O(k\log(1+dk/\varepsilon))}\ell^{O(1)}_{\mathrm{in}} 2 O ( k l o g ( 1 + d k / ε )) ℓ in O ( 1 ) . The common reduction supplies the remaining ε O P T / 2 \varepsilon\mathrm{OPT}/2 ε OPT /2 loss allowance for zero-valid constraints.
The Direct case. Now assume every nonempty zero-free relation is Direct. Keep F F F , M ( v ) M(v) M ( v ) , and U C U_C U C from above. For distinct variables x , y x,y x , y , let J ( x , y ) J(x,y) J ( x , y ) be the total weight of constraints for which both x , y ∈ U C x,y\in U_C x , y ∈ U C . Fix a threshold θ ∈ ( 0 , 1 ) \theta\in(0,1) θ ∈ ( 0 , 1 ) , to be chosen below. Construct an undirected graph with one vertex per variable, joining x , y x,y x , y when J ( x , y ) > 0 J(x,y)>0 J ( x , y ) > 0 and J ( x , y ) ≥ θ max { M ( x ) , M ( y ) } J(x,y)\ge\theta\max\{M(x),M(y)\} J ( x , y ) ≥ θ max { M ( x ) , M ( y )} . Since ∑ y ≠ x J ( x , y ) ≤ ( d − 1 ) M ( x ) \sum_{y\ne x}J(x,y)\le(d-1)M(x) ∑ y = x J ( x , y ) ≤ ( d − 1 ) M ( x ) and every neighbor contributes at least θ M ( x ) \theta M(x) θ M ( x ) , the maximum degree is at most d max : = ⌈ ( d − 1 ) / θ ⌉ d_{\max}:=\lceil(d-1)/\theta\rceil d m a x := ⌈( d − 1 ) / θ ⌉ . Variables with M ( x ) = 0 M(x)=0 M ( x ) = 0 are isolated.
Color each vertex independently green with probability 1 / ( d max + 1 ) 1/(d_{\max}+1) 1/ ( d m a x + 1 ) and red otherwise. For a feasible solution S S S agreeing with the initial guesses, call a coloring good if every variable of S S S is green and every neighbor outside S S S is red. At most k k k variables must be green and k d max kd_{\max} k d m a x must be red, so a random coloring is good with probability at least [ e ( d max + 1 ) ] − k [e(d_{\max}+1)]^{-k} [ e ( d m a x + 1 ) ] − k .
In a good coloring, every neighbor of S S S outside S S S is red. Hence every green connected component meeting S S S lies within S S S and has at most k k k variables. We use a branching algorithm, described below, to choose which components to select in full.
Before branching, process each sampled coloring as follows. Set all red variables to 0. Also set all variables in a green component to 0 if it has more than k k k variables or contains a variable fixed to 0. Skip the coloring if this assigns 0 to a variable fixed to 1.
Select in full every remaining component containing a variable fixed to 1. If the total number of selected variables exceeds k k k , skip the coloring. Otherwise, subtract this number from k k k to obtain the remaining budget. The components still available for selection contain no variables fixed by the initial guesses.
Each remaining component is an item . Write K f r e e \mathcal{K}_{\mathrm{free}} K free for this family of components. Selecting an item y y y selects every variable in that component and has cost κ ( y ) : = ∣ y ∣ \kappa(y):=|y| κ ( y ) := ∣ y ∣ . Leaving it unselected sets all its variables to 0 and costs zero.
Constraints on items. For each original zero-free constraint C C C of positive weight, define a constraint on the at most d d d items whose components meet sc ( C ) \operatorname{sc}(C) sc ( C ) . An item assignment satisfies this new constraint exactly when the corresponding variable assignment satisfies C C C and all selected unit witnesses of C C C lie in exactly one component. All variable values fixed earlier are retained, including selected unit witnesses in components already fixed to 1. The new constraint has weight w ( C ) w(C) w ( C ) , and its scope is the set of items it involves. Write F m a s k F_{\mathrm{mask}} F mask for the total satisfied weight of these item constraints.
The masking condition makes the repair rule survive the recursive fixings: every nonempty zero-free relation obtained by fixing items remains Direct (Lemma 6.5 ). Indeed, in a satisfying assignment all selected original unit witnesses lie in one component. Resetting another selected item changes only controls, so satisfaction is preserved. If that component were already fixed to 1, resetting every remaining item would preserve satisfaction, contradicting zero-freeness. It is therefore a remaining unit witness, and any remaining control item can be reset safely.
The recursive search. Start with these item constraints and the remaining budget. Write b 0 ≤ k b_0 \le k b 0 ≤ k for the initial budget and b b b for the budget at a recursive call. All previously fixed choices remain fixed. If b = 0 b = 0 b = 0 or no constraints remain, select no further items. Otherwise, let Z \mathcal{Z} Z contain the current constraints satisfied when no further item is selected, and put
W : = ∑ C ∈ Z w ( C ) . W := \sum_{C \in\mathcal{Z}} w(C). W := C ∈ Z ∑ w ( C ) .
The thresholds η 1 , η 2 \eta_1, \eta_2 η 1 , η 2 are chosen below and remain fixed throughout the search. Each branch fixes choices for some undecided items. Subtract the cost of the items fixed to 1 from b b b and restrict each current constraint to the fixed choices. Remove constraints that become always satisfied or always unsatisfied, since their contribution is the same for every completion. Recurse on the remaining items and constraints with the reduced budget.
If W > 0 W > 0 W > 0 , define the weighted degree of an undecided item y y y within Z \mathcal{Z} Z by
deg 0 ( y ) : = ∑ C ∈ Z : y ∈ sc ( C ) w ( C ) . \operatorname{deg}_0(y) := \sum_{\substack{C \in\mathcal{Z}:\\ y \in\operatorname{sc}(C)}} w(C). deg 0 ( y ) := C ∈ Z : y ∈ sc ( C ) ∑ w ( C ) .
Let K h i \mathcal{K}_{\mathrm{hi}} K hi contain the items with deg 0 ( y ) ≥ η 1 W / b \operatorname{deg}_0(y) \ge\eta_1 W/b deg 0 ( y ) ≥ η 1 W / b . Each constraint involves at most d d d items, so
∑ y deg 0 ( y ) ≤ d W , ∣ K h i ∣ ≤ d b η 1 . \sum_y \operatorname{deg}_0(y) \le dW,\qquad|\mathcal{K}_{\mathrm{hi}}| \le\frac{db}{\eta_1}. y ∑ deg 0 ( y ) ≤ d W , ∣ K hi ∣ ≤ η 1 d b .
Guess which items of K h i \mathcal{K}_{\mathrm{hi}} K hi are selected by creating one branch for every subset of total cost at most b b b , including the empty subset. Fix the items in that subset to 1 and all other items of K h i \mathcal{K}_{\mathrm{hi}} K hi to 0. After restricting the constraints, also remove from the recursive instance every remaining constraint originally in Z \mathcal{Z} Z that is still satisfied when no further item is selected. The proof counts its weight before the remaining choices are known; the total weight later lost is at most η 1 W \eta_1 W η 1 W , as shown below.
If W = 0 W = 0 W = 0 , no current constraint is satisfied without selecting another item. For each undecided item y y y , let μ ( y ) \mu(y) μ ( y ) be its single-item value : the total weight satisfied by selecting y y y alone among the undecided items, with all fixed choices retained. For distinct items y , z y,z y , z , let I i t e m ( y → z ) I_{\mathrm{item}}(y \to z) I item ( y → z ) be the part of μ ( y ) \mu(y) μ ( y ) contributed by constraints involving z z z .
For an item y y y with μ ( y ) > 0 \mu(y) > 0 μ ( y ) > 0 , define its interaction candidates by
Bad ( y ) : = { z ≠ y : I i t e m ( y → z ) ≥ ( η 2 / b ) μ ( y ) } . \operatorname{Bad}(y) := \{z \ne y : I_{\mathrm{item}}(y \to z) \ge(\eta_2/b)\mu(y)\}. Bad ( y ) := { z = y : I item ( y → z ) ≥ ( η 2 / b ) μ ( y )} .
Put Bad ( y ) = ∅ \operatorname{Bad}(y) = \varnothing Bad ( y ) = ∅ when μ ( y ) = 0 \mu(y) = 0 μ ( y ) = 0 . Every constraint counted by μ ( y ) \mu(y) μ ( y ) involves at most d − 1 d - 1 d − 1 other items. Consequently,
∑ z ≠ y I i t e m ( y → z ) ≤ ( d − 1 ) μ ( y ) , ∣ Bad ( y ) ∣ ≤ ( d − 1 ) b η 2 . \sum_{z \ne y} I_{\mathrm{item}}(y \to z) \le(d - 1)\mu(y),\qquad|\operatorname{Bad}(y)| \le\frac{(d - 1)b}{\eta_2}. z = y ∑ I item ( y → z ) ≤ ( d − 1 ) μ ( y ) , ∣ Bad ( y ) ∣ ≤ η 2 ( d − 1 ) b .
Set ℓ : = ⌊ ( d − 1 ) b 2 / η 2 ⌋ + 1 \ell:= \lfloor(d - 1)b^2/\eta_2 \rfloor+ 1 ℓ := ⌊( d − 1 ) b 2 / η 2 ⌋ + 1 . For each cost bound c ∈ { 1 , … , b } c \in\{1,\ldots,b\} c ∈ { 1 , … , b } , the top candidates L c L_c L c are the ℓ \ell ℓ items with largest positive values μ ( y ) \mu(y) μ ( y ) among those with κ ( y ) ≤ c \kappa(y) \le c κ ( y ) ≤ c , or all such items if fewer exist. Use a fixed item order to break ties. The branch set is the union of the top candidates and their interaction candidates:
B : = ⋃ c = 1 b ( L c ∪ ⋃ y ∈ L c Bad ( y ) ) . \mathcal{B} := \bigcup_{c=1}^{b}\left(L_c \cup\bigcup_{y \in L_c}\operatorname{Bad}(y)\right). B := c = 1 ⋃ b L c ∪ y ∈ L c ⋃ Bad ( y ) .
In particular, ∣ B ∣ ≤ b ℓ ( 1 + ( d − 1 ) b / η 2 ) |\mathcal{B}| \le b\ell(1 + (d - 1)b/\eta_2) ∣ B ∣ ≤ b ℓ ( 1 + ( d − 1 ) b / η 2 ) . Create one branch selecting each y ∈ B y \in\mathcal{B} y ∈ B with κ ( y ) ≤ b \kappa(y) \le b κ ( y ) ≤ b , leaving all other undecided items available. Also keep the choice of selecting no further items as a candidate, without recursing on it.
For each branch, combine the recursive solution with the choices fixed in that branch. Evaluate each resulting assignment on all constraints of the current instance, including those removed before recursion, and return an assignment with largest value.
Also record ρ − 1 ( 1 ) \rho^{-1}(1) ρ − 1 ( 1 ) as a feasible candidate, setting every other variable to 0. Repeat for [ 3 ( d max + 1 ) ] k [3(d_{\max}+1)]^{k} [ 3 ( d m a x + 1 ) ] k independent colorings and return the recorded solution with largest F F F -value, giving constant success probability. For a deterministic version, use Lemma 6.4 .
More precisely, put q = k ( d max + 1 ) q = k(d_{\max}+1) q = k ( d m a x + 1 ) . That lemma constructs at most ( q + 1 ) O ( k ) log ( n + 2 ) (q+1)^{O(k)}\log(n+2) ( q + 1 ) O ( k ) log ( n + 2 ) colorings in ( q + 1 ) O ( k ) Q ( 1 ) (q+1)^{O(k)}Q(1) ( q + 1 ) O ( k ) Q ( 1 ) time, with a good coloring for every feasible S S S . A family of maps to [ q 2 ] [q^{2}] [ q 2 ] assigns distinct labels to S S S and its external neighbors under some map. For each map, enumerate the subsets of at most k k k labels and color exactly those labels green. Choosing the labels of S S S makes all its external neighbors red. Enumerating this family gives the deterministic algorithm claimed in Theorem 1.1 .
Why the search works. Fix a feasible solution S S S . One of the initial guesses agrees with S S S . Consider this guess and a coloring good for S S S . Every green component meeting S S S lies within S S S , so preprocessing keeps it. Every component selected in advance also lies in S S S . Thus the remaining items of S S S fit the remaining budget.
Write F m a s k ( S ) F_{\mathrm{mask}}(S) F mask ( S ) for the value of the corresponding item assignment. A satisfied original constraint is counted unless its selected unit witnesses lie in different green components. Assign each omitted constraint to one such witness pair x , y x,y x , y . Since these vertices are not joined by an edge, J ( x , y ) ≤ θ ( M ( x ) + M ( y ) ) J(x,y) \le\theta(M(x)+M(y)) J ( x , y ) ≤ θ ( M ( x ) + M ( y )) . Summing over pairs and using ∑ x ∈ S M ( x ) ≤ c d O P T \sum_{x\in S} M(x) \le c_d\mathrm{OPT} ∑ x ∈ S M ( x ) ≤ c d OPT from (1) gives
F m a s k ( S ) ≥ F ( S ) − θ k c d O P T . F_{\mathrm{mask}}(S) \ge F(S) - \theta k c_d\mathrm{OPT}. F mask ( S ) ≥ F ( S ) − θ k c d OPT .
We next bound the additional loss caused by the search.
Let σ \sigma σ initially be the item assignment determined by S S S . At each recursive call, it specifies the choices for the remaining undecided items. We follow a branch agreeing with these choices, changing σ \sigma σ only when a replacement is needed.
When W > 0 W>0 W > 0 , follow the branch selecting exactly the items of K h i \mathcal{K}_{\mathrm{hi}} K hi selected by σ \sigma σ . This fixes all items of large weighted degree consistently with σ \sigma σ , and its remaining choices fit the reduced budget. A removed constraint whose weight was counted before the remaining choices were known can later become unsatisfied only if some selected remaining item occurs in its scope. Every remaining item is outside K h i \mathcal{K}_{\mathrm{hi}} K hi , so any feasible completion loses weight at most
∑ selected remaining items y deg 0 ( y ) ≤ b ⋅ η 1 W b = η 1 W . \sum_{\text{selected remaining items } y} \deg_{0}(y)
\le b\cdot\frac{\eta_{1}W}{b}
=\eta_{1}W. selected remaining items y ∑ deg 0 ( y ) ≤ b ⋅ b η 1 W = η 1 W .
This bound applies to the completion returned by the recursive call as well as to the comparison assignment.
When W = 0 W=0 W = 0 , if σ \sigma σ satisfies no current constraint, selecting no further items loses no additional value. Otherwise, if σ \sigma σ selects an item of B \mathcal{B} B , follow the branch selecting that item.
Suppose that σ \sigma σ has positive current value and selects no item of B \mathcal{B} B . Choose a current constraint satisfied by σ \sigma σ , and let C C C be the original constraint from which it was constructed. The selected unit witnesses of C C C lie in a single component.
Keep this component selected and set all other undecided items to 0, leaving fixed choices unchanged. This changes only control entries of C C C from 1 to 0, so the DIRECT property preserves satisfaction of C C C . Its selected unit witnesses remain in the same component, so the item constraint also remains satisfied.
If this component were already fixed to 1, selecting no undecided items would satisfy the current constraint, contradicting W = 0 W=0 W = 0 . Thus the component is an undecided item u u u selected by σ \sigma σ . Selecting u u u alone among the undecided items satisfies this constraint, so μ ( u ) > 0 \mu(u)>0 μ ( u ) > 0 . Put c : = κ ( u ) c:=\kappa(u) c := κ ( u ) .
Since μ ( u ) > 0 \mu(u) > 0 μ ( u ) > 0 and κ ( u ) = c \kappa(u) = c κ ( u ) = c , item u u u is eligible for L c L_c L c . However, u ∉ L c u \notin L_c u ∈ / L c , because L c ⊆ B L_c \subseteq\mathcal{B} L c ⊆ B and σ \sigma σ selects no item of B \mathcal{B} B . Thus ∣ L c ∣ = ℓ |L_c| = \ell ∣ L c ∣ = ℓ , and every item in L c L_c L c costs at most c c c and has single-item value at least μ ( u ) \mu(u) μ ( u ) .
Each selected item z z z has at most ( d − 1 ) b / η 2 (d-1)b/\eta_2 ( d − 1 ) b / η 2 interaction candidates. Since σ \sigma σ selects at most b b b items, the union of their interaction candidates has size at most ( d − 1 ) b 2 / η 2 < ℓ (d-1)b^2/\eta_2 < \ell ( d − 1 ) b 2 / η 2 < ℓ . Choose v ∈ L c v \in L_c v ∈ L c outside this union. Then κ ( v ) ≤ κ ( u ) \kappa(v) \le\kappa(u) κ ( v ) ≤ κ ( u ) and μ ( v ) ≥ μ ( u ) \mu(v) \ge\mu(u) μ ( v ) ≥ μ ( u ) . Also, v v v is unselected because L c ⊆ B L_c \subseteq\mathcal{B} L c ⊆ B .
For every selected item z z z , we have v ∉ Bad ( z ) v \notin\operatorname{Bad}(z) v ∈ / Bad ( z ) by the choice of v v v . We also have z ∉ Bad ( v ) z \notin\operatorname{Bad}(v) z ∈ / Bad ( v ) , since Bad ( v ) ⊆ B \operatorname{Bad}(v) \subseteq\mathcal{B} Bad ( v ) ⊆ B . Therefore,
I i t e m ( z → v ) ≤ η 2 b μ ( z ) , I i t e m ( v → z ) ≤ η 2 b μ ( v ) . I_{\mathrm{item}}(z \to v) \le\frac{\eta_2}{b}\mu(z), \qquad I_{\mathrm{item}}(v \to z) \le\frac{\eta_2}{b}\mu(v). I item ( z → v ) ≤ b η 2 μ ( z ) , I item ( v → z ) ≤ b η 2 μ ( v ) .
Selecting v v v alone, or any selected item z z z alone, together with the previously fixed choices is feasible. Each satisfied current constraint contributes the weight of a satisfied original constraint. Hence μ ( v ) ≤ O P T \mu(v) \le\mathrm{OPT} μ ( v ) ≤ OPT and μ ( z ) ≤ O P T \mu(z) \le\mathrm{OPT} μ ( z ) ≤ OPT . Summing over the at most b b b selected items gives
∑ z : σ ( z ) = 1 I i t e m ( z → v ) ≤ η 2 O P T , ∑ z : σ ( z ) = 1 I i t e m ( v → z ) ≤ η 2 O P T . \sum_{z:\sigma(z)=1} I_{\mathrm{item}}(z \to v) \le\eta_2\mathrm{OPT}, \qquad\sum_{z:\sigma(z)=1} I_{\mathrm{item}}(v \to z) \le\eta_2\mathrm{OPT}. z : σ ( z ) = 1 ∑ I item ( z → v ) ≤ η 2 OPT , z : σ ( z ) = 1 ∑ I item ( v → z ) ≤ η 2 OPT .
Replace u u u by v v v in σ \sigma σ . Since κ ( v ) ≤ κ ( u ) \kappa(v) \le\kappa(u) κ ( v ) ≤ κ ( u ) , the assignment remains feasible. Lemma 6.9 shows that removing u u u loses at most μ ( u ) \mu(u) μ ( u ) , whereas adding v v v gains at least μ ( v ) \mu(v) μ ( v ) minus the two interaction sums. Since μ ( v ) ≥ μ ( u ) \mu(v) \ge\mu(u) μ ( v ) ≥ μ ( u ) , the replacement loses at most 2 η 2 O P T 2\eta_2\mathrm{OPT} 2 η 2 OPT . Follow the branch selecting the top candidate v v v with this modified assignment.
The value W W W is also at most O P T \mathrm{OPT} OPT . Each recursive step therefore introduces loss at most max { η 1 , 2 η 2 } O P T \max\{\eta_1,2\eta_2\}\mathrm{OPT} max { η 1 , 2 η 2 } OPT . A branch selecting an item spends at least one unit of budget. The only branch that spends no budget fixes every item of K h i \mathcal{K}_{hi} K hi to 0 0 0 . All constraints previously in Z \mathcal{Z} Z are then removed, and every retained constraint rejects the choice of selecting no further items. Thus a branch that spends no budget is followed by a step that either spends budget or terminates. There are at most 2 b 0 + 1 2b_0+1 2 b 0 + 1 recursive steps along any path. Combining the loss bounds gives a returned selected set A A A satisfying
F ( A ) ≥ F m a s k ( S ) − ( 2 b 0 + 1 ) max { η 1 , 2 η 2 } O P T . F(A) \ge F_{\mathrm{mask}}(S) - (2b_0+1)\max\{\eta_1,2\eta_2\}\mathrm{OPT}. F ( A ) ≥ F mask ( S ) − ( 2 b 0 + 1 ) max { η 1 , 2 η 2 } OPT .
Here we add the losses along a recursion path. The formal proof of Theorem 6.11 uses induction on ϕ ( J ) = 2 b + 1 [ W > 0 ] \phi(\mathcal{J}) = 2b + 1[W > 0] ϕ ( J ) = 2 b + 1 [ W > 0 ] .
Error and running time. Set θ = ε / ( 4 k c d ) \theta= \varepsilon/(4kcd) θ = ε / ( 4 k c d ) . For each coloring, let b 0 b_0 b 0 be the initial remaining budget of its item search and set η 1 = ε / [ 4 ( 2 b 0 + 1 ) ] \eta_1 = \varepsilon/[4(2b_0+1)] η 1 = ε / [ 4 ( 2 b 0 + 1 )] and η 2 = η 1 / 2 \eta_2 = \eta_1/2 η 2 = η 1 /2 . Passing to item constraints omits at most ε O P T / 4 \varepsilon\mathrm{OPT}/4 ε OPT /4 , and the search loses at most another ε O P T / 4 \varepsilon\mathrm{OPT}/4 ε OPT /4 . Thus F ( A ) ≥ F ( S ) − ε O P T / 2 F(A) \ge F(S) - \varepsilon\mathrm{OPT}/2 F ( A ) ≥ F ( S ) − ε OPT /2 . Together with the common reduction’s loss, this gives the required ( 1 − ε ) (1-\varepsilon) ( 1 − ε ) approximation.
Choose C = ( 1 + d k / ε ) O ( 1 ) ≥ 2 C = (1+dk/\varepsilon)^{O(1)} \ge2 C = ( 1 + d k / ε ) O ( 1 ) ≥ 2 so that, for each r ≥ 1 r \ge1 r ≥ 1 , a call has at most C r C^r C r children that reduce the budget by r r r . There are at most one child that leaves the budget unchanged, and its next step spends budget or terminates. Counting children by r r r gives at most ( 4 C ) k (4C)^k ( 4 C ) k nodes. Each item constraint involves at most d d d items, so its satisfying assignments can be listed using at most 2 d 2^d 2 d evaluations of the original constraint. At each node and edge, restricting constraints, computing degrees and scores, and forming candidate lists take k O ( 1 ) 2 d ℓ i n O ( 1 ) k^{O(1)}2^d\ell_{\mathrm{in}}^{O(1)} k O ( 1 ) 2 d ℓ in O ( 1 ) time. Including the colorings and initial guesses gives total time 2 O ( d + k log ( 1 + d k / ε ) ) ℓ i n O ( 1 ) 2^{O(d+k\log(1+dk/\varepsilon))}\ell_{\mathrm{in}}^{O(1)} 2 O ( d + k l o g ( 1 + d k / ε )) ℓ in O ( 1 ) ; see § 6 .
Hardness: a reduction from Clique. Suppose Γ + \Gamma_+ Γ + contains a relation that fails DIRECT and a relation that fails ROOTED. They may be the same relation. We reduce CLIQUE to an unweighted instance I \mathcal{I} I with budget k ′ k' k ′ and integer target t ≥ 1 t \ge1 t ≥ 1 satisfying
OPT ( I ) ≤ t , OPT ( I ) = t ⟺ G has a k -clique . \operatorname{OPT}(\mathcal{I}) \le t, \qquad\operatorname{OPT}(\mathcal{I}) = t \Longleftrightarrow G \text{ has a } k\text{-clique}. OPT ( I ) ≤ t , OPT ( I ) = t ⟺ G has a k -clique .
Both k ′ k' k ′ and t t t are bounded by functions of k , d k,d k , d .
An inaccessible relation. Choose a minimal satisfying support A A A consisting only of controls, and put q = ∣ A ∣ ≥ 2 q = |A| \ge2 q = ∣ A ∣ ≥ 2 . For each graph edge, place its endpoints in two coordinates of A A A , use q − 2 q - 2 q − 2 shared variables in the other coordinates of A A A , and use fresh variables in every coordinate outside A A A . Set k ′ = k + q − 2 k' = k + q - 2 k ′ = k + q − 2 and t = ( k 2 ) t = \binom{k}{2} t = ( 2 k ) . If all shared variables are selected, an edge constraint with no fresh variable selected is satisfied exactly when both endpoints are selected. With s s s selected vertices and r r r selected fresh variables, s + r ≤ k s + r \le k s + r ≤ k and the score is at most ( s 2 ) + r \binom{s}{2} + r ( 2 s ) + r . For k ≥ q + 3 k \ge q + 3 k ≥ q + 3 , reaching t t t forces s = k s = k s = k and a clique. If a shared variable is missing, every satisfied constraint needs its own selected fresh variable, giving score at most k ′ < t k' < t k ′ < t .
Two accessible relations. Otherwise, choose accessible P , Q ∈ Γ + P,Q \in\Gamma_+ P , Q ∈ Γ + , with P P P failing Direct and Q Q Q failing Rooted. From these relations, we construct a fixed switch gadget : a small collection of constraints with a switch variable x x x , private variables, and shared variables called pins .
With all pins set to 1, selecting a designated set of h h h private variables satisfies h h h constraints when x = 0 x = 0 x = 0 and h + 1 h + 1 h + 1 when x = 1 x = 1 x = 1 . Any other choice of private variables satisfies at most as many constraints as the number of private variables selected, regardless of x x x . Thus, the switch gives one extra satisfied constraint only for the designated choice.
Represent each graph vertex v v v by a variable x v x_v x v . For each edge u v uv uv , use two copies of the gadget with switches x u , x v x_u,x_v x u , x v , shared private variables, and separate pin groups. The designated choice then gives one extra point for each selected endpoint. Selecting both x u x_u x u and x v x_v x v gives two extra points using the same h h h private variables, so the construction rewards edges whose endpoints are both selected.
Additional constraints ensure that every pin is set to 1 in any assignment reaching the target score. We choose a budget k ′ k' k ′ and a target t t t , both depending only on k k k and d d d , so that the optimum is at most t t t and equals t t t exactly when the graph contains a k k k -clique. The instance is unweighted, and no two constraints use the same set of variables.
Finally, an EPAS with ε = 1 / ( 2 t ) \varepsilon= 1/(2t) ε = 1/ ( 2 t ) must return score t t t when a clique exists and at most t − 1 t - 1 t − 1 otherwise, since scores are integers. For fixed Γ \Gamma Γ , this decides Clique in FPT time. The full construction and proof are in § 7 .
Classification and common reductions
The following sections prove Theorem 1.1 : a classification of the fixed finite Boolean constraint languages Γ \Gamma Γ for which Max k k k -Weight CSP(Γ \Gamma Γ ) admits an EPAS parameterized by the budget k k k . We prove the approximation guarantee for each of the two repair rules, Direct and Rooted, and prove hardness when neither rule holds for all the nonempty zero-free relations. As in § 2 , each constraint uses distinct variables, listed in coordinate order. § 8.1 proves Corollary 1.3 for relations of arity at most two.
Classification of zero-free relations
A relation is zero-valid if it contains the all-zero tuple and zero-free otherwise. Empty relations can be discarded because their constraints are never satisfied. Define
Γ + : = { R ∈ Γ : R ≠ ∅ , 0 ∉ R } , \Gamma_+ := \{R \in\Gamma: R \ne\varnothing,\ \mathbf{0} \notin R\}, Γ + := { R ∈ Γ : R = ∅ , 0 ∈ / R } ,
the nonempty zero-free part of the original language.
For a nonempty zero-free relation R ⊆ { 0 , 1 } r R \subseteq\{0,1\}^r R ⊆ { 0 , 1 } r , let e i e_i e i be the tuple whose unique 1 is in coordinate i i i . Coordinate i i i is a unit-witness coordinate if e i ∈ R e_i \in R e i ∈ R and a control otherwise. For a tuple α = ( α 1 , … , α r ) \alpha= (\alpha_1,\ldots,\alpha_r) α = ( α 1 , … , α r ) , its support is supp ( α ) : = { i : α i = 1 } \operatorname{supp}(\alpha) := \{i : \alpha_i = 1\} supp ( α ) := { i : α i = 1 } .
Definition 4.1. Let R ⊆ { 0 , 1 } r R \subseteq\{0,1\}^r R ⊆ { 0 , 1 } r be a nonempty zero-free relation.
R R R is Direct if, for every α ∈ R \alpha\in R α ∈ R and every control coordinate c c c with α c = 1 \alpha_c = 1 α c = 1 ,
α − e c ∈ R . \alpha- e_c \in R. α − e c ∈ R .
Here α − e c \alpha-e_c α − e c changes coordinate c c c from 1 to 0 and leaves every other coordinate unchanged.
R R R is Rooted if, for every α ∈ R \alpha\in R α ∈ R , there is a unit-witness coordinate u u u with α u = 1 \alpha_u = 1 α u = 1 such that, for every B ⊆ supp ( α ) B \subseteq\operatorname{supp}(\alpha) B ⊆ supp ( α ) consisting only of control coordinates, R R R contains a tuple β \beta β with
supp ( β ) = { u } ∪ B . \operatorname{supp}(\beta) = \{u\} \cup B. supp ( β ) = { u } ∪ B .
Lemma 4.2. For a nonempty zero-free relation R R R of arity r r r , the Direct and Rooted rules can be checked using O ( r 2 r ) O(r2^r) O ( r 2 r ) and O ( r 4 r ) O(r4^r) O ( r 4 r ) membership queries, respectively. For a finite language Γ \Gamma Γ of arity at most d d d , checking both rules for every relation in Γ + \Gamma_+ Γ + uses O ( ∣ Γ ∣ d 4 ) O(|\Gamma|d^4) O ( ∣Γ∣ d 4 ) queries.
Proof. Each membership query asks whether a specified tuple belongs to a relation. For each relation R ∈ Γ R \in\Gamma R ∈ Γ of arity r r r , first query the all-zero tuple. If it belongs to R R R , skip this relation: zero-valid relations need not satisfy either repair rule.
Otherwise, enumerate all 2 r 2^r 2 r Boolean tuples and record which belong to R R R . Discard R R R if none belongs to it. The remaining relations are exactly those in Γ + \Gamma_+ Γ + . For each such relation, the answers for the unit tuples e i e_i e i identify which coordinates are unit witnesses and which are controls.
For Direct, for each α ∈ R \alpha\in R α ∈ R and each control coordinate c c c with α c = 1 \alpha_c = 1 α c = 1 , query whether α − e c ∈ R \alpha-e_c \in R α − e c ∈ R . There are at most r r r such tests per tuple, giving O ( r 2 r ) O(r2^r) O ( r 2 r ) queries.
For Rooted, for each α ∈ R \alpha\in R α ∈ R , try every unit-witness coordinate u u u with α u = 1 \alpha_u = 1 α u = 1 . For each such u u u and every B ⊆ supp ( α ) B \subseteq\operatorname{supp}(\alpha) B ⊆ supp ( α ) consisting only of control coordinates, query the tuple whose support is { u } ∪ B \{u\} \cup B { u } ∪ B . The rule holds exactly when every α ∈ R \alpha\in R α ∈ R has a choice of u u u for which all these queries succeed. There are at most r r r choices of u u u and 2 r 2^r 2 r subsets B B B per tuple, giving O ( r 4 r ) O(r4^r) O ( r 4 r ) queries.
Summing over Γ \Gamma Γ gives O ( ∣ Γ ∣ d 4 ) O(|\Gamma|d^4) O ( ∣Γ∣ d 4 ) queries. For fixed Γ \Gamma Γ and d d d , this bound is constant.
Definition 4.3. A nonempty zero-free relation R ⊆ { 0 , 1 } r R \subseteq\{0,1\}^r R ⊆ { 0 , 1 } r is accessible if every α ∈ R \alpha\in R α ∈ R satisfies
there is u ∈ [ r ] with α u = 1 and e u ∈ R . (2) \text{there is }u \in[r]\text{ with }\alpha_u = 1\text{ and }e_u \in R. \tag*{(2)} there is u ∈ [ r ] with α u = 1 and e u ∈ R . (2) It is inaccessible otherwise.
Lemma 4.4. Every nonempty zero-free relation that is Direct or Rooted is accessible.
Proof. For Rooted, the definition requires every α ∈ R \alpha\in R α ∈ R to have α u = 1 \alpha_u = 1 α u = 1 at some unit-witness coordinate u u u .
For Direct, suppose that some α ∈ R \alpha\in R α ∈ R has no 1 in a unit-witness coordinate. Every coordinate set to 1 is then a control. Set these coordinates to 0 one at a time. The Direct rule preserves membership in R R R at every step, so the all-zero tuple belongs to R R R . This contradicts zero-freeness.
Both sufficient conditions may hold. A language that satisfies neither condition belongs to the hard case.
Order of the proofs. § 4.2 reduces arbitrary instances to zero-free instances in a form that both algorithms can use. § 4.3 bounds the sum of single-variable scores, which both algorithms use to control their approximation error. § 5 gives the algorithm for Rooted relations, and § 6 gives the algorithm for Direct relations. § 7 proves hardness when neither rule holds for all relations in Γ + \Gamma_+ Γ + . § 8 combines these results to prove the classification, and § 8.1 handles relations of arity at most two.
Reduction to zero-free constraints
Fix a Boolean constraint language Γ \Gamma Γ of arity at most d d d . We reduce approximation over Γ \Gamma Γ to approximation over its zero-free part Γ + \Gamma_{+} Γ + , while respecting prescribed variable values. The same reduction applies to both the Direct and Rooted algorithms.
Suppose A \mathcal{A} A is an algorithm with the following guarantee. Given an instance J \mathcal{J} J over Γ + \Gamma_{+} Γ + with budget k k k , a partial assignment ρ \rho ρ with ∣ ρ − 1 ( 1 ) ∣ ≤ k |\rho^{-1}(1)| \leq k ∣ ρ − 1 ( 1 ) ∣ ≤ k , and a rational δ ∈ ( 0 , 1 ) \delta\in(0,1) δ ∈ ( 0 , 1 ) , it returns a feasible assignment τ \tau τ extending ρ \rho ρ such that
F J ( τ ) ≥ F J ( τ ′ ) − δ OPT ( J ) F^{\mathcal{J}}(\tau) \geq F^{\mathcal{J}}(\tau')-\delta\operatorname{OPT}(\mathcal{J}) F J ( τ ) ≥ F J ( τ ′ ) − δ OPT ( J )
for every feasible assignment τ ′ \tau' τ ′ extending ρ \rho ρ . Here OPT ( J ) \operatorname{OPT}(\mathcal{J}) OPT ( J ) is measured before imposing ρ \rho ρ . The running time of A \mathcal{A} A is g ( k , d , δ ) ℓ i n O ( 1 ) g(k,d,\delta)\ell_{\mathrm{in}}^{O(1)} g ( k , d , δ ) ℓ in O ( 1 ) .
Lemma 4.5. Using A \mathcal{A} A , for every rational ε ∈ ( 0 , 1 ) \varepsilon\in(0,1) ε ∈ ( 0 , 1 ) , we can compute a ( 1 − ε ) (1-\varepsilon) ( 1 − ε ) -approximate solution to any instance over Γ \Gamma Γ in time
2 O ( k log ( 1 + d k / ε ) ) g ( k , d , ε / 2 ) ℓ i n O ( 1 ) . 2^{O(k\log(1+dk/\varepsilon))}g(k,d,\varepsilon/2)\ell_{\mathrm{in}}^{O(1)}. 2 O ( k l o g ( 1 + d k / ε )) g ( k , d , ε /2 ) ℓ in O ( 1 ) .
We prove the lemma by constructing a small family of partial assignments. Consider an instance I = ( X , C , w , k ) \mathcal{I}=(X,C,w,k) I = ( X , C , w , k ) over Γ \Gamma Γ . Discard empty relations, and split the remaining constraints into the zero-valid constraints C 0 C_{0} C 0 and the zero-free constraints C + C_{+} C + . Let I + : = ( X , C + , w ∣ C + , k ) \mathcal{I}_{+}:=(X,C_{+},w|_{C_{+}},k) I + := ( X , C + , w ∣ C + , k ) . Write F 0 F_{0} F 0 and F + F_{+} F + for the two contributions to the objective, so F = F 0 + F + F=F_{0}+F_{+} F = F 0 + F + , and put OPT + : = OPT ( I + ) \operatorname{OPT}_{+}:=\operatorname{OPT}(\mathcal{I}_{+}) OPT + := OPT ( I + ) . Define
w 0 : = ∑ C ∈ C 0 w ( C ) , D 0 ( v ) : = ∑ C ∈ C 0 : v ∈ sc ( C ) w ( C ) . w_{0}:=\sum_{C\in C_{0}}w(C),\qquad D_{0}(v):=\sum_{C\in C_{0}:v\in\operatorname{sc}(C)}w(C). w 0 := C ∈ C 0 ∑ w ( C ) , D 0 ( v ) := C ∈ C 0 : v ∈ sc ( C ) ∑ w ( C ) .
Thus w 0 w_{0} w 0 is the value of the all-zero assignment, and D 0 ( v ) D_{0}(v) D 0 ( v ) bounds the weight of zero-valid constraints that changing v v v can affect. Nonnegative weights give OPT + ≤ OPT \operatorname{OPT}_{+}\leq\operatorname{OPT} OPT + ≤ OPT , and the all-zero assignment gives w 0 ≤ OPT w_{0}\leq\operatorname{OPT} w 0 ≤ OPT .
For k ≥ 1 k\geq1 k ≥ 1 and a rational ε ∈ ( 0 , 1 ) \varepsilon\in(0,1) ε ∈ ( 0 , 1 ) , define
H : = { v ∈ X : D 0 ( v ) > ε w 0 4 k } . H:=\left\{v\in X:D_{0}(v)>\frac{\varepsilon w_{0}}{4k}\right\}. H := { v ∈ X : D 0 ( v ) > 4 k ε w 0 } .
For each T ⊆ H T\subseteq H T ⊆ H with ∣ T ∣ ≤ k |T|\leq k ∣ T ∣ ≤ k , let ρ T : H → { 0 , 1 } \rho_{T}:H\to\{0,1\} ρ T : H → { 0 , 1 } be the restriction of τ T \tau_{T} τ T to H H H . Thus ρ T \rho_{T} ρ T assigns 1 to T T T and 0 to H ∖ T H\setminus T H ∖ T . The choice of H H H adapts Manurangsi’s degree-threshold argument for clauses with negative literals [21 ] . The next lemma bounds the loss on zero-valid constraints once these values are fixed.
Lemma 4.6. The family { ρ T : T ⊆ H , ∣ T ∣ ≤ k } \{\rho_{T}:T\subseteq H,\ |T|\leq k\} { ρ T : T ⊆ H , ∣ T ∣ ≤ k } has at most 2 O ( k log ( 1 + d k / ε ) ) 2^{O(k\log(1+dk/\varepsilon))} 2 O ( k l o g ( 1 + d k / ε )) members. For every S ⊆ X S\subseteq X S ⊆ X with ∣ S ∣ ≤ k |S|\leq k ∣ S ∣ ≤ k , the assignment τ S \tau_{S} τ S extends ρ T \rho_{T} ρ T for T = S ∩ H T=S\cap H T = S ∩ H , and every feasible assignment τ \tau τ extending this ρ T \rho_{T} ρ T satisfies
∣ F 0 ( τ ) − F 0 ( S ) ∣ ≤ ε 2 w 0 . |F_{0}(\tau)-F_{0}(S)|\leq\frac{\varepsilon}{2}w_{0}. ∣ F 0 ( τ ) − F 0 ( S ) ∣ ≤ 2 ε w 0 .
Proof. If w 0 = 0 w_{0}=0 w 0 = 0 , then D 0 ( v ) = 0 D_{0}(v)=0 D 0 ( v ) = 0 for every v v v , so H = ∅ H=\varnothing H = ∅ and the family has one member. Otherwise, since each constraint has arity at most d d d ,
∣ H ∣ ε w 0 4 k ≤ ∑ v ∈ H D 0 ( v ) ≤ ∑ v ∈ X D 0 ( v ) ≤ d w 0 . |H|\frac{\varepsilon w_{0}}{4k}\leq\sum_{v\in H}D_{0}(v)\leq\sum_{v\in X}D_{0}(v)\leq dw_{0}. ∣ H ∣ 4 k ε w 0 ≤ v ∈ H ∑ D 0 ( v ) ≤ v ∈ X ∑ D 0 ( v ) ≤ d w 0 .
Hence ∣ H ∣ ≤ 4 d k / ε |H|\leq4dk/\varepsilon ∣ H ∣ ≤ 4 d k / ε in either case. The number of members is at most
∑ i = 0 min { k , ∣ H ∣ } ( ∣ H ∣ i ) ≤ ( ∣ H ∣ + 1 ) k ≤ ( 1 + 4 d k / ε ) k . \sum_{i=0}^{\min\{k,|H|\}}\binom{|H|}{i}\leq(|H|+1)^{k}\leq(1+4dk/\varepsilon)^{k}. i = 0 ∑ m i n { k , ∣ H ∣ } ( i ∣ H ∣ ) ≤ ( ∣ H ∣ + 1 ) k ≤ ( 1 + 4 d k / ε ) k .
Now fix S S S and put T = S ∩ H T = S \cap H T = S ∩ H . By construction, τ S \tau_S τ S extends ρ T \rho_T ρ T . Let τ \tau τ be any feasible assignment extending ρ T \rho_T ρ T , and put A : = τ − 1 ( 1 ) A := \tau^{-1}(1) A := τ − 1 ( 1 ) . Then ∣ A ∣ ≤ k |A| \le k ∣ A ∣ ≤ k and A ∩ H = S ∩ H A \cap H = S \cap H A ∩ H = S ∩ H . Every zero-valid constraint whose satisfaction changes contains a variable on which A A A and S S S differ. Such a variable lies in ( A ∪ S ) ∖ H (A \cup S) \setminus H ( A ∪ S ) ∖ H . This set has at most 2 k 2k 2 k variables, and each has D 0 ( v ) ≤ ε w 0 / ( 4 k ) D_0(v) \le\varepsilon w_0/(4k) D 0 ( v ) ≤ ε w 0 / ( 4 k ) . Therefore
∣ F 0 ( τ ) − F 0 ( S ) ∣ ≤ ∑ v ∈ ( A ∪ S ) ∖ H D 0 ( v ) ≤ ε 2 w 0 . (3) |F_0(\tau)-F_0(S)| \le\sum_{v\in(A\cup S)\setminus H}D_0(v)\le\frac{\varepsilon}{2}w_0. \tag*{(3)} ∣ F 0 ( τ ) − F 0 ( S ) ∣ ≤ v ∈ ( A ∪ S ) ∖ H ∑ D 0 ( v ) ≤ 2 ε w 0 . (3)
□ \square □
Proof of Lemma 4.5. If k = 0 k = 0 k = 0 , return the all-zero assignment. Otherwise construct I + \mathcal{I}_+ I + and the family of partial assignments above. For each T ⊆ H T \subseteq H T ⊆ H with ∣ T ∣ ≤ k |T| \le k ∣ T ∣ ≤ k , run A ( I + , ρ T , ε / 2 ) \mathcal{A}(\mathcal{I}_+,\rho_T,\varepsilon/2) A ( I + , ρ T , ε /2 ) . Evaluate each returned assignment on the original instance and return one with the largest value. Every call uses the original zero-free relations; ρ T \rho_T ρ T only restricts the permitted assignments.
Let O O O be an optimal selected set for the original instance, and let τ \tau τ be the assignment returned by A ( I + , ρ O ∩ H , ε / 2 ) \mathcal{A}(\mathcal{I}_+,\rho_{O\cap H},\varepsilon/2) A ( I + , ρ O ∩ H , ε /2 ) . Since τ O \tau_O τ O is a feasible assignment extending ρ O ∩ H \rho_{O\cap H} ρ O ∩ H , the guarantee of A \mathcal{A} A gives
F + ( τ ) ≥ F + ( O ) − ε 2 OPT + . (4) F_+(\tau)\ge F_+(O)-\frac{\varepsilon}{2}\operatorname{OPT}_+. \tag*{(4)} F + ( τ ) ≥ F + ( O ) − 2 ε OPT + . (4)
Lemma 4.6 gives F 0 ( τ ) ≥ F 0 ( O ) − ε 2 w 0 F_0(\tau)\ge F_0(O)-\frac{\varepsilon}{2}w_0 F 0 ( τ ) ≥ F 0 ( O ) − 2 ε w 0 . Adding the two bounds yields
F ( τ ) ≥ F ( O ) − ε 2 ( OPT + + w 0 ) ≥ ( 1 − ε ) OPT . F(\tau)\ge F(O)-\frac{\varepsilon}{2}(\operatorname{OPT}_+ + w_0)\ge(1-\varepsilon)\operatorname{OPT}. F ( τ ) ≥ F ( O ) − 2 ε ( OPT + + w 0 ) ≥ ( 1 − ε ) OPT .
The best returned assignment has at least this value.
By Lemma 4.6 , there are at most 2 O ( k log ( 1 + d k / ε ) ) 2^{O(k\log(1+dk/\varepsilon))} 2 O ( k l o g ( 1 + d k / ε )) calls to A \mathcal{A} A . Each call takes time g ( k , d , ε / 2 ) ℓ i n O ( 1 ) g(k,d,\varepsilon/2)\ell_{\mathrm{in}}^{O(1)} g ( k , d , ε /2 ) ℓ in O ( 1 ) . Constructing I + \mathcal{I}_+ I + , preparing each ρ T \rho_T ρ T , and evaluating each returned assignment take polynomial time in ℓ i n \ell_{\mathrm{in}} ℓ in . For a fixed language, membership tests take constant time; for input relation descriptions, we use the assumption in Remark 1.2. This proves the running-time bound.
Bounding single-variable scores
For any instance with zero-free relations, the next lemma bounds the sum of single-variable scores over a set of at most k k k variables by c d c_d c d times the optimum. The factor c d c_d c d depends only on the arity bound d d d . Both algorithms use this bound to control their approximation loss. Put c 1 : = 1 c_1 := 1 c 1 := 1 and, for d ≥ 2 d \ge2 d ≥ 2 ,
c d : = d ( 1 − 1 d ) − ( d − 1 ) = d d ( d − 1 ) d − 1 ≤ e d . (5) c_d := d\left(1-\frac{1}{d}\right)^{-(d-1)}=\frac{d^d}{(d-1)^{d-1}}\le ed. \tag*{(5)} c d := d ( 1 − d 1 ) − ( d − 1 ) = ( d − 1 ) d − 1 d d ≤ e d . (5)
Lemma 4.7. Let J = ( X , C , w , k ) \mathcal{J}=(X,C,w,k) J = ( X , C , w , k ) be an instance of arity at most d d d , with k ≥ 1 k\ge1 k ≥ 1 and nonempty zero-free relations. For v ∈ X v\in X v ∈ X , let M ( v ) : = F J ( τ { v } ) M(v):=F^{\mathcal{J}}(\tau_{\{v\}}) M ( v ) := F J ( τ { v } ) . Then every Q ⊆ X Q\subseteq X Q ⊆ X with ∣ Q ∣ ≤ k |Q|\le k ∣ Q ∣ ≤ k satisfies
∑ v ∈ Q M ( v ) ≤ c d OPT ( J ) . (6) \sum_{v\in Q}M(v)\le c_d\operatorname{OPT}(\mathcal{J}). \tag*{(6)} v ∈ Q ∑ M ( v ) ≤ c d OPT ( J ) . (6)
Proof. For d = 1 d=1 d = 1 , every nonempty zero-free relation accepts only the value 1. Each constraint contributes to the score of its unique variable. Hence
∑ v ∈ Q M ( v ) = F J ( τ Q ) ≤ OPT ( J ) . \sum_{v\in Q}M(v)=F^{\mathcal{J}}(\tau_Q)\le\operatorname{OPT}(\mathcal{J}). v ∈ Q ∑ M ( v ) = F J ( τ Q ) ≤ OPT ( J ) .
Since c 1 = 1 c_1=1 c 1 = 1 , this proves the bound.
Now suppose d ≥ 2 d\ge2 d ≥ 2 . Retain each variable of Q Q Q independently with probability p : = 1 / d p:=1/d p := 1/ d , obtaining Q ′ ⊆ Q Q'\subseteq Q Q ′ ⊆ Q . The assignment τ Q ′ \tau_{Q'} τ Q ′ selects exactly the retained variables. For each v ∈ Q v \in Q v ∈ Q , consider every constraint C C C satisfied by τ { v } \tau_{\{v\}} τ { v } . If there is no such constraint, then M ( v ) = 0 M(v)=0 M ( v ) = 0 and v v v contributes nothing to the sum. For any such C C C , we have v ∈ sc ( C ) v \in\operatorname{sc}(C) v ∈ sc ( C ) : otherwise τ { v } [ C ] \tau_{\{v\}}[C] τ { v } [ C ] would be the all-zero tuple, contradicting zero-freeness.
Consider the event that v v v is the only retained variable in sc ( C ) \operatorname{sc}(C) sc ( C ) :
Q ′ ∩ sc ( C ) = { v } . Q' \cap\operatorname{sc}(C)=\{v\}. Q ′ ∩ sc ( C ) = { v } .
This requires retaining v v v and omitting the other ∣ Q ∩ sc ( C ) ∣ − 1 |Q \cap\operatorname{sc}(C)|-1 ∣ Q ∩ sc ( C ) ∣ − 1 variables of Q Q Q in the scope. By independence, its probability is
p ( 1 − p ) ∣ Q ∩ sc ( C ) ∣ − 1 ≥ p ( 1 − p ) d − 1 = 1 c d , p(1-p)^{|Q\cap\operatorname{sc}(C)|-1} \ge p(1-p)^{d-1}=\frac{1}{c_d}, p ( 1 − p ) ∣ Q ∩ sc ( C ) ∣ − 1 ≥ p ( 1 − p ) d − 1 = c d 1 ,
where the inequality uses ∣ Q ∩ sc ( C ) ∣ ≤ d |Q \cap\operatorname{sc}(C)| \le d ∣ Q ∩ sc ( C ) ∣ ≤ d . On this event, τ Q ′ [ C ] = τ { v } [ C ] \tau_{Q'}[C]=\tau_{\{v\}}[C] τ Q ′ [ C ] = τ { v } [ C ] , so τ Q ′ \tau_{Q'} τ Q ′ satisfies C C C . For a fixed constraint C C C , these events are disjoint for different choices of v v v , since C C C cannot have two different variables as its only retained variable. Thus the probability that τ Q ′ \tau_{Q'} τ Q ′ satisfies C C C is at least the sum of these event probabilities. Multiplying by the nonnegative weights and summing over constraints gives
E [ F I ( τ Q ′ ) ] = ∑ C ∈ C w ( C ) Pr [ τ Q ′ ⊨ C ] ≥ 1 c d ∑ C ∈ C ∑ v ∈ Q τ { v } ⊨ C w ( C ) = 1 c d ∑ v ∈ Q M ( v ) . \begin{aligned}
\mathbb{E}[F^{\mathcal{I}}(\tau_{Q'})]=\sum_{C\in\mathcal{C}}w(C)\Pr[\tau_{Q'}\models C] \\
&\ge\frac{1}{c_d}\sum_{C\in\mathcal{C}}\sum_{\substack{v\in Q\\ \tau_{\{v\}}\models C}}w(C) \\
&=\frac{1}{c_d}\sum_{v\in Q}M(v).
\end{aligned} E [ F I ( τ Q ′ )] = C ∈ C ∑ w ( C ) Pr [ τ Q ′ ⊨ C ] ≥ c d 1 C ∈ C ∑ v ∈ Q τ { v } ⊨ C ∑ w ( C ) = c d 1 v ∈ Q ∑ M ( v ) .
The last equality follows by changing the order of summation: for each v v v , the inner sum is precisely M ( v ) M(v) M ( v ) .
Every outcome has ∣ Q ′ ∣ ≤ ∣ Q ∣ ≤ k |Q'| \le|Q| \le k ∣ Q ′ ∣ ≤ ∣ Q ∣ ≤ k , so τ Q ′ \tau_{Q'} τ Q ′ is feasible and its value is at most OPT ( J ) \operatorname{OPT}(\mathcal{J}) OPT ( J ) . Therefore
1 c d ∑ v ∈ Q M ( v ) ≤ E [ F I ( τ Q ′ ) ] ≤ OPT ( J ) , \frac{1}{c_d}\sum_{v\in Q}M(v)\le\mathbb{E}[F^{\mathcal{I}}(\tau_{Q'})]\le\operatorname{OPT}(\mathcal{J}), c d 1 v ∈ Q ∑ M ( v ) ≤ E [ F I ( τ Q ′ )] ≤ OPT ( J ) ,
which proves (5).
Algorithm for Rooted relations
In this section, we provide an EPAS for Max k k k -Weight CSP(Γ \Gamma Γ ), parameterized by k k k , when every relation in Γ + \Gamma^+ Γ + is Rooted. The algorithm builds on the branching and exchange ideas of Jain et al. [16 ] .
For the rest of the zero-free analysis, fix an instance I = ( X , C , w , k ) \mathcal{I}=(X,\mathcal{C},w,k) I = ( X , C , w , k ) of arity at most d d d whose relations are nonempty, zero-free and Rooted. Empty relations may be discarded, since their constraints are never satisfied. We assume k ≥ 1 k \ge1 k ≥ 1 , since for k = 0 k=0 k = 0 the all-zero assignment is the unique feasible assignment.
For each constraint C ∈ C C \in\mathcal{C} C ∈ C , define
U C : = { x ∈ sc ( C ) : τ { x } ⊨ C } , N C : = sc ( C ) ∖ U C . U_C:=\{x\in\operatorname{sc}(C):\tau_{\{x\}}\models C\},\qquad N_C:=\operatorname{sc}(C)\setminus U_C. U C := { x ∈ sc ( C ) : τ { x } ⊨ C } , N C := sc ( C ) ∖ U C .
Thus U C U_C U C contains the variables that satisfy C C C when selected alone, and N C N_C N C contains the remaining variables. We call these unit-witness variables and controls, respectively. Abbreviate
F ( S ) : = F I ( τ S ) ( S ⊆ X ) . F(S):=F^{\mathcal{I}}(\tau_S)\qquad(S\subseteq X). F ( S ) := F I ( τ S ) ( S ⊆ X ) .
Single-variable scores and candidate scores
For v ∈ X v \in X v ∈ X , the single-variable score M ( v ) M(v) M ( v ) is the total weight of constraints satisfied by selecting v v v alone. For distinct v , x ∈ X v,x \in X v , x ∈ X , let I ( v → x ) I(v \to x) I ( v → x ) be the total weight of these constraints whose scope also contains x x x . Define
M ( v ) : = F ( { v } ) , (7) M(v) := F(\{v\}), \tag*{(7)} M ( v ) := F ({ v }) , (7)
I ( v → x ) : = ∑ C ∈ C : { v , x } ⊆ sc ( C ) τ { v } ⊨ C w ( C ) ( v ≠ x ) . (8) I(v \to x) := \sum_{\substack{C \in\mathcal{C}:\{v,x\}\subseteq\operatorname{sc}(C)\\ \tau_{\{v\}}\models C}} w(C) \qquad(v \ne x). \tag*{(8)} I ( v → x ) := C ∈ C : { v , x } ⊆ sc ( C ) τ { v } ⊨ C ∑ w ( C ) ( v = x ) . (8)
Both quantities depend only on the instance.
Let K ⊆ X K \subseteq X K ⊆ X be the set of variables required to be selected. For v ∈ X ∖ K v \in X \setminus K v ∈ X ∖ K , define
A K ( v ) : = { C ∈ C : v ∈ U C , K ∩ U C = ∅ , τ K ∪ { v } ⊨ C } . \mathcal{A}_K(v) := \left\{ C \in\mathcal{C} : \begin{array}{c} v \in U_C,\quad K \cap U_C = \varnothing, \\ \tau_{K\cup\{v\}} \models C \end{array} \right\}. A K ( v ) := { C ∈ C : v ∈ U C , K ∩ U C = ∅ , τ K ∪ { v } ⊨ C } .
Thus A K ( v ) \mathcal{A}_K(v) A K ( v ) consists of the constraints satisfied by selecting K ∪ { v } K \cup\{v\} K ∪ { v } for which v v v is the only selected unit-witness variable. The candidate score at K K K is
m K ( v ) : = ∑ C ∈ A K ( v ) w ( C ) . (9) m_K(v) := \sum_{C \in\mathcal{A}_K(v)} w(C). \tag*{(9)} m K ( v ) := C ∈ A K ( v ) ∑ w ( C ) . (9)
Every constraint in A K ( v ) \mathcal{A}_K(v) A K ( v ) is also satisfied by selecting v v v alone, since v ∈ U C v \in U_C v ∈ U C . Therefore,
0 ≤ m K ( v ) ≤ M ( v ) . (10) 0 \le m_K(v) \le M(v). \tag*{(10)} 0 ≤ m K ( v ) ≤ M ( v ) . (10)
The candidate score m K ( v ) m_K(v) m K ( v ) depends on K K K . It need not equal F ( K ∪ { v } ) − F ( K ) F(K \cup\{v\}) - F(K) F ( K ∪ { v }) − F ( K ) : it counts only constraints in A K ( v ) \mathcal{A}_K(v) A K ( v ) and does not subtract the weight of constraints that become unsatisfied when v v v is added.
Lemma 5.1. For every v ∈ X v \in X v ∈ X ,
∑ x ≠ v I ( v → x ) ≤ ( d − 1 ) M ( v ) . \sum_{x \ne v} I(v \to x) \le(d-1)M(v). x = v ∑ I ( v → x ) ≤ ( d − 1 ) M ( v ) .
Proof. Each constraint counted by M ( v ) M(v) M ( v ) contains at most d − 1 d-1 d − 1 other variables. Its weight therefore appears in at most d − 1 d-1 d − 1 of the sums I ( v → x ) I(v \to x) I ( v → x ) . Summing over these constraints proves the bound. □ \square □
The next two lemmas bound the loss from removing variables and the gain from adding variables, in terms of the candidate scores m K m_K m K and the sums I I I .
Lemma 5.2. For all K ⊆ S ⊆ X K \subseteq S \subseteq X K ⊆ S ⊆ X ,
F ( S ) − F ( K ) ≤ ∑ v ∈ S ∖ K m K ( v ) + ∑ u ∈ K x ∈ S ∖ K I ( u → x ) . (11) F(S) - F(K) \le\sum_{v \in S\setminus K} m_K(v) + \sum_{\substack{u \in K\\ x \in S\setminus K}} I(u \to x). \tag*{(11)} F ( S ) − F ( K ) ≤ v ∈ S ∖ K ∑ m K ( v ) + u ∈ K x ∈ S ∖ K ∑ I ( u → x ) . (11)
Proof. The difference F ( S ) − F ( K ) F(S) - F(K) F ( S ) − F ( K ) is at most the total weight of constraints satisfied by τ S \tau_S τ S but not by τ K \tau_K τ K . We show that each such constraint contributes its weight to at least one sum on the right.
Consider such a constraint C C C . First suppose that K ∩ U C = ∅ K \cap U_C = \varnothing K ∩ U C = ∅ . Since K ∩ N C ⊆ S ∩ N C K \cap N_C \subseteq S \cap N_C K ∩ N C ⊆ S ∩ N C , the Rooted property gives a variable v ∈ S ∩ U C v \in S \cap U_C v ∈ S ∩ U C such that C C C remains satisfied when we keep only v v v and the controls in K ∩ N C K \cap N_C K ∩ N C . These are precisely the variables of sc ( C ) \operatorname{sc}(C) sc ( C ) selected by τ K ∪ { v } \tau_{K\cup\{v\}} τ K ∪ { v } . Hence
τ K ∪ { v } ⊨ C . \tau_{K\cup\{v\}} \models C. τ K ∪ { v } ⊨ C .
Moreover, v ∉ K v \notin K v ∈ / K . Thus C ∈ A K ( v ) C \in\mathcal{A}_K(v) C ∈ A K ( v ) , and w ( C ) w(C) w ( C ) is included in m K ( v ) m_K(v) m K ( v ) .
Now suppose that K ∩ U C ≠ ∅ K \cap U_C \ne\varnothing K ∩ U C = ∅ , and choose u ∈ K ∩ U C u \in K \cap U_C u ∈ K ∩ U C . By the definition of U C U_C U C , τ { u } ⊨ C \tau_{\{u\}} \models C τ { u } ⊨ C . Since C C C is satisfied by τ S \tau_S τ S but not by τ K \tau_K τ K , its scope must contain a variable x ∈ S ∖ K x \in S \setminus K x ∈ S ∖ K . Therefore, w ( C ) w(C) w ( C ) is included in I ( u → x ) I(u \to x) I ( u → x ) .
These cases cover every lost constraint. Since weights are nonnegative, counting a constraint more than once only increases the bound. This proves (10).
Lemma 5.3. Let K ⊆ X K \subseteq X K ⊆ X and let P = { p 1 , … , p s } ⊆ X ∖ K P = \{p_1,\ldots,p_s\} \subseteq X \setminus K P = { p 1 , … , p s } ⊆ X ∖ K , with its distinct elements listed in a fixed order. Put P < i : = { p 1 , … , p i − 1 } P_{<i} := \{p_1,\ldots,p_{i-1}\} P < i := { p 1 , … , p i − 1 } . Then
F ( K ∪ P ) − F ( K ) ≥ ∑ i = 1 s m K ( p i ) − ∑ i = 1 s ∑ j < i I ( p i → p j ) − ∑ i = 1 s ∑ u ∈ K ∪ P < i I ( u → p i ) . (12) F(K \cup P) - F(K) \ge\sum_{i=1}^{s} m_K(p_i) - \sum_{i=1}^{s}\sum_{j<i} I(p_i \to p_j) - \sum_{i=1}^{s}\sum_{u \in K \cup P_{<i}} I(u \to p_i). \tag*{(12)} F ( K ∪ P ) − F ( K ) ≥ i = 1 ∑ s m K ( p i ) − i = 1 ∑ s j < i ∑ I ( p i → p j ) − i = 1 ∑ s u ∈ K ∪ P < i ∑ I ( u → p i ) . (12) Proof. Put K i : = K ∪ { p 1 , … , p i } K_i := K \cup\{p_1,\ldots,p_i\} K i := K ∪ { p 1 , … , p i } for i = 0 , … , s i = 0,\ldots,s i = 0 , … , s , so K 0 = K K_0 = K K 0 = K and K i − 1 = K ∪ P < i K_{i-1} = K \cup P_{<i} K i − 1 = K ∪ P < i . We bound the gain and loss when p i p_i p i is added. By Lemma 4.4, every assignment satisfying a constraint C C C selects at least one variable in U C U_C U C .
First consider C ∈ A K ( p i ) C \in\mathcal{A}_K(p_i) C ∈ A K ( p i ) whose scope contains no variable from P < i P_{<i} P < i . Before adding p i p_i p i , the assignment on C C C agrees with τ K [ C ] \tau_K[C] τ K [ C ] . Since K ∩ U C = ∅ K \cap U_C = \varnothing K ∩ U C = ∅ , this assignment does not satisfy C C C . After adding p i p_i p i , the assignment on C C C agrees with τ K ∪ { p i } [ C ] \tau_{K \cup\{p_i\}}[C] τ K ∪ { p i } [ C ] , which satisfies C C C by the definition of A K ( p i ) \mathcal{A}_K(p_i) A K ( p i ) . Thus C C C gives a new gain of w ( C ) w(C) w ( C ) .
A constraint in A K ( p i ) \mathcal{A}_K(p_i) A K ( p i ) containing an earlier variable p j p_j p j may fail to give this gain. Its weight is included in I ( p i → p j ) I(p_i \to p_j) I ( p i → p j ) , since selecting p i p_i p i alone satisfies C C C . Therefore, the total weight of candidate constraints that may fail to give a new gain is at most
∑ j < i I ( p i → p j ) . \sum_{j<i} I(p_i \to p_j). j < i ∑ I ( p i → p j ) . Counting a constraint more than once only increases this upper bound.
Now consider a constraint C C C satisfied by τ K i − 1 \tau_{K_{i-1}} τ K i − 1 but not by τ K i \tau_{K_i} τ K i . Since only p i p_i p i changes value, p i ∈ sc ( C ) p_i \in\operatorname{sc}(C) p i ∈ sc ( C ) . Accessibility gives a variable u ∈ K i − 1 ∩ U C u \in K_{i-1} \cap U_C u ∈ K i − 1 ∩ U C . Selecting u u u alone satisfies C C C , so w ( C ) w(C) w ( C ) is included in I ( u → p i ) I(u \to p_i) I ( u → p i ) . Thus the total weight lost is at most ∑ u ∈ K i − 1 I ( u → p i ) \sum_{u \in K_{i-1}} I(u \to p_i) ∑ u ∈ K i − 1 I ( u → p i ) .
Combining the gain and loss bounds gives
F ( K i ) − F ( K i − 1 ) ≥ m K ( p i ) − ∑ j < i I ( p i → p j ) − ∑ u ∈ K i − 1 I ( u → p i ) . F(K_i) - F(K_{i-1}) \ge m_K(p_i) - \sum_{j<i} I(p_i \to p_j) - \sum_{u \in K_{i-1}} I(u \to p_i). F ( K i ) − F ( K i − 1 ) ≥ m K ( p i ) − j < i ∑ I ( p i → p j ) − u ∈ K i − 1 ∑ I ( u → p i ) . Since K 0 = K K_0 = K K 0 = K , K s = K ∪ P K_s = K \cup P K s = K ∪ P , and K i − 1 = K ∪ P < i K_{i-1} = K \cup P_{<i} K i − 1 = K ∪ P < i , summing the preceding inequalities gives
F ( K ∪ P ) − F ( K ) = ∑ i = 1 s ( F ( K i ) − F ( K i − 1 ) ) F(K \cup P) - F(K) = \sum_{i=1}^{s} \bigl(F(K_i) - F(K_{i-1})\bigr) F ( K ∪ P ) − F ( K ) = i = 1 ∑ s ( F ( K i ) − F ( K i − 1 ) ) ≥ ∑ i = 1 s m K ( p i ) − ∑ i = 1 s ∑ j < i I ( p i → p j ) − ∑ i = 1 s ∑ u ∈ K ∪ P < i I ( u → p i ) . \ge\sum_{i=1}^{s} m_K(p_i) - \sum_{i=1}^{s}\sum_{j<i} I(p_i \to p_j) - \sum_{i=1}^{s}\sum_{u \in K \cup P_{<i}} I(u \to p_i). ≥ i = 1 ∑ s m K ( p i ) − i = 1 ∑ s j < i ∑ I ( p i → p j ) − i = 1 ∑ s u ∈ K ∪ P < i ∑ I ( u → p i ) . This proves (11).
Choosing candidates with small losses
Fix a rational δ ∈ ( 0 , 1 ) \delta\in(0,1) δ ∈ ( 0 , 1 ) and a partial assignment ρ : H → { 0 , 1 } \rho: H \to\{0,1\} ρ : H → { 0 , 1 } , where H ⊆ X H \subseteq X H ⊆ X and ∣ ρ − 1 ( 1 ) ∣ ≤ k |\rho^{-1}(1)| \le k ∣ ρ − 1 ( 1 ) ∣ ≤ k . Put
H 1 : = ρ − 1 ( 1 ) , H 0 : = ρ − 1 ( 0 ) , Y : = X ∖ H 0 . H^1 := \rho^{-1}(1), \qquad H^0 := \rho^{-1}(0), \qquad Y := X \setminus H^0. H 1 := ρ − 1 ( 1 ) , H 0 := ρ − 1 ( 0 ) , Y := X ∖ H 0 .
The search starts at K = H 1 K = H^1 K = H 1 and maintains H 1 ⊆ K ⊆ Y H^1 \subseteq K \subseteq Y H 1 ⊆ K ⊆ Y and ∣ K ∣ ≤ k |K| \le k ∣ K ∣ ≤ k . At a call with required selected set K K K , the available variables are those in Y ∖ K Y \setminus K Y ∖ K . Fix an order on X X X for breaking ties.
Parameters and the graph. By Lemma 4.7,
∑ v ∈ Q M ( v ) ≤ c d OPT ( I ) ( Q ⊆ X , ∣ Q ∣ ≤ k ) , (13) \sum_{v \in Q} M(v) \le c_d\operatorname{OPT}(\mathcal{I}) \qquad(Q \subseteq X,\ |Q| \le k), \tag*{(13)} v ∈ Q ∑ M ( v ) ≤ c d OPT ( I ) ( Q ⊆ X , ∣ Q ∣ ≤ k ) , (13)
where c d c_d c d is defined in (5) . Set
θ : = δ 2 k c d , d max : = ⌈ d − 1 θ ⌉ , ℓ : = k ( 3 d max + 1 ) . (14) \theta:= \frac{\delta}{2kc_d}, \qquad d_{\max} := \left\lceil\frac{d-1}{\theta}\right\rceil, \qquad\ell:= k(3d_{\max}+1). \tag*{(14)} θ := 2 k c d δ , d m a x := ⌈ θ d − 1 ⌉ , ℓ := k ( 3 d m a x + 1 ) . (14)
Construct a directed graph on X X X . For distinct v , x ∈ X v,x \in X v , x ∈ X , draw an arrow v → x v \to x v → x exactly when I ( v → x ) > θ M ( v ) I(v \to x) > \theta M(v) I ( v → x ) > θ M ( v ) , and give it weight I ( v → x ) I(v \to x) I ( v → x ) . The graph is computed once before the search. Write
E ( v ) : = { x ∈ X ∖ { v } : I ( v → x ) > θ M ( v ) } E(v) := \{x \in X \setminus\{v\} : I(v \to x) > \theta M(v)\} E ( v ) := { x ∈ X ∖ { v } : I ( v → x ) > θ M ( v )}
for the outgoing neighbors of v v v . If M ( v ) = 0 M(v)=0 M ( v ) = 0 , Lemma 5.1 gives I ( v → x ) = 0 I(v \to x)=0 I ( v → x ) = 0 for every x ≠ v x \ne v x = v , so E ( v ) = ∅ E(v)=\varnothing E ( v ) = ∅ . If M ( v ) > 0 M(v)>0 M ( v ) > 0 , each outgoing arrow has weight greater than θ M ( v ) \theta M(v) θ M ( v ) , and their total weight is at most ( d − 1 ) M ( v ) (d-1)M(v) ( d − 1 ) M ( v ) . Consequently,
∣ E ( v ) ∣ ≤ d max ( v ∈ X ) . (15) |E(v)| \le d_{\max} \qquad(v \in X). \tag*{(15)} ∣ E ( v ) ∣ ≤ d m a x ( v ∈ X ) . (15)
Candidate sets. At a call with required set K K K , define
E o u t ( K ) : = ( ⋃ u ∈ K E ( u ) ) ∩ ( Y ∖ K ) , ∣ E o u t ( K ) ∣ ≤ ∣ K ∣ d max ≤ k d max . (16) E^{\mathrm{out}}(K) := \left(\bigcup_{u \in K} E(u)\right) \cap(Y \setminus K), \qquad|E^{\mathrm{out}}(K)| \le|K|d_{\max} \le kd_{\max}. \tag*{(16)} E out ( K ) := ( u ∈ K ⋃ E ( u ) ) ∩ ( Y ∖ K ) , ∣ E out ( K ) ∣ ≤ ∣ K ∣ d m a x ≤ k d m a x . (16)
These are the available variables receiving an arrow from K K K . If x ∈ Y ∖ K x \in Y \setminus K x ∈ Y ∖ K lies outside E o u t ( K ) E^{\mathrm{out}}(K) E out ( K ) , then
I ( u → x ) ≤ θ M ( u ) ( u ∈ K ) . I(u \to x) \le\theta M(u) \qquad(u \in K). I ( u → x ) ≤ θ M ( u ) ( u ∈ K ) .
Let T K T_K T K consist of the ℓ \ell ℓ available variables with largest positive scores m K ( v ) m_K(v) m K ( v ) . If fewer than ℓ \ell ℓ available variables have positive scores, take all of them. Break ties by the fixed order on X X X . The search branches on
B K : = T K ∪ E o u t ( K ) ⊆ Y ∖ K . (17) B_K := T_K \cup E^{\mathrm{out}}(K) \subseteq Y \setminus K. \tag*{(17)} B K := T K ∪ E out ( K ) ⊆ Y ∖ K . (17)
Replacement sets. When ∣ T K ∣ = ℓ |T_K|=\ell ∣ T K ∣ = ℓ , form an undirected graph G K G_K G K on T K ∖ E o u t ( K ) T_K \setminus E^{\mathrm{out}}(K) T K ∖ E out ( K ) . Distinct vertices p , q p,q p , q are adjacent exactly when
I ( p → q ) > θ M ( p ) or I ( q → p ) > θ M ( q ) . (18) I(p \to q) > \theta M(p) \quad\text{or}\quad I(q \to p) > \theta M(q). \tag*{(18)} I ( p → q ) > θ M ( p ) or I ( q → p ) > θ M ( q ) . (18)
Lemma 5.4. If ∣ T K ∣ = ℓ |T_K|=\ell ∣ T K ∣ = ℓ , we can deterministically find, in polynomial time, a set of k k k variables
Q K = { q 1 , … , q k } ⊆ T K ∖ E o u t ( K ) (19) Q_K = \{q_1,\ldots,q_k\} \subseteq T_K \setminus E^{\mathrm{out}}(K) \tag*{(19)} Q K = { q 1 , … , q k } ⊆ T K ∖ E out ( K ) (19) such that
I ( u → v ) ≤ θ M ( u ) ( v ∈ Q K , u ∈ K ∪ Q K , u ≠ v ) . I(u \to v) \le\theta M(u) \qquad(v \in Q_K,\ u \in K \cup Q_K,\ u \ne v). I ( u → v ) ≤ θ M ( u ) ( v ∈ Q K , u ∈ K ∪ Q K , u = v ) .
Proof. Since ∣ T K ∣ = ℓ |T_K|=\ell ∣ T K ∣ = ℓ and ∣ E o u t ( K ) ∣ ≤ k d max |E^{\mathrm{out}}(K)|\le kd_{\max} ∣ E out ( K ) ∣ ≤ k d m a x ,
∣ T K ∖ E o u t ( K ) ∣ ≥ ℓ − k d max = k ( 2 d max + 1 ) . |T_K\setminus E^{\mathrm{out}}(K)|\ge\ell-kd_{\max}=k(2d_{\max}+1). ∣ T K ∖ E out ( K ) ∣ ≥ ℓ − k d m a x = k ( 2 d m a x + 1 ) .
Let W W W be a nonempty subset of the vertices of G K G_K G K . Every edge in the subgraph induced by W W W comes from at least one directed arrow with both endpoints in W W W . There are at most d max ∣ W ∣ d_{\max}|W| d m a x ∣ W ∣ such arrows, since each vertex has at most d max d_{\max} d m a x outgoing arrows. The induced subgraph therefore has at most d max ∣ W ∣ d_{\max}|W| d m a x ∣ W ∣ edges and average degree at most 2 d max 2d_{\max} 2 d m a x . Hence it contains a vertex with at most 2 d max 2d_{\max} 2 d m a x neighbors.
Repeatedly remove a vertex of minimum degree, breaking ties by the fixed order on X X X . Each vertex has at most 2 d max 2d_{\max} 2 d m a x neighbors still present when it is removed. Now color the vertices in reverse removal order. The already colored neighbors of a vertex are exactly those that were still present when it was removed. Thus at most 2 d max 2d_{\max} 2 d m a x colors are forbidden. Assigning the first available color uses at most 2 d max + 1 2d_{\max}+1 2 d m a x + 1 colors. This procedure is deterministic and takes polynomial time [9 , 24 ] .
A largest color class has at least
∣ T K ∖ E o u t ( K ) ∣ 2 d max + 1 ≥ k \frac{|T_K\setminus E^{\mathrm{out}}(K)|}{2d_{\max}+1}\ge k 2 d m a x + 1 ∣ T K ∖ E out ( K ) ∣ ≥ k
vertices. Choose such a class, breaking ties by color number, and let q 1 , … , q k q_1,\ldots,q_k q 1 , … , q k be its first k k k vertices in the fixed order on X X X . These vertices are pairwise nonadjacent in G K G_K G K , so no arrow joins two distinct variables in Q K Q_K Q K . Moreover, no arrow goes from K K K to Q K Q_K Q K , because Q K ⊆ T K ∖ E o u t ( K ) Q_K\subseteq T_K\setminus E^{\mathrm{out}}(K) Q K ⊆ T K ∖ E out ( K ) . The definition of the arrows now gives the required inequality for every v ∈ Q K v\in Q_K v ∈ Q K and u ∈ K ∪ Q K u\in K\cup Q_K u ∈ K ∪ Q K with u ≠ v u\ne v u = v .
The search
Algorithm. Algorithm 1 takes a partial assignment ρ \rho ρ , which fixes some variables to 0 or 1. It returns a selected set A A A with ∣ A ∣ ≤ k |A|\le k ∣ A ∣ ≤ k such that τ A \tau_A τ A agrees with ρ \rho ρ on every fixed variable. The scores M M M , the sums I I I , and the directed graph are computed once. At each call with ∣ K ∣ < k |K|<k ∣ K ∣ < k , the algorithm computes m K ( v ) m_K(v) m K ( v ) for every available variable v ∈ Y ∖ K v\in Y\setminus K v ∈ Y ∖ K .
At a call with required set K K K , the algorithm records K K K . If ∣ K ∣ < k |K|<k ∣ K ∣ < k and ∣ T K ∣ = ℓ |T_K|=\ell ∣ T K ∣ = ℓ , it also records
K ∪ { q 1 , … , q j } ( 0 ≤ j ≤ k − ∣ K ∣ ) , (20) K\cup\{q_1,\ldots,q_j\}\qquad(0\le j\le k-|K|), \tag*{(20)} K ∪ { q 1 , … , q j } ( 0 ≤ j ≤ k − ∣ K ∣ ) , (20)
where Q K = { q 1 , … , q k } Q_K=\{q_1,\ldots,q_k\} Q K = { q 1 , … , q k } is constructed by Lemma 5.4. When ∣ K ∣ < k |K|<k ∣ K ∣ < k , it calls the search on K ∪ { v } K\cup\{v\} K ∪ { v } for every v ∈ B K v\in B_K v ∈ B K . The call returns a set with largest F F F -value among its recorded sets and the sets returned by its children.
Algorithm 1: Rooted algorithm
Input: Zero-free Rooted instance I \mathcal{I} I with budget k k k ; rational δ ∈ ( 0 , 1 ) \delta\in(0,1) δ ∈ ( 0 , 1 ) ; partial assignment ρ : H → { 0 , 1 } \rho: H \to\{0,1\} ρ : H → { 0 , 1 } with ∣ ρ − 1 ( 1 ) ∣ ≤ k |\rho^{-1}(1)| \le k ∣ ρ − 1 ( 1 ) ∣ ≤ k .
Output: A selected set A A A with ∣ A ∣ ≤ k |A| \le k ∣ A ∣ ≤ k such that τ A \tau_A τ A extends ρ \rho ρ .
if k = 0 k = 0 k = 0 then
return ∅ \varnothing ∅
Set d d d to the largest constraint arity, taking d = 1 d = 1 d = 1 if C = ∅ \mathcal{C} = \varnothing C = ∅
Fix an order on X X X for enumerating branches and breaking ties
Set H 1 ← ρ − 1 ( 1 ) H^1 \gets\rho^{-1}(1) H 1 ← ρ − 1 ( 1 ) , H 0 ← ρ − 1 ( 0 ) H^0 \gets\rho^{-1}(0) H 0 ← ρ − 1 ( 0 ) , and Y ← X ∖ H 0 Y \gets X \setminus H^0 Y ← X ∖ H 0
Set θ \theta θ , d max d_{\max} d m a x , ℓ \ell ℓ as in (14)
Compute M M M , I I I , and the directed graph once
return RootedSearch(H 1 H^1 H 1 )
Procedure RootedSearch(K K K ):
L ← { K } \mathcal{L} \gets\{K\} L ← { K }
if ∣ K ∣ = k |K| = k ∣ K ∣ = k then
return K K K
Recompute m K ( v ) m_K(v) m K ( v ) for all v ∈ Y ∖ K v \in Y \setminus K v ∈ Y ∖ K
Form T K T_K T K , E o u t ( K ) E^{\mathrm{out}}(K) E out ( K ) , and B K B_K B K as defined above
if B K = ∅ B_K = \varnothing B K = ∅ then
return K K K
if ∣ T K ∣ = ℓ |T_K| = \ell ∣ T K ∣ = ℓ then
Form G K G_K G K on T K ∖ E o u t ( K ) T_K \setminus E^{\mathrm{out}}(K) T K ∖ E out ( K )
Construct Q K = { q 1 , … , q k } Q_K = \{q_1,\ldots,q_k\} Q K = { q 1 , … , q k } by Lemma 5.4
for j = 0 , … , k − ∣ K ∣ j = 0,\ldots,k - |K| j = 0 , … , k − ∣ K ∣ do
L ← L ∪ { K ∪ { q 1 , … , q j } } \mathcal{L} \gets\mathcal{L} \cup\{K \cup\{q_1,\ldots,q_j\}\} L ← L ∪ { K ∪ { q 1 , … , q j }}
foreach v ∈ B K v \in B_K v ∈ B K do
A v ← A_v \gets A v ← RootedSearch( K ∪ { v } ) (K \cup\{v\}) ( K ∪ { v })
L ← L ∪ { A v } \mathcal{L} \gets\mathcal{L} \cup\{A_v\} L ← L ∪ { A v }
return a set in L \mathcal{L} L with largest F F F -value
Replacement at a call. The next lemma bounds the loss from replacing a feasible selected set S ⊇ K S \supseteq K S ⊇ K by a set recorded at the current call when ( S ∖ K ) ∩ B K = ∅ (S \setminus K) \cap B_K = \varnothing ( S ∖ K ) ∩ B K = ∅ .
Lemma 5.5. Let K K K be the required selected set at a search call, and let K ⊆ S ⊆ Y K \subseteq S \subseteq Y K ⊆ S ⊆ Y with ∣ S ∣ ≤ k |S| \le k ∣ S ∣ ≤ k . If ( S ∖ K ) ∩ B K = ∅ (S \setminus K) \cap B_K = \varnothing ( S ∖ K ) ∩ B K = ∅ , then the call records a set A A A with K ⊆ A ⊆ Y K \subseteq A \subseteq Y K ⊆ A ⊆ Y and ∣ A ∣ ≤ k |A| \le k ∣ A ∣ ≤ k such that
F ( A ) ≥ F ( S ) − δ OPT ( I ) . (21) F(A) \ge F(S) - \delta\operatorname{OPT}(\mathcal{I}). \tag*{(21)} F ( A ) ≥ F ( S ) − δ OPT ( I ) . (21)
Proof. Put s : = ∣ S ∖ K ∣ s := |S \setminus K| s := ∣ S ∖ K ∣ . If s = 0 s = 0 s = 0 , take the recorded set A : = K = S A := K = S A := K = S . Assume henceforth that s ≥ 1 s \ge1 s ≥ 1 , so ∣ K ∣ < k |K| < k ∣ K ∣ < k .
Since E o u t ( K ) ⊆ B K E^{\mathrm{out}}(K) \subseteq B_K E out ( K ) ⊆ B K , the assumption gives I ( u → x ) ≤ θ M ( u ) I(u \to x) \le\theta M(u) I ( u → x ) ≤ θ M ( u ) for every u ∈ K u \in K u ∈ K and x ∈ S ∖ K x \in S \setminus K x ∈ S ∖ K . Lemma 5.2 therefore implies
F ( K ) ≥ F ( S ) − ∑ v ∈ S ∖ K m K ( v ) − θ s ∑ u ∈ K M ( u ) . (22) F(K) \ge F(S) - \sum_{v \in S \setminus K} m_K(v) - \theta s \sum_{u \in K} M(u). \tag*{(22)} F ( K ) ≥ F ( S ) − v ∈ S ∖ K ∑ m K ( v ) − θ s u ∈ K ∑ M ( u ) . (22)
Suppose first that ∣ T K ∣ < ℓ |T_K| < \ell ∣ T K ∣ < ℓ . Then T K T_K T K contains every available variable with positive candidate score. Since ( S ∖ K ) ∩ T K = ∅ (S \setminus K) \cap T_K = \varnothing ( S ∖ K ) ∩ T K = ∅ , we have m K ( v ) = 0 m_K(v) = 0 m K ( v ) = 0 for every v ∈ S ∖ K v \in S \setminus K v ∈ S ∖ K . Taking the recorded set A : = K A := K A := K and applying (12), we obtain
F ( A ) ≥ F ( S ) − θ s c d O P T OPT ( I ) ≥ F ( S ) − δ 2 OPT ( I ) , F(A) \ge F(S) - \theta s c d_{\mathrm{OPT}}\operatorname{OPT}(\mathcal{I}) \ge F(S) - \frac{\delta}{2}\operatorname{OPT}(\mathcal{I}), F ( A ) ≥ F ( S ) − θ sc d OPT OPT ( I ) ≥ F ( S ) − 2 δ OPT ( I ) ,
where the last inequality uses s ≤ k s \le k s ≤ k and θ k c d = δ / 2 \theta k c d = \delta/2 θ k c d = δ /2 . Thus A A A satisfies (20).
Now suppose that ∣ T K ∣ = ℓ |T_K|=\ell ∣ T K ∣ = ℓ . Let Q K = { q 1 , … , q k } Q_K=\{q_1,\ldots,q_k\} Q K = { q 1 , … , q k } be the replacement set constructed at this call, and put
P : = { q 1 , … , q s } , A : = K ∪ P . P:=\{q_1,\ldots,q_s\},\qquad A:=K\cup P. P := { q 1 , … , q s } , A := K ∪ P .
Since s ≤ k − ∣ K ∣ s\le k-|K| s ≤ k − ∣ K ∣ , the algorithm records A A A . Moreover, P ⊆ Y ∖ K P\subseteq Y\setminus K P ⊆ Y ∖ K , so K ⊆ A ⊆ Y K\subseteq A\subseteq Y K ⊆ A ⊆ Y and ∣ A ∣ = ∣ S ∣ ≤ k |A|=|S|\le k ∣ A ∣ = ∣ S ∣ ≤ k .
The sets P P P and S ∖ K S\setminus K S ∖ K both have s s s variables. Every variable in P P P belongs to T K T_K T K , whereas S ∖ K S\setminus K S ∖ K is disjoint from T K T_K T K . By the choice of T K T_K T K , every candidate score in P P P is at least every candidate score in S ∖ K S\setminus K S ∖ K . Hence
∑ p ∈ P m K ( p ) ≥ ∑ v ∈ S ∖ K m K ( v ) . (23) \sum_{p\in P}m_K(p)\ge\sum_{v\in S\setminus K}m_K(v). \tag*{(23)} p ∈ P ∑ m K ( p ) ≥ v ∈ S ∖ K ∑ m K ( v ) . (23)
Lemma 5.4 gives I ( u → v ) ≤ θ M ( u ) I(u\to v)\le\theta M(u) I ( u → v ) ≤ θ M ( u ) for every v ∈ P v\in P v ∈ P and u ∈ K ∪ P u\in K\cup P u ∈ K ∪ P with u ≠ v u\ne v u = v . Thus the two sums subtracted in Lemma 5.3 satisfy
∑ i = 1 s ∑ j < i I ( q i → q j ) ≤ θ ∑ i = 1 s ( i − 1 ) M ( q i ) ≤ θ s ∑ p ∈ P M ( p ) (24) \sum_{i=1}^{s}\sum_{j<i}I(q_i\to q_j)\le\theta\sum_{i=1}^{s}(i-1)M(q_i)\le\theta s\sum_{p\in P}M(p) \tag*{(24)} i = 1 ∑ s j < i ∑ I ( q i → q j ) ≤ θ i = 1 ∑ s ( i − 1 ) M ( q i ) ≤ θ s p ∈ P ∑ M ( p ) (24)
and
∑ i = 1 s ∑ u ∈ K ∪ { q 1 , … , q i − 1 } I ( u → q i ) ≤ θ s ∑ z ∈ A M ( z ) . (25) \sum_{i=1}^{s}\sum_{u\in K\cup\{q_1,\ldots,q_{i-1}\}}I(u\to q_i)\le\theta s\sum_{z\in A}M(z). \tag*{(25)} i = 1 ∑ s u ∈ K ∪ { q 1 , … , q i − 1 } ∑ I ( u → q i ) ≤ θ s z ∈ A ∑ M ( z ) . (25)
Using these bounds in Lemma 5.3, then applying (22) and (23) , gives
F ( A ) ≥ F ( K ) + ∑ p ∈ P m K ( p ) − θ s ( ∑ p ∈ P M ( p ) + ∑ z ∈ A M ( z ) ) ≥ F ( S ) − θ s ( ∑ u ∈ K M ( u ) + ∑ p ∈ P M ( p ) + ∑ z ∈ A M ( z ) ) = F ( S ) − 2 θ s ∑ z ∈ A M ( z ) ≥ F ( S ) − 2 θ k c d OPT ( I ) = F ( S ) − δ OPT ( I ) . \begin{aligned}
F(A)&\ge F(K)+\sum_{p\in P}m_K(p)-\theta s\left(\sum_{p\in P}M(p)+\sum_{z\in A}M(z)\right)\\
&\ge F(S)-\theta s\left(\sum_{u\in K}M(u)+\sum_{p\in P}M(p)+\sum_{z\in A}M(z)\right)\\
&=F(S)-2\theta s\sum_{z\in A}M(z)\\
&\ge F(S)-2\theta k c d\operatorname{OPT}(\mathcal{I})\\
&=F(S)-\delta\operatorname{OPT}(\mathcal{I}).
\end{aligned} F ( A ) ≥ F ( K ) + p ∈ P ∑ m K ( p ) − θ s p ∈ P ∑ M ( p ) + z ∈ A ∑ M ( z ) ≥ F ( S ) − θ s u ∈ K ∑ M ( u ) + p ∈ P ∑ M ( p ) + z ∈ A ∑ M ( z ) = F ( S ) − 2 θ s z ∈ A ∑ M ( z ) ≥ F ( S ) − 2 θ k c d OPT ( I ) = F ( S ) − δ OPT ( I ) .
The first equality uses A = K ∪ P A=K\cup P A = K ∪ P and K ∩ P = ∅ K\cap P=\varnothing K ∩ P = ∅ . The last two steps use ∣ A ∣ ≤ k |A|\le k ∣ A ∣ ≤ k , s ≤ k s\le k s ≤ k , (12), and 2 θ k c d = δ 2\theta k c d=\delta 2 θ k c d = δ .
Correctness. We prove feasibility and the approximation guarantee for every search call by induction on the remaining budget k − ∣ K ∣ k-|K| k − ∣ K ∣ .
Lemma 5.6. Let H 1 ⊆ K ⊆ Y H^1\subseteq K\subseteq Y H 1 ⊆ K ⊆ Y with ∣ K ∣ ≤ k |K|\le k ∣ K ∣ ≤ k . The search call in Algorithm 1 with required selected set K K K returns a set A A A with
K ⊆ A ⊆ Y , ∣ A ∣ ≤ k , K\subseteq A\subseteq Y,\qquad|A|\le k, K ⊆ A ⊆ Y , ∣ A ∣ ≤ k , such that
F ( A ) ≥ F ( S ) − δ OPT ( I ) F(A)\ge F(S)-\delta\operatorname{OPT}(\mathcal{I}) F ( A ) ≥ F ( S ) − δ OPT ( I ) for every S S S with K ⊆ S ⊆ Y K\subseteq S\subseteq Y K ⊆ S ⊆ Y and ∣ S ∣ ≤ k |S|\le k ∣ S ∣ ≤ k .
Proof. We prove feasibility and the value bound by induction on the remaining budget k − ∣ K ∣ k-|K| k − ∣ K ∣ .
If ∣ K ∣ = k |K|=k ∣ K ∣ = k , the call returns A = K A=K A = K . Any set S S S containing K K K and having size at most k k k must equal K K K . Thus A A A is feasible and F ( A ) = F ( S ) F(A)=F(S) F ( A ) = F ( S ) , which proves the value bound.
Suppose that ∣ K ∣ < k |K|<k ∣ K ∣ < k , and assume that the lemma holds for every required set with smaller remaining budget. Each recursive call has required set K ∪ { v } K\cup\{v\} K ∪ { v } for some v ∈ B K ⊆ Y ∖ K v\in B_K\subseteq Y\setminus K v ∈ B K ⊆ Y ∖ K . Hence
H 1 ⊆ K ∪ { v } ⊆ Y , ∣ K ∪ { v } ∣ = ∣ K ∣ + 1 ≤ k . H^1\subseteq K\cup\{v\}\subseteq Y,\qquad|K\cup\{v\}|=|K|+1\leq k. H 1 ⊆ K ∪ { v } ⊆ Y , ∣ K ∪ { v } ∣ = ∣ K ∣ + 1 ≤ k .
Its remaining budget is k − ∣ K ∣ − 1 k-|K|-1 k − ∣ K ∣ − 1 , so the induction hypothesis applies to every recursive call. Every set recorded directly at the current call is either K K K or a set K ∪ { q 1 , … , q j } K\cup\{q_1,\ldots,q_j\} K ∪ { q 1 , … , q j } with 0 ≤ j ≤ k − ∣ K ∣ 0\leq j\leq k-|K| 0 ≤ j ≤ k − ∣ K ∣ . Whenever such a prefix is recorded, its variables belong to the replacement set Q K ⊆ Y ∖ K Q_K\subseteq Y\setminus K Q K ⊆ Y ∖ K . Thus every directly recorded set contains K K K , lies in Y Y Y , and has size at most k k k . For every child call, the induction hypothesis gives
K ∪ { v } ⊆ A v ⊆ Y , ∣ A v ∣ ≤ k . K\cup\{v\}\subseteq A_v\subseteq Y,\qquad|A_v|\leq k. K ∪ { v } ⊆ A v ⊆ Y , ∣ A v ∣ ≤ k .
Thus every directly recorded set and every set returned by a child is feasible for the current call. The returned set A A A is one of these sets, so K ⊆ A ⊆ Y K\subseteq A\subseteq Y K ⊆ A ⊆ Y and ∣ A ∣ ≤ k |A|\leq k ∣ A ∣ ≤ k .
It remains to prove the value bound. Fix any S S S with K ⊆ S ⊆ Y K\subseteq S\subseteq Y K ⊆ S ⊆ Y and ∣ S ∣ ≤ k |S|\leq k ∣ S ∣ ≤ k . Suppose first that ( S ∖ K ) ∩ B K ≠ ∅ (S\setminus K)\cap B_K\ne\varnothing ( S ∖ K ) ∩ B K = ∅ . Choose v v v in this intersection. The algorithm makes a recursive call with required set K ∪ { v } K\cup\{v\} K ∪ { v } , and S S S satisfies
K ∪ { v } ⊆ S ⊆ Y , ∣ S ∣ ≤ k . K\cup\{v\}\subseteq S\subseteq Y,\qquad|S|\leq k. K ∪ { v } ⊆ S ⊆ Y , ∣ S ∣ ≤ k .
The induction hypothesis therefore gives
F ( A v ) ≥ F ( S ) − δ OPT ( I ) . F(A_v)\geq F(S)-\delta\operatorname{OPT}(\mathcal{I}). F ( A v ) ≥ F ( S ) − δ OPT ( I ) .
The current call returns a set of value at least that of every set returned by a child. Consequently,
F ( A ) ≥ F ( A v ) ≥ F ( S ) − δ OPT ( I ) . F(A)\geq F(A_v)\geq F(S)-\delta\operatorname{OPT}(\mathcal{I}). F ( A ) ≥ F ( A v ) ≥ F ( S ) − δ OPT ( I ) .
Now suppose that ( S ∖ K ) ∩ B K = ∅ (S\setminus K)\cap B_K=\varnothing ( S ∖ K ) ∩ B K = ∅ . Lemma 5.5 gives a set A ′ A' A ′ recorded directly at the current call with
F ( A ′ ) ≥ F ( S ) − δ OPT ( I ) . F(A')\geq F(S)-\delta\operatorname{OPT}(\mathcal{I}). F ( A ′ ) ≥ F ( S ) − δ OPT ( I ) .
The returned set has value at least that of every directly recorded set, so
F ( A ) ≥ F ( A ′ ) ≥ F ( S ) − δ OPT ( I ) . F(A)\geq F(A')\geq F(S)-\delta\operatorname{OPT}(\mathcal{I}). F ( A ) ≥ F ( A ′ ) ≥ F ( S ) − δ OPT ( I ) .
Since S S S was arbitrary, the value bound holds for every permitted set S S S . This completes the induction.
Running time.
Theorem 5.7. Let I = ( X , C , w , k ) \mathcal{I}=(X,C,w,k) I = ( X , C , w , k ) be an instance of arity at most d d d whose relations are nonempty, zero-free and Rooted. For every rational δ ∈ ( 0 , 1 ) \delta\in(0,1) δ ∈ ( 0 , 1 ) and partial assignment ρ \rho ρ fixing at most k k k variables to 1, Algorithm 1 returns a selected set A A A with ∣ A ∣ ≤ k |A|\leq k ∣ A ∣ ≤ k such that τ A \tau_A τ A extends ρ \rho ρ and
F ( A ) ≥ F ( S ) − δ OPT ( I ) F(A)\geq F(S)-\delta\operatorname{OPT}(\mathcal{I}) F ( A ) ≥ F ( S ) − δ OPT ( I ) for every selected set S S S with ∣ S ∣ ≤ k |S|\leq k ∣ S ∣ ≤ k such that τ S \tau_S τ S extends ρ \rho ρ . With membership tests as specified in Remark 1.2, the algorithm runs in time
2 O ( k log ( 1 + d k / δ ) ) ℓ i n O ( 1 ) . 2^{O(k\log(1+dk/\delta))}\ell_{\mathrm{in}}^{O(1)}. 2 O ( k l o g ( 1 + d k / δ )) ℓ in O ( 1 ) .
Proof. If k = 0 k = 0 k = 0 , the assumption on ρ \rho ρ implies that every fixed variable is assigned 0. The algorithm returns the empty set, which is the unique feasible selected set and respects ρ \rho ρ . Both the value bound and the running-time bound follow. Assume henceforth that k ≥ 1 k \ge1 k ≥ 1 .
The initial search call has required set K = H 1 = ρ − 1 ( 1 ) K = H^1 = \rho^{-1}(1) K = H 1 = ρ − 1 ( 1 ) , and Y = X ∖ ρ − 1 ( 0 ) Y = X \setminus\rho^{-1}(0) Y = X ∖ ρ − 1 ( 0 ) . A selected set S S S satisfies H 1 ⊆ S ⊆ Y H^1 \subseteq S \subseteq Y H 1 ⊆ S ⊆ Y exactly when τ S \tau_S τ S extends ρ \rho ρ . Lemma 5.6 therefore gives the stated feasibility and value guarantees. For the empty partial assignment, applying the lemma to an optimal selected set gives F ( A ) ≥ ( 1 − δ ) OPT ( T ) F(A) \ge(1 - \delta)\operatorname{OPT}(T) F ( A ) ≥ ( 1 − δ ) OPT ( T ) .
For the running-time analysis, it is enough to use the largest constraint arity as d d d , taking d = 1 d = 1 d = 1 if C = ∅ \mathcal{C} = \varnothing C = ∅ . Using a larger arity bound only enlarges the stated running-time bound.
Each call has at most
∣ B K ∣ ≤ ℓ + k d max = k ( 4 d max + 1 ) |B_K| \le\ell+ kd_{\max} = k(4d_{\max} + 1) ∣ B K ∣ ≤ ℓ + k d m a x = k ( 4 d m a x + 1 )
children. Every child adds one variable to K K K , so the recursion depth is at most k − ∣ H 1 ∣ ≤ k k - |H^1| \le k k − ∣ H 1 ∣ ≤ k . The number of calls is therefore at most
( 1 + k ( 4 d max + 1 ) ) k \left(1 + k(4d_{\max} + 1)\right)^k ( 1 + k ( 4 d m a x + 1 ) ) k
By (5) , we have c d ≤ e d c_d \le ed c d ≤ e d . Hence
d max ≤ 1 + d − 1 θ = 1 + 2 k c d ( d − 1 ) δ , d_{\max} \le1 + \frac{d - 1}{\theta} = 1 + \frac{2kc_d(d - 1)}{\delta}, d m a x ≤ 1 + θ d − 1 = 1 + δ 2 k c d ( d − 1 ) ,
and thus d max + 1 = O ( d 2 k / δ ) d_{\max} + 1 = O(d^2k/\delta) d m a x + 1 = O ( d 2 k / δ ) . Since δ < 1 \delta< 1 δ < 1 ,
1 + d 2 k 2 δ ≤ ( 1 + d k δ ) 2 . 1 + \frac{d^2k^2}{\delta} \le\left(1 + \frac{dk}{\delta}\right)^2. 1 + δ d 2 k 2 ≤ ( 1 + δ d k ) 2 .
It follows that the number of calls is 2 O ( k log ( 1 + d k / δ ) ) 2^{O(k\log(1+dk/\delta))} 2 O ( k l o g ( 1 + d k / δ )) .
We next bound the work done before the search and at each call. For every constraint C C C , we compute U C U_C U C by testing τ { x } ⊨ C \tau_{\{x\}} \models C τ { x } ⊨ C for each x ∈ sc ( C ) x \in\operatorname{sc}(C) x ∈ sc ( C ) , using at most d d d membership tests. For each v ∈ U C v \in U_C v ∈ U C , the weight w ( C ) w(C) w ( C ) contributes to M ( v ) M(v) M ( v ) and to I ( v → x ) I(v \to x) I ( v → x ) for every x ∈ sc ( C ) ∖ { v } x \in\operatorname{sc}(C) \setminus\{v\} x ∈ sc ( C ) ∖ { v } . Thus all scores M M M and sums I I I can be computed using at most d 2 d^2 d 2 additions per constraint. The directed graph is then computed once from these quantities.
At a call with required set K K K , a constraint can contribute to a candidate score only if K ∩ U C = ∅ K \cap U_C = \varnothing K ∩ U C = ∅ . For each available v ∈ U C v \in U_C v ∈ U C , we test whether τ K ∪ { v } \tau_{K \cup\{v\}} τ K ∪ { v } satisfies C C C and, if so, add w ( C ) w(C) w ( C ) to m K ( v ) m_K(v) m K ( v ) . This uses at most d d d membership tests per constraint. Sorting the scores, forming the candidate sets, and constructing Q K Q_K Q K by Lemma 5.4 take polynomial time in the input size.
A replacement set has k k k distinct variables, so whenever it is constructed, k ≤ ∣ X ∣ k \le|X| k ≤ ∣ X ∣ . Consequently, each call records at most ∣ X ∣ + 1 |X| + 1 ∣ X ∣ + 1 sets directly and receives at most ∣ X ∣ |X| ∣ X ∣ sets from its children. Each set can be evaluated by scanning the original constraints. All value evaluations at a call therefore take polynomial time in the input size.
Finally, all scores and interaction sums are sums of input weights, so their numerators and denominators have polynomial bit length in ℓ i n \ell_{\mathrm{in}} ℓ in . For d ≥ 2 d \ge2 d ≥ 2 , the numerator and denominator in
c d = d d ( d − 1 ) d − 1 c_d = \frac{d^d}{(d - 1)^{d-1}} c d = ( d − 1 ) d − 1 d d
have O ( d log ( d + 1 ) ) O(d\log(d + 1)) O ( d log ( d + 1 )) bits; for d = 1 d = 1 d = 1 , we have c 1 = 1 c_1 = 1 c 1 = 1 . Since constraint scopes are explicitly listed, the maximum arity used by the algorithm is at most ℓ i n \ell_{\mathrm{in}} ℓ in . Thus c d c_d c d , θ \theta θ , d max d_{\max} d m a x and ℓ \ell ℓ also have polynomial bit length. Exact arithmetic and comparisons therefore take polynomial time in ℓ i n \ell_{\mathrm{in}} ℓ in .
For fixed Γ \Gamma Γ , membership tests take constant time. When relation descriptions are supplied as part of the input, we assume that membership tests take time polynomial in ℓ i n \ell_{\mathrm{in}} ℓ in , with a fixed exponent across inputs. Preprocessing and the work at each call consequently take ℓ i n O ( 1 ) \ell_{\mathrm{in}}^{O(1)} ℓ in O ( 1 ) bit operations. Combining this with the bound on the number of calls proves the stated running time.
Adding zero-valid constraints.
Theorem 5.8. Let Γ \Gamma Γ be a fixed Boolean constraint language of arity at most d d d . If every relation in Γ + \Gamma_{+} Γ + is Rooted, then Max k k k -Weight CSP( Γ ) (\Gamma) ( Γ ) admits an EPAS parameterized by k k k , with running time
2 O ( k log ( 1 + d k / ε ) ) ℓ i n O ( 1 ) . 2^{O(k\log(1+dk/\varepsilon))}\ell_{\mathrm{in}}^{O(1)}. 2 O ( k l o g ( 1 + d k / ε )) ℓ in O ( 1 ) .
Proof. Fix a rational ε ∈ ( 0 , 1 ) \varepsilon\in(0,1) ε ∈ ( 0 , 1 ) . We apply Lemma 4.5 . It requires an algorithm A \mathcal{A} A with the following guarantee on instances over Γ + \Gamma_{+} Γ + . Given such an instance J \mathcal{J} J with budget k k k , a partial assignment ρ \rho ρ fixing at most k k k variables to 1 1 1 , and a rational δ ∈ ( 0 , 1 ) \delta\in(0,1) δ ∈ ( 0 , 1 ) , the algorithm must return a feasible assignment τ \tau τ extending ρ \rho ρ such that
F J ( τ ) ≥ F J ( τ ′ ) − δ OPT ( J ) F^{\mathcal{J}}(\tau) \ge F^{\mathcal{J}}(\tau')-\delta\operatorname{OPT}(\mathcal{J}) F J ( τ ) ≥ F J ( τ ′ ) − δ OPT ( J )
for every feasible assignment τ ′ \tau' τ ′ extending ρ \rho ρ . Here OPT ( J ) \operatorname{OPT}(\mathcal{J}) OPT ( J ) is measured before imposing ρ \rho ρ .
Define A ( J , ρ , δ ) \mathcal{A}(\mathcal{J},\rho,\delta) A ( J , ρ , δ ) to run Algorithm 1 with these inputs and return the assignment τ A \tau_A τ A corresponding to its selected set A A A . Every relation in Γ + \Gamma_{+} Γ + is nonempty, zero-free and Rooted. Thus Theorem 5.7 applies. It shows that τ A \tau_A τ A is feasible, extends ρ \rho ρ , and satisfies the required value bound. The same theorem gives running time
2 O ( k log ( 1 + d k / δ ) ) ℓ i n O ( 1 ) . 2^{O(k\log(1+dk/\delta))}\ell_{\mathrm{in}}^{O(1)}. 2 O ( k l o g ( 1 + d k / δ )) ℓ in O ( 1 ) .
Thus A \mathcal{A} A meets the assumptions of Lemma 4.5 .
Applying that lemma with this algorithm gives a ( 1 − ε ) (1-\varepsilon) ( 1 − ε ) -approximate solution for every instance over Γ \Gamma Γ . The reduction calls A \mathcal{A} A with δ = ε / 2 \delta=\varepsilon/2 δ = ε /2 , so its total running time is
2 O ( k log ( 1 + d k / ε ) ) ⋅ 2 O ( k log ( 1 + 2 d k / ε ) ) ℓ i n O ( 1 ) = 2 O ( k log ( 1 + d k / ε ) ) ℓ i n O ( 1 ) . \begin{aligned}
2^{O(k\log(1+dk/\varepsilon))}\cdot2^{O(k\log(1+2dk/\varepsilon))}\ell_{\mathrm{in}}^{O(1)} \\
&=2^{O(k\log(1+dk/\varepsilon))}\ell_{\mathrm{in}}^{O(1)}.
\end{aligned} 2 O ( k l o g ( 1 + d k / ε )) ⋅ 2 O ( k l o g ( 1 + 2 d k / ε )) ℓ in O ( 1 ) = 2 O ( k l o g ( 1 + d k / ε )) ℓ in O ( 1 ) .
Here we use 1 + 2 d k / ε ≤ 2 ( 1 + d k / ε ) 1+2dk/\varepsilon\le2(1+dk/\varepsilon) 1 + 2 d k / ε ≤ 2 ( 1 + d k / ε ) . Since Γ \Gamma Γ is fixed, d d d is constant, so this is an EPAS parameterized by k k k . □
Algorithm for Direct relations
In this section, we provide an EPAS for languages whose nonempty zero-free relations are Direct. We formalize the component construction and item search described in § 3 .
Separating small components
Boolean instance. For the zero-free analysis, fix a Boolean instance I = ( X , C , w , k ) \mathcal{I}=(X,\mathcal{C},w,k) I = ( X , C , w , k ) of arity at most d d d whose relations are nonempty, zero-free and Direct. Write
F ( S ) : = F I ( τ S ) ( S ⊆ X ) , M ( x ) : = F ( { x } ) ( x ∈ X ) . F(S):=F^{\mathcal{I}}(\tau_S) \qquad(S\subseteq X), \qquad M(x):=F(\{x\}) \qquad(x\in X). F ( S ) := F I ( τ S ) ( S ⊆ X ) , M ( x ) := F ({ x }) ( x ∈ X ) .
We discard constraints of weight zero and assume k ≥ 1 k\ge1 k ≥ 1 . For k = 0 k=0 k = 0 , the empty selected set is the only feasible solution. For each constraint C ∈ C C\in\mathcal{C} C ∈ C , define
U C : = { x ∈ sc ( C ) : τ { x } ⊨ C } , N C : = sc ( C ) ∖ U C . U_C:=\{x\in\operatorname{sc}(C):\tau_{\{x\}}\models C\}, \qquad N_C:=\operatorname{sc}(C)\setminus U_C. U C := { x ∈ sc ( C ) : τ { x } ⊨ C } , N C := sc ( C ) ∖ U C .
As in the Rooted analysis, U C U_C U C consists of the unit-witness variables of C C C , and N C N_C N C consists of its controls.
Shared-witness graph. For distinct variables x , y ∈ X x,y \in X x , y ∈ X , define
J ( x , y ) : = ∑ C ∈ C : { x , y } ⊆ U C w ( C ) . J(x,y) := \sum_{\substack{C\in\mathcal{C}:\\ \{x,y\}\subseteq U_C}} w(C). J ( x , y ) := C ∈ C : { x , y } ⊆ U C ∑ w ( C ) .
Thus J ( x , y ) = J ( y , x ) J(x,y)=J(y,x) J ( x , y ) = J ( y , x ) is the total weight of constraints for which both x x x and y y y are unit witnesses. These weights and the scores M M M are computed once from the original instance.
Lemma 6.1. Every x ∈ X x \in X x ∈ X satisfies
∑ y ∈ X ∖ { x } J ( x , y ) ≤ ( d − 1 ) M ( x ) . \sum_{y\in X\setminus\{x\}} J(x,y) \le(d-1)M(x). y ∈ X ∖ { x } ∑ J ( x , y ) ≤ ( d − 1 ) M ( x ) . Proof. A constraint contributes to M ( x ) M(x) M ( x ) exactly when x ∈ U C x \in U_C x ∈ U C . For such a constraint, its weight appears in J ( x , y ) J(x,y) J ( x , y ) for each y ∈ U C ∖ { x } y \in U_C \setminus\{x\} y ∈ U C ∖ { x } . There are at most d − 1 d-1 d − 1 such variables. Therefore
∑ y ≠ x J ( x , y ) = ∑ C ∈ C : x ∈ U C ( ∣ U C ∣ − 1 ) w ( C ) ≤ ( d − 1 ) ∑ C ∈ C : x ∈ U C w ( C ) = ( d − 1 ) M ( x ) . \sum_{y\ne x} J(x,y) = \sum_{\substack{C\in\mathcal{C}:\\ x\in U_C}} (|U_C|-1)w(C) \le(d-1)\sum_{\substack{C\in\mathcal{C}:\\ x\in U_C}} w(C) = (d-1)M(x). y = x ∑ J ( x , y ) = C ∈ C : x ∈ U C ∑ ( ∣ U C ∣ − 1 ) w ( C ) ≤ ( d − 1 ) C ∈ C : x ∈ U C ∑ w ( C ) = ( d − 1 ) M ( x ) .
Fix a rational threshold θ ∈ ( 0 , 1 ) \theta\in(0,1) θ ∈ ( 0 , 1 ) . The graph G θ G_\theta G θ has vertex set X X X . Distinct vertices x , y x,y x , y are adjacent exactly when
J ( x , y ) > 0 and J ( x , y ) ≥ θ max { M ( x ) , M ( y ) } . J(x,y)>0 \quad\text{and}\quad J(x,y)\ge\theta\max\{M(x),M(y)\}. J ( x , y ) > 0 and J ( x , y ) ≥ θ max { M ( x ) , M ( y )} .
This is the graph used in the Direct part of the technical overview.
Corollary 6.2. The maximum degree of G θ G_\theta G θ is at most d max : = ⌈ ( d − 1 ) / θ ⌉ d_{\max}:=\lceil(d-1)/\theta\rceil d m a x := ⌈( d − 1 ) / θ ⌉ .
Proof. If M ( x ) = 0 M(x)=0 M ( x ) = 0 , Lemma 6.1 and nonnegativity imply that J ( x , y ) = 0 J(x,y)=0 J ( x , y ) = 0 for every y ≠ x y\ne x y = x . Thus x x x is isolated. Otherwise, every neighbor y y y contributes at least θ M ( x ) \theta M(x) θ M ( x ) to ∑ y ≠ x J ( x , y ) \sum_{y\ne x}J(x,y) ∑ y = x J ( x , y ) . Hence
deg G θ ( x ) θ M ( x ) ≤ ∑ y ≠ x J ( x , y ) ≤ ( d − 1 ) M ( x ) . \deg_{G_\theta}(x)\theta M(x)\le\sum_{y\ne x}J(x,y)\le(d-1)M(x). deg G θ ( x ) θ M ( x ) ≤ y = x ∑ J ( x , y ) ≤ ( d − 1 ) M ( x ) . Dividing by θ M ( x ) > 0 \theta M(x)>0 θ M ( x ) > 0 proves the degree bound.
Coloring the variables. Let ρ \rho ρ be a partial assignment fixing at most k k k variables to 1 1 1 , and put
H 1 : = ρ − 1 ( 1 ) , H 0 : = ρ − 1 ( 0 ) , Y : = X ∖ H 0 . H^1:=\rho^{-1}(1),\qquad H^0:=\rho^{-1}(0),\qquad Y:=X\setminus H^0. H 1 := ρ − 1 ( 1 ) , H 0 := ρ − 1 ( 0 ) , Y := X ∖ H 0 .
A selected set S S S respects ρ \rho ρ exactly when H 1 ⊆ S ⊆ Y H^1\subseteq S\subseteq Y H 1 ⊆ S ⊆ Y . For a graph G G G and a set S S S of its vertices, write N G ( S ) N_G(S) N G ( S ) for the vertices adjacent to at least one member of S S S . A coloring isolates S S S if every vertex of S S S is green and every vertex of N G ( S ) ∖ S N_G(S)\setminus S N G ( S ) ∖ S is red. In such a coloring, every green connected component meeting S S S is contained in S S S .
Algorithm 2 samples colorings of G θ G_\theta G θ . For each coloring, it retains the small green components that avoid the variables fixed to 0 0 0 , and forces components meeting H 1 H^1 H 1 to be selected in full. It records the retained components K K K , the variables P P P forced to be selected, and the remaining budget b b b . The procedure chooses no further components at this stage.
Algorithm 2: Random color coding
Input: Graph G θ G_\theta G θ on X X X of maximum degree at most d max d_{\max} d m a x ; budget k ≥ 1 k \ge1 k ≥ 1 ; partial assignment ρ \rho ρ fixing at most k k k variables to 1 1 1 .
Output: A list D \mathcal{D} D of triples ( K , P , b ) (\mathcal{K}, P, b) ( K , P , b ) .
Set H 1 ← ρ − 1 ( 1 ) H^1 \gets\rho^{-1}(1) H 1 ← ρ − 1 ( 1 ) , H 0 ← ρ − 1 ( 0 ) H^0 \gets\rho^{-1}(0) H 0 ← ρ − 1 ( 0 ) , and Y ← X ∖ H 0 Y \gets X \setminus H^0 Y ← X ∖ H 0
Set N ← [ 3 ( d max + 1 ) ] k N \gets[3(d_{\max}+1)]^k N ← [ 3 ( d m a x + 1 ) ] k and D ← ∅ \mathcal{D} \gets\varnothing D ← ∅
for j = 1 , … , N j = 1,\ldots,N j = 1 , … , N do
Independently color each vertex green with probability 1 / ( d max + 1 ) 1/(d_{\max}+1) 1/ ( d m a x + 1 ) and red otherwise
Let K \mathcal{K} K contain the green connected components of size at most k k k that lie in Y Y Y
if H 1 ⊈ ⋃ K H^1 \not\subseteq\bigcup\mathcal{K} H 1 ⊆ ⋃ K then
Skip this coloring
P ← ⋃ { K ∈ K : K ∩ H 1 ≠ ∅ } P \gets\bigcup\{K \in\mathcal{K}: K \cap H^1 \ne\varnothing\} P ← ⋃ { K ∈ K : K ∩ H 1 = ∅ }
if ∣ P ∣ > k |P| > k ∣ P ∣ > k then
Skip this coloring
Append ( K , P , k − ∣ P ∣ ) (\mathcal{K}, P, k-|P|) ( K , P , k − ∣ P ∣ ) to D \mathcal{D} D
return D \mathcal{D} D
Lemma 6.3. Fix S S S with H 1 ⊆ S ⊆ Y H^1 \subseteq S \subseteq Y H 1 ⊆ S ⊆ Y and ∣ S ∣ ≤ k |S| \le k ∣ S ∣ ≤ k . A single sampled coloring isolates S S S with probability at least [ e ( d max + 1 ) ] − k [e(d_{\max}+1)]^{-k} [ e ( d m a x + 1 ) ] − k . With probability at least 1 − e − 1 1-e^{-1} 1 − e − 1 , Algorithm 2 records a triple ( K , P , b ) (\mathcal{K},P,b) ( K , P , b ) such that P ⊆ S P \subseteq S P ⊆ S and S ∖ P S \setminus P S ∖ P is a union of components in K \mathcal{K} K of total size at most b b b .
Proof. If d max = 0 d_{\max}=0 d m a x = 0 , every vertex is green and S S S has no external neighbors. Thus every sampled coloring isolates S S S .
For d max ≥ 1 d_{\max} \ge1 d m a x ≥ 1 , put
s : = ∣ S ∣ , h : = ∣ N G θ ( S ) ∖ S ∣ . s := |S|,\qquad h := |N_{G_\theta}(S)\setminus S|. s := ∣ S ∣ , h := ∣ N G θ ( S ) ∖ S ∣.
The degree bound gives h ≤ d max s h \le d_{\max}s h ≤ d m a x s . The coloring isolates S S S exactly when all its s s s vertices are green and all its h h h external neighbors are red. Since vertices are colored independently,
Pr [ S is isolated ] = ( 1 d max + 1 ) s ( d max d max + 1 ) h ≥ [ 1 d max + 1 ( d max d max + 1 ) d max ] s ≥ [ e ( d max + 1 ) ] − s ≥ [ e ( d max + 1 ) ] − k . \begin{aligned}
\Pr[S\text{ is isolated}] =
\left(\frac{1}{d_{\max}+1}\right)^s
\left(\frac{d_{\max}}{d_{\max}+1}\right)^h \\
&\ge
\left[
\frac{1}{d_{\max}+1}
\left(\frac{d_{\max}}{d_{\max}+1}\right)^{d_{\max}}
\right]^s \\
&\ge[e(d_{\max}+1)]^{-s} \\
&\ge[e(d_{\max}+1)]^{-k}.
\end{aligned} Pr [ S is isolated ] = ( d m a x + 1 1 ) s ( d m a x + 1 d m a x ) h ≥ [ d m a x + 1 1 ( d m a x + 1 d m a x ) d m a x ] s ≥ [ e ( d m a x + 1 ) ] − s ≥ [ e ( d m a x + 1 ) ] − k .
Here the first inequality uses h ≤ d max s h \le d_{\max}s h ≤ d m a x s , and
( d max d max + 1 ) d max = ( 1 + 1 d max ) − d max ≥ e − 1 . \left(\frac{d_{\max}}{d_{\max}+1}\right)^{d_{\max}}
=
\left(1+\frac{1}{d_{\max}}\right)^{-d_{\max}}
\ge e^{-1}. ( d m a x + 1 d m a x ) d m a x = ( 1 + d m a x 1 ) − d m a x ≥ e − 1 .
The final inequality uses s ≤ k s \le k s ≤ k .
The algorithm samples N = [ 3 ( d max + 1 ) ] k N=[3(d_{\max}+1)]^k N = [ 3 ( d m a x + 1 ) ] k colorings. Since e < 3 e<3 e < 3 , each trial isolates S S S with probability at least 1 / N 1/N 1/ N . This also holds when d max = 0 d_{\max}=0 d m a x = 0 . Independence of the trials gives
Pr [ no trial isolates S ] ≤ ( 1 − 1 / N ) N ≤ e − 1 . \Pr[\text{no trial isolates }S] \le(1-1/N)^N \le e^{-1}. Pr [ no trial isolates S ] ≤ ( 1 − 1/ N ) N ≤ e − 1 .
Consider a trial that isolates S S S . A green connected component meeting S S S cannot contain a vertex outside S S S : a green path leaving S S S would have to pass through an external neighbor of S S S , which is red. Thus every such component lies in S S S , has size at most k k k , and lies in Y Y Y . The algorithm retains all these components, and they partition S S S .
Since H 1 ⊆ S H^1 \subseteq S H 1 ⊆ S , the retained components cover H 1 H^1 H 1 . Every component meeting H 1 H^1 H 1 lies in S S S , so their union P P P satisfies P ⊆ S P \subseteq S P ⊆ S and ∣ P ∣ ≤ k |P| \le k ∣ P ∣ ≤ k . Neither condition for skipping the coloring holds, and the algorithm records ( K , P , b ) (\mathcal{K},P,b) ( K , P , b ) with b = k − ∣ P ∣ b=k-|P| b = k − ∣ P ∣ .
The retained components contained in S S S and disjoint from P P P partition S ∖ P S \setminus P S ∖ P . Their total size is
∣ S ∖ P ∣ = ∣ S ∣ − ∣ P ∣ ≤ k − ∣ P ∣ = b . |S \setminus P| = |S| - |P| \le k - |P| = b. ∣ S ∖ P ∣ = ∣ S ∣ − ∣ P ∣ ≤ k − ∣ P ∣ = b .
This proves the recorded triple’s guarantee.
Derandomization. We replace the random trials by a deterministic family of green and red colorings.
Lemma 6.4. Let k ≥ 1 k \ge1 k ≥ 1 , and let G G G have n n n vertices and maximum degree at most d max d_{\max} d m a x . Put q : = k ( d max + 1 ) q := k(d_{\max} + 1) q := k ( d m a x + 1 ) . One can deterministically construct a family of at most
( q + 1 ) O ( k ) log ( n + 2 ) (q + 1)^{O(k)} \log(n + 2) ( q + 1 ) O ( k ) log ( n + 2 ) green and red colorings such that every set S S S of size at most k k k is isolated by some coloring in the family. The construction takes ( q + 1 ) O ( k ) ℓ O ( 1 ) (q + 1)^{O(k)} \ell^{O(1)} ( q + 1 ) O ( k ) ℓ O ( 1 ) time. In a coloring isolating S S S , every green connected component meeting S S S is contained in S S S and has size at most k k k .
Proof. The ( n , q , q 2 ) (n,q,q^2) ( n , q , q 2 ) -splitter construction of Naor, Schulman, and Srinivasan [26 Lemma 2 and Theorem 3(iv)] lets us deterministically construct a family H \mathcal{H} H of maps V ( G ) → [ q 2 ] V(G) \to[q^2] V ( G ) → [ q 2 ] such that every set of at most q q q vertices receives distinct labels under some map. The family has size ( q + 1 ) O ( 1 ) log ( n + 2 ) (q + 1)^{O(1)} \log(n + 2) ( q + 1 ) O ( 1 ) log ( n + 2 ) , and its construction takes time polynomial in q + n q + n q + n . For q = 1 q = 1 q = 1 , the constant map suffices; if q > n q > n q > n , one map assigning distinct labels to all vertices suffices.
For each h ∈ H h \in\mathcal{H} h ∈ H and each B ⊆ [ q 2 ] B \subseteq[q^2] B ⊆ [ q 2 ] with ∣ B ∣ ≤ k |B| \le k ∣ B ∣ ≤ k , color x x x green if h ( x ) ∈ B h(x) \in B h ( x ) ∈ B , and red otherwise. Fix S S S with ∣ S ∣ ≤ k |S| \le k ∣ S ∣ ≤ k . The set
T : = S ∪ ( N G ( S ) ∖ S ) T := S \cup(N_G(S) \setminus S) T := S ∪ ( N G ( S ) ∖ S )
has size at most k ( d max + 1 ) = q k(d_{\max} + 1) = q k ( d m a x + 1 ) = q . Choose a map assigning distinct labels to T T T and take B = h ( S ) B = h(S) B = h ( S ) . This makes every vertex of S S S green and every external neighbor red, so the coloring isolates S S S .
The number of colorings is at most
∣ H ∣ ∑ i = 0 k ( q 2 i ) ≤ ∣ H ∣ ( q 2 + 1 ) k = ( q + 1 ) O ( k ) log ( n + 2 ) . |\mathcal{H}| \sum_{i=0}^{k} \binom{q^2}{i} \le|\mathcal{H}|(q^2 + 1)^k = (q + 1)^{O(k)} \log(n + 2). ∣ H ∣ i = 0 ∑ k ( i q 2 ) ≤ ∣ H ∣ ( q 2 + 1 ) k = ( q + 1 ) O ( k ) log ( n + 2 ) .
Enumerating and evaluating these colorings gives the stated construction time. Every green connected component meeting S S S lies in S S S , since all external neighbors are red. Its size is therefore at most k k k .
Enumerating this family in Algorithm 2 produces a deterministic list of triples. For every feasible S S S with τ S \tau_S τ S extending ρ \rho ρ , this list contains a triple ( K , P , b ) (\mathcal{K}, P, b) ( K , P , b ) such that P ⊆ S P \subseteq S P ⊆ S and S ∖ P S \setminus P S ∖ P is a union of components in K \mathcal{K} K with total size at most b b b .
Search on item constraints
Fix a triple ( K , P , b 0 ) (\mathcal{K}, P, b_0) ( K , P , b 0 ) recorded by Algorithm 2. The items are the components K f r e e : = { K ∈ K : K ∩ P = ∅ } \mathcal{K}_{\mathrm{free}} := \{K \in\mathcal{K} : K \cap P = \varnothing\} K free := { K ∈ K : K ∩ P = ∅ } , with initial costs κ ( y ) : = ∣ y ∣ \kappa(y) := |y| κ ( y ) := ∣ y ∣ and budget b 0 = k − ∣ P ∣ b_0 = k - |P| b 0 = k − ∣ P ∣ . Fix an order on the items. Write J = ( K f r e e , C i t e m , w , κ , b ) J = (\mathcal{K}_{\mathrm{free}}, \mathcal{C}_{\mathrm{item}}, w, \kappa, b) J = ( K free , C item , w , κ , b ) for the current item instance, where w w w gives nonnegative rational weights, κ \kappa κ gives positive integer costs, and b ∈ Z ≥ 0 b \in\mathbb{Z}_{\ge0} b ∈ Z ≥ 0 is the remaining budget. An item constraint is a Boolean constraint whose variables are items. Constraints have arity at most d ≥ 1 d \ge1 d ≥ 1 and may have an empty scope; their relations are given by their satisfying tuples. We use the constraint and objective notation from Section 2, with items in place of variables. For a complete or partial item assignment σ \sigma σ , put
supp ( σ ) : = σ − 1 ( 1 ) , κ ( σ ) : = ∑ y ∈ supp ( σ ) κ ( y ) . \operatorname{supp}(\sigma) := \sigma^{-1}(1), \qquad\kappa(\sigma) := \sum_{y \in\operatorname{supp}(\sigma)} \kappa(y). supp ( σ ) := σ − 1 ( 1 ) , κ ( σ ) := y ∈ supp ( σ ) ∑ κ ( y ) .
For a complete assignment σ \sigma σ , F J ( σ ) F^{\mathcal{J}}(\sigma) F J ( σ ) is the total weight of its satisfied constraints. The assignment is feasible when κ ( σ ) ≤ b \kappa(\sigma) \le b κ ( σ ) ≤ b , and OPT ( J ) \operatorname{OPT}(\mathcal{J}) OPT ( J ) is the largest value of a feasible assignment. A complete assignment σ \sigma σ to the initial instance selects the variable set
S ( σ ) : = P ∪ ⋃ K ∈ supp ( σ ) K , S(\sigma) := P \cup\bigcup_{K \in\operatorname{supp}(\sigma)} K, S ( σ ) := P ∪ K ∈ supp ( σ ) ⋃ K ,
∣ S ( σ ) ∣ = ∣ P ∣ + κ ( σ ) . |S(\sigma)| = |P| + \kappa(\sigma). ∣ S ( σ ) ∣ = ∣ P ∣ + κ ( σ ) .
For each original constraint C C C , define an item constraint C ^ \widehat{C} C of weight w ( C ) w(C) w ( C ) on the items intersecting sc ( C ) \operatorname{sc}(C) sc ( C ) , listed in the fixed item order. Define its relation by
σ ⊨ C ^ ⟺ τ S ( σ ) ⊨ C and ∅ ≠ S ( σ ) ∩ U C ⊆ K for some K ∈ K . (26) \sigma\models\widehat{C} \quad\Longleftrightarrow\quad\tau_{S(\sigma)} \models C \text{ and } \varnothing\ne S(\sigma) \cap U_C \subseteq K \text{ for some } K \in\mathcal{K}. \tag*{(26)} σ ⊨ C ⟺ τ S ( σ ) ⊨ C and ∅ = S ( σ ) ∩ U C ⊆ K for some K ∈ K . (26)
Thus C C C is counted when its selected unit witnesses, including those in P P P , lie in one component. Since the components are disjoint, each item constraint has arity at most d d d . Call this item instance J c o l \mathcal{J}_{\mathrm{col}} J col . The search requires every nonempty zero-free relation obtained by fixing items in an input constraint to be Direct. Lemma 6.5 proves that the constructed instance has this property.
Recursive calls. Discard constraints of weight zero. Let δ ∈ ( 0 , 1 ) \delta\in(0,1) δ ∈ ( 0 , 1 ) be the rational error parameter for the item search. We seek a feasible assignment of value at least ( 1 − δ ) OPT ( J ) (1-\delta)\operatorname{OPT}(\mathcal{J}) ( 1 − δ ) OPT ( J ) for the input item instance J \mathcal{J} J . Set
η 1 : = δ 2 b 0 + 1 , η 2 : = η 1 2 . \eta_1 := \frac{\delta}{2b_0+1}, \qquad\eta_2 := \frac{\eta_1}{2}. η 1 := 2 b 0 + 1 δ , η 2 := 2 η 1 .
These thresholds remain fixed throughout the search. At each call, J \mathcal{J} J contains the unfixed items and the constraints after substituting all earlier fixed values. The assignment 0 \mathbf{0} 0 sets every unfixed item to 0 0 0 . A constraint is zero-free if this assignment does not satisfy it. If b = 0 b=0 b = 0 or no constraints remain, return 0 \mathbf{0} 0 . Otherwise, define
Z : = { C ∈ C i t e m : 0 ⊨ C } , W : = ∑ C ∈ Z w ( C ) = F J ( 0 ) . \mathcal{Z} := \{C \in\mathcal{C}_{\mathrm{item}} : \mathbf{0} \models C\}, \qquad W := \sum_{C \in\mathcal{Z}} w(C) = F^{\mathcal{J}}(\mathbf{0}). Z := { C ∈ C item : 0 ⊨ C } , W := C ∈ Z ∑ w ( C ) = F J ( 0 ) .
For a partial assignment π \pi π with κ ( π ) ≤ b \kappa(\pi) \le b κ ( π ) ≤ b , form the child instance J π \mathcal{J}_{\pi} J π by substituting π \pi π , removing its fixed items, and reducing the budget to b − κ ( π ) b-\kappa(\pi) b − κ ( π ) . First remove constraints that become always satisfied or always unsatisfied. Then, among the remaining restrictions of constraints in the parent’s Z \mathcal{Z} Z , remove those satisfied when all unfixed items are $0; the values prescribed by π \pi π stay fixed. The remaining constraints and items keep their weights and costs.
The branching rule when W > 0 W>0 W > 0 . We fix every item whose total weight of constraints in Z \mathcal{Z} Z reaches η 1 W / b \eta_1W/b η 1 W / b . Define
deg 0 ( y ) : = ∑ C ∈ Z y ∈ sc ( C ) w ( C ) , \deg_0(y) := \sum_{\substack{C \in\mathcal{Z}\\ y \in\operatorname{sc}(C)}} w(C), deg 0 ( y ) := C ∈ Z y ∈ sc ( C ) ∑ w ( C ) ,
K h i : = { y ∈ K f r e e : deg 0 ( y ) ≥ η 1 W b } . \mathcal{K}_{\mathrm{hi}} := \left\{y \in\mathcal{K}_{\mathrm{free}} : \deg_0(y) \ge\frac{\eta_1 W}{b}\right\}. K hi := { y ∈ K free : deg 0 ( y ) ≥ b η 1 W } .
Create one branch for every assignment π : K h i → { 0 , 1 } \pi: \mathcal{K}_{\mathrm{hi}} \to\{0,1\} π : K hi → { 0 , 1 } with κ ( π ) ≤ b \kappa(\pi) \le b κ ( π ) ≤ b , including the all-zero assignment. We call the items in K h i \mathcal{K}_{\mathrm{hi}} K hi marked. Lemma 6.7 shows that the additionally removed constraints left unsatisfied by a feasible completion have total weight at most η 1 OPT ( J ) \eta_1\operatorname{OPT}(\mathcal{J}) η 1 OPT ( J ) . It also shows that the all-zero branch gives a zero-free child.
The branching rule when W = 0 W = 0 W = 0 . Since W = 0 W = 0 W = 0 , the current instance is zero-free. For a set Q Q Q of unfixed items, let τ Q \tau_Q τ Q select exactly the items in Q Q Q . We use two quantities to form the candidate set. For each item y y y , μ ( y ) \mu(y) μ ( y ) is the value of selecting y y y alone. For distinct items y , z y,z y , z , I i t e m ( y → z ) I_{\mathrm{item}}(y \to z) I item ( y → z ) is the part of that value from constraints whose scopes contain z z z :
μ ( y ) : = F J ( τ { y } ) , \mu(y) := F^{\mathcal{J}}(\tau_{\{y\}}), μ ( y ) := F J ( τ { y } ) ,
I i t e m ( y → z ) : = ∑ C ∈ C i t e m : y , z ∈ sc ( C ) , τ { y } ⊨ C w ( C ) ( y ≠ z ) . I_{\mathrm{item}}(y \to z) := \sum_{\substack{C\in\mathcal{C}_{\mathrm{item}}:\\ y,z\in\operatorname{sc}(C),\ \tau_{\{y\}}\models C}} w(C) \qquad(y\ne z). I item ( y → z ) := C ∈ C item : y , z ∈ sc ( C ) , τ { y } ⊨ C ∑ w ( C ) ( y = z ) .
For rational η ∈ ( 0 , 1 ) \eta\in(0,1) η ∈ ( 0 , 1 ) , put
Bad ( y ) : = { { z ∈ K f r e e ∖ { y } : I i t e m ( y → z ) ≥ η b μ ( y ) } if μ ( y ) > 0 , ∅ if μ ( y ) = 0. \operatorname{Bad}(y) := \begin{cases}
\left\{z\in\mathcal{K}_{\mathrm{free}}\setminus\{y\}: I_{\mathrm{item}}(y\to z)\ge\dfrac{\eta}{b}\mu(y)\right\} & \text{if }\mu(y)>0,\\
\varnothing& \text{if }\mu(y)=0.
\end{cases} Bad ( y ) := { { z ∈ K free ∖ { y } : I item ( y → z ) ≥ b η μ ( y ) } ∅ if μ ( y ) > 0 , if μ ( y ) = 0.
Set
ℓ : = ⌈ ( d − 1 ) b 2 η ⌉ + 1. \ell:= \left\lceil\frac{(d-1)b^2}{\eta}\right\rceil+1. ℓ := ⌈ η ( d − 1 ) b 2 ⌉ + 1.
For each c ∈ [ b ] c\in[b] c ∈ [ b ] , let L c L_c L c contain the ℓ \ell ℓ items of largest positive score μ ( y ) \mu(y) μ ( y ) among those with κ ( y ) ≤ c \kappa(y)\le c κ ( y ) ≤ c , or all such items if fewer exist, using the fixed item order for ties. Define
B : = ⋃ c = 1 b ( L c ∪ ⋃ y ∈ L c Bad ( y ) ) . \mathcal{B} := \bigcup_{c=1}^{b}\left(L_c\cup\bigcup_{y\in L_c}\operatorname{Bad}(y)\right). B := c = 1 ⋃ b L c ∪ y ∈ L c ⋃ Bad ( y ) .
The search uses η = η 2 \eta=\eta_2 η = η 2 . Create one branch fixing y = 1 y=1 y = 1 for each y ∈ B y\in\mathcal{B} y ∈ B with κ ( y ) ≤ b \kappa(y)\le b κ ( y ) ≤ b . Also keep 0 0 0 as a candidate, without a recursive call. Lemma 6.10 shows that every positive-valued feasible assignment avoiding B \mathcal{B} B can exchange one selected item for an item in a list, losing at most 2 η OPT ( J ) 2\eta\operatorname{OPT}(\mathcal{J}) 2 η OPT ( J ) in value.
For each partial assignment π \pi π specified by either branching rule, construct J π \mathcal{J}_{\pi} J π as above and apply the search to it. Combine its returned assignment σ \sigma σ with π \pi π to obtain the candidate π ⊔ σ \pi\sqcup\sigma π ⊔ σ . After processing all branches, evaluate every candidate, including 0 \mathbf{0} 0 when W = 0 W=0 W = 0 , on all constraints of the current instance J \mathcal{J} J , including those removed before recursion. Return a candidate with largest F J F^{\mathcal{J}} F J -value. Use the fixed item order to enumerate assignments and break ties, with 0 0 0 before 1 1 1 .
Algorithm 3 gives the search.
Correctness
The item construction. For a complete item assignment σ \sigma σ , write F m a s k ( σ ) : = F J c o l ( σ ) F_{\mathrm{mask}}(\sigma):=F^{\mathcal{J}_{\mathrm{col}}}(\sigma) F mask ( σ ) := F J col ( σ ) . For a union S S S of retained components containing P P P , let σ S \sigma_S σ S be the item assignment that selects exactly the items contained in S S S . Put F m a s k ( S ) : = F m a s k ( σ S ) F_{\mathrm{mask}}(S):=F_{\mathrm{mask}}(\sigma_S) F mask ( S ) := F mask ( σ S ) .
If σ \sigma σ is feasible for J c o l \mathcal{J}_{\mathrm{col}} J col , then
∣ S ( σ ) ∣ = ∣ P ∣ + κ ( σ ) ≤ ∣ P ∣ + b 0 = k . |S(\sigma)|=|P|+\kappa(\sigma)\le|P|+b_0=k. ∣ S ( σ ) ∣ = ∣ P ∣ + κ ( σ ) ≤ ∣ P ∣ + b 0 = k .
Thus τ S ( σ ) \tau_{S(\sigma)} τ S ( σ ) is feasible for the original instance. By (26) , each satisfied item constraint corresponds to a satisfied original constraint of the same weight. Hence
F m a s k ( σ ) ≤ F ( S ( σ ) ) , OPT ( J c o l ) ≤ OPT ( I ) . F_{\mathrm{mask}}(\sigma)\le F(S(\sigma)),\qquad\operatorname{OPT}(\mathcal{J}_{\mathrm{col}})\le\operatorname{OPT}(\mathcal{I}). F mask ( σ ) ≤ F ( S ( σ )) , OPT ( J col ) ≤ OPT ( I ) .
Algorithm 3: Search on item constraints
Input: An item instance J \mathcal{J} J with budget b 0 b_0 b 0 such that every nonempty zero-free relation obtained by fixing items in any constraint is Direct ; a rational δ ∈ ( 0 , 1 ) \delta\in(0,1) δ ∈ ( 0 , 1 ) .
Output: An assignment of cost at most b 0 b_0 b 0 .
Discard constraints of weight zero
if b 0 = 0 b_0 = 0 b 0 = 0 then
return 0
Set d d d to the largest constraint arity, taking d = 1 d = 1 d = 1 if all scopes are empty
Set η 1 ← δ / ( 2 b 0 + 1 ) \eta_1 \leftarrow\delta/(2b_0 + 1) η 1 ← δ / ( 2 b 0 + 1 ) and η 2 ← η 1 / 2 \eta_2 \leftarrow\eta_1/2 η 2 ← η 1 /2
Keep d d d , η 1 \eta_1 η 1 , η 2 \eta_2 η 2 , and the item order fixed throughout all recursive calls
return SearchItems(J \mathcal{J} J )
Procedure SearchItems(J \mathcal{J} J ):
Let b b b be the budget of J \mathcal{J} J
if b = 0 b = 0 b = 0 or no constraints remain then
return 0
L ← ∅ \mathcal{L} \leftarrow\varnothing L ← ∅
Compute W ← F J ( 0 ) W \leftarrow F^{\mathcal{J}}(\mathbf{0}) W ← F J ( 0 )
if W > 0 W > 0 W > 0 then
Form Z \mathcal{Z} Z , deg 0 \operatorname{deg}_0 deg 0 , and K h i \mathcal{K}_{\mathrm{hi}} K hi using η 1 \eta_1 η 1
Let P \mathcal{P} P contain every assignment π \pi π on K h i \mathcal{K}_{\mathrm{hi}} K hi with κ ( π ) ≤ b \kappa(\pi) \leq b κ ( π ) ≤ b , including the all-zero assignment
else
Compute μ ( y ) \mu(y) μ ( y ) and I i t e m ( y → z ) I_{\mathrm{item}}(y \to z) I item ( y → z ) from the current constraints
Form the lists L c \mathcal{L}_c L c and B \mathcal{B} B using η = η 2 \eta= \eta_2 η = η 2
Let P \mathcal{P} P contain every fixing y = 1 y = 1 y = 1 with y ∈ B y \in\mathcal{B} y ∈ B and κ ( y ) ≤ b \kappa(y) \leq b κ ( y ) ≤ b
L ← { 0 } \mathcal{L} \leftarrow\{0\} L ← { 0 }
foreach π ∈ P \pi\in\mathcal{P} π ∈ P in the fixed order do
J π ← \mathcal{J}_{\pi} \leftarrow J π ← MakeChild(J , π \mathcal{J}, \pi J , π )
σ ← \sigma\leftarrow σ ← SearchItems(J π \mathcal{J}_{\pi} J π )
L ← L ∪ { π ⊔ σ } \mathcal{L} \leftarrow\mathcal{L} \cup\{\pi\sqcup\sigma\} L ← L ∪ { π ⊔ σ }
return an assignment in L \mathcal{L} L with largest F J F^{\mathcal{J}} F J -value, evaluated on all constraints received by this call, breaking ties by the fixed order
Procedure MakeChild(J , π \mathcal{J}, \pi J , π ):
Let b b b be the budget of J \mathcal{J} J
Let Z \mathcal{Z} Z contain the constraints of J \mathcal{J} J satisfied by 0 \mathbf{0} 0
Form J π \mathcal{J}_{\pi} J π by substituting π \pi π into every constraint of J \mathcal{J} J and removing the fixed items
Set the budget of J π \mathcal{J}_{\pi} J π to b − κ ( π ) b - \kappa(\pi) b − κ ( π )
Remove constraints that are always satisfied or always unsatisfied
Among the remaining restrictions of constraints in Z \mathcal{Z} Z , remove those satisfied by 0 \mathbf{0} 0 on the remaining items
return J π \mathcal{J}_{\pi} J π
Lemma 6.5. Every nonempty zero-free relation obtained by fixing items in a constraint of J c o l \mathcal{J}_{\mathrm{col}} J col is Direct.
Proof. Fix any subset of the items of C ^ \widehat{C} C so that the remaining relation is nonempty and zero-free. Consider any satisfying assignment, keeping all fixed values unchanged. By (25), the selected unit witnesses of C C C lie in a unique component K ∗ ∈ K K^* \in\mathcal{K} K ∗ ∈ K . Resetting any remaining item other than K ∗ K^* K ∗ changes only controls of C C C from 1 to 0. The original Direct rule preserves satisfaction of C C C , and its selected unit witnesses remain in K ∗ K^* K ∗ . Thus C ^ \widehat{C} C remains satisfied.
If K ∗ K^* K ∗ were already selected by the fixed choices, including those in P P P , resetting all remaining items would preserve satisfaction, contradicting zero-freeness. Hence K ∗ K^* K ∗ is a remaining item. Selecting it alone among the remaining items satisfies the restricted constraint, so it is a unit witness. Every selected item that is not a unit witness differs from K ∗ K^* K ∗ , and resetting it preserves satisfaction. Thus the restricted relation is Direct.
The objective F m a s k F_{\mathrm{mask}} F mask omits the weight of a satisfied original constraint when its selected unit witnesses lie in different green components. We bound this weight using J J J and M M M .
Lemma 6.6. Let S S S be feasible with τ S \tau_S τ S extending ρ \rho ρ , and let a coloring isolate S S S . Then the component construction yields an item instance J c o l \mathcal{J}_{\mathrm{col}} J col for which σ S \sigma_S σ S is feasible, and
F m a s k ( S ) ≥ F ( S ) − θ ( k − 1 ) ∑ x ∈ S M ( x ) . F_{\mathrm{mask}}(S) \ge F(S) - \theta(k-1) \sum_{x \in S} M(x). F mask ( S ) ≥ F ( S ) − θ ( k − 1 ) x ∈ S ∑ M ( x ) . Consequently,
F m a s k ( S ) ≥ F ( S ) − θ k c d OPT ( I ) , F_{\mathrm{mask}}(S) \ge F(S) - \theta k c_d \operatorname{OPT}(\mathcal{I}), F mask ( S ) ≥ F ( S ) − θ k c d OPT ( I ) , where c d c_d c d is defined in (4).
Proof. Every green component meeting S S S lies in S S S . It therefore has size at most k k k and contains no variable fixed to 0 by ρ \rho ρ , so it is retained. These components partition S S S . The components forced to 1 also lie in S S S , so P ⊆ S P \subseteq S P ⊆ S and the coloring is not skipped. Thus σ S \sigma_S σ S is well defined and feasible, since
κ ( σ S ) = ∣ S ∖ P ∣ ≤ k − ∣ P ∣ = b . \kappa(\sigma_S) = |S \setminus P| \le k - |P| = b. κ ( σ S ) = ∣ S ∖ P ∣ ≤ k − ∣ P ∣ = b . For S = ∅ S = \varnothing S = ∅ , both bounds follow from zero-freeness. Otherwise, Lemma 4.4 gives a selected unit witness for every satisfied original constraint.
For each omitted constraint, choose two selected unit witnesses in different components and assign its weight to their unordered pair { x , y } \{x,y\} { x , y } . The total weight assigned to this pair is at most J ( x , y ) J(x,y) J ( x , y ) . Since x , y x,y x , y lie in different green components, they are not adjacent in G θ G_\theta G θ , so J ( x , y ) ≤ θ max { M ( x ) , M ( y ) } ≤ θ ( M ( x ) + M ( y ) ) J(x,y) \le\theta\max\{M(x),M(y)\} \le\theta(M(x) + M(y)) J ( x , y ) ≤ θ max { M ( x ) , M ( y )} ≤ θ ( M ( x ) + M ( y )) . Summing over all unordered pairs in S S S gives
F ( S ) − F m a s k ( S ) ≤ θ ∑ { x , y } ⊆ S ( M ( x ) + M ( y ) ) = θ ( ∣ S ∣ − 1 ) ∑ x ∈ S M ( x ) ≤ θ ( k − 1 ) ∑ x ∈ S M ( x ) . \begin{aligned}
F(S) - F_{\mathrm{mask}}(S) &\le\theta\sum_{\{x,y\}\subseteq S} (M(x) + M(y)) \\
&= \theta(|S| - 1) \sum_{x \in S} M(x) \\
&\le\theta(k - 1) \sum_{x \in S} M(x).
\end{aligned} F ( S ) − F mask ( S ) ≤ θ { x , y } ⊆ S ∑ ( M ( x ) + M ( y )) = θ ( ∣ S ∣ − 1 ) x ∈ S ∑ M ( x ) ≤ θ ( k − 1 ) x ∈ S ∑ M ( x ) . Finally, Lemma 4.7 gives ∑ x ∈ S M ( x ) ≤ c d OPT ( I ) \sum_{x \in S} M(x) \le c_d\operatorname{OPT}(\mathcal{I}) ∑ x ∈ S M ( x ) ≤ c d OPT ( I ) , which proves the second bound.
The branching rule when W > 0 W > 0 W > 0 . Each marked item has deg 0 ( y ) ≥ η 1 W / b \deg_0(y) \ge\eta_1 W/b deg 0 ( y ) ≥ η 1 W / b . Each constraint in Z \mathcal{Z} Z contributes its weight to deg 0 ( y ) \deg_0(y) deg 0 ( y ) for at most d d d items. Together, these give
∣ K h i ∣ η 1 W b ≤ ∑ y ∈ K f r e e deg 0 ( y ) ≤ d W . |\mathcal{K}_{\mathrm{hi}}|\frac{\eta_1 W}{b} \le\sum_{y\in\mathcal{K}_{\mathrm{free}}} \deg_0(y) \le dW. ∣ K hi ∣ b η 1 W ≤ y ∈ K free ∑ deg 0 ( y ) ≤ d W .
Dividing by η 1 W / b > 0 \eta_1 W/b > 0 η 1 W / b > 0 gives
∣ K h i ∣ ≤ d b η 1 . (27) |\mathcal{K}_{\mathrm{hi}}| \le\frac{db}{\eta_1}. \tag*{(27)} ∣ K hi ∣ ≤ η 1 d b . (27)
For a partial assignment π \pi π used by the search, let w a c c ( π ) w_{\mathrm{acc}}(\pi) w acc ( π ) be the total weight of removed constraints satisfied after substituting π \pi π and setting every unfixed item to 0. Removed constraints that are always satisfied after substitution contribute their weights for every completion of π \pi π . Constraints removed in the second step may become unsatisfied. For every feasible completion σ \sigma σ , the next lemma bounds how much w a c c ( π ) + F J π ( σ ) w_{\mathrm{acc}}(\pi) + F^{\mathcal{J}_{\pi}}(\sigma) w acc ( π ) + F J π ( σ ) can exceed F J ( π ⊔ σ ) F^{\mathcal{J}}(\pi\sqcup\sigma) F J ( π ⊔ σ ) .
Lemma 6.7. Let J \mathcal{J} J be an item instance with budget b ≥ 1 b \ge1 b ≥ 1 and W : = F J ( 0 ) > 0 W := F^{\mathcal{J}}(0) > 0 W := F J ( 0 ) > 0 . Fix a rational η 1 ∈ ( 0 , 1 ) \eta_1 \in(0,1) η 1 ∈ ( 0 , 1 ) and define K h i \mathcal{K}_{\mathrm{hi}} K hi as above.
Let π : K h i → { 0 , 1 } \pi: \mathcal{K}_{\mathrm{hi}} \to\{0,1\} π : K hi → { 0 , 1 } be a partial assignment with κ ( π ) ≤ b \kappa(\pi) \le b κ ( π ) ≤ b . Use J π \mathcal{J}_{\pi} J π and w a c c ( π ) w_{\mathrm{acc}}(\pi) w acc ( π ) defined above. For every assignment σ \sigma σ to the unmarked items with κ ( σ ) ≤ b − κ ( π ) \kappa(\sigma) \le b-\kappa(\pi) κ ( σ ) ≤ b − κ ( π ) ,
F J ( π ⊔ σ ) ≤ w a c c ( π ) + F J π ( σ ) F^{\mathcal{J}}(\pi\sqcup\sigma) \le w_{\mathrm{acc}}(\pi) + F^{\mathcal{J}_{\pi}}(\sigma) F J ( π ⊔ σ ) ≤ w acc ( π ) + F J π ( σ ) ≤ F J ( π ⊔ σ ) + η 1 OPT ( J ) . \le F^{\mathcal{J}}(\pi\sqcup\sigma) + \eta_1\operatorname{OPT}(\mathcal{J}). ≤ F J ( π ⊔ σ ) + η 1 OPT ( J ) . If π \pi π sets every marked item to 0, then J π \mathcal{J}_{\pi} J π is zero-free.
Proof. Fix a feasible completion σ \sigma σ of π \pi π . The retained constraints contribute exactly F J π ( σ ) F^{\mathcal{J}_{\pi}}(\sigma) F J π ( σ ) to the value of π ⊔ σ \pi\sqcup\sigma π ⊔ σ . Removed constraints that are always satisfied contribute their weights to both this value and w a c c ( π ) w_{\mathrm{acc}}(\pi) w acc ( π ) . Those that are always unsatisfied contribute 0 to both. Every constraint removed in the second step has its weight included in w a c c ( π ) w_{\mathrm{acc}}(\pi) w acc ( π ) , whether or not π ⊔ σ \pi\sqcup\sigma π ⊔ σ satisfies it. This proves the first inequality. The excess counted weight is exactly the total weight of constraints removed in the second step that π ⊔ σ \pi\sqcup\sigma π ⊔ σ fails to satisfy.
Consider any such constraint. It was satisfied with π \pi π fixed and all unmarked items set to 0. Since the values fixed by π \pi π do not change, its remaining scope must contain an item y y y selected by σ \sigma σ . The constraint belonged to Z \mathcal{Z} Z before substitution, so its weight is included in deg 0 ( y ) \deg_0(y) deg 0 ( y ) . Every item selected by σ \sigma σ is unmarked, and hence deg 0 ( y ) < η 1 W / b \deg_0(y) < \eta_1 W/b deg 0 ( y ) < η 1 W / b for each y ∈ supp ( σ ) y \in\operatorname{supp}(\sigma) y ∈ supp ( σ ) .
Since item costs are positive integers and σ \sigma σ is feasible,
∣ supp ( σ ) ∣ ≤ κ ( σ ) ≤ b − κ ( π ) ≤ b . |\operatorname{supp}(\sigma)| \le\kappa(\sigma) \le b-\kappa(\pi) \le b. ∣ supp ( σ ) ∣ ≤ κ ( σ ) ≤ b − κ ( π ) ≤ b .
The excess counted weight is therefore at most
∑ y ∈ supp ( σ ) deg 0 ( y ) ≤ ∣ supp ( σ ) ∣ η 1 W b ≤ η 1 W . \sum_{y\in\operatorname{supp}(\sigma)} \deg_0(y) \le|\operatorname{supp}(\sigma)|\frac{\eta_1 W}{b} \le\eta_1 W. y ∈ supp ( σ ) ∑ deg 0 ( y ) ≤ ∣ supp ( σ ) ∣ b η 1 W ≤ η 1 W .
The all-zero assignment is feasible for J \mathcal{J} J , so W ≤ OPT ( J ) W \le\operatorname{OPT}(\mathcal{J}) W ≤ OPT ( J ) . This proves the second inequality.
Now suppose that π \pi π sets every marked item to 0. Setting every unmarked item to 0 then sets every item of J \mathcal{J} J to 0. Every constraint in Z \mathcal{Z} Z is satisfied by this assignment and is removed in the first or second step. Every constraint outside Z \mathcal{Z} Z rejects this assignment, so every retained restriction rejects 0 on its remaining items. Thus J π \mathcal{J}_{\pi} J π is zero-free. □ \square □
Fixing further item values in a retained constraint of J π \mathcal{J}_{\pi} J π gives a relation obtained by fixing items in its corresponding constraint in J \mathcal{J} J . Therefore, if every nonempty zero-free restriction of a constraint of J \mathcal{J} J is Direct, the same holds for J π \mathcal{J}_{\pi} J π .
The branching rule when W = 0 W = 0 W = 0 . For the candidate set B \mathcal{B} B formed using η \eta η , we show that every feasible assignment of positive value either selects an item in B \mathcal{B} B or can be changed to do so with value loss at most 2 η OPT ( J ) 2\eta\operatorname{OPT}(\mathcal{J}) 2 η OPT ( J ) . First, we show that every satisfied constraint has a selected unit witness. We then use this fact to bound the change in value when one item is set to 0 or 1.
For a current item constraint C C C , an item y ∈ sc ( C ) y \in\operatorname{sc}(C) y ∈ sc ( C ) is a unit witness if τ { y } ⊨ C \tau_{\{y\}} \models C τ { y } ⊨ C . The other items in sc ( C ) \operatorname{sc}(C) sc ( C ) are controls.
Lemma 6.8. Let C C C be an item constraint with a nonempty zero-free Direct relation. Every complete item assignment σ \sigma σ satisfying C C C selects an item y ∈ supp ( σ ) ∩ sc ( C ) y \in\operatorname{supp}(\sigma)\cap\operatorname{sc}(C) y ∈ supp ( σ ) ∩ sc ( C ) such that τ { y } ⊨ C \tau_{\{y\}} \models C τ { y } ⊨ C .
Proof. Suppose that no selected item in sc ( C ) \operatorname{sc}(C) sc ( C ) is a unit witness of C C C . Every selected item in sc ( C ) \operatorname{sc}(C) sc ( C ) is then a control. Starting from σ \sigma σ , set these items to 0 one at a time. The Direct rule preserves satisfaction of C C C at each step. The resulting assignment is 0 on every item in sc ( C ) \operatorname{sc}(C) sc ( C ) and still satisfies C C C , contradicting zero-freeness. Thus σ \sigma σ selects a unit witness y y y of C C C , and τ { y } ⊨ C \tau_{\{y\}} \models C τ { y } ⊨ C by definition.
For a ∈ { 0 , 1 } a \in\{0,1\} a ∈ { 0 , 1 } , we write σ [ y ← a ] \sigma[y \leftarrow a] σ [ y ← a ] for the assignment obtained by setting item y y y to a a a and leaving all other values unchanged. Updates to distinct items may be written together.
For the following lemma, write F : = F J F := F^{\mathcal{J}} F := F J .
Lemma 6.9. Let J \mathcal{J} J be a zero-free item instance whose nonempty relations are Direct. For every item y ∈ K f r e e y \in K_{\mathrm{free}} y ∈ K free ,
∑ z ∈ K f r e e z ≠ y I i t e m ( y → z ) ≤ ( d − 1 ) μ ( y ) . \sum_{\substack{z\in K_{\mathrm{free}}\\z\ne y}} I_{\mathrm{item}}(y\to z) \le(d-1)\mu(y). z ∈ K free z = y ∑ I item ( y → z ) ≤ ( d − 1 ) μ ( y ) . For every complete item assignment σ \sigma σ , its value satisfies
F ( σ ) ≤ ∑ y ∈ supp ( σ ) μ ( y ) . (28) F(\sigma) \le\sum_{y\in\operatorname{supp}(\sigma)}\mu(y). \tag*{(28)} F ( σ ) ≤ y ∈ supp ( σ ) ∑ μ ( y ) . (28) For every selected item y ∈ supp ( σ ) y\in\operatorname{supp}(\sigma) y ∈ supp ( σ ) , setting it to 0 gives
F ( σ [ y ← 0 ] ) ≥ F ( σ ) − μ ( y ) . (29) F(\sigma[y\leftarrow0]) \ge F(\sigma)-\mu(y). \tag*{(29)} F ( σ [ y ← 0 ]) ≥ F ( σ ) − μ ( y ) . (29) For every unselected item y ∈ K f r e e ∖ supp ( σ ) y\in K_{\mathrm{free}}\setminus\operatorname{supp}(\sigma) y ∈ K free ∖ supp ( σ ) , setting it to 1 gives
F ( σ [ y ← 1 ] ) ≥ F ( σ ) + μ ( y ) − ∑ z ∈ supp ( σ ) ( I i t e m ( y → z ) + I i t e m ( z → y ) ) . (30) \begin{aligned}
F(\sigma[y\leftarrow1]) &\ge F(\sigma)+\mu(y)\\
&\quad-\sum_{z\in\operatorname{supp}(\sigma)}
\left(I_{\mathrm{item}}(y\to z)+I_{\mathrm{item}}(z\to y)\right). \tag*{(30)}
\end{aligned} F ( σ [ y ← 1 ]) ≥ F ( σ ) + μ ( y ) − z ∈ supp ( σ ) ∑ ( I item ( y → z ) + I item ( z → y ) ) . (30) Proof. Every constraint counted by μ ( y ) \mu(y) μ ( y ) contains y y y , since it is zero-free. Its weight therefore occurs in at most d − 1 d-1 d − 1 terms I i t e m ( y → z ) I_{\mathrm{item}}(y\to z) I item ( y → z ) , proving the first bound.
By Lemma 6.8, every constraint satisfied by σ \sigma σ has a unit witness y ∈ supp ( σ ) y\in\operatorname{supp}(\sigma) y ∈ supp ( σ ) . Its weight is therefore included in μ ( y ) \mu(y) μ ( y ) . Summing over the satisfied constraints proves (27).
If setting a selected item y y y to 0 makes a satisfied constraint C C C unsatisfied, then y y y must be a unit witness of C C C . Otherwise, the Direct rule would preserve satisfaction. Each such constraint has its weight included in μ ( y ) \mu(y) μ ( y ) . Thus the total weight of constraints that become unsatisfied is at most μ ( y ) \mu(y) μ ( y ) , proving (28).
For (29), fix an unselected item y y y . Every constraint counted by μ ( y ) \mu(y) μ ( y ) whose scope is disjoint from supp ( σ ) \operatorname{supp}(\sigma) supp ( σ ) is unsatisfied under σ \sigma σ and becomes satisfied when y y y is set to 1. Every other
constraint counted by μ ( y ) \mu(y) μ ( y ) contains a selected item z z z , so its weight is included in I i t e m ( y → z ) I_{\mathrm{item}}(y \to z) I item ( y → z ) . Therefore the total weight of constraints that become satisfied is at least
μ ( y ) − ∑ z ∈ supp ( σ ) I i t e m ( y → z ) . \mu(y)-\sum_{z\in\operatorname{supp}(\sigma)} I_{\mathrm{item}}(y\to z). μ ( y ) − z ∈ supp ( σ ) ∑ I item ( y → z ) .
Every constraint that becomes unsatisfied contains y y y . By Lemma 6.8 , it has a unit witness z ∈ supp ( σ ) z\in\operatorname{supp}(\sigma) z ∈ supp ( σ ) before the change. Its weight is therefore included in I i t e m ( z → y ) I_{\mathrm{item}}(z\to y) I item ( z → y ) . Thus the total weight of constraints that become unsatisfied is at most
∑ z ∈ supp ( σ ) I i t e m ( z → y ) . \sum_{z\in\operatorname{supp}(\sigma)} I_{\mathrm{item}}(z\to y). z ∈ supp ( σ ) ∑ I item ( z → y ) .
The change in value is the weight that becomes satisfied minus the weight that becomes unsatisfied. Combining the two bounds proves (29).
We use Lemma 6.9 to bound Bad ( y ) \operatorname{Bad}(y) Bad ( y ) and B \mathcal{B} B . If μ ( y ) = 0 \mu(y)=0 μ ( y ) = 0 , the terms I i t e m ( y → z ) I_{\mathrm{item}}(y\to z) I item ( y → z ) with z ≠ y z\ne y z = y are nonnegative and have sum at most 0 0 0 , so each is 0 0 0 . If μ ( y ) > 0 \mu(y)>0 μ ( y ) > 0 , the definition of Bad ( y ) \operatorname{Bad}(y) Bad ( y ) and the lemma give
∣ Bad ( y ) ∣ η b μ ( y ) ≤ ∑ z ∈ K f r e e ∖ { y } I i t e m ( y → z ) ≤ ( d − 1 ) μ ( y ) . \left|\operatorname{Bad}(y)\right|\frac{\eta}{b}\mu(y)
\le\sum_{z\in K_{\mathrm{free}}\setminus\{y\}} I_{\mathrm{item}}(y\to z)
\le(d-1)\mu(y). ∣ Bad ( y ) ∣ b η μ ( y ) ≤ z ∈ K free ∖ { y } ∑ I item ( y → z ) ≤ ( d − 1 ) μ ( y ) .
For μ ( y ) > 0 \mu(y)>0 μ ( y ) > 0 , divide by ( η / b ) μ ( y ) (\eta/b)\mu(y) ( η / b ) μ ( y ) . When μ ( y ) = 0 \mu(y)=0 μ ( y ) = 0 , Bad ( y ) = ∅ \operatorname{Bad}(y)=\varnothing Bad ( y ) = ∅ by definition. Thus, for every item y y y ,
∣ Bad ( y ) ∣ ≤ ( d − 1 ) b η . (31) \left|\operatorname{Bad}(y)\right|\le\frac{(d-1)b}{\eta}. \tag*{(31)} ∣ Bad ( y ) ∣ ≤ η ( d − 1 ) b . (31)
For distinct items y , z y,z y , z with z ∉ Bad ( y ) z\notin\operatorname{Bad}(y) z ∈ / Bad ( y ) , the definition and the zero-score case give
I i t e m ( y → z ) ≤ η b μ ( y ) . I_{\mathrm{item}}(y\to z)\le\frac{\eta}{b}\mu(y). I item ( y → z ) ≤ b η μ ( y ) .
Each list L c L_c L c has at most ℓ \ell ℓ items. The definition of B \mathcal{B} B and (30) therefore give
∣ B ∣ ≤ ∑ c = 1 b ∑ y ∈ L c ( 1 + ∣ Bad ( y ) ∣ ) ≤ b ℓ ( 1 + ( d − 1 ) b η ) . (32) \left|\mathcal{B}\right|
\le\sum_{c=1}^{b}\sum_{y\in L_c}\left(1+\left|\operatorname{Bad}(y)\right|\right)
\le b\ell\left(1+\frac{(d-1)b}{\eta}\right). \tag*{(32)} ∣ B ∣ ≤ c = 1 ∑ b y ∈ L c ∑ ( 1 + ∣ Bad ( y ) ∣ ) ≤ b ℓ ( 1 + η ( d − 1 ) b ) . (32)
Lemma 6.10. Let J \mathcal{J} J be a zero-free item instance with budget b ≥ 1 b\ge1 b ≥ 1 whose nonempty relations are Direct. Let η ∈ ( 0 , 1 ) \eta\in(0,1) η ∈ ( 0 , 1 ) be rational, and construct the sets L c L_c L c and B \mathcal{B} B from J \mathcal{J} J as above. Let σ \sigma σ be a feasible item assignment with F ( σ ) > 0 F(\sigma)>0 F ( σ ) > 0 and supp ( σ ) ∩ B = ∅ \operatorname{supp}(\sigma)\cap\mathcal{B}=\varnothing supp ( σ ) ∩ B = ∅ . There are a selected item u ∈ supp ( σ ) u\in\operatorname{supp}(\sigma) u ∈ supp ( σ ) and an unselected item v ∈ L κ ( u ) v\in L_{\kappa(u)} v ∈ L κ ( u ) such that
σ ′ : = σ [ u ← 0 , v ← 1 ] \sigma' := \sigma[u\leftarrow0,v\leftarrow1] σ ′ := σ [ u ← 0 , v ← 1 ] satisfies
κ ( σ ′ ) ≤ κ ( σ ) , \kappa(\sigma')\le\kappa(\sigma), κ ( σ ′ ) ≤ κ ( σ ) , F ( σ ′ ) ≥ F ( σ ) − 2 η OPT ( J ) . F(\sigma')\ge F(\sigma)-2\eta\operatorname{OPT}(\mathcal{J}). F ( σ ′ ) ≥ F ( σ ) − 2 η OPT ( J ) .
Proof. By (27) and F ( σ ) > 0 F(\sigma)>0 F ( σ ) > 0 , some selected item u u u has μ ( u ) > 0 \mu(u)>0 μ ( u ) > 0 . Put c : = κ ( u ) ∈ [ b ] c:=\kappa(u)\in[b] c := κ ( u ) ∈ [ b ] . The item u u u meets both conditions for inclusion in L c L_c L c , but u ∉ L c u\notin L_c u ∈ / L c because L c ⊆ B L_c\subseteq\mathcal{B} L c ⊆ B . Therefore ∣ L c ∣ = ℓ \lvert L_c\rvert=\ell ∣ L c ∣ = ℓ , and every item in L c L_c L c has cost at most κ ( u ) \kappa(u) κ ( u ) and score at least μ ( u ) \mu(u) μ ( u ) . Since σ \sigma σ selects at most b b b items, (30) gives
∣ ⋃ z ∈ supp ( σ ) Bad ( z ) ∣ ≤ ( d − 1 ) b 2 η < ℓ . \left|\bigcup_{z\in\operatorname{supp}(\sigma)} \operatorname{Bad}(z)\right| \le\frac{(d-1)b^2}{\eta} < \ell. z ∈ supp ( σ ) ⋃ Bad ( z ) ≤ η ( d − 1 ) b 2 < ℓ .
Choose v ∈ L c v \in L_c v ∈ L c outside this union. Thus v ∉ Bad ( z ) v \notin\operatorname{Bad}(z) v ∈ / Bad ( z ) for every selected item z z z .
Since L c ⊆ B L_c \subseteq B L c ⊆ B , the item v v v is unselected. Also, Bad ( v ) ⊆ B \operatorname{Bad}(v) \subseteq B Bad ( v ) ⊆ B , so no selected item belongs to Bad ( v ) \operatorname{Bad}(v) Bad ( v ) . Consequently, for every z ∈ supp ( σ ) ∖ { u } z \in\operatorname{supp}(\sigma) \setminus\{u\} z ∈ supp ( σ ) ∖ { u } ,
I i t e m ( v → z ) ≤ η b μ ( v ) , I i t e m ( z → v ) ≤ η b μ ( z ) . I_{\mathrm{item}}(v \to z) \le\frac{\eta}{b}\mu(v), \qquad I_{\mathrm{item}}(z \to v) \le\frac{\eta}{b}\mu(z). I item ( v → z ) ≤ b η μ ( v ) , I item ( z → v ) ≤ b η μ ( z ) .
Replacing u u u by v v v does not increase the cost:
κ ( σ ′ ) = κ ( σ ) − κ ( u ) + κ ( v ) ≤ κ ( σ ) ≤ b . \kappa(\sigma') = \kappa(\sigma) - \kappa(u) + \kappa(v) \le\kappa(\sigma) \le b. κ ( σ ′ ) = κ ( σ ) − κ ( u ) + κ ( v ) ≤ κ ( σ ) ≤ b .
Thus σ ′ \sigma' σ ′ is feasible.
The item v v v and every item selected by σ \sigma σ are feasible when selected alone. Their scores are therefore at most OPT ( J ) \operatorname{OPT}(\mathcal{J}) OPT ( J ) . There are at most b b b items in supp ( σ ) ∖ { u } \operatorname{supp}(\sigma) \setminus\{u\} supp ( σ ) ∖ { u } , so the two bounds above give
∑ z ∈ supp ( σ ) ∖ { u } I i t e m ( v → z ) ≤ η OPT ( J ) , \sum_{z\in\operatorname{supp}(\sigma)\setminus\{u\}} I_{\mathrm{item}}(v \to z) \le\eta\operatorname{OPT}(\mathcal{J}), z ∈ supp ( σ ) ∖ { u } ∑ I item ( v → z ) ≤ η OPT ( J ) ,
∑ z ∈ supp ( σ ) ∖ { u } I i t e m ( z → v ) ≤ η OPT ( J ) . \sum_{z\in\operatorname{supp}(\sigma)\setminus\{u\}} I_{\mathrm{item}}(z \to v) \le\eta\operatorname{OPT}(\mathcal{J}). z ∈ supp ( σ ) ∖ { u } ∑ I item ( z → v ) ≤ η OPT ( J ) .
Finally, apply the removal bound to u u u and then the insertion bound to v v v :
F ( σ ′ ) ≥ F ( σ ) − μ ( u ) + μ ( v ) − ∑ z ∈ supp ( σ ) ∖ { u } ( I i t e m ( v → z ) + I i t e m ( z → v ) ) ≥ F ( σ ) − 2 η OPT ( J ) . \begin{aligned}
F(\sigma') &\ge F(\sigma) - \mu(u) + \mu(v) \\
&\quad- \sum_{z\in\operatorname{supp}(\sigma)\setminus\{u\}} \left(I_{\mathrm{item}}(v \to z) + I_{\mathrm{item}}(z \to v)\right) \\
&\ge F(\sigma) - 2\eta\operatorname{OPT}(\mathcal{J}).
\end{aligned} F ( σ ′ ) ≥ F ( σ ) − μ ( u ) + μ ( v ) − z ∈ supp ( σ ) ∖ { u } ∑ ( I item ( v → z ) + I item ( z → v ) ) ≥ F ( σ ) − 2 η OPT ( J ) .
The last inequality uses μ ( v ) ≥ μ ( u ) \mu(v) \ge\mu(u) μ ( v ) ≥ μ ( u ) and the two sum bounds above.
Theorem 6.11. Let J \mathcal{J} J be an item instance with a nonnegative integer budget b 0 b_0 b 0 and constraints of arity at most d ≥ 1 d \ge1 d ≥ 1 . Assume that every nonempty zero-free relation obtained by fixing items in any input constraint is Direct. For every rational δ ∈ ( 0 , 1 ) \delta\in(0,1) δ ∈ ( 0 , 1 ) , Algorithm 3 returns a feasible assignment of value at least ( 1 − δ ) OPT ( J ) (1-\delta)\operatorname{OPT}(\mathcal{J}) ( 1 − δ ) OPT ( J ) in time
2 O ( b 0 log ( 1 + d b 0 / δ ) + d ) ℓ i n O ( 1 ) . 2^{O(b_0\log(1+db_0/\delta)+d)}\ell_{\mathrm{in}}^{O(1)}. 2 O ( b 0 l o g ( 1 + d b 0 / δ ) + d ) ℓ in O ( 1 ) .
Proof. If b 0 = 0 b_0=0 b 0 = 0 , positive item costs make 0 \mathbf{0} 0 the only feasible assignment, and the algorithm returns it in polynomial time. Assume b 0 ≥ 1 b_0 \ge1 b 0 ≥ 1 below. The relation assumption holds at every call: any further restriction of a child constraint is also a restriction of its corresponding input constraint.
Termination. For a call on J \mathcal{J} J with remaining budget b b b , define
ϕ ( J ) : = 2 b + 1 [ F J ( 0 ) > 0 ] , \phi(\mathcal{J}) := 2b + 1[\mathcal{F}^{\mathcal{J}}(0) > 0], ϕ ( J ) := 2 b + 1 [ F J ( 0 ) > 0 ] ,
where 1 [ E ] 1[E] 1 [ E ] equals 1 if E E E holds and 0 otherwise.
If a branch fixes π \pi π at cost r : = κ ( π ) ≥ 1 r := \kappa(\pi) \ge1 r := κ ( π ) ≥ 1 , its child has budget b − r b-r b − r . The term 2 b 2b 2 b decreases by 2 r 2r 2 r , while the indicator can increase by at most 1. Hence
ϕ ( J π ) ≤ ϕ ( J ) − 2 r + 1 ≤ ϕ ( J ) − 1. \phi(\mathcal{J}_{\pi}) \le\phi(\mathcal{J}) - 2r + 1 \le\phi(\mathcal{J}) - 1. ϕ ( J π ) ≤ ϕ ( J ) − 2 r + 1 ≤ ϕ ( J ) − 1.
The only recursive branch of cost zero fixes every marked item to 0 at a call with W > 0 W > 0 W > 0 . Its child is zero-free by Lemma 6.7. The budget stays the same, and the indicator decreases from 1 to 0, so
ϕ ( J π ) = ϕ ( J ) − 1. \phi(\mathcal{J}_{\pi}) = \phi(\mathcal{J}) - 1. ϕ ( J π ) = ϕ ( J ) − 1.
Thus every recursive step decreases the nonnegative integer ϕ \phi ϕ by at least one. Its initial value is at most 2 b 0 + 1 2b_0 + 1 2 b 0 + 1 , so the search terminates after at most 2 b 0 + 1 2b_0 + 1 2 b 0 + 1 recursive steps along any path.
Feasibility and approximation. Recall that η 1 = δ / ( 2 b 0 + 1 ) \eta_1 = \delta/(2b_0 + 1) η 1 = δ / ( 2 b 0 + 1 ) and 2 η 2 = η 1 2\eta_2 = \eta_1 2 η 2 = η 1 . We prove by induction on ϕ ( J ) \phi(\mathcal{J}) ϕ ( J ) that every call returns a feasible assignment σ o u t \sigma_{\mathrm{out}} σ out with
F J ( σ o u t ) ≥ ( 1 − ϕ ( J ) η 1 ) OPT ( J ) . (33) F^{\mathcal{J}}(\sigma_{\mathrm{out}}) \ge(1-\phi(\mathcal{J})\eta_1)\operatorname{OPT}(\mathcal{J}). \tag*{(33)} F J ( σ out ) ≥ ( 1 − ϕ ( J ) η 1 ) OPT ( J ) . (33)
If b = 0 b = 0 b = 0 , the all-zero assignment is the only feasible assignment. If no constraints remain, every assignment has value 0. Thus terminal calls return an optimal assignment.
At a nonterminal call, every tried assignment π \pi π has κ ( π ) ≤ b \kappa(\pi) \le b κ ( π ) ≤ b . The induction hypothesis gives a child assignment σ \sigma σ with κ ( σ ) ≤ b − κ ( π ) \kappa(\sigma) \le b-\kappa(\pi) κ ( σ ) ≤ b − κ ( π ) . Hence
κ ( π ⊔ σ ) = κ ( π ) + κ ( σ ) ≤ b . \kappa(\pi\sqcup\sigma) = \kappa(\pi) + \kappa(\sigma) \le b. κ ( π ⊔ σ ) = κ ( π ) + κ ( σ ) ≤ b .
The additional candidate 0 when W = 0 W = 0 W = 0 is also feasible.
Write ω : = OPT ( J ) \omega:= \operatorname{OPT}(\mathcal{J}) ω := OPT ( J ) and put
α : = 1 − ( ϕ ( J ) − 1 ) η 1 . \alpha:= 1-(\phi(\mathcal{J})-1)\eta_1. α := 1 − ( ϕ ( J ) − 1 ) η 1 .
At a nonterminal call, 2 ≤ ϕ ( J ) ≤ 2 b 0 + 1 2 \le\phi(\mathcal{J}) \le2b_0 + 1 2 ≤ ϕ ( J ) ≤ 2 b 0 + 1 , and hence 0 < α ≤ 1 0 < \alpha\le1 0 < α ≤ 1 . Every child has ϕ ( J π ) ≤ ϕ ( J ) − 1 \phi(\mathcal{J}_{\pi}) \le\phi(\mathcal{J}) - 1 ϕ ( J π ) ≤ ϕ ( J ) − 1 . By induction, its returned assignment σ \sigma σ satisfies
F J π ( σ ) ≥ α OPT ( J π ) . F^{\mathcal{J}_{\pi}}(\sigma) \ge\alpha\operatorname{OPT}(\mathcal{J}_{\pi}). F J π ( σ ) ≥ α OPT ( J π ) .
Suppose W > 0 W > 0 W > 0 . Choose an optimal assignment of J \mathcal{J} J , and let π \pi π be its restriction to K h i \mathcal{K}_{\mathrm{hi}} K hi . This π \pi π is one of the tried assignments. Write w a c c : = w a c c ( π ) w_{\mathrm{acc}} := w_{\mathrm{acc}}(\pi) w acc := w acc ( π ) and ω ′ : = OPT ( J π ) \omega' := \operatorname{OPT}(\mathcal{J}_{\pi}) ω ′ := OPT ( J π ) . The first inequality of Lemma 6.7, applied to the optimal completion, gives
w a c c + ω ′ ≥ ω . w_{\mathrm{acc}} + \omega' \ge\omega. w acc + ω ′ ≥ ω .
For the child’s returned completion σ \sigma σ , the second inequality of that lemma and the induction bound give
F J ( π ⊔ σ ) ≥ w a c c + F J π ( σ ) − η 1 ω ≥ w a c c + α ω ′ − η 1 ω ≥ α ( w a c c + ω ′ ) − η 1 ω ≥ ( α − η 1 ) ω = ( 1 − ϕ ( J ) η 1 ) ω . \begin{aligned}
F^{\mathcal{J}}(\pi\sqcup\sigma) &\ge w_{\mathrm{acc}} + F^{\mathcal{J}_{\pi}}(\sigma) - \eta_1\omega\\
&\ge w_{\mathrm{acc}} + \alpha\omega' - \eta_1\omega\\
&\ge\alpha(w_{\mathrm{acc}} + \omega') - \eta_1\omega\\
&\ge(\alpha-\eta_1)\omega\\
&= (1-\phi(\mathcal{J})\eta_1)\omega.
\end{aligned} F J ( π ⊔ σ ) ≥ w acc + F J π ( σ ) − η 1 ω ≥ w acc + α ω ′ − η 1 ω ≥ α ( w acc + ω ′ ) − η 1 ω ≥ ( α − η 1 ) ω = ( 1 − ϕ ( J ) η 1 ) ω .
Here w a c c ≥ 0 w_{\mathrm{acc}} \ge0 w acc ≥ 0 and α ≤ 1 \alpha\le1 α ≤ 1 justify factoring out α \alpha α .
Suppose W = 0 W=0 W = 0 . The current instance is zero-free, since constraints of weight zero were discarded. If ω = 0 \omega=0 ω = 0 , the candidate 0 \mathbf{0} 0 already has optimal value. Assume ω > 0 \omega>0 ω > 0 . If an optimal assignment selects an item in B B B , there is a branch fixing that item to 1 1 1 . Otherwise, Lemma 6.10, with η = η 2 \eta=\eta_2 η = η 2 , gives a feasible assignment selecting an item in B B B with value at least
( 1 − 2 η 2 ) ω = ( 1 − η 1 ) ω . (1-2\eta_2)\omega=(1-\eta_1)\omega. ( 1 − 2 η 2 ) ω = ( 1 − η 1 ) ω .
Thus some tried assignment π \pi π extends to a feasible assignment of J \mathcal{J} J with value at least ( 1 − η 1 ) ω (1-\eta_1)\omega ( 1 − η 1 ) ω .
Since Z = ∅ \mathcal{Z}=\varnothing Z = ∅ , the child construction removes only constraints that become always satisfied or always unsatisfied after substituting π \pi π . Their contribution is therefore exact for every completion. With w a c c : = w a c c ( π ) w_{\mathrm{acc}}:=w_{\mathrm{acc}}(\pi) w acc := w acc ( π ) and ω ′ : = OPT ( J π ) \omega':=\operatorname{OPT}(\mathcal{J}_{\pi}) ω ′ := OPT ( J π ) , this gives
w a c c + ω ′ ≥ ( 1 − η 1 ) ω . w_{\mathrm{acc}}+\omega' \ge(1-\eta_1)\omega. w acc + ω ′ ≥ ( 1 − η 1 ) ω .
For the child’s returned completion σ \sigma σ ,
F J ( π ⊔ σ ) = w a c c + F J π ( σ ) ≥ w a c c + α ω ′ ≥ α ( w a c c + ω ′ ) ≥ α ( 1 − η 1 ) ω ≥ ( α − η 1 ) ω = ( 1 − ϕ ( J ) η 1 ) ω . \begin{aligned}
F^{\mathcal{J}}(\pi\sqcup\sigma) &= w_{\mathrm{acc}}+F^{\mathcal{J}_{\pi}}(\sigma) \\
&\ge w_{\mathrm{acc}}+\alpha\omega' \\
&\ge\alpha(w_{\mathrm{acc}}+\omega') \\
&\ge\alpha(1-\eta_1)\omega\\
&\ge(\alpha-\eta_1)\omega\\
&= (1-\phi(\mathcal{J})\eta_1)\omega.
\end{aligned} F J ( π ⊔ σ ) = w acc + F J π ( σ ) ≥ w acc + α ω ′ ≥ α ( w acc + ω ′ ) ≥ α ( 1 − η 1 ) ω ≥ ( α − η 1 ) ω = ( 1 − ϕ ( J ) η 1 ) ω .
These inequalities again use w a c c ≥ 0 w_{\mathrm{acc}} \ge0 w acc ≥ 0 and 0 < α ≤ 1 0<\alpha\le1 0 < α ≤ 1 .
The search evaluates all candidates on the constraints of the current instance and returns one of largest value. Thus (33) holds in both cases. At the initial call, ϕ ( J ) η 1 ≤ ( 2 b 0 + 1 ) η 1 = δ \phi(\mathcal{J})\eta_1 \le(2b_0+1)\eta_1=\delta ϕ ( J ) η 1 ≤ ( 2 b 0 + 1 ) η 1 = δ , which proves the required approximation guarantee.
Running time. The recursion depth is at most 2 b 0 + 1 2b_0+1 2 b 0 + 1 . Since b ≤ b 0 b\le b_0 b ≤ b 0 and the thresholds remain fixed, (27) and (32) give size bounds depending only on d d d , b 0 b_0 b 0 , δ \delta δ . Fix one integer q ≥ 2 q\ge2 q ≥ 2 such that, at every nonterminal call,
1 + ∣ K h i ∣ ≤ q ( W > 0 ) , ∣ B ∣ ≤ q ( W = 0 ) . 1+|\mathcal{K}_{\mathrm{hi}}| \le q \quad(W>0), \qquad|B| \le q \quad(W=0). 1 + ∣ K hi ∣ ≤ q ( W > 0 ) , ∣ B ∣ ≤ q ( W = 0 ) .
These bounds allow q = ( 1 + d b 0 / δ ) O ( 1 ) q=(1+db_0/\delta)^{O(1)} q = ( 1 + d b 0 / δ ) O ( 1 ) . When W > 0 W>0 W > 0 , a branch of cost r ≥ 1 r\ge1 r ≥ 1 selects at most r r r marked items. Writing h : = ∣ K h i ∣ h:=|\mathcal{K}_{\mathrm{hi}}| h := ∣ K hi ∣ , the number of these branches is at most
∑ i = 0 min { r , h } ( h i ) ≤ ( 1 + h ) r ≤ q r . \sum_{i=0}^{\min\{r,h\}} \binom{h}{i} \le(1+h)^r \le q^r. i = 0 ∑ m i n { r , h } ( i h ) ≤ ( 1 + h ) r ≤ q r .
When W = 0 W=0 W = 0 , there are at most q q q branches, all of positive cost.
Let N ( b ) N(b) N ( b ) bound the number of recursive calls, including the current call, starting with budget at most b b b . Then N ( 0 ) = 1 N(0)=1 N ( 0 ) = 1 . Branches of cost r ≥ 1 r\ge1 r ≥ 1 contribute at most q r N ( b − r ) q^rN(b-r) q r N ( b − r ) calls. The only branch of cost zero has a zero-free child, which contributes at most 1 + q N ( b − 1 ) 1+qN(b-1) 1 + q N ( b − 1 ) calls. Including the current call therefore gives, for b ≥ 1 b\ge1 b ≥ 1 ,
N ( b ) ≤ 2 + q N ( b − 1 ) + ∑ r = 1 b q r N ( b − r ) . N(b) \le2+qN(b-1)+\sum_{r=1}^{b}q^rN(b-r). N ( b ) ≤ 2 + q N ( b − 1 ) + r = 1 ∑ b q r N ( b − r ) .
We prove N ( b ) ≤ ( 4 q ) b N(b)\le(4q)^b N ( b ) ≤ ( 4 q ) b by induction on b b b . The case b = 0 b=0 b = 0 follows from N ( 0 ) = 1 N(0)=1 N ( 0 ) = 1 . For b ≥ 1 b\ge1 b ≥ 1 , substitute the induction bounds into the recurrence:
N ( b ) ≤ ( 4 q ) b ( 2 ( 4 q ) b + 1 4 + ∑ r = 1 b 4 − r ) . N(b) \le(4q)^b\left(\frac{2}{(4q)^b}+\frac{1}{4}+\sum_{r=1}^{b}4^{-r}\right). N ( b ) ≤ ( 4 q ) b ( ( 4 q ) b 2 + 4 1 + r = 1 ∑ b 4 − r ) .
Since q ≥ 2 q \ge2 q ≥ 2 , the expression in parentheses is at most 1 / 4 + 1 / 4 + 1 / 3 = 5 / 6 < 1 1/4 + 1/4 + 1/3 = 5/6 < 1 1/4 + 1/4 + 1/3 = 5/6 < 1 . This proves the induction bound.
To list the assignments π \pi π on K h i K_{\mathrm{hi}} K hi with κ ( π ) ≤ b \kappa(\pi) \le b κ ( π ) ≤ b , process the marked items in their fixed order, trying 0 before 1. Stop extending a partial assignment once its cost exceeds b b b . Every partial assignment kept extends to such a π \pi π by setting the remaining marked items to 0. Each π \pi π has h + 1 h + 1 h + 1 such partial assignments, one for each possible number of processed items. Hence the number of partial assignments kept is at most ( h + 1 ) (h + 1) ( h + 1 ) times the number of these assignments π \pi π . Since h h h is at most the number of input items, this takes polynomial work per generated branch.
Forming children, computing scores and interactions, forming lists, and evaluating candidates take b 0 O ( 1 ) 2 d ℓ i n O ( 1 ) b_0^{O(1)}2^d\ell_{\mathrm{in}}^{O(1)} b 0 O ( 1 ) 2 d ℓ in O ( 1 ) time per call and branch. Scores and interactions are sums of input weights. Their bit lengths, as well as those of the thresholds and list sizes, are polynomial in ℓ i n \ell_{\mathrm{in}} ℓ in . Thus exact arithmetic also takes polynomial time.
Each generated branch creates one child call. Multiplying the bound on the number of calls by the work per call and branch therefore gives
( 4 q ) b 0 b 0 O ( 1 ) 2 d ℓ i n O ( 1 ) = 2 O ( b 0 log ( 1 + d b 0 / δ ) + d ) ℓ i n O ( 1 ) . (4q)^{b_0}b_0^{O(1)}2^d\ell_{\mathrm{in}}^{O(1)}
=2^{O(b_0\log(1+db_0/\delta)+d)}\ell_{\mathrm{in}}^{O(1)}. ( 4 q ) b 0 b 0 O ( 1 ) 2 d ℓ in O ( 1 ) = 2 O ( b 0 l o g ( 1 + d b 0 / δ ) + d ) ℓ in O ( 1 ) .
The Direct algorithm
Algorithm 4 runs the item search for each recorded triple and returns the selected set with largest value. It uses the coloring threshold θ = δ / ( 2 k c d ) \theta= \delta/(2kc_d) θ = δ / ( 2 k c d ) and accuracy δ / 2 \delta/2 δ /2 for the item search.
Algorithm 4: Direct algorithm for zero-free constraints
Input: Boolean instance I = ( X , C , w , k ) \mathcal{I}=(X,\mathcal{C},w,k) I = ( X , C , w , k ) with nonempty zero-free Direct relations; rational δ ∈ ( 0 , 1 ) \delta\in(0,1) δ ∈ ( 0 , 1 ) ; partial assignment ρ \rho ρ fixing at most k k k variables to 1.
Output: A selected set A A A with ∣ A ∣ ≤ k |A| \le k ∣ A ∣ ≤ k such that τ A \tau_A τ A extends ρ \rho ρ .
if k = 0 k = 0 k = 0 then return ∅ \varnothing ∅
Set d d d to the largest constraint arity, taking d = 1 d = 1 d = 1 if C = ∅ \mathcal{C} = \varnothing C = ∅
Set H 1 ← ρ ( 1 ) H^1 \leftarrow\rho^{(1)} H 1 ← ρ ( 1 ) , H 0 ← ρ ( 0 ) H^0 \leftarrow\rho^{(0)} H 0 ← ρ ( 0 ) , and Y ← X ∖ H 0 Y \leftarrow X \setminus H^0 Y ← X ∖ H 0
Set θ ← δ / ( 2 k c d ) \theta\leftarrow\delta/(2kc_d) θ ← δ / ( 2 k c d )
Compute M M M , J J J , and G θ G_\theta G θ
Set d max ← ⌈ ( d − 1 ) / θ ⌉ d_{\max} \leftarrow\lceil(d-1)/\theta\rceil d m a x ← ⌈( d − 1 ) / θ ⌉
Construct the coloring family F \mathcal{F} F using Lemma 6.4
Set D ← ∅ \mathcal{D} \leftarrow\varnothing D ← ∅
foreach coloring χ ∈ F \chi\in\mathcal{F} χ ∈ F do Apply the steps of Algorithm 2 from the construction of K \mathcal{K} K through the append step, using χ \chi χ as the current coloring
L ← ∅ \mathcal{L} \leftarrow\varnothing L ← ∅
foreach ( K , P , b ) ∈ D (K,P,b) \in\mathcal{D} ( K , P , b ) ∈ D do Construct J c o l \mathcal{J}_{\mathrm{col}} J col from ( K , P , b ) (K,P,b) ( K , P , b ) as in Section 6.2
Run Algorithm 3 on ( J c o l , δ / 2 ) (\mathcal{J}_{\mathrm{col}},\delta/2) ( J col , δ /2 ) , obtaining σ \sigma σ
S ← P ∪ ⋃ K ∈ supp ( σ ) K S \leftarrow P \cup\bigcup_{K\in\operatorname{supp}(\sigma)} K S ← P ∪ ⋃ K ∈ supp ( σ ) K
L ← L ∪ { S } \mathcal{L} \leftarrow\mathcal{L} \cup\{S\} L ← L ∪ { S }
Choose A ∈ L A \in\mathcal{L} A ∈ L with largest exact F ( A ) F(A) F ( A )
return A A A
Theorem 6.12. Let I = ( X , C , w , k ) \mathcal{I}=(X,\mathcal{C},w,k) I = ( X , C , w , k ) be an instance of arity at most d ≥ 1 d \ge1 d ≥ 1 such that every constraint has a nonempty zero-free Direct relation. For every rational δ ∈ ( 0 , 1 ) \delta\in(0,1) δ ∈ ( 0 , 1 ) and partial assignment ρ \rho ρ with ∣ ρ − 1 ( 1 ) ∣ ≤ k |\rho^{-1}(1)| \le k ∣ ρ − 1 ( 1 ) ∣ ≤ k , Algorithm 4 returns a set A ⊆ X A \subseteq X A ⊆ X with ∣ A ∣ ≤ k |A| \le k ∣ A ∣ ≤ k such that τ A \tau_A τ A extends ρ \rho ρ and
F ( A ) ≥ F ( S ) − δ OPT ( I ) F(A) \ge F(S) - \delta\operatorname{OPT}(\mathcal{I}) F ( A ) ≥ F ( S ) − δ OPT ( I )
for every S ⊆ X S \subseteq X S ⊆ X with ∣ S ∣ ≤ k |S| \le k ∣ S ∣ ≤ k such that τ S \tau_S τ S extends ρ \rho ρ . The running time is
2 O ( d + k log ( 1 + d k / δ ) ) ℓ i n O ( 1 ) , 2^{O(d+k\log(1+dk/\delta))}\ell_{\mathrm{in}}^{O(1)}, 2 O ( d + k l o g ( 1 + d k / δ )) ℓ in O ( 1 ) ,
where ℓ i n \ell_{\mathrm{in}} ℓ in is the total bit length of I \mathcal{I} I , ρ \rho ρ , and δ \delta δ . If relation descriptions are supplied as part of the input, this bound assumes that membership in each relation can be tested in time polynomial in ℓ i n \ell_{\mathrm{in}} ℓ in , with a fixed exponent for all inputs.
Proof. If k = 0 k=0 k = 0 , then ρ \rho ρ fixes no variable to 1. The algorithm returns the empty set, whose assignment extends ρ \rho ρ and is the unique feasible assignment. Assume k ≥ 1 k \ge1 k ≥ 1 .
Recall that H 1 = ρ − 1 ( 1 ) H^1=\rho^{-1}(1) H 1 = ρ − 1 ( 1 ) and Y = X ∖ ρ − 1 ( 0 ) Y=X\setminus\rho^{-1}(0) Y = X ∖ ρ − 1 ( 0 ) . Since ∣ H 1 ∣ ≤ k |H^1|\le k ∣ H 1 ∣ ≤ k , the coloring family contains a coloring that isolates H 1 H^1 H 1 . Applying Lemma 6.6 to H 1 H^1 H 1 shows that the algorithm records at least one triple. Thus D ≠ ∅ \mathcal{D}\ne\varnothing D = ∅ .
For each recorded triple ( K , P , b ) (\mathcal{K},P,b) ( K , P , b ) , Lemma 6.5 verifies the relation assumption of Theorem 6.11 . The item search therefore returns a feasible assignment σ \sigma σ . The corresponding variable set S ( σ ) S(\sigma) S ( σ ) satisfies
H 1 ⊆ S ( σ ) ⊆ Y , ∣ S ( σ ) ∣ = ∣ P ∣ + κ ( σ ) ≤ ∣ P ∣ + b = k . H^1\subseteq S(\sigma)\subseteq Y,\qquad|S(\sigma)|=|P|+\kappa(\sigma)\le|P|+b=k. H 1 ⊆ S ( σ ) ⊆ Y , ∣ S ( σ ) ∣ = ∣ P ∣ + κ ( σ ) ≤ ∣ P ∣ + b = k .
Hence L \mathcal{L} L is nonempty, and every candidate has size at most k k k and an assignment extending ρ \rho ρ .
Fix any S ⊆ X S\subseteq X S ⊆ X with ∣ S ∣ ≤ k |S|\le k ∣ S ∣ ≤ k such that τ S \tau_S τ S extends ρ \rho ρ . Lemma 6.4 gives a coloring that isolates S S S . By Lemma 6.6 , the algorithm records its triple, and σ S \sigma_S σ S is feasible for the corresponding item instance J c o l \mathcal{J}_{\mathrm{col}} J col . Since θ = δ / ( 2 k c d ) \theta=\delta/(2kc_d) θ = δ / ( 2 k c d ) , the same lemma gives
F m a s k ( σ S ) ≥ F ( S ) − δ 2 OPT ( I ) . F_{\mathrm{mask}}(\sigma_S)\ge F(S)-\frac{\delta}{2}\operatorname{OPT}(\mathcal{I}). F mask ( σ S ) ≥ F ( S ) − 2 δ OPT ( I ) .
Let σ \sigma σ be the item assignment returned for this coloring. Theorem 6.11 , applied with accuracy δ / 2 \delta/2 δ /2 , gives
F m a s k ( σ ) ≥ ( 1 − δ / 2 ) OPT ( J c o l ) . F_{\mathrm{mask}}(\sigma)\ge(1-\delta/2)\operatorname{OPT}(\mathcal{J}_{\mathrm{col}}). F mask ( σ ) ≥ ( 1 − δ /2 ) OPT ( J col ) .
Since σ S \sigma_S σ S is feasible and OPT ( J c o l ) ≤ OPT ( I ) \operatorname{OPT}(\mathcal{J}_{\mathrm{col}})\le\operatorname{OPT}(\mathcal{I}) OPT ( J col ) ≤ OPT ( I ) , it follows that
F m a s k ( σ ) ≥ F m a s k ( σ S ) − δ 2 OPT ( I ) . F_{\mathrm{mask}}(\sigma)\ge F_{\mathrm{mask}}(\sigma_S)-\frac{\delta}{2}\operatorname{OPT}(\mathcal{I}). F mask ( σ ) ≥ F mask ( σ S ) − 2 δ OPT ( I ) .
The algorithm chooses A A A with largest value among all candidates. Also, every constraint counted by F m a s k ( σ ) F_{\mathrm{mask}}(\sigma) F mask ( σ ) is satisfied by τ S ( σ ) \tau_{S(\sigma)} τ S ( σ ) . Therefore
F ( A ) ≥ F ( S ( σ ) ) ≥ F m a s k ( σ ) ≥ F m a s k ( σ S ) − δ 2 OPT ( I ) ≥ F ( S ) − δ OPT ( I ) . \begin{aligned}
F(A)&\ge F(S(\sigma))\\
&\ge F_{\mathrm{mask}}(\sigma)\\
&\ge F_{\mathrm{mask}}(\sigma_S)-\frac{\delta}{2}\operatorname{OPT}(\mathcal{I})\\
&\ge F(S)-\delta\operatorname{OPT}(\mathcal{I}).
\end{aligned} F ( A ) ≥ F ( S ( σ )) ≥ F mask ( σ ) ≥ F mask ( σ S ) − 2 δ OPT ( I ) ≥ F ( S ) − δ OPT ( I ) .
Running time. We may take d d d to be the largest constraint arity, or 1 if C = ∅ \mathcal{C}=\varnothing C = ∅ , because this choice only reduces the stated bound. Using θ = δ / ( 2 k c d ) \theta=\delta/(2kc_d) θ = δ / ( 2 k c d ) and c d ≤ e d c_d\le ed c d ≤ e d , we obtain
d max + 1 = O ( 1 + d 2 k / δ ) , q : = k ( d max + 1 ) = O ( k + d 2 k 2 / δ ) . d_{\max}+1=O(1+d^2k/\delta),\qquad q:=k(d_{\max}+1)=O(k+d^2k^2/\delta). d m a x + 1 = O ( 1 + d 2 k / δ ) , q := k ( d m a x + 1 ) = O ( k + d 2 k 2 / δ ) .
In particular, q + 1 = ( 1 + d k / δ ) O ( 1 ) q+1=(1+dk/\delta)^{O(1)} q + 1 = ( 1 + d k / δ ) O ( 1 ) . Lemma 6.4 therefore constructs and enumerates the coloring family in time
( q + 1 ) O ( k ) ℓ i n O ( 1 ) = 2 O ( k log ( 1 + d k / δ ) ) ℓ i n O ( 1 ) . (q+1)^{O(k)}\ell_{\mathrm{in}}^{O(1)}=2^{O(k\log(1+dk/\delta))}\ell_{\mathrm{in}}^{O(1)}. ( q + 1 ) O ( k ) ℓ in O ( 1 ) = 2 O ( k l o g ( 1 + d k / δ )) ℓ in O ( 1 ) .
Computing U C U_C U C , M M M , J J J , and G θ G_\theta G θ takes polynomial time. For each original constraint, this uses at most d d d relation membership tests and O ( d 2 ) O(d^2) O ( d 2 ) additions.
For each coloring, construct the item instance by enumerating the at most 2 d 2^d 2 d assignments to the scope of each C ^ \widehat{C} C and testing (26) . The construction takes 2 O ( d ) ℓ i n O ( 1 ) 2^{O(d)}\ell_{\mathrm{in}}^{O(1)} 2 O ( d ) ℓ in O ( 1 ) time and produces an item instance of at most this bit length. Its budget satisfies b ≤ k b\le k b ≤ k . Theorem 6.11 , with accuracy δ / 2 \delta/2 δ /2 , therefore solves this instance in time
2 O ( d + k log ( 1 + d k / δ ) ) ℓ i n O ( 1 ) . 2^{O(d+k\log(1+dk/\delta))}\ell_{\mathrm{in}}^{O(1)}. 2 O ( d + k l o g ( 1 + d k / δ )) ℓ in O ( 1 ) .
Forming the corresponding variable set and evaluating its value in the original instance take polynomial time. Multiplying by the number of colorings gives the stated running time.
All scores are sums of input weights and have polynomial bit length. For d ≥ 2 d\ge2 d ≥ 2 , the numerator and denominator of c d = d d / ( d − 1 ) d − 1 c_d=d^d/(d-1)^{d-1} c d = d d / ( d − 1 ) d − 1 have O ( d log ( d + 1 ) ) O(d\log(d+1)) O ( d log ( d + 1 )) bits; c 1 = 1 c_1=1 c 1 = 1 . Since constraint scopes are explicitly listed, the actual arity is at most the input size. Together with the input encodings of k k k and δ \delta δ , this gives polynomial bit length for θ \theta θ , d max d_{\max} d m a x , q q q , and the coloring parameters. Thus exact arithmetic takes polynomial time. Membership tests take constant time for a fixed language and polynomial time under the assumption in the theorem. Hence the stated bound counts bit operations. □ \square □
Adding zero-valid constraints.
Theorem 6.13. Let Γ \Gamma Γ be a fixed Boolean constraint language of arity at most d ≥ 1 d\ge1 d ≥ 1 . If every relation in Γ + \Gamma_+ Γ + is Direct, then Max k k k -Weight CSP(Γ \Gamma Γ ) admits an EPAS parameterized by k k k . For every rational ε ∈ ( 0 , 1 ) \varepsilon\in(0,1) ε ∈ ( 0 , 1 ) , its running time is
2 O ( d + k log ( 1 + d k / ε ) ) ℓ i n O ( 1 ) , 2^{O(d+k\log(1+dk/\varepsilon))}\ell_{\mathrm{in}}^{O(1)}, 2 O ( d + k l o g ( 1 + d k / ε )) ℓ in O ( 1 ) ,
where ℓ i n \ell_{\mathrm{in}} ℓ in is the total bit length of the instance and ε \varepsilon ε .
Proof. If k = 0 k=0 k = 0 , the all-zero assignment is the unique feasible assignment and is therefore optimal. Assume k ≥ 1 k\ge1 k ≥ 1 .
For an instance J \mathcal{J} J over Γ + \Gamma_+ Γ + , define A ( J , ρ , δ ) \mathcal{A}(\mathcal{J},\rho,\delta) A ( J , ρ , δ ) by running Algorithm 4 and returning the assignment τ A \tau_A τ A corresponding to its output set A A A . By Theorem 6.12, this assignment is feasible, extends ρ \rho ρ , and satisfies
F J ( τ A ) ≥ F J ( τ ′ ) − δ OPT ( J ) F^{\mathcal{J}}(\tau_A)\ge F^{\mathcal{J}}(\tau')-\delta\operatorname{OPT}(\mathcal{J}) F J ( τ A ) ≥ F J ( τ ′ ) − δ OPT ( J )
for every feasible assignment τ ′ \tau' τ ′ extending ρ \rho ρ . Here OPT ( J ) \operatorname{OPT}(\mathcal{J}) OPT ( J ) is taken over all feasible assignments, before imposing ρ \rho ρ . The running time of A \mathcal{A} A is
2 O ( d + k log ( 1 + d k / δ ) ) ℓ i n O ( 1 ) . 2^{O(d+k\log(1+dk/\delta))}\ell_{\mathrm{in}}^{O(1)}. 2 O ( d + k l o g ( 1 + d k / δ )) ℓ in O ( 1 ) .
Thus A \mathcal{A} A satisfies the assumptions of Lemma 4.5 . That lemma calls A \mathcal{A} A with δ = ε / 2 \delta=\varepsilon/2 δ = ε /2 and returns a ( 1 − ε ) (1-\varepsilon) ( 1 − ε ) -approximate solution to the original instance. Its running time is
2 O ( k log ( 1 + d k / ε ) ) 2 O ( d + k log ( 1 + 2 d k / ε ) ) ℓ i n O ( 1 ) = 2 O ( d + k log ( 1 + d k / ε ) ) ℓ i n O ( 1 ) . \begin{aligned}
2^{O(k\log(1+dk/\varepsilon))}2^{O(d+k\log(1+2dk/\varepsilon))}\ell_{\mathrm{in}}^{O(1)} \\
&=2^{O(d+k\log(1+dk/\varepsilon))}\ell_{\mathrm{in}}^{O(1)}.
\end{aligned} 2 O ( k l o g ( 1 + d k / ε )) 2 O ( d + k l o g ( 1 + 2 d k / ε )) ℓ in O ( 1 ) = 2 O ( d + k l o g ( 1 + d k / ε )) ℓ in O ( 1 ) .
Since Γ \Gamma Γ is fixed, we can choose d d d as a constant. This proves that the algorithm is an EPAS parameterized by k k k .
The parameter values also agree with § 3 . With δ = ε / 2 \delta= \varepsilon/2 δ = ε /2 , the zero-free algorithm uses θ = ε / ( 4 k c d ) \theta= \varepsilon/(4kcd) θ = ε / ( 4 k c d ) and calls the item search with accuracy ε / 4 \varepsilon/4 ε /4 . For initial item budget b 0 b_0 b 0 , the item search therefore uses
η 1 = ε 4 ( 2 b 0 + 1 ) , η 2 = η 1 2 . \eta_1 = \frac{\varepsilon}{4(2b_0+1)}, \qquad\eta_2 = \frac{\eta_1}{2}. η 1 = 4 ( 2 b 0 + 1 ) ε , η 2 = 2 η 1 .
Hardness when neither repair rule holds throughout the language
Fix a finite Boolean constraint language Γ \Gamma Γ of maximum arity d d d . Assume that Γ + \Gamma_+ Γ + contains a relation that is not DIRECT and a relation that is not ROOTED. We prove the hardness half of the dichotomy using only its nonempty zero-free relations. We use the unit-witness and control coordinates and the rules DIRECT and ROOTED defined above. Selecting a variable means setting it to one, and the score counts satisfied constraints. Throughout this section, k k k is the size of the sought clique and k ′ k' k ′ is the budget of the constructed instance.
From a CLIQUE instance ( G , k ) (G,k) ( G , k ) , where G = ( V G , E G ) G=(V_G,E_G) G = ( V G , E G ) is a finite simple undirected graph, we construct an unweighted multiplicity-one instance I \mathcal{I} I with budget k ′ k' k ′ and integer target t t t , both bounded by functions of k k k and d d d , such that
OPT ( I ) ≤ t , OPT ( I ) = t ⟺ G has a k -clique . (34) \operatorname{OPT}(\mathcal{I}) \le t,\qquad\operatorname{OPT}(\mathcal{I}) = t \Longleftrightarrow G\text{ has a }k\text{-clique}. \tag*{(34)} OPT ( I ) ≤ t , OPT ( I ) = t ⟺ G has a k -clique . (34)
Recall that e i e_i e i is the tuple whose only 1 is in coordinate i i i . A nonempty zero-free relation R R R is accessible if every tuple in R R R has a 1 in some coordinate i i i with e i ∈ R e_i \in R e i ∈ R . It is inaccessible if it contains a tuple whose 1s all lie in control coordinates.
We first consider a language containing an inaccessible relation. We then consider the remaining case, where every nonempty zero-free relation is accessible. In this second case, the hardness hypothesis gives two relations: P P P , which fails DIRECT, and Q Q Q , which fails ROOTED. The relations P P P and Q Q Q may coincide.
Lemma 7.1 (A gap of one rules out an EPAS). Suppose a parameterized maximization problem has nonnegative integer solution values and admits an FPT reduction from CLIQUE. For each input ( G , k ) (G,k) ( G , k ) , the reduction produces an instance I \mathcal{I} I with parameter k ′ = k ′ ( k ) k'=k'(k) k ′ = k ′ ( k ) and an integer target t = t ( k ) ≥ 1 t=t(k)\ge1 t = t ( k ) ≥ 1 such that
OPT ( I ) ≤ t , OPT ( I ) = t ⟺ G contains a k -clique . \operatorname{OPT}(\mathcal{I}) \le t,\qquad\operatorname{OPT}(\mathcal{I}) = t \Longleftrightarrow G\text{ contains a }k\text{-clique}. OPT ( I ) ≤ t , OPT ( I ) = t ⟺ G contains a k -clique . Then the problem admits no EPAS unless FPT = W[1 ] .
Proof. Suppose an EPAS exists. Run it on I \mathcal{I} I with ε = 1 / ( 2 t ) \varepsilon= 1/(2t) ε = 1/ ( 2 t ) . If G G G contains a k k k -clique, the returned feasible solution has value at least ( 1 − ε ) t = t − 1 / 2 (1-\varepsilon)t=t-1/2 ( 1 − ε ) t = t − 1/2 . Its value is an integer and is at most t t t , so it equals t t t . If G G G contains no k k k -clique, then OPT ( I ) ≤ t − 1 \operatorname{OPT}(\mathcal{I})\le t-1 OPT ( I ) ≤ t − 1 , so the returned value is less than t t t .
Comparing the returned value with t t t therefore decides CLIQUE. The reduction runs in FPT time, and both k ′ k' k ′ and ε \varepsilon ε depend only on k k k , so this gives an FPT algorithm for CLIQUE. Since CLIQUE is W[1 ] -complete [10 ] , we obtain FPT = W[1 ] .
Each construction below requires k ≥ k min k\ge k_{\min} k ≥ k m i n for a fixed positive integer k min k_{\min} k m i n depending only on Γ \Gamma Γ . If k < k min k<k_{\min} k < k m i n , add k min − k k_{\min}-k k m i n − k new vertices, each adjacent to every original vertex and every other new vertex, and replace k k k by k min k_{\min} k m i n . A k k k -clique in the original graph extends to a k min k_{\min} k m i n -clique by including all new vertices. Conversely, a k min k_{\min} k m i n -clique in the enlarged graph contains at least k k k original vertices, and any k k k of these form a clique in the original graph. Since k min k_{\min} k m i n is fixed, this step adds only a constant number of vertices. We then use ( G , k ) (G,k) ( G , k ) to denote the resulting instance, so k ≥ k min k \ge k_{\min} k ≥ k m i n . This lets us assume that k k k is larger than a fixed constant in either reduction.
Every relation used in the constructions belongs to Γ \Gamma Γ . A fresh variable is a new variable, distinct from every variable introduced earlier. When pairing two copies of a constraint family, we state explicitly which variables they share. Within each constraint, the variables are pairwise distinct, as required in Section 2.
An inaccessible relation
Lemma 7.2 (Reduction using an inaccessible relation). Let Γ \Gamma Γ be a fixed finite Boolean constraint language containing a nonempty zero-free inaccessible relation. Then there is an FPT reduction from Clique to unweighted instances of Max k k k -Weight CSP( Γ ) (\Gamma) ( Γ ) with multiplicity one. For each input ( G , k ) (G,k) ( G , k ) , the constructed instance I \mathcal{I} I satisfies (33).
Proof. Choose a nonempty zero-free inaccessible relation R ∈ Γ R \in\Gamma R ∈ Γ . By inaccessibility, there is a tuple β ∈ R \beta\in R β ∈ R whose support consists only of control coordinates. Among the tuples α ∈ R \alpha\in R α ∈ R with supp ( α ) ⊆ supp ( β ) \operatorname{supp}(\alpha) \subseteq\operatorname{supp}(\beta) supp ( α ) ⊆ supp ( β ) , choose one with the fewest 1s. Put A : = supp ( α ) A := \operatorname{supp}(\alpha) A := supp ( α ) and q : = ∣ A ∣ q := |A| q := ∣ A ∣ .
No tuple in R R R has support strictly contained in A A A : such a tuple would also have support contained in supp ( β ) \operatorname{supp}(\beta) supp ( β ) and would have fewer 1s than α \alpha α . Since R R R is zero-free, A A A is nonempty. If A = { i } A = \{i\} A = { i } , then α = e i ∈ R \alpha= e_i \in R α = e i ∈ R , contradicting the fact that i i i is a control coordinate. Hence q ≥ 2 q \ge2 q ≥ 2 .
Construction. Assume k ≥ q + 3 k \ge q + 3 k ≥ q + 3 , using the preprocessing above. Choose two distinct coordinates a 1 , a 2 ∈ A a_1,a_2 \in A a 1 , a 2 ∈ A for the edge endpoints. Introduce q − 2 q-2 q − 2 distinct shared anchor variables for the other coordinates of A A A . For each vertex v ∈ V G v \in V_G v ∈ V G , introduce a variable x v x_v x v . For each edge u v uv uv , choose an order ( u , v ) (u,v) ( u , v ) and add one unit-weight R R R -constraint with x u x_u x u in coordinate a 1 a_1 a 1 and x v x_v x v in coordinate a 2 a_2 a 2 . Put the anchors in their coordinates of A A A and a fresh private variable in every coordinate outside A A A . Different edges have disjoint private variables. All vertex, anchor, and private variables are distinct. Since G G G is simple, different edges give different scope sets. Set
k ′ : = k + q − 2 , t : = ( k 2 ) . (35) k' := k+q-2,\qquad t := \binom{k}{2}. \tag*{(35)} k ′ := k + q − 2 , t := ( 2 k ) . (35)
Let X X X be the set of all vertex, anchor, and private variables introduced above, and let C \mathcal{C} C be the collection of the constructed R R R -constraints. The output instance is I = ( X , C , w , k ′ ) \mathcal{I}=(X,\mathcal{C},w,k') I = ( X , C , w , k ′ ) , where w ( C ) = 1 w(C)=1 w ( C ) = 1 for every C ∈ C C \in\mathcal{C} C ∈ C . Its decision threshold is t t t .
Given a k k k -clique, set its vertex variables and every anchor to 1, and set every other variable to 0. This assignment has weight k ′ k' k ′ . Each clique edge receives the tuple α ∈ R \alpha\in R α ∈ R . On any other edge, the tuple has support strictly contained in A A A , so its constraint is unsatisfied. Thus the score is exactly t t t .
Upper bound. Consider an assignment within the budget. Suppose first that it selects every anchor, and let s s s and r r r be the numbers of selected vertex and private variables. Then s + r ≤ k s+r \le k s + r ≤ k . At most ( s 2 ) \binom{s}{2} ( 2 s ) constraints have both endpoints selected. Every other satisfied constraint needs a selected private variable: without one, the tuple assigned to that constraint would have support properly contained in A A A . Private variables are disjoint across edge constraints, so the score is at most
( s 2 ) + r ≤ ( s 2 ) + k − s . (36) \binom{s}{2}+r \le\binom{s}{2}+k-s. \tag*{(36)} ( 2 s ) + r ≤ ( 2 s ) + k − s . (36)
For s < k s<k s < k , this is less than t t t , because
( k 2 ) − ( ( s 2 ) + k − s ) = ( k − s ) ( k + s − 3 ) 2 > 0. (37) \binom{k}{2}-\left(\binom{s}{2}+k-s\right)=\frac{(k-s)(k+s-3)}{2}>0. \tag*{(37)} ( 2 k ) − ( ( 2 s ) + k − s ) = 2 ( k − s ) ( k + s − 3 ) > 0. (37)
If s = k s = k s = k , no private variable is selected, and the score is the number of edges among these k k k vertices. It equals t t t exactly when they form a clique.
If an anchor is set to 0, a constraint with all its private variables set to 0 receives a tuple whose support is strictly contained in A A A . Such a constraint is unsatisfied. Therefore every satisfied constraint requires a selected private variable. Each private variable occurs in only one constraint, so the score is at most k ′ k' k ′ . Since k ≥ q + 3 ≥ 5 k \ge q + 3 \ge5 k ≥ q + 3 ≥ 5 ,
k ′ = k + q − 2 ≤ 2 k − 5 < 2 k ≤ ( k 2 ) = t . k' = k + q - 2 \le2k - 5 < 2k \le\binom{k}{2} = t. k ′ = k + q − 2 ≤ 2 k − 5 < 2 k ≤ ( 2 k ) = t .
Thus every feasible score is at most t t t , with equality exactly for a k k k -clique.
There is one constraint per edge and at most d − q d - q d − q private variables per edge. Thus the instance has ∣ E G ∣ |E_G| ∣ E G ∣ constraints and at most
∣ V G ∣ + ( q − 2 ) + ( d − q ) ∣ E G ∣ |V_G| + (q - 2) + (d - q)|E_G| ∣ V G ∣ + ( q − 2 ) + ( d − q ) ∣ E G ∣
variables. Since q ≤ d q \le d q ≤ d ,
k ′ ≤ k + d − 2 , t ≤ k 2 2 . k' \le k + d - 2,\qquad t \le\frac{k^2}{2}. k ′ ≤ k + d − 2 , t ≤ 2 k 2 .
These bounds show that the construction is an FPT reduction.
A fixed constraint family with a switch
We now consider the remaining case, where every nonempty zero-free relation in Γ \Gamma Γ is accessible. We first examine a relation that fails Rooted to identify a requirement we can use in the reduction. The next lemma shows that we can leave at least two coordinates free, prescribe a nonempty set of control coordinates as 1, and prescribe all other coordinates as 0. Among tuples with these prescribed values, a tuple belongs to the relation exactly when the entry in every free coordinate is 1.
Here, the prescribed values specify which tuples of the relation we examine. In the reduction, every coordinate contains a Boolean variable, and every constraint uses a relation from Γ \Gamma Γ . We add constraints so that reaching the target score requires selecting the variables corresponding to coordinates prescribed as 1. The proof also considers assignments that select variables corresponding to coordinates prescribed as 0, and bounds the resulting score while accounting for their budget cost.
Lemma 7.3 (A condition equivalent to ROOTED). Let R R R be a nonempty zero-free relation of arity r r r . Then R R R is ROOTED if and only if it has no pinned conjunction. If R R R is accessible, this is equivalent to the following condition: for every set T ⊆ [ r ] T \subseteq[r] T ⊆ [ r ] of control coordinates and every A ⊆ [ r ] ∖ T A \subseteq[r] \setminus T A ⊆ [ r ] ∖ T , if R R R contains a tuple with support A ∪ T A \cup T A ∪ T but no tuple with support A ′ ∪ T A' \cup T A ′ ∪ T for any A ′ ⊊ A A' \subsetneq A A ′ ⊊ A , then ∣ A ∣ = 1 |A| = 1 ∣ A ∣ = 1 .
In particular, if R R R is accessible but not ROOTED, there are disjoint sets A , T ⊆ [ r ] A,T \subseteq[r] A , T ⊆ [ r ] , with ∣ A ∣ ≥ 2 |A| \ge2 ∣ A ∣ ≥ 2 and T T T a nonempty set of control coordinates, such that the following holds: when the entries in T T T are 1 and those outside A ∪ T A \cup T A ∪ T are 0, a tuple belongs to R R R if and only if every entry in A A A is 1.
Proof. Assume first that R R R is accessible. If R R R is ROOTED, then for any sets A , T A,T A , T with the stated support property, its definition gives a unit-witness coordinate u ∈ A u \in A u ∈ A and a tuple in R R R with support { u } ∪ T \{u\} \cup T { u } ∪ T , so the condition on proper subsets forces A = { u } A = \{u\} A = { u } .
Conversely, suppose the stated condition holds. Take any α ∈ R \alpha\in R α ∈ R . Let W W W be the set of unit-witness coordinates in supp ( α ) \operatorname{supp}(\alpha) supp ( α ) , and let N N N be the set of control coordinates in supp ( α ) \operatorname{supp}(\alpha) supp ( α ) . Thus $\operatorname{supp}(\alpha) = W \cup N. Choose a set A ⊆ W A \subseteq W A ⊆ W of minimum size such that R R R contains a tuple with support A ∪ N A \cup N A ∪ N . Such a set exists because α ∈ R \alpha\in R α ∈ R . No proper subset of A A A has this property, so the assumed condition gives A = { u } A = \{u\} A = { u } for some u ∈ W u \in W u ∈ W .
Let B ⊆ N B \subseteq N B ⊆ N be arbitrary. Choose a set A ′ ⊆ { u } ∪ ( N ∖ B ) A' \subseteq\{u\} \cup(N \setminus B) A ′ ⊆ { u } ∪ ( N ∖ B ) of minimum size such that R R R contains a tuple with support A ′ ∪ B A' \cup B A ′ ∪ B . Such a set exists because R R R contains a tuple with support { u } ∪ N \{u\} \cup N { u } ∪ N . Again, no proper subset of A ′ A' A ′ has this property, so the assumed condition gives ∣ A ′ ∣ = 1 |A'| = 1 ∣ A ′ ∣ = 1 . If u ∉ A ′ u \notin A' u ∈ / A ′ , every coordinate in A ′ ∪ B A' \cup B A ′ ∪ B would be a control coordinate, contrary to accessibility. Hence A ′ = { u } A' = \{u\} A ′ = { u } .
Thus, for every B ⊆ N B \subseteq N B ⊆ N , the relation R R R contains a tuple with support { u } ∪ B \{u\} \cup B { u } ∪ B . The same unit-witness coordinate u u u therefore satisfies the requirement of Rooted for α \alpha α . Since α \alpha α was arbitrary, R R R is Rooted.
Finally, suppose R R R is not Rooted. The condition in the lemma then fails, so there are a set T ⊆ [ r ] T \subseteq[r] T ⊆ [ r ] of control coordinates and a set A ⊆ [ r ] ∖ T A \subseteq[r] \setminus T A ⊆ [ r ] ∖ T with ∣ A ∣ ≠ 1 |A| \ne1 ∣ A ∣ = 1 such that R R R contains a tuple with support A ∪ T A \cup T A ∪ T , but no tuple with support A ′ ∪ T A' \cup T A ′ ∪ T for any A ′ ⊊ A A' \subsetneq A A ′ ⊊ A .
By accessibility, the tuple with support A ∪ T A \cup T A ∪ T has a 1 in a unit-witness coordinate u u u . Since T T T contains only control coordinates, u ∈ A u \in A u ∈ A . Thus A A A is nonempty, and ∣ A ∣ ≠ 1 |A| \ne1 ∣ A ∣ = 1 gives ∣ A ∣ ≥ 2 |A| \ge2 ∣ A ∣ ≥ 2 . If T = ∅ T = \varnothing T = ∅ , then e u ∈ R e_u \in R e u ∈ R and supp ( e u ) = { u } ⊊ A \operatorname{supp}(e_u) = \{u\} \subsetneq A supp ( e u ) = { u } ⊊ A , contradicting the condition on proper subsets. Therefore T T T is nonempty. Under these prescribed entries, every possible tuple has support A ′ ∪ T A' \cup T A ′ ∪ T for some A ′ ⊆ A A' \subseteq A A ′ ⊆ A . The support condition therefore gives the stated equivalence. A pinned conjunction violates the condition on proper subsets. The preceding argument therefore proves that an accessible relation is Rooted if and only if it has no pinned conjunction.
If R R R is inaccessible, choose a satisfying tuple whose support A A A consists only of controls and is minimal under inclusion. Since R R R is zero-free and every coordinate in A A A is a control, ∣ A ∣ ≥ 2 |A| \ge2 ∣ A ∣ ≥ 2 . No tuple with support properly contained in A A A belongs to R R R . Hence A A A , together with T = ∅ T = \varnothing T = ∅ , is a pinned conjunction. Such an R R R is also not Rooted. □
We now use this requirement to build a fixed family of constraints. The following definition specifies its variables and the score bounds needed for the reduction.
Definition 7.4 (Switch gadget). A switch gadget H ( x ; Z , Y ) H(x; Z, Y) H ( x ; Z , Y ) is a family of unit-weight constraints, fixed independently of ( G , k ) (G, k) ( G , k ) . Its Boolean variables are partitioned into three disjoint groups:
{ x } \{x\} { x } , where x x x is called the switch ;
Z Z Z , whose members are called private variables ;
a nonempty set Y Y Y , whose members are called pins .
The family has a specified set B ⊆ Z B \subseteq Z B ⊆ Z with h : = ∣ B ∣ ≥ 3 h := |B| \ge3 h := ∣ B ∣ ≥ 3 and contains exactly h + 1 h + 1 h + 1 constraints. For b ∈ { 0 , 1 } b \in\{0,1\} b ∈ { 0 , 1 } and S ⊆ Z S \subseteq Z S ⊆ Z , let f b ( S ) f_b(S) f b ( S ) be the number of constraints satisfied by the assignment that sets x = b x = b x = b , every variable in Y ∪ S Y \cup S Y ∪ S to 1, and every variable in Z ∖ S Z \setminus S Z ∖ S to 0. We require
f 0 ( S ) ≤ ∣ S ∣ for every S ⊆ Z , f 1 ( S ) ≤ ∣ S ∣ for every S ⊆ Z with S ≠ B , f 1 ( B ) = h + 1. (38) \begin{aligned}
f_0(S) &\le|S| && \text{for every } S \subseteq Z,\\
f_1(S) &\le|S| && \text{for every } S \subseteq Z \text{ with } S \ne B,\\
f_1(B) &= h + 1. \tag*{(38)}
\end{aligned} f 0 ( S ) f 1 ( S ) f 1 ( B ) ≤ ∣ S ∣ ≤ ∣ S ∣ = h + 1. for every S ⊆ Z , for every S ⊆ Z with S = B , (38) The constraints also satisfy the following conditions:
Every relation used is nonempty, zero-free, and accessible. The switch and pins occur only in control coordinates.
Every constraint contains the switch or at least one pin.
Each constraint uses pairwise distinct variables, and no two constraints have the same underlying scope set.
We say that Γ \Gamma Γ implements H H H if every constraint in H H H uses a relation from Γ \Gamma Γ .
With all pins in Y Y Y set to 1, select every variable in B B B and leave every variable in Z ∖ B Z \setminus B Z ∖ B at 0. This selects h h h private variables. Turning the switch x x x on then satisfies all h + 1 h+1 h + 1 constraints. Turning it off satisfies at most h h h constraints.
Table 2.
The bounds in the table assume that every pin in Y Y Y is set to 1. Under this assumption, all h + 1 h+1 h + 1 constraints are satisfied with at most h h h selected private variables if and only if S = B S = B S = B and x = 1 x = 1 x = 1 . The switch and pins also count toward the Hamming-weight budget.
If no private variable is selected, no constraint is satisfied, regardless of the values of the switch and pins.
Construction
Choose accessible relations P , Q ∈ Γ + P, Q \in\Gamma^{+} P , Q ∈ Γ + such that P P P is not DIRECT and Q Q Q is not ROOTED. They may be the same relation. We first construct the fixed family H ( x ; Z , Y ) H(x; Z, Y) H ( x ; Z , Y ) and verify that it is a switch gadget. We then use two copies of H H H for each edge of the input graph to construct the CSP instance. The lemma below proves correctness of the reduction.
The switch gadget. We first build one P P P -constraint with the switch in a control coordinate. We then add Q Q Q -constraints, each using a consecutive group of private variables in cyclic order.
The constraint containing the switch. Since P P P is not DIRECT, choose a tuple α ∈ P \alpha\in P α ∈ P and a control coordinate c c c with α c = 1 \alpha_c = 1 α c = 1 such that
α − e c ∉ P . (39) \alpha- e_c \notin P. \tag*{(39)} α − e c ∈ / P . (39)
Thus changing only entry c c c from 1 to 0 changes a satisfying tuple into a tuple outside P P P . We will place the switch in coordinate $c.
Define
A P : = { j ∈ supp ( α ) : e j ∈ P } , T P : = { j ∈ supp ( α ) ∖ { c } : e j ∉ P } . A_P := \{j \in\operatorname{supp}(\alpha) : e_j \in P\}, \qquad T_P := \{j \in\operatorname{supp}(\alpha) \setminus\{c\} : e_j \notin P\}. A P := { j ∈ supp ( α ) : e j ∈ P } , T P := { j ∈ supp ( α ) ∖ { c } : e j ∈ / P } .
Thus A P A_P A P consists of the unit-witness coordinates j j j with α j = 1 \alpha_j = 1 α j = 1 , and T P T_P T P consists of the control coordinates j ≠ c j \ne c j = c with α j = 1 \alpha_j = 1 α j = 1 . These sets and { c } \{c\} { c } are pairwise disjoint, and
supp ( α ) = A P ∪ T P ∪ { c } . \operatorname{supp}(\alpha) = A_P \cup T_P \cup\{c\}. supp ( α ) = A P ∪ T P ∪ { c } .
Since P P P is accessible and α ∈ P \alpha\in P α ∈ P , there is a coordinate j j j with α j = 1 \alpha_j = 1 α j = 1 and e j ∈ P e_j \in P e j ∈ P . Therefore A P ≠ ∅ A_P \ne\varnothing A P = ∅ . Put ℓ : = ∣ A P ∣ \ell:= |A_P| ℓ := ∣ A P ∣ and write A P = { u 1 < ⋯ < u ℓ } A_P = \{u_1 < \cdots< u_\ell\} A P = { u 1 < ⋯ < u ℓ } .
Introduce a switch variable x x x and distinct private variables z 1 , … , z ℓ z_1, \ldots, z_\ell z 1 , … , z ℓ . Add one unit-weight P P P -constraint using the following variables:
Table 3.
We call this the switch constraint . Call the private variables in the last row fillers . The pins and fillers are pairwise distinct and distinct from x , z 1 , … , z ℓ x, z_1, \ldots, z_\ell x , z 1 , … , z ℓ .
If z 1 , … , z ℓ z_1, \ldots, z_\ell z 1 , … , z ℓ and every pin y j P y^P_j y j P are set to 1, and every filler in the switch constraint is set to 0, then its tuple of variable values is α \alpha α when x = 1 x=1 x = 1 and α − e c \alpha-e_c α − e c when x = 0 x=0 x = 0 . Under these conditions, the switch constraint is satisfied if and only if x = 1 x=1 x = 1 .
2. The cycle constraints. Since Q Q Q is accessible and not Rooted, Lemma 7.3 gives disjoint coordinate sets A Q A_Q A Q and T Q T_Q T Q , where ∣ A Q ∣ ≥ 2 |A_Q|\ge2 ∣ A Q ∣ ≥ 2 and T Q T_Q T Q is a nonempty set of control coordinates. Put q : = ∣ A Q ∣ q:=|A_Q| q := ∣ A Q ∣ and write A Q = { a 1 < ⋯ < a q } A_Q=\{a_1<\cdots<a_q\} A Q = { a 1 < ⋯ < a q } . The set A Q A_Q A Q may include control coordinates.
With the entries in T Q T_Q T Q fixed to 1 and those outside A Q ∪ T Q A_Q\cup T_Q A Q ∪ T Q fixed to 0, a tuple belongs to Q Q Q exactly when the entry in every coordinate in A Q A_Q A Q is 1.
Set
h : = max { q + 1 , ℓ } . h:=\max\{q+1,\ell\}. h := max { q + 1 , ℓ } .
Then h ≥ 3 h\ge3 h ≥ 3 , q < h q<h q < h , and ℓ ≤ h \ell\le h ℓ ≤ h . If ℓ < h \ell<h ℓ < h , introduce additional new private variables z ℓ + 1 , … , z h z_{\ell+1},\ldots,z_h z ℓ + 1 , … , z h . Put
B : = { z 1 , … , z h } . B:=\{z_1,\ldots,z_h\}. B := { z 1 , … , z h } .
Thus B B B includes all the variables z 1 , … , z ℓ z_1,\ldots,z_\ell z 1 , … , z ℓ already used in the switch constraint.
Use cyclic subscripts: after z h z_h z h , continue with z 1 z_1 z 1 . Formally, define z h + j : = z j z_{h+j}:=z_j z h + j := z j for j ∈ [ h ] j\in[h] j ∈ [ h ] . For each i ∈ [ h ] i\in[h] i ∈ [ h ] , put
E i : = { z i , z i + 1 , … , z i + q − 1 } . E_i:=\{z_i,z_{i+1},\ldots,z_{i+q-1}\}. E i := { z i , z i + 1 , … , z i + q − 1 } .
This is the group of q q q consecutive variables starting at z i z_i z i . Since q < h q<h q < h , each E i E_i E i is a proper subset of B B B , and the groups E 1 , … , E h E_1,\ldots,E_h E 1 , … , E h are distinct. For example, when q = 2 q=2 q = 2 and h = 3 h=3 h = 3 , the groups are
{ z 1 , z 2 } , { z 2 , z 3 } , { z 3 , z 1 } . \{z_1,z_2\},\qquad\{z_2,z_3\},\qquad\{z_3,z_1\}. { z 1 , z 2 } , { z 2 , z 3 } , { z 3 , z 1 } .
For each j ∈ T Q j\in T_Q j ∈ T Q , introduce a pin y j Q y^Q_j y j Q . These pins are pairwise distinct and distinct from all variables already introduced. Each constraint added below uses the same variable y j Q y^Q_j y j Q in coordinate j j j . For each i ∈ [ h ] i\in[h] i ∈ [ h ] , add one unit-weight Q Q Q -constraint:
Table 4.
Use a different new filler for each remaining coordinate of each constraint added in this step. All these fillers are distinct from one another and from all previously introduced variables.
We call these h h h constraints cycle constraints . Each uses relation Q Q Q and one group E i E_i E i of q q q consecutive private variables in the cyclic order of B B B .
For each i ∈ [ h ] i\in[h] i ∈ [ h ] , if every pin y j Q y^Q_j y j Q is set to 1 and every filler in the cycle constraint indexed by i i i is set to 0, then that constraint is satisfied exactly when every variable in E i E_i E i is set to 1.
3. The complete gadget. Let
Y : = { y j P : j ∈ T P } ∪ { y j Q : j ∈ T Q } . Y:=\{y^P_j:j\in T_P\}\cup\{y^Q_j:j\in T_Q\}. Y := { y j P : j ∈ T P } ∪ { y j Q : j ∈ T Q } .
and let Z Z Z consist of the variables in B B B and all fillers introduced above. The groups { x } \{x\} { x } , Z Z Z , and Y Y Y are disjoint. Each filler occurs in exactly one constraint. Since T Q ≠ ∅ T_Q\ne\varnothing T Q = ∅ , the pin set Y Y Y is nonempty.
The family H ( x ; Z , Y ) H(x;Z,Y) H ( x ; Z , Y ) contains one switch constraint using P P P and h h h cycle constraints using Q Q Q . If every pin in Y Y Y and every variable in B B B is set to 1, and every filler is set to 0, then all h h h cycle constraints are satisfied. The switch constraint is satisfied exactly when x = 1 x=1 x = 1 . Thus
f 0 ( B ) = h , f 1 ( B ) = h + 1. f_0(B)=h,\qquad f_1(B)=h+1. f 0 ( B ) = h , f 1 ( B ) = h + 1.
Verification of the switch gadget. The construction already gives f 0 ( B ) = h f_0(B)=h f 0 ( B ) = h and f 1 ( B ) = h + 1 f_1(B)=h+1 f 1 ( B ) = h + 1 . We now prove the bounds for S ≠ B S\ne B S = B .
First, under any assignment, every satisfied constraint contains a private variable set to 1 in a unit-witness coordinate. This follows from accessibility, since the switch and pins occur only in control coordinates. In particular, no constraint is satisfied when every private variable is 0, regardless of the switch and pin values.
Fix b ∈ { 0 , 1 } b\in\{0,1\} b ∈ { 0 , 1 } and S ⊆ Z S\subseteq Z S ⊆ Z with S ≠ B S\ne B S = B , and set every pin to 1. Put
a : = ∣ S ∩ B ∣ , r : = ∣ S ∖ B ∣ . a:=|S\cap B|,\qquad r:=|S\setminus B|. a := ∣ S ∩ B ∣ , r := ∣ S ∖ B ∣.
Thus ∣ S ∣ = a + r |S|=a+r ∣ S ∣ = a + r , and r r r counts the selected fillers.
If a = 0 a=0 a = 0 , every satisfied constraint contains a selected filler. Each filler occurs in only one constraint, so f b ( S ) ≤ r = ∣ S ∣ f_b(S)\le r=|S| f b ( S ) ≤ r = ∣ S ∣ .
Suppose 0 < a < h 0<a<h 0 < a < h . On the cycle, some selected variable z i z_i z i has an unselected successor z i + 1 z_{i+1} z i + 1 . Every group E j ⊆ S E_j\subseteq S E j ⊆ S starts at a selected variable z j z_j z j . However, E i ⊈ S E_i\not\subseteq S E i ⊆ S because q ≥ 2 q\ge2 q ≥ 2 . Therefore at most a − 1 a-1 a − 1 groups E j E_j E j are contained in S S S .
A satisfied cycle constraint whose group is not contained in S S S must have a selected filler. Otherwise its pins would be 1 and its fillers would be 0, so the defining property of A Q , T Q A_Q,T_Q A Q , T Q would make it unsatisfied. Distinct cycle constraints have distinct fillers, so at most r r r such constraints are satisfied. The switch constraint contributes at most one point. Hence
f b ( S ) ≤ ( a − 1 ) + r + 1 = ∣ S ∣ . (40) f_b(S)\le(a-1)+r+1=|S|. \tag*{(40)} f b ( S ) ≤ ( a − 1 ) + r + 1 = ∣ S ∣. (40)
If a = h a=h a = h , then r ≥ 1 r\ge1 r ≥ 1 because S ≠ B S\ne B S = B . Since H H H has h + 1 h+1 h + 1 constraints,
f b ( S ) ≤ h + 1 ≤ h + r = ∣ S ∣ . f_b(S)\le h+1\le h+r=|S|. f b ( S ) ≤ h + 1 ≤ h + r = ∣ S ∣.
These cases, together with the scores for S = B S=B S = B , prove (37).
Every constraint uses distinct variables. The cycle constraints have different scope sets because their intersections with B B B are the distinct groups E 1 , … , E h E_1,\ldots,E_h E 1 , … , E h . The switch constraint has a different scope set because it contains x x x , which occurs in no cycle constraint. Every cycle constraint contains a pin, and the switch constraint contains the switch. All relations used are nonempty, zero-free, and accessible. Thus H H H satisfies Definition 7.4.
The CSP instance. Let ( G , k ) (G,k) ( G , k ) be a Clique instance, where G = ( V G , E G ) G=(V_G,E_G) G = ( V G , E G ) is a finite simple undirected graph. Assume k ≥ 6 k\ge6 k ≥ 6 , using the preprocessing at the start of this section. We use the switch gadget H ( x ; Z , Y ) H(x;Z,Y) H ( x ; Z , Y ) constructed above.
Vertex and edge variables. For each vertex v ∈ V G v\in V_G v ∈ V G , introduce a variable x v x_v x v . Selecting x v x_v x v represents selecting vertex v v v .
For each edge e ∈ E G e\in E_G e ∈ E G , introduce h h h private variables
B e : = { z e , 1 , … , z e , h } . B_e:=\{z_{e,1},\ldots,z_{e,h}\}. B e := { z e , 1 , … , z e , h } .
These correspond to the variables z 1 , … , z h z_1,\ldots,z_h z 1 , … , z h in B B B . Use cyclic subscripts, defining z e , h + j : = z e , j z_{e,h+j}:=z_{e,j} z e , h + j := z e , j for j ∈ [ h ] j\in[h] j ∈ [ h ] .
Recall that Z ∖ B Z\setminus B Z ∖ B is the set of fillers introduced in the switch gadget construction. For each filler f ∈ Z ∖ B f\in Z\setminus B f ∈ Z ∖ B and each edge e ∈ E G e\in E_G e ∈ E G , introduce a variable d e , f d_{e,f} d e , f . Define
Z e : = B e ∪ { d e , f : f ∈ Z ∖ B } . Z_e:=B_e\cup\{d_{e,f}:f\in Z\setminus B\}. Z e := B e ∪ { d e , f : f ∈ Z ∖ B } .
Thus Z e Z_e Z e consists of B e B_e B e and the fillers for edge e e e . All vertex variables and all variables in the sets Z e Z_e Z e are pairwise distinct.
2. Pins shared across all edges. For each r ∈ { 1 , 2 } r \in\{1,2\} r ∈ { 1 , 2 } , introduce pins
y j , r P ( j ∈ T P ) , y j , r Q ( j ∈ T Q ) , y^{P}_{j,r}\quad(j \in T_P), \qquad y^{Q}_{j,r}\quad(j \in T_Q), y j , r P ( j ∈ T P ) , y j , r Q ( j ∈ T Q ) ,
and define
Y ( r ) : = { y j , r P : j ∈ T P } ∪ { y j , r Q : j ∈ T Q } . Y^{(r)} := \{y^{P}_{j,r}: j \in T_P\} \cup\{y^{Q}_{j,r}: j \in T_Q\}. Y ( r ) := { y j , r P : j ∈ T P } ∪ { y j , r Q : j ∈ T Q } .
All these pins are pairwise distinct and distinct from the vertex and edge variables. Introduce these two pin groups once for the entire instance. The same pins will be used across all edges.
3. Two gadget copies for each edge. For each edge e = u v e=uv e = uv , choose an order ( u , v ) (u,v) ( u , v ) for its endpoints. Add two groups of constraints, one with switch x u x_u x u and one with switch x v x_v x v . Each group contains all h + 1 h+1 h + 1 constraints of H H H , with variables replaced according to the following table. We call these groups the two copies of H H H on edge e e e . Keep the relation and coordinate order of every constraint.
Table 1.
The two copies on edge e e e share every variable in Z e Z_e Z e : both the variables in B e B_e B e and the fillers. They use different vertex variables as switches and different pin groups.
We call the 2 ( h + 1 ) 2(h+1) 2 ( h + 1 ) constraints in the two switch gadgets on each edge its edge constraints .
Different edges have disjoint private-variable sets. They reuse the same two global pin groups. A vertex variable x v x_v x v serves as the switch in one copy on each edge incident to v v v .
With all pins set to 1 1 1 , all variables in B e B_e B e set to 1 1 1 , and all edge fillers set to 0 0 0 , the two copies together satisfy 2 h 2h 2 h constraints, plus one additional constraint for each endpoint variable set to 1 1 1 . In particular, selecting both endpoints gives 2 h + 2 2h+2 2 h + 2 points using only h h h shared private variables.
The budget, target, and pin constraints. Let
L : = ∣ Y ( 1 ) ∪ Y ( 2 ) ∣ = 2 ( ∣ T P ∣ + ∣ T Q ∣ ) L := \lvert Y^{(1)} \cup Y^{(2)} \rvert= 2(\lvert T_P\rvert+ \lvert T_Q\rvert) L := ∣ Y ( 1 ) ∪ Y ( 2 ) ∣ = 2 (∣ T P ∣ + ∣ T Q ∣)
be the number of pins. The sets A P A_P A P , T P T_P T P , and { c } \{c\} { c } are pairwise disjoint, and ∣ A P ∣ ≥ 1 \lvert A_P\rvert\ge1 ∣ A P ∣ ≥ 1 , so ∣ T P ∣ ≤ d − 2 \lvert T_P\rvert\le d-2 ∣ T P ∣ ≤ d − 2 . Similarly, A Q A_Q A Q and T Q T_Q T Q are disjoint and ∣ A Q ∣ ≥ 2 \lvert A_Q\rvert\ge2 ∣ A Q ∣ ≥ 2 , so ∣ T Q ∣ ≤ d − 2 \lvert T_Q\rvert\le d-2 ∣ T Q ∣ ≤ d − 2 . Since T Q ≠ ∅ T_Q \ne\varnothing T Q = ∅ , we obtain
2 ≤ L ≤ 4 ( d − 2 ) . 2 \le L \le4(d-2). 2 ≤ L ≤ 4 ( d − 2 ) .
Thus L L L is a constant depending only on Γ \Gamma Γ . Set
k 0 : = k + h ( k 2 ) , t 0 : = 2 ( h + 1 ) ( k 2 ) . (41) k_0 := k + h\binom{k}{2}, \qquad t_0 := 2(h+1)\binom{k}{2}. \tag*{(41)} k 0 := k + h ( 2 k ) , t 0 := 2 ( h + 1 ) ( 2 k ) . (41)
For a k k k -clique, selecting its k k k vertex variables and every variable in B e B_e B e on each of its ( k 2 ) \binom{k}{2} ( 2 k ) edges uses k 0 k_0 k 0 variables. With all pins selected and all edge fillers set to 0 0 0 , the two gadget copies on each clique edge satisfy 2 ( h + 1 ) 2(h+1) 2 ( h + 1 ) constraints. These edges therefore contribute t 0 t_0 t 0 points.
Set the budget to k ′ : = L + k 0 k' := L + k_0 k ′ := L + k 0 . This allows selecting all L L L pins in addition to the vertex and edge variables described above.
We next add constraints to make selecting every pin necessary for reaching the target. Set
φ : = 2 ( h + 1 ) k ′ + 1. \varphi:= 2(h+1)k' + 1. φ := 2 ( h + 1 ) k ′ + 1.
For each pin y ∈ Y ( 1 ) ∪ Y ( 2 ) y \in Y^{(1)} \cup Y^{(2)} y ∈ Y ( 1 ) ∪ Y ( 2 ) , add φ \varphi φ unit-weight P P P -constraints with y y y in coordinate u 1 u_1 u 1 . In every other coordinate, put a new variable. Use a different new variable for every such coordinate of every constraint. These variables are also distinct from all previously introduced variables. Let D D D be their set.
Since u 1 ∈ A P u_1 \in AP u 1 ∈ A P , we have e u 1 ∈ P e_{u_1} \in P e u 1 ∈ P . Thus setting y = 1 y=1 y = 1 and all the new variables in its constraints to 0 0 0 satisfies all φ \varphi φ constraints added for y y y . If y = 0 y=0 y = 0 , satisfying any of these constraints requires setting one of its new variables to 1 1 1 , because P P P is zero-free.
Define the target by
t : = L φ + t 0 . (42) t := L\varphi+ t_0. \tag*{(42)} t := L φ + t 0 . (42)
Selecting all pins and setting every variable in D D D to 0 0 0 satisfies all L φ L\varphi L φ pin constraints. The remaining t 0 t_0 t 0 points must come from edge constraints. The correctness lemma proves that any assignment selecting at most k ′ k' k ′ variables and leaving a pin at 0 0 0 has score less than t t t .
The variable set of the output instance is
X : = { x v : v ∈ V G } ∪ Y ( 1 ) ∪ Y ( 2 ) ∪ ⋃ e ∈ E G Z e ∪ D . X := \{x_v : v \in V_G\} \cup Y^{(1)} \cup Y^{(2)} \cup\bigcup_{e \in E_G} Z_e \cup D. X := { x v : v ∈ V G } ∪ Y ( 1 ) ∪ Y ( 2 ) ∪ e ∈ E G ⋃ Z e ∪ D .
Let C \mathcal{C} C be the collection of all constraints added for edges and pins, and set w ( C ) : = 1 w(C) := 1 w ( C ) := 1 for every C ∈ C C \in\mathcal{C} C ∈ C . The output instance is I = ( X , C , w , k ′ ) \mathcal{I}=(X,\mathcal{C},w,k') I = ( X , C , w , k ′ ) . The decision question is whether some assignment sets at most k ′ k' k ′ variables to 1 1 1 and satisfies at least t t t constraints.
Correctness of the reduction
Lemma 7.5 (Correctness of the reduction). Let Γ \Gamma Γ be a fixed finite Boolean constraint language of maximum arity d d d . Suppose P , Q ∈ Γ + P,Q \in\Gamma_+ P , Q ∈ Γ + are accessible, P P P is not Direct, and Q Q Q is not Rooted. For every Clique instance ( G , k ) (G,k) ( G , k ) with k ≥ 6 k \ge6 k ≥ 6 , the construction above produces an unweighted multiplicity-one instance I \mathcal{I} I of Max k k k -Weight CSP( Γ ) (\Gamma) ( Γ ) with budget k ′ k' k ′ and target t t t such that
OPT ( I ) ≤ t , OPT ( I ) = t ⟺ G contains a k -clique . \operatorname{OPT}(\mathcal{I}) \le t,\qquad\operatorname{OPT}(\mathcal{I}) = t \Longleftrightarrow G\text{ contains a }k\text{-clique}. OPT ( I ) ≤ t , OPT ( I ) = t ⟺ G contains a k -clique . The construction runs in FPT time, and k ′ ≤ d k 2 k' \le dk^2 k ′ ≤ d k 2 and t ≤ 12 d 3 k 2 t \le12d^3k^2 t ≤ 12 d 3 k 2 .
Proof. Forward direction. Suppose G G G contains a k k k -clique. Set all pins to 1 1 1 , select the vertex variables of the clique, and select exactly B e B_e B e on each edge between its vertices. Set every other variable to 0 0 0 . The number of selected variables is
L + k + h ( k 2 ) = k ′ . L+k+h\binom{k}{2}=k'. L + k + h ( 2 k ) = k ′ .
On each clique edge e = u v e=uv e = uv , both endpoint variables are set to 1 1 1 , exactly the private variables in B e B_e B e are selected, and all pins are set to 1 1 1 . The two switch gadgets on e e e have switches x u x_u x u and x v x_v x v . Both switches are set to 1 1 1 , and each gadget satisfies its h h h cycle constraints and its switch constraint. Together, the two gadgets contribute 2 ( h + 1 ) = 2 h + 2 2(h+1)=2h+2 2 ( h + 1 ) = 2 h + 2 points. On every edge outside the clique, all private variables are set to 0 0 0 . In every constraint of the two switch gadgets on such an edge, vertex variables and pins occur only in control coordinates. Thus the variable in every unit-witness coordinate is 0 0 0 , so accessibility makes the constraint unsatisfied. In every pin constraint, the pin is set to 1 in coordinate u 1 u_1 u 1 , and all other variables are set to 0. Its tuple is therefore e u 1 ∈ P e_{u_1} \in P e u 1 ∈ P , so all L φ L\varphi L φ pin constraints are satisfied. There are ( k 2 ) \binom{k}{2} ( 2 k ) clique edges, giving the total score
2 ( h + 1 ) ( k 2 ) + L φ = t . 2(h+1)\binom{k}{2}+L\varphi=t. 2 ( h + 1 ) ( 2 k ) + L φ = t .
Backward direction. Suppose an assignment τ \tau τ satisfies wt ( τ ) ≤ k ′ \operatorname{wt}(\tau)\leq k' wt ( τ ) ≤ k ′ and F I ( τ ) ≥ t F^{I}(\tau)\geq t F I ( τ ) ≥ t . We show that G G G contains a k k k -clique and that F I ( τ ) = t F^{I}(\tau)=t F I ( τ ) = t . Let s s s be the number of selected variables in ⋃ e ∈ E G Z e \bigcup_{e\in E_G} Z_e ⋃ e ∈ E G Z e . Let r r r be the number of variables in D D D that τ \tau τ sets to 1. These are the fresh variables introduced in the pin constraints. Write F e d g e ( τ ) F_{\mathrm{edge}}(\tau) F edge ( τ ) for the number of edge constraints satisfied by τ \tau τ .
Every pin is selected. Suppose τ \tau τ leaves at least one pin at 0. Every satisfied edge constraint must have a variable set to 1 in a unit-witness coordinate, by accessibility. Any vertex variable or pin in an edge constraint occurs in a control coordinate, so this selected variable must be private.
Each selected private variable belongs to one edge. It occurs only in the two switch gadgets on that edge, which together contain 2 ( h + 1 ) 2(h+1) 2 ( h + 1 ) constraints. Thus at most 2 ( h + 1 ) s 2(h+1)s 2 ( h + 1 ) s edge constraints contain a selected private variable, giving
F e d g e ( τ ) ≤ 2 ( h + 1 ) s . F_{\mathrm{edge}}(\tau)\leq2(h+1)s. F edge ( τ ) ≤ 2 ( h + 1 ) s .
A satisfied pin constraint whose pin is 0 must contain a selected variable from D D D , because P P P is zero-free. Each variable in D D D occurs in only one constraint, so these constraints contribute at most r r r points. At most L − 1 L-1 L − 1 pins are selected, and the constraints added for each selected pin contribute at most φ \varphi φ points. Since s + r ≤ k ′ s+r\leq k' s + r ≤ k ′ , we obtain
F I ( τ ) ≤ ( L − 1 ) φ + 2 ( h + 1 ) s + r ≤ ( L − 1 ) φ + 2 ( h + 1 ) k ′ = L φ − 1 < t . (43) \begin{aligned}
F^{I}(\tau)&\leq(L-1)\varphi+2(h+1)s+r\\
&\leq(L-1)\varphi+2(h+1)k'\\
&=L\varphi-1<t. \tag*{(43)}
\end{aligned} F I ( τ ) ≤ ( L − 1 ) φ + 2 ( h + 1 ) s + r ≤ ( L − 1 ) φ + 2 ( h + 1 ) k ′ = L φ − 1 < t . (43)
The last equality uses φ = 2 ( h + 1 ) k ′ + 1 \varphi=2(h+1)k'+1 φ = 2 ( h + 1 ) k ′ + 1 . This contradicts F I ( τ ) ≥ t F^{I}(\tau)\geq t F I ( τ ) ≥ t . Therefore τ \tau τ selects every pin.
Edge-score bounds. Let p p p be the number of selected vertex variables. Since all L L L pins are selected,
L + p + s + r = wt ( τ ) ≤ k ′ = L + k 0 . L+p+s+r=\operatorname{wt}(\tau)\leq k'=L+k_0. L + p + s + r = wt ( τ ) ≤ k ′ = L + k 0 .
Therefore p + s + r ≤ k 0 p+s+r\leq k_0 p + s + r ≤ k 0 , and hence
s ≤ k 0 − p = h ( k 2 ) + k − p . (44) s\leq k_0-p=h\binom{k}{2}+k-p. \tag*{(44)} s ≤ k 0 − p = h ( 2 k ) + k − p . (44)
There are L φ L\varphi L φ pin constraints, each of weight one. They therefore contribute at most L φ L\varphi L φ points. We next bound the score from the two switch gadgets on each edge. For each edge e = u v e=uv e = uv , use the endpoint order chosen in the construction. The two switch gadgets on e e e have switches x u x_u x u and x v x_v x v and share the private-variable set Z e Z_e Z e . Let S e S_e S e be the set of these private variables that τ \tau τ sets to 1, and let s e s_e s e be their number:
S e : = { z ∈ Z e : τ ( z ) = 1 } , s e : = ∣ S e ∣ . S_e:=\{z\in Z_e:\tau(z)=1\},\qquad s_e:=|S_e|. S e := { z ∈ Z e : τ ( z ) = 1 } , s e := ∣ S e ∣.
Since different edges have disjoint private-variable sets,
s = ∑ e ∈ E G s e . s=\sum_{e\in E_G}s_e. s = e ∈ E G ∑ s e .
All pins are selected, so we can apply the switch gadget bounds to each switch gadget. If S e ≠ B e S_e \ne B_e S e = B e , each switch gadget contributes at most s e s_e s e points, whether its switch is 0 or 1, by (38) . Both switch gadgets have the same selected private set S e S_e S e . Their combined score is therefore at most s e + s e = 2 s e s_e+s_e=2s_e s e + s e = 2 s e , regardless of which endpoints are selected.
If S e = B e S_e=B_e S e = B e , every variable in B e B_e B e is set to 1 and every edge filler is set to 0. Each switch gadget then satisfies its h h h cycle constraints. Its switch constraint is satisfied exactly when its endpoint variable is set to 1. The combined score is therefore
2 h + τ ( x u ) + τ ( x v ) . 2h+\tau(x_u)+\tau(x_v). 2 h + τ ( x u ) + τ ( x v ) .
These two cases give the following table:
Table 5.
The table bounds the score on each edge by 2 s e 2s_e 2 s e , plus at most two additional points when S e = B e S_e=B_e S e = B e . The terms 2 s e 2s_e 2 s e sum to 2 s 2s 2 s .
If S e = B e S_e=B_e S e = B e , the two switch gadgets on e e e share exactly h h h selected private variables. Private variables belonging to different edges are distinct. Thus each such edge uses h h h different variables from the total of s s s selected private variables. There can therefore be at most s / h s/h s / h edges with S e = B e S_e=B_e S e = B e .
We count the additional points in two ways.
First bound. Allow two additional points for every edge with S e = B e S_e=B_e S e = B e . Since there are at most s / h s/h s / h such edges, these points contribute at most 2 s / h 2s/h 2 s / h .
Second bound. First allow one additional point for every edge with S e = B e S_e=B_e S e = B e , even if neither endpoint is selected. These points contribute at most s / h s/h s / h .
An edge can contribute a second additional point only when both endpoint variables are set to 1. Let m G m_G m G be the number of graph edges with both endpoint variables set to 1. Each of these edges contributes at most one second additional point, so these points contribute at most m G m_G m G . Since p p p vertex variables are selected and G G G is simple, m G ≤ ( p 2 ) m_G \le\binom{p}{2} m G ≤ ( 2 p ) .
Adding these estimates to 2 s 2s 2 s gives
F e d g e ( τ ) ≤ 2 s + 2 s h , F_{\mathrm{edge}}(\tau)\le2s+\frac{2s}{h}, F edge ( τ ) ≤ 2 s + h 2 s ,
F e d g e ( τ ) ≤ 2 s + s h + m G . (45) F_{\mathrm{edge}}(\tau)\le2s+\frac{s}{h}+m_G. \tag*{(45)} F edge ( τ ) ≤ 2 s + h s + m G . (45)
Exactly k k k vertices are selected, and they form a clique. The pin constraints contribute at most L φ L\varphi L φ points. Since F Γ ( τ ) ≥ t F^\Gamma(\tau)\ge t F Γ ( τ ) ≥ t , the edge constraints must contribute at least
F e d g e ( τ ) ≥ t − L φ = t 0 . F_{\mathrm{edge}}(\tau)\ge t-L\varphi=t_0. F edge ( τ ) ≥ t − L φ = t 0 .
If p > k p>k p > k , selecting these extra vertex variables leaves fewer private variables available:
s ≤ h ( k 2 ) − ( p − k ) . s\le h\binom{k}{2}-(p-k). s ≤ h ( 2 k ) − ( p − k ) .
The first edge-score bound therefore gives
F e d g e ( τ ) ≤ t 0 − ( 2 + 2 h ) ( p − k ) < t 0 . F_{\mathrm{edge}}(\tau)\le t_0-\left(2+\frac{2}{h}\right)(p-k)<t_0. F edge ( τ ) ≤ t 0 − ( 2 + h 2 ) ( p − k ) < t 0 .
This contradicts the required edge score.
If p < k p<k p < k , the private-variable budget gives
s ≤ h ( k 2 ) + ( k − p ) . s \le h\binom{k}{2}+(k-p). s ≤ h ( 2 k ) + ( k − p ) .
Compared with h ( k 2 ) h\binom{k}{2} h ( 2 k ) , this allows at most k − p k-p k − p more selected private variables. In the second edge-score bound, this increases the term ( 2 + 1 / h ) s (2+1/h)s ( 2 + 1/ h ) s by at most ( 2 + 1 / h ) ( k − p ) (2+1/h)(k-p) ( 2 + 1/ h ) ( k − p ) . However, the number of possible pairs of selected vertices decreases by
( k 2 ) − ( p 2 ) = ( k − p ) ( k + p − 1 ) 2 ≥ 5 2 ( k − p ) , \binom{k}{2}-\binom{p}{2}=\frac{(k-p)(k+p-1)}{2}\ge\frac{5}{2}(k-p), ( 2 k ) − ( 2 p ) = 2 ( k − p ) ( k + p − 1 ) ≥ 2 5 ( k − p ) ,
using k ≥ 6 k\ge6 k ≥ 6 and p ≥ 0 p\ge0 p ≥ 0 . Since h ≥ 3 h\ge3 h ≥ 3 , we have 2 + 1 / h ≤ 7 / 3 2+1/h\le7/3 2 + 1/ h ≤ 7/3 . Thus the decrease in possible pairs is larger than the increase from the private-variable budget. Formally,
F e d g e ( τ ) ≤ t 0 + ( 2 + 1 h ) ( k − p ) − ( ( k 2 ) − ( p 2 ) ) ≤ t 0 + 7 3 ( k − p ) − 5 2 ( k − p ) = t 0 − k − p 6 < t 0 . (46) \begin{aligned}
F_{\mathrm{edge}}(\tau)&\le t_0+\left(2+\frac{1}{h}\right)(k-p)-\left(\binom{k}{2}-\binom{p}{2}\right)\\
&\le t_0+\frac{7}{3}(k-p)-\frac{5}{2}(k-p)\\
&=t_0-\frac{k-p}{6}<t_0. \tag*{(46)}
\end{aligned} F edge ( τ ) ≤ t 0 + ( 2 + h 1 ) ( k − p ) − ( ( 2 k ) − ( 2 p ) ) ≤ t 0 + 3 7 ( k − p ) − 2 5 ( k − p ) = t 0 − 6 k − p < t 0 . (46)
This also contradicts the required edge score. Therefore p = k p=k p = k .
We now have s ≤ h ( k 2 ) s\le h\binom{k}{2} s ≤ h ( 2 k ) and m G ≤ ( k 2 ) m_G\le\binom{k}{2} m G ≤ ( 2 k ) . The second edge-score bound gives
F e d g e ( τ ) ≤ 2 s + s h + m G ≤ ( 2 h + 1 ) ( k 2 ) + ( k 2 ) = t 0 . F_{\mathrm{edge}}(\tau)\le2s+\frac{s}{h}+m_G\le(2h+1)\binom{k}{2}+\binom{k}{2}=t_0. F edge ( τ ) ≤ 2 s + h s + m G ≤ ( 2 h + 1 ) ( 2 k ) + ( 2 k ) = t 0 .
The edge score is at least t 0 t_0 t 0 , so equality holds throughout the displayed inequalities. Both coefficients in ( 2 + 1 / h ) s + m G (2+1/h)s+m_G ( 2 + 1/ h ) s + m G are positive. If either s < h ( k 2 ) s<h\binom{k}{2} s < h ( 2 k ) or m G < ( k 2 ) m_G<\binom{k}{2} m G < ( 2 k ) , this upper bound would be strictly less than t 0 t_0 t 0 . Therefore
s = h ( k 2 ) , m G = ( k 2 ) . s=h\binom{k}{2},\qquad m_G=\binom{k}{2}. s = h ( 2 k ) , m G = ( 2 k ) .
There are ( k 2 ) \binom{k}{2} ( 2 k ) pairs among the k k k selected vertices, and m G m_G m G counts the graph edges between them. Thus every pair is an edge, giving a k k k -clique.
We have also shown that F e d g e ( τ ) = t 0 F_{\mathrm{edge}}(\tau)=t_0 F edge ( τ ) = t 0 . The pin constraints contribute at most L φ L\varphi L φ points, so
F I ( τ ) ≤ L φ + t 0 = t . F^{I}(\tau)\le L\varphi+t_0=t. F I ( τ ) ≤ L φ + t 0 = t .
Our assumption F I ( τ ) ≥ t F^{I}(\tau)\ge t F I ( τ ) ≥ t therefore forces equality. Thus no feasible assignment has score greater than t t t , and any feasible assignment with score t t t gives a k k k -clique. Together with the forward direction, this proves (33).
Distinct variables and constraint scopes. Every constraint has weight one and uses either P P P or Q Q Q , both of which belong to Γ \Gamma Γ .
No constraint repeats a variable. Within each switch gadget, different variables of H H H are replaced by different variables. Each pin constraint uses its pin and a distinct fresh variable in every other coordinate.
We now show that no two constraints contain exactly the same set of variables.
Pin constraints. Since u 1 ≠ c u_1 \ne c u 1 = c , the relation P P P has arity at least two. Every pin constraint therefore contains a fresh variable from D D D . This variable occurs in no other constraint, so it distinguishes this pin constraint from every other constraint.
Constraints on different edges. Every constraint on an edge e e e contains a variable from B e B_e B e : the switch constraint contains z e , 1 z_{e,1} z e , 1 , and each cycle constraint contains q q q variables from B e B_e B e . Variables in B e B_e B e occur only in constraints on e e e . Thus constraints on different edges cannot contain the same set of variables.
Constraints on the same edge e = u v e=uv e = uv . The switch constraint for u u u contains x u x_u x u as its only vertex variable. The switch constraint for v v v contains x v x_v x v as its only vertex variable. Since u ≠ v u \ne v u = v , these constraints have different sets of variables. Neither can have the same set of variables as a cycle constraint, because cycle constraints contain no vertex variables.
Within either switch gadget, the cycle constraint indexed by i ∈ [ h ] i \in[h] i ∈ [ h ] contains exactly the following variables from B e B_e B e :
{ z e , i , z e , i + 1 , … , z e , i + q − 1 } . \{z_{e,i},z_{e,i+1},\ldots,z_{e,i+q-1}\}. { z e , i , z e , i + 1 , … , z e , i + q − 1 } .
Since q < h q<h q < h , the first variable z e , i z_{e,i} z e , i is the unique variable in this group whose predecessor in the cyclic order lies outside the group. Thus different starting indices give different groups. Consequently, cycle constraints within one switch gadget have different sets of variables.
Finally, T Q ≠ ∅ T_Q \ne\varnothing T Q = ∅ . Every cycle constraint in the gadget with switch x u x_u x u contains a pin from Y ( 1 ) Y^{(1)} Y ( 1 ) and none from Y ( 2 ) Y^{(2)} Y ( 2 ) . Every cycle constraint in the gadget with switch x v x_v x v contains a pin from Y ( 2 ) Y^{(2)} Y ( 2 ) and none from Y ( 1 ) Y^{(1)} Y ( 1 ) . Thus cycle constraints from the two gadgets also have different sets of variables.
Every pair of constraints falls into one of these cases. Hence I \mathcal{I} I has multiplicity one.
Parameter bounds and reduction size. We first bound the budget and target in terms of d d d and k k k , then count the variables and constraints.
The relation Q Q Q has q q q coordinates in A Q A_Q A Q and at least one coordinate in T Q T_Q T Q , so q ≤ d − 1 q \le d-1 q ≤ d − 1 . The control coordinate c c c lies outside A P A_P A P , so ℓ ≤ d − 1 \ell\le d-1 ℓ ≤ d − 1 . Hence
3 ≤ h = max { q + 1 , ℓ } ≤ d . 3 \le h=\max\{q+1,\ell\}\le d. 3 ≤ h = max { q + 1 , ℓ } ≤ d .
In particular, d ≥ 3 d \ge3 d ≥ 3 . We also have 2 ≤ L ≤ 4 ( d − 2 ) 2 \le L \le4(d-2) 2 ≤ L ≤ 4 ( d − 2 ) .
Budget. Since h ≤ d h \le d h ≤ d and k ≥ 6 k \ge6 k ≥ 6 ,
k 0 = k + h ( k 2 ) ≤ k + d ( k 2 ) ≤ d k 2 2 , k_0=k+h\binom{k}{2}\le k+d\binom{k}{2}\le\frac{dk^2}{2}, k 0 = k + h ( 2 k ) ≤ k + d ( 2 k ) ≤ 2 d k 2 ,
k ′ = L + k 0 ≤ 4 ( d − 2 ) + d k 2 2 ≤ d k 2 . k'=L+k_0\le4(d-2)+\frac{dk^2}{2}\le dk^2. k ′ = L + k 0 ≤ 4 ( d − 2 ) + 2 d k 2 ≤ d k 2 .
Target. The bound on k ′ k' k ′ gives
φ = 2 ( h + 1 ) k ′ + 1 ≤ 2 d ( d + 1 ) k 2 + 1 ≤ 3 d 2 k 2 . \varphi=2(h+1)k'+1\le2d(d+1)k^2+1\le3d^2k^2. φ = 2 ( h + 1 ) k ′ + 1 ≤ 2 d ( d + 1 ) k 2 + 1 ≤ 3 d 2 k 2 .
Since h ≥ 1 h\ge1 h ≥ 1 , the definition k ′ = L + k + h ( k 2 ) k'=L+k+h\binom{k}{2} k ′ = L + k + h ( 2 k ) gives ( k 2 ) ≤ k ′ \binom{k}{2}\le k' ( 2 k ) ≤ k ′ . Therefore
t 0 = 2 ( h + 1 ) ( k 2 ) ≤ 2 ( h + 1 ) k ′ = φ − 1 < φ . t_0=2(h+1)\binom{k}{2}\le2(h+1)k'=\varphi-1<\varphi. t 0 = 2 ( h + 1 ) ( 2 k ) ≤ 2 ( h + 1 ) k ′ = φ − 1 < φ .
Using L + 1 ≤ 4 d L+1\le4d L + 1 ≤ 4 d , we obtain
t = L φ + t 0 < ( L + 1 ) φ ≤ 4 d φ ≤ 12 d 3 k 2 . t=L\varphi+t_0<(L+1)\varphi\le4d\varphi\le12d^3k^2. t = L φ + t 0 < ( L + 1 ) φ ≤ 4 d φ ≤ 12 d 3 k 2 .
Number of variables and constraints. Each constraint of H H H contains the switch or a pin. Its remaining coordinates contain at most d − 1 d-1 d − 1 private variables. Since H H H has h + 1 h+1 h + 1 constraints and every private variable occurs in one of them,
∣ Z ∣ ≤ ( h + 1 ) ( d − 1 ) ≤ d 2 − 1. |Z| \leq(h+1)(d-1) \leq d^2-1. ∣ Z ∣ ≤ ( h + 1 ) ( d − 1 ) ≤ d 2 − 1.
Each pin constraint introduces at most d − 1 d-1 d − 1 fresh variables. There are L φ L\varphi L φ such constraints, so
∣ D ∣ ≤ ( d − 1 ) L φ ≤ ( d − 1 ) t . |D| \leq(d-1)L\varphi\leq(d-1)t. ∣ D ∣ ≤ ( d − 1 ) L φ ≤ ( d − 1 ) t .
Each edge contributes 2 ( h + 1 ) 2(h+1) 2 ( h + 1 ) constraints from its two switch gadgets. Adding the L φ L\varphi L φ pin constraints gives
∣ C ∣ = 2 ( h + 1 ) ∣ E G ∣ + L φ ≤ 2 ( d + 1 ) ∣ E G ∣ + t . |C| = 2(h+1)|E_G| + L\varphi\leq2(d+1)|E_G| + t. ∣ C ∣ = 2 ( h + 1 ) ∣ E G ∣ + L φ ≤ 2 ( d + 1 ) ∣ E G ∣ + t .
There are ∣ V G ∣ |V_G| ∣ V G ∣ vertex variables, L L L pins, ∣ Z ∣ |Z| ∣ Z ∣ private variables for each edge, and ∣ D ∣ |D| ∣ D ∣ fresh variables from the pin constraints. The two switch gadgets on an edge share all its private variables, so we count these variables once. The four groups are disjoint. Thus
∣ X ∣ = ∣ V G ∣ + L + ∣ Z ∣ ∣ E G ∣ + ∣ D ∣ ≤ ∣ V G ∣ + 4 ( d − 2 ) + ( d 2 − 1 ) ∣ E G ∣ + ( d − 1 ) t . \begin{aligned}
|X| = |V_G| + L + |Z||E_G| + |D| \\
&\leq|V_G| + 4(d-2) + (d^2-1)|E_G| + (d-1)t.
\end{aligned} ∣ X ∣ = ∣ V G ∣ + L + ∣ Z ∣∣ E G ∣ + ∣ D ∣ ≤ ∣ V G ∣ + 4 ( d − 2 ) + ( d 2 − 1 ) ∣ E G ∣ + ( d − 1 ) t .
For fixed Γ \Gamma Γ , the value d d d is constant. The bounds above therefore give O ( ∣ V G ∣ + ∣ E G ∣ + k 2 ) O(|V_G|+|E_G|+k^2) O ( ∣ V G ∣ + ∣ E G ∣ + k 2 ) variables and constraints. Each constraint has at most d d d coordinates, so the construction takes time polynomial in ∣ V G ∣ + ∣ E G ∣ + k 2 |V_G|+|E_G|+k^2 ∣ V G ∣ + ∣ E G ∣ + k 2 . The output budget k ′ k' k ′ and target t t t are bounded by functions of k k k and d d d . Together with the correctness proved above, this establishes an FPT reduction.
The hardness theorem
Theorem 7.6 (Unweighted multiplicity-one hardness). Let Γ \Gamma Γ be a fixed finite Boolean constraint language of maximum arity d d d . Suppose Γ + \Gamma_+ Γ + contains a relation that is not Direct and a relation that is not Rooted.
Then Max k k k -Weight CSP(Γ \Gamma Γ ) admits no EPAS on unweighted multiplicity-one instances unless FPT = W[1 ] .
Proof. If Γ + \Gamma_+ Γ + contains an inaccessible relation, apply Lemma 7.2. Otherwise, every relation in Γ + \Gamma_+ Γ + is accessible. Choose P , Q ∈ Γ + P,Q \in\Gamma_+ P , Q ∈ Γ + such that P P P is not Direct and Q Q Q is not Rooted, and apply Lemma 7.5.
Both reductions produce unweighted multiplicity-one instances satisfying (33). Their output budgets and targets are bounded by functions of the clique parameter k k k and the arity bound d d d . Since Γ \Gamma Γ is fixed, d d d is constant.
Every feasible score is a nonnegative integer. Lemma 7.1 therefore excludes an EPAS unless FPT = W[1 ] .
Completing the classification
Proof of Theorem 1.1. If every relation in Γ + \Gamma_+ Γ + is Direct, Theorem 6.13 gives the claimed EPAS and running time. If every relation in Γ + \Gamma_+ Γ + is Rooted, Theorem 5.8 gives the claimed EPAS and running time. Both results use Lemma 4.5 to extend the corresponding zero-free algorithm to instances that also contain zero-valid constraints. The zero-free algorithms respect prescribed variable values, as required by that lemma. If both conditions hold, either algorithm applies. If neither condition holds, Γ + \Gamma_{+} Γ + contains a relation that is not Direct and a relation that is not Rooted. Theorem 7.6 therefore excludes an EPAS unless FPT = = = W[1 ] , even on unweighted multiplicity-one instances.
It remains to justify Remark 1.2. Both algorithms access the original relations only through membership tests. Testing the all-zero tuple identifies zero-valid relations. Testing the at most d d d unit tuples identifies the unit-witness coordinates. Under either sufficient condition on Γ + \Gamma_{+} Γ + , Lemma 4.4 implies that a zero-free relation with no unit-witness coordinate is empty. Its constraints can therefore be discarded without enumerating satisfying tuples.
The running-time proofs of Theorems 5.7 and 6.12 bound the number of membership tests and show that the intermediate rational numbers have polynomial bit length in ℓ i n \ell_{\mathrm{in}} ℓ in . Thus polynomial-time membership tests, with a fixed exponent across all inputs, and exact arithmetic preserve the claimed running-time bounds. The proof of Lemma 4.5 establishes the same guarantee for the steps handling zero-valid constraints. This proves the remark.
Relations of arity at most two
Proposition 8.1. Every nonempty zero-free relation of arity at most two other than R A N D = { ( 1 , 1 ) } R_{\mathrm{AND}} = \{(1,1)\} R AND = {( 1 , 1 )} is both Direct and Rooted. The relation R A N D R_{\mathrm{AND}} R AND satisfies neither rule.
Proof. The only nonempty zero-free unary relation is { 1 } \{1\} { 1 } , which satisfies both rules. Let R R R be nonempty, zero-free, binary, and different from R A N D R_{\mathrm{AND}} R AND . Every α ∈ R \alpha\in R α ∈ R has a selected unit witness u u u : this is immediate for a unit tuple, and for α = ( 1 , 1 ) \alpha= (1,1) α = ( 1 , 1 ) it follows because R R R contains a unit tuple e u e_u e u . Deleting a selected control gives e u e_u e u , proving Direct. Keeping only u u u among the unit witnesses and any subset of the selected controls gives either e u e_u e u or α \alpha α , proving Rooted. Finally, R A N D R_{\mathrm{AND}} R AND has no unit witness and deleting a control from ( 1 , 1 ) (1,1) ( 1 , 1 ) gives a tuple outside the relation, so it satisfies neither rule.
Proof of Corollary 1.3. If R A N D ∉ Γ R_{\mathrm{AND}} \notin\Gamma R AND ∈ / Γ , Proposition 8.1 and the Rooted case of Theorem 1.1 with d = 2 d = 2 d = 2 give the stated deterministic EPAS and running time. If R A N D ∈ Γ R_{\mathrm{AND}} \in\Gamma R AND ∈ Γ , it belongs to Γ + \Gamma_{+} Γ + and satisfies neither rule, so the hardness case of the same theorem excludes an EPAS unless FPT = = = W[1 ] .
Conclusion
We give a complete classification of the fixed finite Boolean constraint languages of arity at most d d d that admit an EPAS for Max k k k -Weight CSP, parameterized by k + d k + d k + d , when variables within each constraint are distinct (Theorem 1.1 ). An interesting open question is whether the running time of these approximation schemes can be improved, particularly the dependence on k k k , d d d , and ε \varepsilon ε . Another natural open question is whether an analogous classification holds over larger finite domains, with a distinguished value 0 and a budget of at most k k k variables assigned a nonzero value.
Acknowledgments
Souvik Saha acknowledges support from the Anusandhan National Research Foundation (ANRF), Government of India, through the National Post Doctoral Fellowship (N-PDF), File No. PDF/2026/005409.
AI disclosure
ChatGPT (OpenAI) helped prepare the manuscript and provided first drafts of proofs, including the hardness argument. The algorithms were developed by the authors. The authors verified and extensively simplified the hardness proofs through interactive discussions with ChatGPT. They independently checked the hardness proofs and references, reviewed and edited the final text, and take full responsibility for the paper’s results, proofs, and text.