8
Theoretical Computer Science 511 (2013) 77–84 Contents lists available at ScienceDirect Theoretical Computer Science journal homepage: www.elsevier.com/locate/tcs Parameterized complexity of MaxSat Above Average Robert Crowston a , Gregory Gutin a,, Mark Jones a , Venkatesh Raman b , Saket Saurabh b a Royal Holloway, University of London, Egham, Surrey, UK b The Institute of Mathematical Sciences, Chennai 600 113, India article info This paper is dedicated to the memory of Alan Turing abstract In MaxSat, we are given a CNF formula F with n variables and m clauses; the task is to find a truth assignment satisfying the maximum number of clauses. Let r 1 ,..., r m be the number of literals in the clauses of F . Then asat(F ) = m i=1 (1 2 r i ) is the expected number of clauses satisfied by a random truth assignment, when the truth values to the variables are distributed uniformly and independently. It is well-known that, in polynomial time, one can find a truth assignment satisfying at least asat(F ) clauses. In the parameterized problem MaxSat-AA, we are to decide whether there is a truth assignment satisfying at least asat(F )+k clauses, where k is the (nonnegative) parameter. We prove that MaxSat-AA is para-NP-complete and thus, MaxSat-AA is not fixed-parameter tractable unless P = NP. This is in sharp contrast to the similar problem MaxLin 2-AA which was recently proved to be fixed-parameter tractable by Crowston et al. (FSTTCS 2011). In fact, we consider a more refined version of MaxSat-AA, Max-r (n)-Sat-AA, where r j r (n) for each j. Alon et al. (SODA 2010) proved that if r = r (n) is a constant, then Max-r -Sat-AA is fixed-parameter tractable. We prove that Max-r (n)-Sat-AA is para-NP- complete for any r (n) log n. We also prove that assuming the exponential time hypothesis, Max-r (n)-Sat-AA is not even in XP for any integral r (n) log log n + φ(n), where φ(n) is any real-valued unbounded strictly increasing computable function. This lower bound on r (n) cannot be decreased much further as we prove that Max-r (n)-Sat- AA is (i) in XP for any r (n) log log n log log log n and (ii) fixed-parameter tractable for any r (n) log log n log log log n φ(n), where φ(n) is any real-valued unbounded strictly increasing computable function. The proof uses some results on MaxLin 2-AA. © 2013 Elsevier B.V. All rights reserved. 1. Introduction Satisfiability is a well-known fundamental problem in Computer Science. Its optimization version (finding the maximum number of clauses that can be satisfied by a truth assignment) and its generalizations (constraint satisfaction problems) are well studied in almost every paradigm of algorithms and complexity, including approximation and parameterized complexity. Here we consider the parameterized complexity of a variation of MaxSat. In parameterized complexity, one identifies a parameter k in the input and asks whether there exists an algorithm that confines the combinatorial explosion to this parameter, while keeping the rest of the running time polynomial in the size of the input. More specifically, the notion of feasibility is fixed-parameter tractability where one is interested in an algorithm whose running time is O(f (k)n c ), where f is an arbitrary (typically exponential) function of k, n is the input size and c is a constant independent of k. When the values of k are relatively small, fixed-parameter tractability implies that the problem A preliminary version of this paper appeared in the proceedings of LATIN 2012 [4]. Corresponding author. Tel.: +44 1784414229. E-mail addresses: [email protected], [email protected] (G. Gutin). 0304-3975/$ – see front matter © 2013 Elsevier B.V. All rights reserved. doi:10.1016/j.tcs.2013.01.005

Parameterized complexity of MaxSat Above Average

  • Upload
    saket

  • View
    215

  • Download
    1

Embed Size (px)

Citation preview

Theoretical Computer Science 511 (2013) 77–84

Contents lists available at ScienceDirect

Theoretical Computer Science

journal homepage: www.elsevier.com/locate/tcs

Parameterized complexity of MaxSat Above Average✩

Robert Crowston a, Gregory Gutin a,∗, Mark Jones a, Venkatesh Raman b, Saket Saurabh b

a Royal Holloway, University of London, Egham, Surrey, UKb The Institute of Mathematical Sciences, Chennai 600 113, India

a r t i c l e i n f o

This paper is dedicated to the memory ofAlan Turing

a b s t r a c t

InMaxSat, we are given a CNF formula F with n variables andm clauses; the task is to find atruth assignment satisfying themaximum number of clauses. Let r1, . . . , rm be the numberof literals in the clauses of F . Then asat(F) =

mi=1(1 − 2−ri ) is the expected number

of clauses satisfied by a random truth assignment, when the truth values to the variablesare distributed uniformly and independently. It is well-known that, in polynomial time,one can find a truth assignment satisfying at least asat(F) clauses. In the parameterizedproblem MaxSat-AA, we are to decide whether there is a truth assignment satisfying atleast asat(F)+k clauses,where k is the (nonnegative) parameter.Weprove thatMaxSat-AAis para-NP-complete and thus,MaxSat-AA is not fixed-parameter tractable unless P = NP.This is in sharp contrast to the similar problemMaxLin 2-AAwhich was recently proved tobe fixed-parameter tractable by Crowston et al. (FSTTCS 2011).

