Parameterized Approximability for Modular Linear Equations
Abstract
We consider the Min--Lin() problem: given a system of length- linear equations modulo , find of minimum cardinality such that is satisfiable. The problem is NP-hard and UGC-hard to approximate in polynomial time within any constant factor even when . We focus on parameterized approximation with solution size as the parameter. Dabrowski, Jonsson, Ordyniak, Osipov and Wahlström [SODA-2023] showed that Min-2-Lin() is in FPT if is prime (i.e. is a field), and it is W[1]-hard if is not a prime power. We show that Min-2-Lin() is FPT-approximable within a factor of for every prime and integer . This implies that Min-2-Lin(), , is FPT-approximable within a factor of where counts the number of distinct prime divisors of . The high-level idea behind the algorithm is to solve tighter and tighter relaxations of the problem, decreasing the set of possible values for the variables at each step. When working over and viewing the values in base-, one can roughly think of a relaxation as fixing the number of trailing zeros and the least significant nonzero digits of the values assigned to the variables. To solve the relaxed problem, we construct a certain graph where solutions can be identified with a particular collection of cuts. The relaxation may hide obstructions that will only become visible in the next iteration of the algorithm, which makes it difficult to find optimal solutions. To deal with this, we use a strategy based on shadow removal [Marx & Razgon, STOC-2011] to compute solutions that (1) cost at most twice as much as the optimum and (2) allow us to reduce the set of values for all variables simultaneously. We complement the algorithmic result with two lower bounds, ruling out constant-factor FPT-approximation for Min--Lin() over any nontrivial ring and for Min--Lin() over some finite commutative rings .
Keywords and phrases:
parameterized complexity, approximation algorithms, linear equationsFunding:
Peter Jonsson: Supported by the Swedish Research Council (VR) under grant 2021-04371.Copyright and License:
2012 ACM Subject Classification:
Theory of computation Parameterized complexity and exact algorithmsEditors:
Anne Benoit, Haim Kaplan, Sebastian Wild, and Grzegorz HermanSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
Systems of linear equations are ubiquitous in computer science and mathematics [16] and methods like Gaussian elimination can efficiently solve linear systems over various rings. Equations and congruences over the ring of integers modulo () are of central importance in number theory, but also have many applications in computer science, including complexity theory, coding theory, cryptography, hash functions and pseudorandom generators, see e.g. [3, 9, 11, 33]. Linear equations over modular rings can be solved in polynomial time, but the methods are not suited to dealing with inconsistent systems of equations. We consider the Min--Lin() problem which asks to find an assignment to a system of linear equation over the ring that violates the minimum number of equations, and where each equation contains at most distinct variables. This problem is NP-hard even when and is the simplest nontrivial ring [23]. We note that Min--Lin() for and finite ring is a special case of MinCSP for a finite constraint language . This, and the more general Valued CSP, have been widely studied from many different perspectives, e.g. [4, 6, 22, 23, 31, 32].
Two common ways of coping with NP-hardness are approximation and parameterized algorithms, but neither of them seems sufficient in isolation to deal with Min--Lin(). Even Min-2-Lin over finite fields such as is conjectured to be NP-hard to approximate within any constant factor under the Unique Games Conjecture (UGC) [20]: see Definition 3 in [21] and the discussion that follows. The natural parameter for Min--Lin() is the cost of the optimal solution (i.e. the number of equations not satisfied by it), which we denote by . Under this parameterization, Min-2-Lin() is fixed-parameter tractable when is a prime, i.e. is a field, but W[1]-hard when is not a prime power. Moreover, the problem Min-3-Lin is W[1]-hard for every nontrivial ring [8]. This motivates us to study parameterized approximation algorithms [14, 27]. This approach has received rapidly increasing interest (see, for instance, [13, 17, 18, 25, 26, 30]). Let be a constant. A factor- FPT-approximation algorithm takes an instance , runs in 111The notation hides polynomial factors in the input size. time for an arbitrary computable function , either returns that there is no solution of size at most or returns that there is a solution of size at most . Thus, there is more time to compute the solution (compared to polynomial-time approximation) and the algorithm may output an oversized solution (unlike an exact FPT algorithm). 222A decision -approximation procedure for Min-2-Lin() can be turned into an algorithm that returns a -approximate solution using self-reducibility: if is a yes-instance, then there exists a subset , , such that is a yes-instance; moreover, such can be found by iterating over all subsets of size at most , which incurs a polynomial overhead on the running time of the algorithm. Our main result is the following. Let be the number of distinct prime factors of .
Theorem 1.
For every , Min-2-Lin() is FPT-approximable within .
We complement the result with two lower bounds. First, we show that allowing three or more variables per equation leads to W[1]-hardness of constant-factor approximation.
Theorem 2.
Min--Lin() over every nontrivial ring is W[1]-hard to approximate within any constant factor.
This result strengthens two previously known hardness results: (i) Min--Lin() is W[1]-hard [8] and (ii) Min--Lin() is NP-hard to approximate within any constant (which can easily be derived from [19]). While we focus on rings of the form , the result of Theorem 1 begs the questions whether Min--Lin() is FPT-approximable within a constant factor for every finite commutative ring . We answer this question in the negative.
Theorem 3 (See Theorem 17 for a more detailed statement.).
There exist finite commutative rings such that Min--Lin() is W[1]-hard to approximate within any constant factor.
Theorems 5.2 and 6.2 in [8] leave open the question of whether Min-2-Lin() is FPT or W[1]-hard for a prime and . The answer is unknown even for the smallest such ring – . While our result implies that Min-2-Lin() is FPT-approximable within a factor of 2, its exact parameterized complexity remains an intriguing open problem.
Full proofs for the results marked with a can be found in the full version of the paper. Another version of this paper is available on arXiv [7]; it considers a broader class of rings, but gives worse approximation factors.
2 Preliminaries
An expression is a (linear) equation over if and are variables with domain . This equation is homogeneous if . Let be a set (or equivalently a system) of equations over . Let denote the variables in , and we say that is consistent if there is an assignment satisfying all equations in . An instance of the computational problem -Lin() is a system of equations in at most variables over , and the question is whether is consistent. Linear equation systems over are solvable in polynomial time and the well-known procedure is outlined, for instance, in [1, p. 473]. We now define the computational problem when we allow some equations in an instance to be soft (i.e. deletable at unit cost) and crisp (i.e. undeletable).
Min--Lin() Instance: A (multi)set of equations over with at most variables per equation, a subset of crisp equations and an integer . Parameter: . Question: Is there a set such that is consistent and ?
We use crisp equations for convenience since they can be modelled by copies of the same soft equation. For an assignment , let be if does not satisfy a crisp equation and the number of unsatisfied soft equations otherwise. We drop the subscript when it is clear from context. We write to denote the minimum cost of an assignment to .
3 FPT-Approximation Algorithm
3.1 Algorithm Summary
Let be the prime factorization of . It is well known that is isomorphic to the direct sum , and we can reduce the problem to the prime power case.
Proposition 4 ().
Suppose that the ring is isomorphic to a direct sum . If Min--Lin() is FPT-approximable within a factor for all , then Min--Lin() is FPT-approximable within a factor .
Now, consider the ring for a prime and positive integer . We start with a simplification step. An equation over a ring is simple if it is either a binary equation of the form for some or a crisp unary equation for some . An instance of -Lin() is simple if every equation in is simple.
Lemma 5 ().
Let be positive integer and be a constant. If Min-2-Lin() restricted to simple instances is FPT-approximable within a factor , then Min-2-Lin() on general instances is FPT-approximable within a factor .
Now, suppose , i.e. we are working over a field . Min-2-Lin() can be solved exactly in FPT time (see. [8]); we will show a -approximation because it is illustrative of our approach. For an instance of -Lin(), we construct a graph with vertices for every and and special vertices and . For unary equations in , add crisp edges if , and crisp edges for every if . For every binary equation of the form , construct an edge bundle and add these edges to . This completes the construction. We establish a correspondence between conformal -cuts in and assignments to . Formally, for a set of vertices , let be the set of edges with exactly one endpoint in , i.e. is the cut separating and . If is such that , and there is at most one vertex for any , we say that is a conformal -cut. To construct an assignment from a conformal cut , map whenever for some , and otherwise ; the reverse direction of the correspondence is obvious.
Let be the number of edge bundles intersected by . Then being a field implies that is exactly the cost of the assignment corresponding to . More specifically, consider an equation , suppose and . Then because the edge is uncut and both its endpoints are reachable from , so the assignment corresponding to satisfies . This guarantee is represented by being a matching: view an edge as encoding “ if and only if ”. To complete the algorithm for fields, we compute a conformal cut with . Observe that implies because contains at most one vertex per variable so may intersect at most two edges of any bundle. Thus, for -approximation it suffices to compute a conformal cut of size , which is guaranteed to exist for yes-instances. However, when translating it back into a set of equations, we may delete equations because all edges of our conformal cut may intersect distinct bundles. Finally, to compute a conformal cut in FPT time, we may use branching in the style of Digraph Pair Cut [24]: compute the closest -cut (which is unique by submodularity of cuts), and if it is not conformal, then branch.
If we use the same approach naïvely over , , then the bundles stop being matchings. Consider the equation over (second graph from the left in Figure 1). Note that both and are adjacent to in . Moreover, if then either or so the dependencies cannot be captured by binary edges (even if one were to use directed graphs). Thus, we lose the connection between the number of bundles intersected by a conformal cut and the cost of the corresponding assignment. One idea for solving Min--Lin() is to retain the “if and only if” semantics of an edge by matching sets of values rather than individual values. More specifically, let us partition into classes and build with vertices , and for all . To keep the matching structure for an equation , we want an edge in to mean “ if and only if ”. For fields, we have used the most refined partition (every nonzero element is a class of its own). For other rings, a coarser partition is needed: e.g. if , then and have to be in the same class (think of ). However, simply taking a coarser partition is not sufficient: indeed, the coarsest partition (putting all non-zero elements in the same class) has the required structure, but it only distinguishes between zero and nonzero values, and is not very useful algorithmically. Intuitively, we want to a partition such that a class assignment over allows us to rewrite our input as a set of equations over without increasing the cost too much.
A useful partition is obtained by viewing the elements of represented in base-. Formally, every element equals , where the coefficients uniquely define . Let , and for every , define to be the index of the first nonzero coordinate in , and to be the least significant unit in . For completeness, let . Let
This equivalence relation has two important properties. First, it is matching, i.e. is an equivalence class, and for every and ,
-
if then ,
-
if , then either or .
Moreover, it is absorbing, meaning that
-
for all .
Let denote the set of equivalence classes of , and . We will drop the subscript when it is clear from the context. The name “matching” comes from considering bipartite graphs defined by binary equations for every as follows: let and let there be an edge between two classes on the left and on the right if and only if for some and . Then being matching implies that is a matching for every , i.e. every vertex has degree at most .
Example 6.
Partition (with elements written in base-) has classes
For another example, has classes
For a non-example, a coarser partition of into three classes
lacks the matching property (as is evident from the equation in Figure 1).
The matching property of is crucial for the main algorithmic lemma, which we state below and prove in Section 3.2. A value assignment agrees with a class assignment if for all . A class assignment respects an equation if it admits a satisfying assignment that agrees with , otherwise we say that violates . Define the cost of a class assignment to be the number of equations in that it violates. Note that every value assignment uniquely defines a class assignment , so we say that strongly violates an equation if violates . Clearly, an optimal assignment can violate at most equations in , and we can guess the number of strongly violated equations.
Lemma 7.
Let be a prime, be a positive integer, and let and be integers with . There is a randomized algorithm that takes a simple instance of 2-Lin() and integers and as input, and in time returns a class assignment such that the following holds. Let be the set of equations in violated by . Then have . Moreover, if admits an assignment of cost at most that strongly violates at most equations, then with probability at least , admits an assignment of cost at most that agrees with .
While technical details are deferred to Section 3.2, we remark that we can no longer use branching in the style of Digraph Pair Cut when working over non-fields since some conformal cuts of low cost correspond to class assignments of high cost. For an extreme example over , consider the system of equations . By the construction of , the vertex is isolated and the connected component of contains vertices , , , and . Hence, is empty and conformal, but the cost of is at least because the system is inconsistent (this follows from considering both possible values for , which are and ). In fact, the cost is exactly because it is sufficient to delete . To mitigate this issue of “invisible” future costs, we use shadow removal in the class assignment graph followed by branching on the shadow components.
Now, to explain how the absorbing property of is used, we need some definitions. Choose an arbitrary representative element from every equivalence class . Consider a simple equation and a class assignment to its variables that respects . For unary equations , define to be
For binary equations , define to be
The absorbing property implies that is defined in both cases. Indeed, if and respects , then and , so divides . If and respects , then there is an assignment such that , and . Equivalently, and divides both and , hence also divides any linear combination of these two values, particularly
Lemma 8 ().
Let be a prime and . Let be a simple equation over , and be a class assignment. Then respects if and only if is satisfiable over .
Now we combine all ingredients to prove the main theorem.
Theorem 1. [Restated, see original statement.]
For every , Min-2-Lin() is FPT-approximable within .
Proof.
Let be the prime factorization of . Note that , so by Proposition 4, it suffices to show that Min-2-Lin() is FPT-approximable within factor for every prime and positive integer . We proceed by induction on . If , then we can use the algorithm of [8] for Min-2-Lin over fields to solve the problem exactly. Otherwise, let be an instance of Min-2-Lin(). By Lemma 5, we may assume without loss of generality that is simple.
Select a value uniformly at random and run the algorithm from Lemma 7 on to produce a class assignment . Let be the set of equations in violated by . If , then reject . Otherwise, create an instance of -Lin() with and . Set and pass as input to the algorithm for Min-2-Lin(), and return the same answer.
Towards correctness, first assume is a yes-instance, and let be the number of equations strongly violated by an optimal assignment to . Our guess for is correct with probability . By Lemma 7, with probability , we have and admits an assignment of cost at most that agrees with . By Lemma 8, the instance of 2-Lin() we create has cost at most , so we accept.
For the other direction, suppose the algorithm accepts. Then is a yes-instance of Min-2-Lin(), and by Lemma 8, . Let be an optimal solution to . Then is a solution to , and .
We remark that all steps in the algorithm can be derandomized either by exhaustive branching or standard methods in [28].
3.2 Computing Class Assignments
This subsection is devoted to a proof of Lemma 7. To achieve this we introduce the class assignment graph (Section 3.2.1) and show that certain cuts in this graph correspond to class assignments (Section 3.2.2), which themselves correspond to solutions of Min--Lin(). We then use shadow removal and branching to compute these cuts (Section 3.2.3). Throughout this section, we consider the ring for prime number and integer .
3.2.1 The Class Assignment Graph
In what follows, let be a simple instance of Min--Lin() and let be the matching and absorbing equivalence relation on defined in Section 3.1. Without loss of generality, we assume that every equation of is consistent (otherwise we can remove the equation and decrease by ) and non-trivial (otherwise we can remove the equation). We first use the matching property of to define the mapping between equivalence classes for any equation with , as follows. For every , we set:
-
if for every and
-
otherwise, where is the unique equivalence class such that maps to . This is uniquely defined since has the matching property.
For an equation with , we let be the unique equivalence class consistent with . We can now define the class assignment graph ; see Figure 2 for an illustration. The graph has two distinguished vertices and together with vertices for every and every non-zero class . Moreover, contains the following edges for each equation.
-
For an equation do the following. For every , add the edge if . For every such that is undefined, add the edge . If the equation is crisp, then the edges are crisp as well.
-
For a crisp equation , add the crisp edge for every class .
-
For a crisp equation , where , add the crisp edge .
Intuitively, every node of corresponds to a Boolean variable and every edge of corresponds to an “if and only if” between the two Boolean variables connected by . Moreover, every assignment of the variables of naturally corresponds to a Boolean assignment, denoted by of the vertices in by setting , , and:
-
if belongs to the non-zero class , then we set and for every non-zero class not equal to ,
-
if , we set for every non-zero class .
We say that an edge of is satisfied by if satisfies the “if and only if” Boolean constraint represented by that edge.
Observation 9.
Let be a simple instance of -Lin(), let be an assignment of and pick . If satisfies , then satisfies all edges corresponding to in .
3.2.2 Cuts in the Class Assignment Graph
In this section, we introduce conformal cuts and show how they relate to class assignments and solutions to Min--Lin() instances. Let be a simple instance of -Lin() and . An -cut in is conformal if for every variable at most one vertex for some is connected to in . Please refer to Figure 2 for an illustration of conformal cuts in the class assignment graph. If is a conformal -cut in , then we say that a variable is decided with respect to if (exactly) one vertex is reachable from in ; and otherwise we say that is undecided with respect to . Moreover, we denote by the assignment of variables of to classes in implied by , i.e. if is undecided and otherwise , where is the unique non-zero class in such that is reachable from in . We say that an assignment of agrees with if is in the class for every variable of . Note that if some assignment agrees with , then is conformal. The following auxiliary lemma characterizes which edges of are satisfied by an assignment of after removing a set of edges from .
Lemma 10.
Let be a set of edges of and let be an assignment of . Then, satisfies all edges reachable from in if and only if sets all Boolean variables reachable from in to . Similarly, satisfies all edges reachable from in if and only if sets all Boolean variables reachable from in to .
Proof.
This follows because and for any and every edge of corresponds to an “if and only if” between the variables corresponding to its two endpoints.
For a set of equations of , we let denote the set of all edges of corresponding to an equation of . Conversely, for a set of edges of , we let denote all equations of having a corresponding edge in . Moreover, if is an -cut in , we let denote the unique minimal -cut contained in that is closest to in . Finally, for an optimal solution of , we let be the set of equations , i.e. all equations in that do not have an edge in . We can now establish the connection between solutions of Min--Lin() instances and conformal -cuts in the class assignment graph.
Lemma 11 ().
Let be a set of equations such that is satisfiable and let . Then, satisfies:
-
1.
is a conformal -cut.
-
2.
.
-
3.
There is a satisfying assignment for that agrees with .
Proof Sketch.
Let be a satisfying assignment of . Observation 9 implies that satisfies all edges of . Therefore, it follows from Lemma 10 that sets all vertices reachable from in to and all vertices reachable from in to . Thus, is an -cut, because otherwise would have to be set to by since it would be reachable from in . Therefore, exists. Because is closest to , it holds that a vertex is reachable from in if and only if it is reachable from in . Therefore, if at least two vertices and for some distinct non-zero classes and are reachable from in for some variable , then all of them must be set to by , which is not possible due to the definition of . We conclude that is conformal.
Towards showing that , it suffices to show that for every equation . Note that because is a minimal -cut, it holds that one of the endpoints of every is reachable from in . Therefore, because is conformal, can contain at most two edges in for every binary equation of the form . Similarly, can contain at most one edge in for every unary equation of the form . Finally, for every unary equation of the form . Therefore, , and by definition.
Let be the set of all variables of such that no vertex is reachable from in . Let be the assignment for such that if and otherwise. Clearly, agrees with , because agrees with all variables not in and all other variables are correctly set to by . It therefore only remains to show that still satisfies , which we leave to the full version of the paper.
3.2.3 Shadow Removal
We show how shadow removal (introduced in [28] and improved in [5]) can be used for computing conformal cuts that correspond to solutions of a Min--Lin() instance. We follow [5] and begin by importing some definitions, which we translate from directed graphs to undirected graphs to fit our setting; to get back to directed graphs one simply has to think of an undirected graph as the directed graph obtained after replacing each undirected edge with two directed arcs in both directions. Let be an undirected graph. Let be a set of connected subgraphs of . A set is an -transversal if intersects every subgraph in . Conversely, if is an -transversal, we say that is -connected.
Theorem 12 ([5]).
Let be an undirected graph, and . There is a randomized algorithm that takes as input and returns in time a set such that the following holds with probability . For every -connected family of connected subgraphs in , if there is an -transversal of size at most in , then there is an -transversal of size at most such that every vertex is connected to in .
The following lemma is crucial for the application of shadow removal (Theorem 12). Informally, it shows that if is a solution, i.e. a set of equations such that is satisfiable, then we can obtain a (not too large) new solution by replacing the corresponding conformal minimal -cut , where is the set of vertices in not reachable from in , by any minimal -cut .
Lemma 13.
Let be a simple instance of -Lin() and . Moreover, let be a set of equations such that is satisfiable, , be the set of all vertices in that are not reachable from in , and let be an -cut in . Then, there is an assignment of that satisfies and agrees with , where .
Proof.
Lemma 11 implies that is conformal and there is a satisfying assignment for that agrees with . Because is also an -cut in , if no vertex is reachable from in for some variable of , then the same applies in . Let be the set of all variables of such that some vertex is reachable from in but that is not the case in . Let be the assignment obtained from by setting all variables in to . Then, agrees with . We claim that also satisfies , where .
Consider a unary equation of on variable . If , then and therefore satisfies (because is crisp and therefore ). So suppose that . If is of the form , then satisfies . Otherwise, is of the form for some and contains the edge . Therefore, is reachable from in contradicting our assumption that .
Now, consider a binary equation of on variables and and first consider the case when . Clearly, if neither a vertex nor a vertex is reachable from in , then , so is satisfied by . We next show that either no vertex or no vertex is reachable from in . Suppose for a contradiction that and are reachable from in . Let be an arbitrary edge in ; such an edge exists because . Because is a minimal -cut, it follows that exactly one endpoint of is reachable from in and either or (endpoint of ) for some must be reachable from in . We assume without loss of generality that is reachable from in . Because is an -cut and does not contain , is not reachable from in . But then and both and are reachable from in , which contradicts that is conformal. It remains to consider the case when there is a vertex that is reachable from in but no vertex is reachable from in ; the case when there is a vertex reachable from in but no vertex reachable from in is analogous. Since , we obtain that since otherwise either or some would be reachable from in . Because , it follows that is satisfied by . This completes the proof for the case when .
Suppose instead that . In this case satisfies and therefore also satisfies unless exactly one of and is not in . We distinguish the following cases:
-
and . If there is no vertex that is reachable from in , then the same holds in so , which shows that satisfies . Otherwise, let be reachable from in . Then, since otherwise either or is also reachable from in (because ), which in the former case contradicts our assumption that is an -cut and which in the latter case contradicts our assumption that . Therefore, satisfies (because ).
-
and . We first show that there is no vertex that is reachable from in . Suppose there is such a vertex . Then, is undefined since otherwise is reachable from in (because ), which contradicts our assumption that . But then and is reachable from in , which contradicts our assumption that is an -cut. Hence, there is no vertex that is reachable from in , which implies that the same holds in so , which shows that satisfies .
Let and for a set , let be the set of edges incident to a vertex in and a vertex in . The forthcoming Lemma 14 provides a version of shadow removal adopted to our problem. Informally, it provides us with a set such that we only have to look for conformal -cuts that are subsets of to obtain our class assignment; in fact it even shows that for every component of either all edges in are part of the cut or no edge of is part of the cut. We will use this fact in Lemma 15 to find a conformal -cut by branching on which components of are reachable from .
More formally, if is a set of equations such that is satisfiable and is the set of vertices not reachable from in minus the conformal -cut (see Lemma 11), then the lemma provides us with a set such that there is a conformal -cut within of size at most such that there is an assignment for the variables in that satisfies and agrees with . The main idea behind the proof is the application of Theorem 12 to the set of all walks from to in to obtain the set and to employ Lemma 13 to obtain the new solution that corresponds to the minimum -cut .
Lemma 14 ().
Let be a simple instance of -Lin() and let . Moreover, let be a set of equations such that is satisfiable, , let be the set of all vertices in that are not reachable from in , and let . There is a randomized algorithm that in time takes as input and returns a set such that the following holds with probability . There is a (minimal) -cut of size at most satisfying:
-
1.
every vertex is connected to in ,
-
2.
,
-
3.
there is satisfying assignment for that agrees with .
Moreover, for every component of the following holds:
- resume
-
either or ,
- resume
-
if , then ,
- resume
-
if for some variable and , then ,
- resume
-
if contains some for some decided variable w.r.t. , then .
The following lemma now uses the set computed in Lemma 14 to compute a set of at most conformal cuts which contains a cut with the following property. If has a solution of size at most such that , then there is a subset with for which serves as a -approximation: more precisely, , is a solution to , and admits a satisfying assignment that agrees with . Observe that the cost of is at most . Now Lemma 7 is an immediate consequence of Lemma 15, i.e. instead of returning the set of conformal cuts, we choose one conformal cut uniformly at random and output the class assignment corresponding to . The main idea behind computing is to use the fact that we only need to consider conformal cuts that are within and this allows us to branch on which components of are reachable from (see also Property 4. in Lemma 14).
Lemma 15 ().
Let be a simple instance of -Lin() and let and with be integers. There is a randomized algorithm that takes as input and returns in time a set of at most conformal cuts (each of size at most ), such that if has a solution of size at most such that then with probability at least there is a cut with the following property: there is a partition where and , and an assignment that satisfies and agrees with .
4 Hardness of FPT-Approximation
We complement the approximation algorithm with hardness results: we prove (1) that for finite, commutative, non-trivial rings , Min--Lin() is W[1]-hard to FPT-approximate within any constant when and (2) the existence of finite commutative rings such that Min--Lin() is W[1]-hard to FPT-approximate within any constant.
Let denote an arbitrary Abelian group. An expression is an equation over if and are either variables or inverted variables with domain . We say that it is an -variable equation if it contains at most distinct variables. A cyclic group is generated by a single element and every finite cyclic group of order is isomorphic to the additive group of . Cyclic groups are the building blocks of more complex Abelian groups: the fundamental theorem of finite Abelian groups asserts that every finite Abelian group is a direct sum of cyclic groups whose orders are prime powers.
We consider the natural group-based variant Min--Lin() of the Min--Lin() problems in what follows. We first prove that Min--Lin(), with a prime, is not FPT-approximable within any constant if FPT W[1]. Our result is based on a reduction from a fundamental problem in coding theory: the Maximum Likelihood Decoding problem over with prime. Here we are given a matrix , a vector , and the goal is to find such that with minimum Hamming weight, i.e. the one that minimizes . The parameter is . Theorem 5.1 in [2] proves that for every prime , the problem is W[1]-hard to approximate within any constant factor.
Intuitively, row in is a linear equation , where are coefficients and are variables. There is a straightforward way to subdivide long equations into ternary equations: for example, if we have an equation , we can introduce auxiliary variables and write
When summing up these equations, auxiliary variables cancel out and we obtain . Using this trick, we encode the constraints implied by the row equations of as crisp ternary and unary equations. To encode the objective function, i.e. the fact that we are minimizing the Hamming weight of , we add soft equations for all . This way, breaking a soft equation corresponds to increasing the Hamming weight by . This hardness result for , with prime, can be lifted into the general case via two simple steps: algebraic manipulations allow us to show hardness for , , and this implies hardness for Min--Lin() by recalling that is a direct sum of cyclic groups of prime power order. We obtain the following due to the additive group of every ring being Abelian.
Theorem 16 ().
Let be a non-trivial finite ring. Min--Lin() is W[1]-hard to FPT-approximate within any constant factor when .
We use Theorem 16 to demonstrate that there exist finite commutative rings such that Min--Lin() is W[1]-hard to FPT-approximate within any constant factor. Let denote the 16-element polynomial ring , i.e. the ring with coefficients from and indeterminates with and factored out. An element is thus a sum , where . The idea is to express equations of length over using equations of length 2 over . We illustrate this by considering an equation over . To express it using binary equations over , we introduce a fresh variable and three equations (1) , (2) , and (3) . Summing up the first two equations, we obtain . Together with the third one, this implies . On the other hand, any assignment that satisfies can be extended as to satisfy all three binary equations. With this in mind, it is not too difficult to prove the following with the aid of Theorem 16.
Theorem 17 ().
Min--Lin() is W[1]-hard to FPT-approximate within any constant factor when , prime, and .
References
- [1] Vikraman Arvind and T. C. Vijayaraghavan. The complexity of solving linear equations over a finite ring. In Proc. 22nd Annual Symposium on Theoretical Aspects of Computer Science (STACS-2005), pages 472–484, 2005. doi:10.1007/978-3-540-31856-9_39.
- [2] Arnab Bhattacharyya, Édouard Bonnet, László Egri, Suprovat Ghoshal, Bingkai Lin, Pasin Manurangsi, and Dániel Marx. Parameterized intractability of even set and shortest vector problem. Journal of the ACM, 68(3):1–40, 2021. doi:10.1145/3444942.
- [3] Ian F. Blake. Codes over certain rings. Information and Control, 20(4):396–404, 1972. doi:10.1016/S0019-9958(72)90223-9.
- [4] Édouard Bonnet, László Egri, and Dániel Marx. Fixed-parameter approximability of Boolean MinCSPs. In Proc. 24th Annual European Symposium on Algorithms (ESA-2016), pages 18:1–18:18, 2016. doi:10.4230/LIPICS.ESA.2016.18.
- [5] Rajesh Chitnis, Marek Cygan, MohammadTaghi Hajiaghayi, and Dániel Marx. Directed subset feedback vertex set is fixed-parameter tractable. ACM Transactions on Algorithms, 11(4):1–28, 2015. doi:10.1145/2700209.
- [6] Konrad K. Dabrowski, Peter Jonsson, Sebastian Ordyniak, George Osipov, Marcin Pilipczuk, and Roohani Sharma. Parameterized complexity classification for interval constraints. In Proc. 18th International Symposium on Parameterized and Exact Computation (IPEC-2023), pages 11:1–11:19, 2023. doi:10.4230/LIPICS.IPEC.2023.11.
- [7] Konrad K. Dabrowski, Peter Jonsson, Sebastian Ordyniak, George Osipov, and Magnus Wahlström. Towards a parameterized approximation dichotomy of mincsp for linear equations over finite commutative rings. CoRR, abs/2410.09932, 2024. doi:10.48550/arXiv.2410.09932.
- [8] Konrad K. Dabrowski, Peter Jonsson, Sebastian Ordyniak, George Osipov, and Magnus Wahlström. Almost consistent systems of linear equations. In Proc. 34th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA-2023), pages 3179–3217, 2023. doi:10.1137/1.9781611977554.CH121.
- [9] Anuj Dawar, Erich Grädel, Bjarki Holm, Eryk Kopczynski, and Wied Pakusa. Definability of linear equation systems over groups and rings. Logical Methods in Computer Science, 9(4), 2013. doi:10.2168/LMCS-9(4:12)2013.
- [10] Reinhard Diestel. Graph Theory. Springer, Berlin, Heidelberg, 6th edition, 2025.
- [11] Cunsheng Ding, Dingyi Pei, and Arto Salomaa. Chinese Remainder Theorem: Applications in Computing, Coding, Cryptography. World Scientific, 1996.
- [12] Rodney G. Downey and Michael R. Fellows. Parameterized Complexity. Springer, 1999.
- [13] Eduard Eiben, Clément Rambaud, and Magnus Wahlström. On the parameterized complexity of symmetric directed multicut. In Proc. 17th International Symposium on Parameterized and Exact Computation (IPEC-2022), pages 11:1–11:17, 2022. doi:10.4230/LIPICS.IPEC.2022.11.
- [14] Andreas Emil Feldmann, Karthik C. S., Euiwoong Lee, and Pasin Manurangsi. A survey on approximation in parameterized complexity: Hardness and algorithms. Algorithms, 13(6):146, 2020. doi:10.3390/A13060146.
- [15] Jörg Flum and Martin Grohe. Parameterized Complexity Theory. Springer, 2006. doi:10.1007/3-540-29953-X.
- [16] Joseph F. Grcar. How ordinary elimination became Gaussian elimination. Historia Mathematica, 38(2):163–218, 2011.
- [17] Venkatesan Guruswami, Bingkai Lin, Xuandi Ren, Yican Sun, and Kewen Wu. Parameterized inapproximability hypothesis under exponential time hypothesis. In Proc. 56th Annual ACM Symposium on Theory of Computing (STOC-2024), pages 24–35, 2024. doi:10.1145/3618260.3649771.
- [18] Venkatesan Guruswami, Xuandi Ren, and Sai Sandeep. Baby PIH: parameterized inapproximability of MinCSP. In Proc. 39th Computational Complexity Conference (CCC-2024), pages 27:1–27:17, 2024. doi:10.4230/LIPICS.CCC.2024.27.
- [19] Johan Håstad. Some optimal inapproximability results. Journal of the ACM, 48(4):798–859, 2001. doi:10.1145/502090.502098.
- [20] Subhash Khot. On the power of unique 2-prover 1-round games. In Proc. 24th Annual ACM Symposium on Theory of Computing (STOC-2002), pages 767–775, 2002. doi:10.1145/509907.510017.
- [21] Subhash Khot and Dana Moshkovitz. Candidate hard unique game. In Proc. 48th Annual ACM Symposium on Theory of Computing (STOC-2016), pages 63–76, 2016. doi:10.1145/2897518.2897531.
- [22] Eun Jung Kim, Stefan Kratsch, Marcin Pilipczuk, and Magnus Wahlström. Flow-augmentation III: complexity dichotomy for boolean CSPs parameterized by the number of unsatisfied constraints. In Proc. 2023 ACM-SIAM Symposium on Discrete Algorithms (SODA-2023), pages 3218–3228, 2023. doi:10.1137/1.9781611977554.CH122.
- [23] Vladimir Kolmogorov, Andrei A. Krokhin, and Michal Rolínek. The complexity of general-valued CSPs. SIAM Journal on Computing, 46(3):1087–1110, 2017. doi:10.1137/16M1091836.
- [24] Stefan Kratsch and Magnus Wahlström. Representative sets and irrelevant vertices: New tools for kernelization. Journal of the ACM, 67(3):1–50, 2020. doi:10.1145/3390887.
- [25] Daniel Lokshtanov, Pranabendu Misra, M. S. Ramanujan, Saket Saurabh, and Meirav Zehavi. FPT-approximation for FPT problems. In Proc. 2021 ACM-SIAM Symposium on Discrete Algorithms (SODA-2021), pages 199–218, 2021. doi:10.1137/1.9781611976465.14.
- [26] Daniel Lokshtanov, M. S. Ramanujan, Saket Saurab, and Meirav Zehavi. Parameterized complexity and approximability of directed odd cycle transversal. In Proc. 40th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA-2020), pages 2181–2200, 2020. doi:10.1137/1.9781611975994.134.
- [27] Dániel Marx. Parameterized complexity and approximation algorithms. The Computer Journal, 51(1):60–78, 2008. doi:10.1093/COMJNL/BXM048.
- [28] Dániel Marx and Igor Razgon. Fixed-parameter tractability of multicut parameterized by the size of the cutset. SIAM Journal on Computing, 43(2):355–388, 2014. doi:10.1137/110855247.
- [29] Rolf Niedermeier. Invitation to Fixed-Parameter Algorithms. Oxford University Press, 2006. doi:10.1093/ACPROF:OSO/9780198566076.001.0001.
- [30] George Osipov, Marcin Pilipczuk, and Magnus Wahlström. Parameterized complexity of MinCSP over the point algebra. In Proc. 32nd Annual European Symposium on Algorithms (ESA-2024), volume 308, pages 93:1–93:15, 2024. doi:10.4230/LIPICS.ESA.2024.93.
- [31] George Osipov and Magnus Wahlström. Parameterized complexity of equality MinCSP. In Proc. 31st Annual European Symposium on Algorithms (ESA-2023), pages 86:1–86:17, 2023. doi:10.4230/LIPICS.ESA.2023.86.
- [32] Prasad Raghavendra. Optimal algorithms and inapproximability results for every CSP? In Proc. 40th Annual ACM Symposium on Theory of Computing (STOC-2008), pages 245–254, 2008. doi:10.1145/1374376.1374414.
- [33] Song Yan. Number Theory for Computing. Springer, 2002.