In fact, we consider a more refined version of MaxSat-AA, Max-r(n)-Sat-AA, whererj ≤ r(n) for each j. Alon et al. (SODA 2010) proved that if r = r(n) is a constant, thenMax-r-Sat-AA is fixed-parameter tractable. We prove that Max-r(n)-Sat-AA is para-NP-complete for any r(n) ≥ ⌈log n⌉. We also prove that assuming the exponential timehypothesis, Max-r(n)-Sat-AA is not even in XP for any integral r(n) ≥ log log n + φ(n),where φ(n) is any real-valued unbounded strictly increasing computable function. Thislower bound on r(n) cannot be decreased much further as we prove that Max-r(n)-Sat-AA is (i) in XP for any r(n) ≤ log log n − log log log n and (ii) fixed-parameter tractablefor any r(n) ≤ log log n − log log log n − φ(n), where φ(n) is any real-valued unboundedstrictly increasing computable function. The proof uses some results onMaxLin 2-AA.

© 2013 Elsevier B.V. All rights reserved.

1. Introduction

Satisfiability is a well-known fundamental problem in Computer Science. Its optimization version (finding themaximum number of clauses that can be satisfied by a truth assignment) and its generalizations (constraint satisfactionproblems) are well studied in almost every paradigm of algorithms and complexity, including approximation andparameterized complexity. Here we consider the parameterized complexity of a variation ofMaxSat.

In parameterized complexity, one identifies a parameter k in the input and asks whether there exists an algorithm thatconfines the combinatorial explosion to this parameter, while keeping the rest of the running time polynomial in the sizeof the input. More specifically, the notion of feasibility is fixed-parameter tractabilitywhere one is interested in an algorithmwhose running time is O(f (k)nc), where f is an arbitrary (typically exponential) function of k, n is the input size and c is aconstant independent of k. When the values of k are relatively small, fixed-parameter tractability implies that the problem

✩ A preliminary version of this paper appeared in the proceedings of LATIN 2012 [4].∗ Corresponding author. Tel.: +44 1784414229.

E-mail addresses: [email protected], [email protected] (G. Gutin).

0304-3975/$ – see front matter© 2013 Elsevier B.V. All rights reserved.doi:10.1016/j.tcs.2013.01.005

78 R. Crowston et al. / Theoretical Computer Science 511 (2013) 77–84

under consideration is tractable, in a sense. The class of fixed-parameter tractable problems will be denoted by FPT. Whenthe available running time is replaced by the much more powerful O(nf (k)), we obtain the class XP, where each problemis polynomial-time solvable for any fixed value of k. It is well-known that FPT is a proper subset of XP. More details onparameterized algorithms and complexity are given at the end of this section.

A well-studied parameter in most optimization problems is the size of the solution. In particular, forMaxSat, the naturalparameterized question is whether a given Boolean formula in CNF has an assignment satisfying at least k clauses. Using the(folklore) observation that every CNF formula on m clauses has an assignment satisfying at least m/2 clauses (a randomassignment will satisfy at least m/2 clauses), Mahajan and Raman [20] observed that this problem is fixed-parametertractable. This lower bound ofm/2 for themaximumnumber of satisfied clauses, means that the problem is interesting onlywhen k > m/2, i.e., when the values of k are relatively large. Hence Mahajan and Raman introduced, and showed fixed-parameter tractable, a more natural parameterized question: whether the given CNF formula has an assignment satisfyingat leastm/2 + k clauses.

This idea of parameterizing above a (tight) lower bound has been followed up in many directions subsequently. ForMaxSat alone, better (larger than m/2) lower bounds for certain classes of instances (formulas with no pair of unit clausesin conflict, for example) have been proved and the problems parameterized above these bounds have been shown to befixed-parameter tractable [5,14]. When every clause has r literals, the expected number of clauses that are satisfied by a(uniformly) random assignment can easily seen to be (1− 1/2r)m, and Alon et al. [1] proved that checking whether kmorethan this many clauses can be satisfied in such an r-CNF formula is fixed-parameter tractable. This problem is known asMax-r-Sat-AA. The problemMax-r(n)-Sat-AAwe consider in this paper, is a refinement of this problem, where r need notbe a constant.

More specifically, the problemMaxSat-AA1 we address is the following.

MaxSat-AAInstance: A CNF formula F with clauses c1, . . . , cm, and variables x1, . . . , xn, and anonnegative integer k. Clause ci has ri literals, i = 1, . . . ,m.Parameter: k.Task: Decide whether there is a truth assignment satisfying at least asat(F) + kclauses, where asat(F) =

mi=1(1 − 2−ri).

The problem Max-r(n)-Sat-AA is a refinement of MaxSat-AA in which each clause has at most r(n) literals, where r(n) isan integer-valued function.

Note that asat(F) is the average number of satisfied clauses. Indeed, if we assign true or false to each xj with probability1/2 independently of the other variables, then the probability of ci being satisfied is 1−2−ri , and by linearity of expectation,asat(F) is the expected number of satisfied clauses. (Since our distribution is uniform, asat(F) is indeed the average numberof satisfied clauses.) Let sat(F) denote themaximumnumber of clauses satisfied by a truth assignment. For Boolean variablesy1, . . . , yt , the complete set of clauses on y1, . . . , yt is the set {(z1 ∨ · · · ∨ zt) : zi ∈ {yi, yi}, i ∈ [t]}. Any formula Fconsisting of one or more complete sets of clauses shows that the lower bound sat(F) ≥ asat(F) on sat(F) is tight. Usingthe derandomization method of conditional expectations (see, e.g., Alon and Spencer [2]), it is easy to obtain a polynomialtime algorithm which finds a truth assignment satisfying at least asat(F) clauses. Thus, the question asked inMaxSat-AA iswhether we can find a better truth assignment efficiently from the parameterized complexity point of view.

Our Results and Related Work. Solving an open problem of Crowston et al. [7] we show that MaxSat-AA is notfixed-parameter tractable unless P = NP. More specifically, we show this for Max-r(n)-Sat-AA for any r(n) ≥ ⌈log n⌉.Also, we prove that unless the exponential time hypothesis (ETH) is false, Max-r(n)-Sat-AA is not even in XP for anyr(n) ≥ log log n + φ(n), where φ(n) is any real-valued unbounded strictly increasing computable function.2 These tworesults are proved in Section 2.

These results are in sharp contrast to the complexity status of the related problems MaxLin2-AA (see Section 3 for adefinition of this problem) andMax-r-Sat-AA, which are known to be fixed-parameter tractable [1,7]. Also this is one of thevery few problems in the ‘above guarantee’ parameterization world, which is known to be hard. See Mahajan et al. [21], fora number of other hard above guarantee problems.

Then, complementing our hardness results, we show that the lower bound above on r(n) cannot be decreased muchfurther as we prove that Max-r(n)-Sat-AA is in XP for any r(n) ≤ log log n − log log log n and fixed-parameter tractablefor any r(n) ≤ log log n − log log log n − φ(n), where φ(n) is any real-valued unbounded strictly increasing computablefunction. This result generalizes the one of Alon et al. [1] and is proved in Section 3. We conclude in Section 4 with someopen problems.

The problem we study is one of the few problems in the ‘above guarantee parameterization’ where we parameterizeabove an instance-specific bound, as opposed to a generic bound, see Mahajan et al. [21] for a discussion on this issue.Another example of such parameterizations is the problem Vertex Cover parameterized above the maximum matching ofthe given graph. See [24,8,22,19] for recent results on this problem.

1 In this paper, AA is an abbreviation for Above Average.2 A function f is strictly increasing if for every pair x′, x′′ of values of the argument with x′ < x′′ , we have f (x′) < f (x′′).

R. Crowston et al. / Theoretical Computer Science 511 (2013) 77–84 79

Basics on Parameterized Complexity. A parameterized problem Π can be considered as a set of pairs (I, k) where Iis the problem instance and k (usually a nonnegative integer) is the parameter. Π is called fixed-parameter tractable (fpt) ifmembership of (I, k) inΠ can be decided by an algorithm of runtime O(f (k)|I|c), where |I| is the size of I , f (k) is an arbitraryfunction of the parameter k only, and c is a constant independent from k and I . Such an algorithm is called an fpt algorithm.LetΠ andΠ ′ be parameterized problems with parameters k and k′, respectively. An fpt-reduction R fromΠ toΠ ′ is a many-to-one transformation fromΠ toΠ ′, such that (i) (I, k) ∈ Π if and only if (I ′, k′) ∈ Π ′ with k′

≤ g(k) for a fixed functiong , and (ii) R is of complexity O(f (k)|I|c). Here (I ′, k′) is the image of instance (I, k).Π belongs to XP if membership of (I, k) in Π can be decided by an algorithm of runtime O(|I|f (k)), where f (k) is an

arbitrary function of the parameter k only. It is well-known that FPT is a proper subset of XP [9,10,23].Π is in para-NP if membership of (I, k) in Π can be decided by a nondeterministic Turing machine in time O(f (k)|I|c),

where |I| is the size of I , f (k) is an arbitrary function of the parameter k only, and c is a constant independent from k and I . Aparameterized problemΠ ′ is para-NP-complete if it is in para-NP and for any parameterized problemΠ in para-NP there isan fpt-reduction fromΠ toΠ ′. It is well-known that a parameterized problemΠ belonging to para-NP is para-NP-completeif we can reduce an NP-complete problem to the subproblem ofΠ when the parameter is equal to some constant [10].

For example, consider the k-Colorability problem, where given a graph G and a positive integer k (k is the parameter),we are to decide whether G is k-colorable. Since the (unparameterized) Colorability problem is in NP, k-Colorability is inpara-NP. k-Colorability is para-NP-complete since 3-Colorability is NP-complete.

For further background and terminology on parameterized algorithms and complexity we refer the reader to themonographs [9,10,23].

For an integer n, [n] stands for {1, . . . , n}.

2. Hardness results

In this section we give our hardness results. A 3-CNF formula contains exactly three literals in each clause. For our resultswe need the following problem as a starting point for our reductions. Here c is a positive integral constant.

Linear-c-3SatInstance: A 3-CNF formula F with clauses c1, . . . , cm, and variables x1, . . . , xn suchthatm ≤ cn (i.e., the number of clauses in F is linear in the number of variables).Task: Decide whether there is a truth assignment satisfying F .

It is well known that Linear-c-3Sat is NP-complete for each c ≥ 2: the well-known theorem of Tovey [25] states thatthe 3-SAT problem is NP-complete even when the input consists of 3-CNF formula with every variable appearing in at mostfour clauses.

We begin with a useful construction of aMax-r(n)-Sat-AA instance from an arbitrary Linear-c-3Sat instance.

Lemma 1. Let c be a positive integral constant. For a Linear-c-3Sat instance F with n variables and m clauses, we can construct,in polynomial time, a CNF formula F ′ with n′

= 2cn variables, such that each clause of F ′ has r(n′) = ⌈log n′⌉ literals, and F is

satisfiable if and only if (F ′,2) is a Yes-instance of Max-r(n′)-Sat-AA.

Proof. Consider a Linear-c-3Sat instance F . Let the variables of F be x1, . . . , xn, and the distinct clauses c1, . . . , cm. Recallthatm ≤ cn.

We form a CNF formula F ′ with n′= 2cn variables, the existing variables x1, . . . , xn, together with new variables

y1, . . . , yn′−n, andm′= 2⌈log n′

⌉+1 clauses. The set of clauses of F ′ consists of three sets, C1, C2 and C3, described below:

• C1 is the complete set of clauses on variables y1, . . . , y⌈log n′⌉ without the clause consisting of all negative literals,c = (y1 ∨ y2 ∨ · · · ∨ y⌈log n′⌉).

• C2 = {ci ∨ y4 ∨ y5 ∨ . . . ∨ y⌈log n′⌉ : i ∈ [m]}.• C3 is a set ofm′

−|C1|−|C2| clauses on the variables y⌈log n′⌉+1, . . . , yn′−n, of length ⌈log n′⌉ such that each variable appears

in at least one clause and every clause consists of only positive literals.

We claim that F is satisfiable if and only if (F ′, 2) is a Yes-instance ofMax-r(n)-Sat-AA, thus completing the proof. Since,in F ′, each clause has r(n′) = ⌈log n′

⌉ literals, we have asat(F ′) = (1− 2/m′)m′= m′

− 2. Thus, (F ′, 2) asks whether all theclauses of F ′ can be satisfied.

Suppose F is satisfied by a truth assignment. Extend this assignment to the variables of F ′ by assigning all yi to be true.Since F is satisfied, all the clauses in C2 are satisfied. Every clause in C1 and C3 contains at least one positive literal yi, and sois satisfied. Hence F ′ is satisfied.

If F ′ is satisfied, then y1, . . . , y⌈log n′⌉ must all be set to true (otherwise, there is a clause in C1 that is not satisfied). As aresult, the set C2 of clauses can be simplified to the 3-SAT formula F , and thus F must be satisfied. �

Lemma 1 implies the following:

Theorem 1. Max-r(n)-Sat-AA is para-NP-complete for any r(n) ≥ ⌈log n⌉.

80 R. Crowston et al. / Theoretical Computer Science 511 (2013) 77–84

Proof. Since it suffices to prove the theorem for r(n) = ⌈log n⌉we assume that r(n) = ⌈log n⌉.Max-r(n)-Sat-AA is in para-NP as in polynomial time, we can calculate asat(φ)+ k, and then decide if there exists an assignment satisfying this manyclauses in polynomial time using a nondeterministic Turing machine. To complete our proof of para-NP-completeness, weobserve that Lemma 1 gives a reduction from Linear-c-3SAT to Max-r(n)-Sat-AAwith k = 2. �

It is not hard to prove Theorem 1 without starting from Linear-c-3SAT. We use Linear-c-3SAT to ensure that n′= O(n)

which is necessary in the proof of the next theorem. Hereafter, we will assume the Exponential Time Hypothesis (ETH),which is stated below.

Exponential Time Hypothesis (ETH) (Impagliazzo and Paturi [16]). There is a positive real s such that 3-SAT on n variablescannot be solved in time O(2sn).

Using the Sparsification Lemma [17, Corollary 1], one may assume that, in the ETH in the input formula F to 3-SAT, thenumber of clauses is at most p times the number of variables, for some positive constant p. For completeness we give a proofbelow.

Sparsification Lemma (Impagliazzo et al. [17]). For every ε > 0, there is a constant Cε so that any 3-CNF formula F with nvariables, can be expressed as F = ∨

ti=1Yi, where t ≤ 2εn and each Yi is a 3-CNF formula with all variables from F and with at

most Cεn clauses. Moreover, this disjunction can be computed by an algorithm running in time O(2εn).

Proposition 1 ([17]). Assuming the ETH, there is a positive integral constant C and a positive real s′ such that Linear-C-3SATcannot be solved in time O(2s′n), where n is the number of variables.

Proof. Let s be a positive real such that 3-SAT on n variables cannot be solved in time O(2sn), let s′ = s/2 and let C = Cs′ bea constant sufficient for the Sparsification Lemma (where ε = s′).

Suppose that Linear-C-3SAT can be solved in time O(2s′n). Using the Sparsification Lemma, we can produce 3-CNFformulas Y1, . . . , Yt , t ≤ 2s′n, in time O(2s′n). We can solve all of them in time O(22s′n) = O(2sn) and so can obtain a solutionfor F in time O(2sn), a contradiction. �

Thus, it follows that there exists a constant C such that Linear-C-3SAT cannot be solved in time 2o(n) unless the ETH fails.Using the ETH, we strengthen Theorem 1.

Theorem 2. Assuming the ETH, Max-r(n)-Sat-AA is not in XP for any r(n) ≥ log log n + φ(n), where φ(n) is any real-valuedunbounded strictly increasing computable function of n.

Proof. Let φ(n) be a real-valued unbounded strictly increasing function of n. Note that if the theorem holds for someunbounded strictly increasing function ψ(n) of n, it holds also for any strictly increasing function ψ ′(n) such that ψ ′(n) ≥

ψ(n) for every n ≥ 1. Thus, it suffices to give the proof for φ(n) ≤ log log n.Let C be a constant from Proposition 1. Consider a Linear-C-3SAT instance F ′′ with n′′ variables and m′′ clauses. Using

Lemma 1, reduce F ′′ to a Max-r ′(n′)-Sat-AA instance (F ′, k)with n′ variables and r ′(n′) = ⌈log n′⌉. Note that n′

= 2Cn′′.Now let n be the minimum integer such that ⌈log n′

⌉ ≤ log log n + φ(n). Add n − n′ new variables to F ′ togetherwith a pair of contradicting unit clauses, (x), (x) for each new variable. Let F denote the resulting formula and let (F , k)be an instance of Max-r(n)-Sat-AA. (The extra variables can be seen as padding, so that r(n) has the required value.)The total number n of variables in F is such that r(n) = ⌈log n′

⌉ ≤ log log n + φ(n). By the minimality of n, we have1 + log n′ > log log(n − 1) + φ(n − 1) and, thus, n − 1 ≤ 22n′/2φ(n−1)

≤ 22n′/2φ(n′)

= 2o(n′). Hence, it takes 2o(n′) time toconstruct F , the last equality holding because φ(n) is strictly increasing. Observe that F has O(n) clauses.

Note that (F ′, k) is a Yes-instance of Max-r(n′)-Sat-AA if and only if (F , k) is a Yes-instance of Max-r(n)-Sat-AA. ByLemma 1, (F ′, 2) is a Yes-instance of Max-r(n′)-Sat-AA if and only if the Linear-C-3SAT instance F ′′ is satisfiable. Thus,(F , 2) is a Yes-instance of Max-r(n)-Sat-AA if and only if F ′′ is satisfiable. Therefore, if there was an XP algorithm for Max-r(n)-Sat-AA, then for k = 2 it would have running time O(nc) = 2o(n′)

= 2o(n′′), where c is a constant, to check whether theLinear-C-3SAT instance F ′′ is satisfiable, contradicting Proposition 1. �

3. Algorithmic results

To prove the main result of this section, Theorem 4, we reduceMax-r(n)-Sat-AA to Max-r(n)-Lin2-AA defined below.In the problem MaxLin2, we are given a system S consisting of m equations in n variables, where each equation is of

the form

i∈I xi = b, b ∈ {−1, 1} and each variable xi may only take a value from {−1, 1}. Each equation is assigned apositive integral weight and we wish to find an assignment of values to the variables in order to maximize the total weightof satisfied equations.

Let W be the sum of the weights of all equations in S and let sat(S) be the maximum total weight of equations that canbe satisfied simultaneously. Note that W/2 is a tight lower bound on sat(S). Indeed, consider choosing assignments to thevariables uniformly at random: thenW/2 is the expected weight of satisfied equations (as the probability of each equationto be satisfied is 1/2) and so is a lower bound. To see the tightness consider a system consisting of pairs of equations of

R. Crowston et al. / Theoretical Computer Science 511 (2013) 77–84 81

the form

i∈I xi = −1,

i∈I xi = 1 of weight 1, for some non-empty I ⊆ [n]. This leads to the following parameterizedproblem:

Max-r(n)-Lin2-AAInstance: A system S of equations

i∈Ij

xi = bj, where bj ∈ {−1, 1}, |Ij| ≤ r(n),xi ∈ {−1, 1}, and j ∈ [m], in which Equation j is assigned a positive integral weightwj, and a nonnegative integer k.Parameter: k.Task: Decide whether sat(S) ≥ W/2 + k, whereW =

mj=1wj.

If r(n) = n, Max-r(n)-Lin2-AAwill be denoted MaxLin2-AA. The excess for x = (x1, . . . , xn) ∈ {−1, 1}n of S is

εS(x) =12

mj=1

cji∈Ij

xi

,where cj = wjbj. Observe that εS(x) is the difference between the total weight of equations satisfied by x and W/2. Themaximum excess of S is max{εS(x) : x ∈ {−1, 1}n}. Thus, the answer to MaxLin2-AA is Yes if and only if the maximumexcess of S is at least k.

Consider two reduction rules forMaxLin2 introduced in [15].

Reduction Rule 1. Let A be the matrix over F2 corresponding to the set of equations in S, such that aji = 1 if variable xi appearsin Equation j, and 0 otherwise. Let t = rankA and suppose columns ai1 , . . . , ait of A are linearly independent. Then delete allvariables not in {xi1 , . . . , xit } from the equations of S.

Reduction Rule 2. If we have, for a subset I of [n], an equation

i∈I xi = b′

I with weightw′

I , and an equation

i∈I xi = b′′

I withweight w′′

I , then we replace this pair by one of these equations with weight w′

I + w′′

I if b′

I = b′′

I and, otherwise, by the equationwhose weight is bigger, modifying its new weight to be the difference of the two old ones. If the resulting weight is 0, we delete theequation from the system.

The two reduction rules are of interest due to the following:

Lemma 2. [15] Let S ′ be obtained from S by Rule 1 or 2. Then the maximum excess of S ′ is equal to the maximum excess of S.Moreover, S ′ can be obtained from S in time polynomial in n and m.

Using techniques from linear algebra, Crowston et al. [7] showed the following:

Theorem 3. Let (S, k) be an instance of MaxLin2-AA such that system S cannot be reduced by Rule 1 or 2. Let n be the numberof variables in S and let r be the maximum number of variables in an equation of S. If n ≥ (2k− 1)r + 1 then the answer to (S, k)is Yes.

Let (F , k) be an instance ofMaxSat-AA given by a CNF formula F with clauses c1, . . . , cm, and variables x1, . . . , xn. It willbe convenient for us to denote true and false by−1 and 1, respectively. For a truth assignment x = (x1, . . . , xn) ∈ {−1, 1}n,the excess εF (x) for x is the number of clauses satisfied by x minus asat(x). Thus, the answer to (F , k) is Yes if and only ifthere is an assignment xwith εF (x) ≥ k.

Max-r(n)-Sat-AA is related toMax-r(n)-Lin2-AA as follows. Results similar to Lemma3have been proved in the previouspapers [1,6].

Lemma 3. Let (F , k) be an instance of Max-r(n)-SAT-AA with n variables, m clauses and parameter k. Then, in time 2r(n)mO(1),we can produce an instance (S ′, k′) of Max-r(n)-Lin2-AA reduced by Rule 2, with parameter k′

= k2r(n)−1 such that (F , k) is aYes-instance if and only if (S ′, k′) is a Yes-instance. Moreover, F and S ′ have the same set of variables and for any truth assignmentx = (x1, . . . , xn) ∈ {−1, 1}n, εS′(x) = εF (x) · 2r(n)−1.

Proof. Let (F , k) be an instance of Max-r(n)-SAT-AA with clauses c1, . . . , cm and variables x1, . . . , xn.We assume, withoutloss of generality, that no clause contains a literal and its complement. For a clause cj, var(cj)will denote the set of variablesin cj and rj the number of literals in cj. For every j ∈ [m], let x = (x1, . . . , xn) ∈ {−1, 1}n and

hj(x) = 2r(n)−rj [1 −

xi∈var(cj)

(1 + dijxi)],

where dij = 1 if xi is in cj and dij = −1 if xi is in cj.Let H(x) =

mj=1 hj(x). Let x = (x1, . . . , xn) ∈ {−1, 1}n be a fixed truth assignment. We will prove that

H(x) = 2r(n)εF (x). (1)

82 R. Crowston et al. / Theoretical Computer Science 511 (2013) 77–84

Let qj = 1 if cj is satisfied by x and qj = 0, otherwise. Observe that hj(x)/(2r(n)−rj) equals 1−2rj if qj = 0 and 1, otherwise.Thus,

H(x) =

mj=1

[2r(n)−rjqj + (2r(n)−rj − 2r(n))(1 − qj)]

= 2r(n)

mj=1

qj −mj=1

(1 − 2−rj)

= 2r(n)εF (x).

It follows from (1) that the answer to (F , k) is Yes if and only if there is a truth assignment x such thatH(x) ≥ k2r(n). (2)

Algebraic simplification of H(x) will lead us to the following (where cL are the nonzero integers resulting from thissimplification3):

H(x) =

L∈F

cLi∈L

xi, (3)

where F = {∅ = L ⊆ [n] : cL = 0, |L| ≤ r(n)}. The simplification can be done in time 2r(n)mO(1).Observe that by replacing each term cL

i∈L xi with the equation

i∈L xi = 1 if cL ≥ 0 and

i∈L xi = −1 if cL < 0, with

weight |cL|, the sum

L∈F cL

i∈L xi can be viewed as twice the excess for x of an instance (S ′, k′) ofMax-r(n)-Lin2-AA. Letk′

= k2r(n)−1 be the parameter of (S ′, k′). Then, by (2), (F , k) and (S ′, k′) are equivalent.Note that the algebraic simplification of H(x) ensures that (S ′, k′) is reduced by Rule 2. This completes the proof. �

It is important to note that the resulting instance (S ′, k′) of Max-r(n)-Lin2-AA is not necessarily reduced under Rule 1and, thus, reduction of (S ′, k′) by Rule 1 may result in less than n variables.

From Theorem 3 and Lemma 3 we have the following fixed-parameter-tractability result forMax-r(n)-SAT-AA.Theorem 4. Max-r(n)-Sat-AA is (i) in XP for r(n) ≤ log log n − log log log n and (ii) fixed-parameter tractable for r(n) ≤

log log n − log log log n − φ(n), for any real-valued unbounded strictly increasing computable function φ(n).Proof. We start by proving Part (ii). Let φ(n) be a real-valued unbounded strictly increasing computable function of n. Notethat if Part (ii) holds for some unbounded strictly increasing computable function ψ ′(n) of n, it holds also for any strictlyincreasing computable function ψ(n) such that ψ(n) ≥ ψ ′(n) for every n ≥ 1. Thus, it suffices to give the proof for φ(n) ≤

log log log n, as for any strictly increasing function ψ(n)we can consider the case when φ(n) = min{ψ(n), log log log n}.Observe that log log n − log log log n − φ(n) is a nondecreasing function starting from some value n′

0 of n. Let n′′

0 be theminimum value of n such that φ(n) > 0 for all n ≥ n′′

0 and let n0 = max{n′

0, n′′

0}.If n ≤ n0, the problem is trivially solvable in polynomial time. Thus, we may assume that n > n0 and so φ(n) > 0 and

log log n− log log log n−φ(n) is nondecreasing. Note that φ(n) can be extended to a continuous positive strictly increasingfunction φ(t) of real argument t ≥ 1. Thus, φ(t) has an inverse function φ−1(t).

Let r(n) = ⌊log log n − log log log n − φ(n)⌋ and consider an instance (F , k) of Max-r(n)-Sat-AA. Note that 2r(n)≤ n.

Therefore by Lemma3, in polynomial timewe can reduce (F , k) into an instance (S ′, k′) ofMax-r(n)-Lin2-AA, such that (F , k)is a Yes-instance if and only if (S ′, k′) is a Yes-instance with parameter k′

= k · 2r(n)−1. Consider the MaxLin2-AA instance(S ′′, k′) with n′ variables formed by reducing (S ′, k′) by Rules 1 and 2. If n′

≤ log n, (S ′′, k′) may be solved in polynomialtime by trying all 2n′

≤ n assignments to the variables of S ′′. Thus, we may assume that n′ > log n.We may also assumethat n′ > n0.

Note that no equation of S ′′ has more than r(n) variables. If n′≥ (k2r(n)

− 1)r(n)+ 1 then, by Theorem 3 and Lemma 3,(F , k) is a Yes-instance. Hence, it remains to consider the case log n < n′

≤ (k2r(n)− 1)r(n). Thus,

log n ≤ (k2r(n)− 1)r(n) and so log n ≤ k(log log n) · log n/(2φ(n) log log n).

This simplifies toφ(n) ≤ log k and so n ≤ φ−1(log k).Hence, (F , k) can be solved in time 2φ−1(log k)mO(1) by trying all possible

assignments to variables of (S ′′, k′).Now we will prove Part (i). Let r(n) = ⌊log log n − log log log n⌋ and consider an instance (F , k) of Max-r(n)-Sat-AA.

As in the proof of Part (ii), we reduce (F , k) into an instance (S ′, k′) of Max-r(n)-Lin2-AA, such that (F , k) is a Yes-instanceif and only if (S ′, k′) is a Yes-instance with parameter k′

= k · 2r(n)−1. Consider the MaxLin2-AA instance (S ′′, k′) with n′

variables formed by reducing (S ′, k′) by Rules 1 and 2. If n′≤ k log n, (S ′′, k′)may be solved in XP time by trying all 2n′

≤ nk

assignments to the variables of S ′′. Thus, we may assume that n′ > k log n. If n′≥ (k2r(n)

− 1)r(n)+ 1, then by Theorem 3and Lemma 3, (F , k) is a Yes-instance. Thus, it remains to consider the case k log n < n′

≤ (k2r(n)− 1)r(n). We have

k log n ≤ kr(n)2r(n) and so log log n ≤ r(n) + log r(n) < log log n (as log r(n) < log log log n), a contradiction. Thus, thiscase is impossible and we can solve (F , k) in XP time. �

3 Formula (3) is the Fourier expansion of H(x) over basis

i∈L, L ⊆ [n], and cL are nonzero Fourier coefficients of H(x); for more information, see [6,7].

R. Crowston et al. / Theoretical Computer Science 511 (2013) 77–84 83

4. Open problems

It would be interesting to close the gap between the inequalities of Theorems 2 and 4(i). Also, it would be interesting tofind out whetherMax-r(n)-Sat-AA is fixed-parameter tractable if r(n) ≤ log log n − log log log n.

Apart from MaxLin-AA and MaxSat-AA mentioned above, there are some other constraint satisfaction problemsparameterized above a tight lower bound whose complexity has been established in the last few years. One example isr-Linear-Ordering-AA for r = 2 and 3. Let r ≥ 2 be a fixed integer. In r-Linear-Ordering, given a positive integer n and amultisetC of r-tuples of distinct elements from [n], we wish to find a permutation π : [n] → [n]whichmaximizes that thenumber of satisfied r-tuples, i.e., r-tuples (i1, i2, . . . , ir) such that π(i1) < π(i2) < · · · < π(ir). Let m stand for the numberof r-tuples in C.

Let τ : [n] → [n] be a random permutation (chosen uniformly from the set of all permutations). Observe that theprobability that an r-tuple is satisfied by τ is 1/r!. Thus, by linearity of expectation, the expected number of r-tuplessatisfied by τ ism/r!. Using the conditional expectation derandomizationmethod [2], it is not difficult to obtain a polynomialtime algorithm for finding a permutation π which satisfies at least m/r! r-tuples. Thus, we can easily obtain an 1/r!-approximation algorithm for r-LinearOrdering. It is remarkable that for anypositive ε there exists nopolynomial (1/r!+ε)-approximation algorithm provided the Unique Games Conjecture (UGC) of Khot [18] holds. This result was proved byGuruswami et al. [12] for r = 2, Charikar et al. [3] for r = 3 and, finally, by Guruswami et al. [11] for any r .

Observe that every permutation π satisfies exactly one r-tuple in the set {(i1, i2, . . . , ir) : {i1, i2, . . . , ir} = [r]} and,thus,m/r! is a tight lower bound on the maximum number of r-tuples that can be satisfied by a permutation π . It is naturalto ask what is the parameterized complexity of the following problem r-Linear-Ordering-AA: decide whether there is apermutation π which satisfies at least m/r! + k r-tuples, where k ≥ 0 is the parameter. Gutin et al. [15] and [13] provedthat r-Linear-Ordering-AA is fixed-parameter tractable for r = 2 and r = 3, respectively. The complexity of r-Linear-Ordering-AA for r ≥ 4 remains an open problem [13]. Note that if r-Linear-Ordering-AA is fixed-parameter tractable forsome r , then all permutation constraint satisfaction problems of arity r parameterized above average are fixed-parametertractable too (see Gutin et al. [13] for the definition of a permutation constraint satisfaction problem of arity r and a proofof the above-mentioned fact).

Acknowledgments

This research was partially supported by an International Joint grant of the Royal Society. We are grateful to the refereesfor many very important suggestions.

References

[1] N. Alon, G. Gutin, E. J. Kim, S. Szeider, A. Yeo, Solving MAX-r-SAT above a tight lower bound, Algorithmica 61 (2011) 638–655.[2] N. Alon, J. Spencer, The Probabilistic Method, 2nd Edition, Wiley, 2000.[3] M. Charikar, V. Guruswami, R. Manokaran, Every permutation CSP of arity 3 is approximation resistant, in: Proc. Computational Complexity 2009,

pp. 62–73.[4] R. Crowston, G. Gutin,M. Jones, V. Raman, S. Saurabh, Parameterized complexity ofMaxSat above average, in: Proc. LATIN 2012, in: Lect. Notes Comput.

Sci., 7256, 2012, pp. 184–194.[5] R. Crowston, G. Gutin,M. Jones, A. Yeo, ANew Lower Bound on theMaximumNumber of Satisfied Clauses inMax-SAT and Its Algorithmic Applications.

Algorithmica, http://dx.doi.org/10.1007/s00453-011-9550-1.[6] R. Crowston, G. Gutin, M. Jones, E. J. Kim, I. Ruzsa, Systems of linear equations over F2 and problems parameterized above average, in: Proc. SWAT

2010, in: Lect. Notes Comput. Sci., 6139, 2010, pp. 164–175.[7] R. Crowston, M. Fellows, G. Gutin, M. Jones, F. Rosamond, S. Thomassé, A. Yeo, Simultaneously satisfying linear equations over F2: MaxLin2 and

Max-r-Lin2 parameterized above average, in: Proc. FSTTCS, in: LIPICS, vol. 13, 2011, pp. 229–240.[8] M. Cygan, M. Pilipczuk, M. Pilipczuk, J. Wojtaszczyk, OnMultiway Cut parameterized above lower bounds, in: Proc. IPEC 2011, in: Lect. Notes Comput.

Sci., 7112, 2012, pp. 1–12.[9] R. G. Downey, M. R. Fellows, Parameterized Complexity, Springer, 1999.

[10] J. Flum, M. Grohe, Parameterized Complexity Theory, Springer, 2006.[11] V. Guruswami, J. Håstad, R. Manokaran, P. Raghavendra, M. Charikar, Beating the random ordering is hard: Every ordering CSP is approximation

resistant, SIAM J. Comput. 40 (3) (2011) 878–914.[12] V. Guruswami, R. Manokaran, P. Raghavendra, Beating the random ordering is hard: Inapproximability of maximum acyclic subgraph, in: Proc. FOCS

2008, pp. 573–582.[13] G. Gutin, L. van Iersel, M. Mnich, A. Yeo, Every ternary permutation constraint satisfaction problem parameterized above average has a kernel with a

quadratic number of variables, J. Comput. System Sci. 78 (2012) 151–163.[14] G. Gutin, M. Jones, A. Yeo, A new bound for 3-satisfiable MaxSat and its algorithmic application, in: Proc. FCT 2011, in: Lect. Notes Comput. Sci., 6914,

2011, pp. 138–147.[15] G. Gutin, E. J. Kim, S. Szeider, A. Yeo, A probabilistic approach to problems parameterized above or below tight bounds, J. Comput. System Sci. 77

(2011) 422–429.[16] R. Impagliazzo, R. Paturi, On the complexity of k-SAT, J. Comput. System Sci. 62 (2001) 367–375.[17] R. Impagliazzo, R. Paturi, F. Zane, Which problems have strongly exponential complexity?, J. Comput. System Sci. 63 (2001) 512–530.[18] S. Khot, On the power of unique 2-prover 1-round games, in: Proc. STOC 2002, pp. 767–775.[19] D. Lokshtanov, N. S. Narayanaswamy, V. Raman, M. S. Ramanujan, S. Saurabh, Faster parameterized algorithms using linear programming,

arXiv:1203.0833v2, 2012.[20] M. Mahajan, V. Raman, Parameterizing above guaranteed values: MaxSat and MaxCut, J. Algorithms 31 (2) (1999) 335–354.[21] M. Mahajan, V. Raman, S. Sikdar, Parameterizing above or below guaranteed values, in: A preliminary version in the 2nd IWPEC, J. Comput. System

Sci. vol. 4169 (2) (2006) 38–49.

84 R. Crowston et al. / Theoretical Computer Science 511 (2013) 77–84

[22] N. S. Narayanaswamy, V. Raman, M. S. Ramanujan, S. Saurabh, LP can be a cure for parameterized problems, in: Proc. 29th International Symposiumon Theoretical Aspects of Computer Science, STACS 2012, in: Leibniz International Proceedings in Informatics (LIPIcs), Vol. 14, 2012, pp. 338–349.

[23] R. Niedermeier, Invitation to Fixed-Parameter Algorithms, Oxford University Press, 2006.[24] V. Raman, M. S. Ramanujan, S. Saurabh, Paths, flowers and vertex cover, in: Proc. ESA 2011, in: Lect. Notes Comput. Sci., 6942, 2011, pp. 382–393.[25] C.A. Tovey, A simplified satisfiability problem, Discrete Appl. Math. 8 (1984) 85–89.