The study of approximation algorithms asks the question, "Given some NPhard optimization problem P, what is the smallest multiplicative error to which we can approximate the optimal values of instances of P using a polynomial time algorithm?" For some problems, the error can be made arbitrarily small, while for others, there is a fundamental limit beyond which any better approximation could be used to solve the problem exactly, which is impossible unless P = NP. In some cases it is known exactly what this limit is, while in others it is still open.
In this thesis we ask the same question, but with the additional requirement that the algorithm must be definable in fixed point logic with counting (FPC). Roughly, an algorithm is definable in FPC if it respects the natural symmetries of its input, without making any arbitrary choices that break those symmetries. (The formal connection between polynomial time algorithms, FPC and symmetry is discussed in greater detail in Section 2.2.)
In a recent paper, Atserias and Dawar [1] give the first (to the author's knowledge) FPC-inapproximability results, showing that the problems 3XOR, 3SAT, VertexCover and LabelCover cannot be approximated closer than within specific constant factors in FPC. We extend this work to consider a broad class of problems, called constraint satisfaction problems (CSPs).
Using a reduction from the UniqueGames problem to an arbitrary CSP Λ, Raghavendra [2] shows that, assuming P = NP and the Unique Games Conjecture, the best polynomial time approximation algorithm for Λ is given by solving and rounding a specific semidefinite programming relaxation. In Chapter 3 we argue, firstly, that this algorithm is definable in FPC, and secondly, that the reduction from UniqueGames is definable in FPC. Together, these two facts imply an analogue of Raghavendra's result for algorithms that are definable in FPC, holding without the assumption that P = NP (Theorems 3.2.2 and 3.3.3).
However, the result still depends on an FPC-version of the Unique Games Conjecture (Conjecture 3.3.2). While we are not able to prove this conjecture, we do make some partial progress. In Chapter 4 we present a series of CFIconstructions 1 culminating in the following result (Theorem 4.4.7): for all α > 0, there exists a positive integer q = poly( 1 α ) such that there is no FPCdefinable α-approximation algorithm for UniqueGames on a label set of size q.
We assume that the reader is familiar with basic complexity theory, linear algebra, group theory and notation from graph theory. All graphs we consider are undirected, but may contain multiple edges between a pair of vertices and/or loops from a vertex to itself. A graph is simple if it has no multiple edges or self-loops. We also assume an intuitive understanding of the meaning of sentences and formulas of first order logic.
An instance of a constraint satisfaction problem (CSP) is specified by a set of variables taking values in some fixed, finite domain and a set of constraints between certain subsets of variables. The objective is to assign values to the variables to satisfy a maximum number of constraints, or, in a related weighted version, to satisfy a set of constraints of maximum total weight.
The complexity of a CSP is determined by the size of the domain and the kinds of constraints which are allowed. For example, suppose the domain has size 3, and each constraint specifies that a certain pair of variables must not take the same value. Thinking of the constraints as edges in a graph, determining whether all constraints can be satisfied is the 3-Colourability problem, which is NP-complete. If, instead, the domain has size 2, then satisfying all constraints amounts to checking whether the graph is bipartite, which is in P. However, satisfying a maximum number of constraints when it is impossible to satisfy all of them is still NP-hard; this is the same as the MaxCut problem, where we have to partition the vertices of a graph into two sets such that a maximum number of edges are cut by the partition. We have a similar situation if the set of values is a finite field and the constraints are linear equations involving any number of variables: determining whether all constraints can be satisfied is solvable in polynomial time via Gaussian elimination, though satisfying the maximum number of constraints when the system is inconsistent is NP-hard.
Since finding the exact optimal value is NP-hard for almost any interesting CSP, the next logical question is, is it possible to efficiently approximate the optimal value? For 0 ≤ α ≤ 1, an α-approximation algorithm for a CSP Λ is a polynomial time algorithm that, given an instance of Λ with optimal value x * , returns a value x such that αx * ≤ x ≤ x * . Usually, an α-approximation algorithm works by finding a specific assignment of variables f and returning the number of constraints it satisfies; the hard part is in proving that there is no alternative assignment that beats f by more than a factor of 1 α . The constant α is called the approximation ratio attained by the algorithm.
For example, there is a greedy 1 2 -approximation algorithm for MaxCut by Sahni and Gonzalez [4] which iteratively places vertices, in arbitrary order, on the side of the partition that maximizes the number of cut edges between the new vertex and the already-placed vertices. At each step, at least half of the new edges are cut, for otherwise the new vertex should have been placed on the other side. So by the end, if there are m edges, at least m 2 edges are cut, i.e., the returned value of the cut x must satisfy m 2 ≤ x. If x * denotes the maximum number of edges that can be cut, then x * ≤ m, so
and thus we have a 1 2 -approximation algorithm.
The analysis of the Sahni-Gonzalez algorithm reveals an important point about how one often thinks about approximately "solving" a constraint satisfaction problem. This proof shows us that, instead of returning x, the algorithm could have instead just returned the value E 2 . The greedy algorithm serves as nothing more than a proof of existence of such a cut, and actually carrying out this computation does not yield a better approximation ratio in the worst case. Intuitively, we expect that any reasonable algorithm for approximating a CSP should return not just the number of constraints satisfied, but also an assignment of values to variables which satisfies that many constraints. However, from a purely theoretical standpoint, this is unnecessary, and it is important to keep this in mind for Chapter 3 when we consider a setting where it is impossible to compute such an assignment.
Semidefinite programming is an extremely powerful tool in the design of approximation algorithms. It is a generalization of linear programming which allows for certain kinds of nonlinear constraints, yet it is still solvable in polynomial time up to arbitrary precision. A semidefinite program (SDP) is specified by an n × n objective matrix C, a collection of n × n constraint matrices {A k } k∈[m] and a collection of corresponding constraint bounds {b k } k∈ [m] . All numbers and matrices are Q-valued. Given such an SDP, a feasible solution is an n × n matrix X such that, for all k ∈ [m], A k , X := i∈[n] j∈ [n] A i,j X i,j ≤ b k , and, additionally, X is semidefinite, written X 0. There are many equivalent definitions of semidefiniteness [5, App. A] ; the most useful one for our purposes is that X 0 if there exists an n×n matrix B such that X = B B. An SDP is feasible if the set of feasible solutions is nonempty, and bounded if the set of feasible solutions is bounded. The objective is to find a feasible solution X that maximizes the value of C, X .
A paradigm in the design of approximation algorithms is to define a semidefinite program whose variables represent the variables of the input CSP instance, with the objective matrix capturing the quantity to be maximized in the problem. It is usually straightforward to write the constraints of the SDP so that an integral solution satisfying all of the constraints represents a valid solution to the CSP. However, after solving the SDP, we may get a solution with variables taking non-integral values, so the optimal SDP value may be larger than the value of the optimal integral solution. Thus, the final step is to "round" the variables to integers, preserving feasibility without reducing the objective value too much. The approximation ratio attained by such an algorithm depends crucially on the analysis of the rounding step.
The canonical example of this technique is in the Goemans-Williamson algorithm for approximating MaxCut [6] . In the algorithm, a cut in an n-vertex graph is thought of as an assignment of ±1 to each of n variables v 1 ,v 2 , . . . ,v n , each representing one of the vertices, where the variables assigned 1 represent one side of the cut and the variables assigned −1 represent the other side. If an edge between vertex i and vertex j crosses the cut, then v i v j = −1, so 1 − v i v j = 2. If such an edge does not cross the cut, we instead have 1 − v i v j = 0. Therefore, the objective can be written as follows, where w i,j is the weight of the edge between vertex i and vertex j (so each w i,j ∈ {0, 1} for an unweighted graph):
This is a quadratic integer program, so there are no known efficient algorithms to compute an optimal assignment. Instead, the Goemans-Williamson algorithm solves the following relaxation, where v i and v j are vectors that are allowed to take on values in the unit sphere S n−1 :
By defining variables X i,j := v i , v j , this maximization problem becomes an SDP, since the constraint that v i ∈ S n−1 can be written as the pair of linear constraints X i,i ≤ 1 and X i,i ≥ 1, while X 0 if and only if X = B B for some B, which happens if and only if each X i,j is the inner product of column i of B with column j of B-thus the v i vectors are precisely the columns of B.
The first step is to solve this SDP, which can be done in polynomial time via various different algorithms [7] . Given a solution X = B B, the next step is to extract the matrix B. This can be accomplished efficiently via an algorithm known as incomplete Choleski decomposition [8, Alg. 4.2.2] . The vectors v 1 ,v 2 , . . . ,v n , which are the columns of B, define an embedding of the input graph into n-dimensional Euclidean space. The final cut is then obtained by splitting these points by a random hyperplane through the origin: choose a random h ∈ S n−1 and define one side of the cut to be all vertices i such that h, v i ≥ 0. Leveraging the geometry behind this algorithm, one can compute that the expected value of the cut is at least
Since the value of the optimal cut is at most the optimal SDP value,
this gives an (α GW −δ)-approximation algorithm for any δ > 0, where the −δ comes from the fact that we cannot solve SDPs exactly, but can solve them up to any arbitrarily small error. (Technically, it is a randomized approximation algorithm, though it was subsequently derandomized [9] .)
The Goemans-Williamson algorithm was the first improvement from the trivial 1 2 -approximation algorithm of Sahni and Gonzalez in 19 years, and remains the best known approximation algorithm for MaxCut to date. One might naturally ask, is there any better polynomial time algorithm, achieving an even greater approximation ratio than α GW ? Unconditionally answering such a question in the negative is hopeless since we cannot even rule out the existence of an efficient algorithm solving MaxCut exactly. Until the P vs. NP question is resolved, the best we can hope for is a guarantee that an algorithm is the optimal polynomial time approximation algorithm assuming P = NP.
The standard technique for showing such so-called inapproximability results for a maximization problem Λ is to show that the following gap problem, written Gap c,s Λ for 0 < s ≤ c (borrowing notation from [10] ), is hard: given an instance I of Λ in which either (1) the optimal value of I is at least c, or (2) the optimal value of I is less than s, decide which of the two cases (1) or (2) holds. Suppose there existed an s c -approximation algorithm A for Λ. Then, given an instance I of Λ, we can run A to compute the approximate value x. Since x is the value of some solution, if x ≥ s we know we are not in case (2), so we must be in case (1) . Otherwise, if x < s, we know that the optimal value is at most c s x < c s s = c, so we cannot be in case (1) , and hence must be in case (2) . Thus, we can use A to decide the gap problem in polynomial time, so if deciding the gap problem is NP-hard, then there does not exist an α-approximation algorithm for any α ≥ s c unless P = NP. The ratio s c is called the gap ratio.
The most famous result of this kind is the PCP Theorem [11, Chapter 11] , which gives a reduction from 3SAT to Gap 1,s 3SAT, mapping satisfiable formulas to satisfiable formulas, and unsatisfiable formulas to formulas in which no more than an s fraction of clauses can be simultaneously satisfied, for a universal constant s < 1. Further such gap-preserving reductions have been discovered from that gap problem to other gap problems, implying many useful inapproximability bounds [10, Sec. 2.3] . Some of these bounds are tight in the sense that there are known algorithms attaining those bounds, while for other problems, there is still a gap in our knowledge.
A central research question in the study of approximation algorithms concerns the approximability of a certain constraint satisfaction problem, called UniqueGames. For any positive integer q, UG(q) is the unweighted CSP where the domain has size q and constraints may be imposed between pairs of variables such that the value of one variable uniquely determines the value of the other. It is often convenient to think of UniqueGames instances as being defined on some graph G, where the vertices represent variables and each edge {u, v} ∈ E(G) has a permutation π u,v on the label set [q] defining which labels for vertex u correspond to which labels for vertex v. The goal is to label the vertices with elements from [q] to be consistent with a maximum number of permutations. For example, Figure 2 .1 shows a UG(2) instance with edge permutations written in cycle notation, along with one of the optimal vertex labelings, satisfying 3 4 of the constraints. The uniqueness property of the constraints makes it easy to determine whether an instance is completely satisfiable. Just pick any vertex and enumerate all of the k possible labels for it. For each label, inductively derive the unique labels of neighbouring vertices, until labels for the entire graph have been determined. The instance is completely satisfiable if and only if some initial choice of label for the first vertex makes all edges consistent with the derived labels. If the graph is disconnected, then repeat this algorithm for each connected component.
However, when the input instance is not completely satisfiable, there are no known good algorithms for approximating the maximal fraction of simultaneously satisfiable constraints. Indeed, it has been shown that for any δ > 0, there exists a q such that Gap 1 2 ,δ UG(q) is NP-hard [12, Theorem I.5]. As a consequence, for a sufficiently large label set, it is impossible to approximate UniqueGames to within any constant factor. The Unique Games Conjecture (UGC) is a strengthening of this statement: Conjecture 2.1.1 (Unique Games Conjecture). For all ε, δ > 0, there exists a positive integer q such that deciding Gap 1−ε,δ UG(q) is NP-hard. In other words, for a large enough label set, it is NP-hard to distinguish instances in which at least 1 − ε constraints can be satisfied from instances in which less than δ constraints can be satisfied.
Unlike the other central open problems in complexity theory, UGC is a conjecture built upon another conjecture. It is not claiming that it is "impossible" to solve the UniqueGames gap problem; rather, that it is NP-hard. Thus, even if the UGC is proven, one will still not be able to make any unconditional claims about the nonexistence of algorithms until P = NP is proved as well. This is one reason it is believed that the UGC will be resolved sooner than other longstanding open questions.
If it is true (as most researchers suspect), many other inapproximability results would immediately follow. Khot, Kindler, Mossel and O'Donnell [13] show that, assuming the UGC, it is NP-hard to approximate MaxCut to within any factor greater than α GW . In other words, this seemingly arbitrary constant obtained by the geometric analysis of the Goemans-Williamson algorithm is, in fact, the optimal approximation ratio, a fundamental constant for the MaxCut problem. Subsequently, Raghavendra [2] discovered a general explanation for this surprising fact, proving that, for every CSP, there is a polynomial time SDP-based algorithm that gives the optimal approximation ratio assuming the UGC (and P = NP).
In Chapter 4 we consider a special subclass of UniqueGames instances which we call GroupUniqueGames instances. These are instances with the following additional properties:
(1) The set of labels is identified with a finite Abelian group A.
(2) For every edge permutation π, there is some g ∈ A such that π(x) = g + x (we always write the group operation additively). Thus, we can identify the set of edge permutations with A as well.
By restricting the UG optimization problem in this way, one might hope that it is easier to solve. However, it turns out that the problem Max2Lin(q), in which A = Z/qZ, is just as hard as the general UG problem in the sense that there is a gap-preserving reduction from UG(k) to Max2Lin(q) [13] for arbitrary k and q. This reduction implies that, by replacing UG(k) by Max2Lin(k)
we get a conjecture which is logically equivalent to the UGC.
This thesis concerns approximating CSPs not with polynomial time algorithms but with sentences of logic. What does this mean? It turns out that there is a natural way in which a description of a computational problem in a formal logic can be translated into an algorithm for solving it. Conversely, algorithms for solving problems can, in many cases, be translated back into logical sentences describing the problem being solved. Under this correspondence, the resources used by the algorithm (time, space, nondeterminism, etc.) correspond to the operators which are allowed by the logic (different kinds of quantifiers, inductive definitions, etc.). The study of this correspondence is known as descriptive complexity, a more detailed and complete discussion of which is the topic of several books; see [14] , for example. Here we only give a brief introduction to the ideas and notation of descriptive complexity that are needed for this thesis.
Sentences of logic and the structures whose properties they describe are all defined with respect to a vocabulary, or signature, which enumerates special symbols that are necessary to talk about a given problem. All vocabularies we consider are relational, meaning the only special symbols allowed are for relations (no function or constant symbols). A relational vocabulary τ takes the form
where a i is the arity of relation symbol R i (the arity is sometimes dropped when obvious from context). A τ -structure consists of a nonempty set, called its universe, together with relations instantiating, or interpreting, as it is commonly called, the symbols of the signature τ . To make a programming analogy, if a vocabulary τ is a type, then a τ -structure is a term of that type. A τ -structure A with universe A is written as
For example, the vocabulary of graphs, τ graph , consists of a single binary relation, E 2 . A graph can be encoded as a τ graph -structure G = V, E G in which the universe V is the set of vertices and the edge relation symbol E is interpreted by a symmetric relation E G consisting of all the edges.
The fundamental question asked in descriptive complexity is, given some vocabulary τ and some decision problem P concerning τ -structures, what logic is needed to express P? For example, the problem of deciding whether a graph is 2-regular (meaning all vertices have exactly 2 neighbours) is expressible in first order (FO) logic, by the sentence
Any property expressible in FO logic can be decided in polynomial time (as a function of the size of the universe of the input structure), but it is not the case that any polynomial time decidable property is expressible in FO logic-for example, there is no sentence of FO logic expressing the property that a graph is connected. It is therefore said that FO logic does not capture the complexity class P. Thus, several extensions to FO logic have been proposed. LFP is an extension of FO logic allowing for relational variables to be defined inductively, in such a way that LFP-definable properties can still be computed in polynomial time (see [14, Chapter 4] ). If we assume that the input structure is ordered, meaning that the vocabulary comes with a binary relation "≤" interpreted as a total order on the universe, then LFP captures P. This important result is known as the Immerman-Vardi Theorem [15, 16] .
Over unordered structures, however, LFP is not even able to express the simple property that the input structure has an even number of elements in its universe. For this, we can augment LFP with the ability to quantify over numeric variables (taking values from 0 up to the size of the input), along with counting quantifiers, which assert that a certain number of objects satisfy a certain predicate (see [14, Sec. 12.3] ). The resulting logic is called fixed point logic with counting (FPC). While FPC-definable properties are decidable in polynomial time, FPC still does not capture P, but counterexamples are highly nontrivial. Nevertheless, a wide range of powerful algorithmic techniques, including linear and semidefinite programming, are expressible in FPC, making it an important logic to study.
Since the order of the elements assumed by the Immerman-Vardi theorem can be completely arbitrary, the only power gained from assuming an order relation is the ability to repeatedly choose arbitrary elements. In the absence of an ordering relation, indistinguishable elements must be treated equally. Thus, FPC encapsulates the idea of symmetric computation. Polynomial time algorithms correspond to FPC sentences only if they do not make arbitrary, symmetry-breaking choices. A non-example is solving systems of linear equations over finite fields. The standard algorithm for this problem is Gaussian elimination, which requires one repeatedly choose a pivot. In the presence of an ordering of the rows and columns of a matrix, one can choose the nonzero entry in the least column of the ordering, breaking ties by choosing the least row. Without an order, any such choice would break the symmetry of the input problem, so the only thing a symmetric algorithm could do is to try all possible pivots at each iteration, which would take an exponential amount of time. Indeed, it has been shown that solving systems of linear equations (over finite fields) is not definable in FPC [17] . It is difficult to rigorously define exactly what is meant by "symmetry breaking," though hopefully the intuition is clear. Anderson and Dawar [18] give a precise instantiation of this meta-observation defined in terms of symmetric circuits.
To represent an unweighted CSP as a relational structure, we use a vocabulary consisting of relation symbols P 1 ,P 2 , . . . ,P m , one for each kind of constraint of the problem. An instance A = A, P A 1 , P A 2 , . . . , P A m has a universe A consisting of the set of variables, where each P A i defines the set of tuples of variables to which the constraint P i is applied. For example, in 3SAT, there are m = 8 different kinds of constraints (clauses), all of arity 3, where P 1 is for clauses of the form (x 1 ∨x 2 ∨x 3 ), P 2 is for clauses of the form (x 1 ∨x 2 ∨x 3 ), and so on. For UniqueGames on a label set of size q, there is one constraint P π of arity 2 for each permutation π : [q] → [q]. We call this vocabulary 1 τ UG(q) .
To represent a weighted CSP, we first have to introduce some extra machinery to deal with numbers. This definition is loosely based on the structures used by Dawar and Wang [19] to represent vectors and matrices. We can represent a natural number n as a relational structure n = ([b], B n ) in the vocabulary τ N := B, ≤ . The universe [b] has size b = log 2 (n + 1) , ≤ is a binary relation interpreted as the usual linear order on [b] (from least significant bits to most significant bits), and B is a unary relation encoding the bit representation of n, i.e., B n := {k ∈ [b] | the k th (least significant) bit of n in binary is 1}.
To represent negative integers, we add a new unary relation symbol S to τ N to obtain a new vocabulary τ Z , where n is positive if and only if S n = ∅. To represent rational numbers, we replace B with unary relation symbols N and D for the numerator and denominator (which act in the same way as B) to obtain a new vocabulary τ Q .
Let Λ be a CSP. To represent a weighted instance of Λ, we have to combine variables and numbers together. That is, we use what is known as a two-sorted universe, in which there are two different kinds of elements, in this case a variable sort T and a number sort [b], where b := log 2 (1 + (max numerator or denominator of any constraint weight)) .
The vocabulary τ Λ consists of the usual order relation ≤ which is interpreted by the instance A as a total order on [b] and relation symbols N i , D i and S i of arity r i + 1 for each constraint type i of arity r i , where N i is interpreted as
| the k th bit of the numerator of the weight of constraint i applied to tuple x in binary is 1},
is empty if and only if the weight of constraint i applied to x is negative. Having negative weights allows us to consider minimization problems as well as maximization problems, matching the framework for CSPs developed by Raghavendra [2] ; the objective is always to maximize the total weight. Note that the order relation is only imposed on the bit positions, not the variables, so we can still represent unordered structures without breaking symmetry.
For reference, Table 2 .1 lists several important signatures used throughout this thesis. The last two signatures, τ mat and τ SDP , are introduced in Section 3.1. In all cases, ≤ 2 is interpreted as an order on bit positions only, not on variables or abstract indices.
Used to represent 
To show that a property P is definable in FPC, we just need to exhibit a single FPC sentence φ and prove that a structure A satisfies φ (written A |= φ) if and only if A has property P. Showing that a property is not definable in FPC is trickier, since we must argue that no such sentence works. The standard proof technique is to assume, for the sake of contradiction, that there was such a sentence φ defining P. Then there exists a k such that φ can be translated into C k , the fragment of infinitary FO logic with counting quantifiers consisting of (possibly infinite) sentences with only k variables [20] . We denote the minimum such k by µ(φ). To show the contradiction, we construct a pair of structures A = A k and B = B k such that A has property P but B does not, yet any sentence of C k cannot distinguish A from B, in the sense that A satisfies any C k sentence if and only if B does. When this is the case, we write A ≡ C k B.
There is a useful characterization of the relation ≡ C k in terms of a game between two players, Spoiler and Duplicator, called the k-pebble bijective game. The board on which they play consists of the universe A of structure A and the the universe B of structure B. Spoiler's objective is to prove that the structures are different, while Duplicator's objective is to pretend that they are the same. There are k pairs of pebbles, initially not placed anywhere. Throughout the game, the pairs of pebbles will be placed on elements of the two universes, one pebble in each universe. Each round of the game consists of three parts:
(1) Spoiler picks up one of the k pairs of pebbles, removing them from the board.
(2) Duplicator gives a bijection f : A → B such that, for all 1 ≤ i ≤ k, if the i th pebble pair is placed on some pair of elements
(3) Spoiler places the pebbles back down, placing one pebble on some a ∈ A and the other pebble on f (a) ∈ B.
At the end of a round, Spoiler wins if the map sending each pebbled element in A to its correspondingly-pebbled element in B is not a partial isomorphism between the two structures, i.e., there is some relation in one of the two structures that holds of a set of pebbled elements, but the corresponding relation does not hold in the other structure of the correspondingly-pebbled elements. If Spoiler is unable to win the game in any finite number of moves, then Duplicator wins. So, to show that two structures are indistinguishable, and thus that φ does not express P, we just need to present a winning strategy for Duplicator.
So far we have only discussed sentences of logic acting as algorithms for decision problems. If a logical sentence corresponds to a Turing machine, then whether a structure satisfies the sentence corresponds to whether the Turing machine accepts the encoding of that structure. For some applications, however, it is useful to consider Turing machines which output something more complicated than "accept" or "reject." The logical analogue of such a machine is called an interpretation.
To construct an interpretation Θ, suppose we are given an input structure A in some signature σ, and wish to define the output B = Θ(A) in some potentially different signature τ . First we must define the universe of B in terms of the universe of A. This can be done by taking the universe of B to be the set of d-tuples of elements of A satisfying some FPC formula of d free variables, written in the vocabulary σ. By choosing d large enough, we can define universes of size up to n d , where n is the size of the input structure. Next, we must define each relation symbol appearing in τ . For a symbol R i of arity a i , we must define on which a i -tuples of elements of B, i.e., a i -tuples of d-tuples of elements of A, the relation R B i holds. This can be accomplished via a FPC formula of da i free variables, again written in the vocabulary σ, where we take the relation to hold if and only if the formula is satisfied.
Thus, a d-ary FPC-interpretation of τ in σ is defined by a finite sequence of FPC formulas in the vocabulary σ, as outlined above [1, Sec. 2.2] . For an interpretation Θ, we define µ(Θ) to be the maximum value of µ(φ) for any formula φ of Θ.
Just as polynomial time reductions can be used to transfer computational hardness results from one problem to another, interpretations can transfer logical inexpressibility results from one problem to another: if some property P of σ-structures is not definable in FPC, and there is an interpretation Θ of τ in σ such that a σ-structure A has property P if and only if the τ -structure Θ(A) has property P , then P is not definable in FPC either.
Interpretations also give us a useful way to define what it means to "solve" an optimization problem. Recall that, for a CSP Λ, τ Λ is the vocabulary of weighted instances of Λ, and τ Q is the vocabulary of rational numbers. By an FPC-definable algorithm for Λ we mean an interpretation Θ of τ Q in τ Λ such that, for any τ Λ -structure A, the optimal value of A is equal to Θ(A).
We are interested not just in solving CSPs exactly in FPC, but in approximating them. Bringing together our earlier definitions of FPC-definable algorithm and approximation algorithm, we say that, for a CSP Λ and for
In a recent paper, Atserias and Dawar [1] prove the first (to the author's knowledge) inapproximability result for FPC. Their main construction is a pair of 3XOR instances (like 3SAT except with XORs in place of ORs between literals) A k and B k , for any k, such that A k is completely satisfiable, B k is only 1 2 + δ satisfiable (for arbitrarily small δ), but A k ≡ C k B k . As a consequence, there is no FPC-definable α-approximation algorithm for α > 1 2 , for if there was such an FPC-interpretation Θ, if we let δ be such that 1 2 + δ < α and let k := µ(Θ), we would necessarily have Θ(A k ) = Θ(B k ), which contradicts the requirements that Θ(A k ) ≥ αn and Θ(B k ) ≤ ( 1 2 + δ)n (where n is the total number of constraints). This is analogous to showing that a gap problem is hard-in this case, s = 1 2 + δ and c = 1, so the gap ratio is ( 1 2 + δ)/1 = 1 2 + δ. Atserias and Dawar then show that several existing gap-preserving reductions from 3XOR to other problems could be cast as FPC-interpretations, resulting in FPC inapproximability bounds for 3SAT, VertexCover and LabelCover.
Approximating constraint satisfaction problems in FPC In this section we prove an FPC-analogue of Raghavendra's result [2] that, assuming the UGC, the optimal approximation algorithm for any CSP is obtained by rounding a specific SDP relaxation. The proof consists of verifying, firstly, that Raghavendra's general polynomial time algorithm is definable as an FPC-interpretation of τ Q in τ Λ , and secondly, that Raghavendra's reduction from UniqueGames to Λ is definable as an FPC-interpretation of τ Λ in τ UG(q) . We begin by discussing the special case of MaxCut.
To translate the Goemans-Williamson algorithm into an FPC-interpretation, we must first understand how to translate its core subroutine: solving a semidefinite program. This is studied by Dawar and Wang [19] , who define a vocabulary τ SDP for SDP instances and an FPC-interpretation which approximately solves them. Like the vocabulary τ Λ for weighted CSPs, SDPs are defined over a multi-sorted universe, with an unordered sort for indexing the rows and columns of matrices, another unordered sort for indexing the constraints and, finally, an ordered sort for representing numbers in binary. There are 10 relation symbols,
encoding the constraint matrices {A k }, corresponding constraint vectors {b k } and objective matrix C. The X relations encode the numerators, the D relations encode denominators, and the S relations encode signs. For example, if a tuple (k, i, j, m) is in the relation D A A it means that, in the k th constraint matrix of SDP A, the m th bit of the numerator of the entry at row i, column j is a 1. If the unary relation S A C (i, j, ·) is nonempty, it means that the entry of the objective matrix of A at row i, column j is negative. As usual, ≤ encodes the total order on the bit sort.
The output of an SDP solver is the matrix of optimal variable values, which is encoded in the vocabulary
similarly as in the encoding of C.
Theorem 3.1.1 (Dawar and Wang [19] ). There is an FPC-interpretation Φ of τ mat in τ SDP∪ τ Q such that, given a bounded and feasible SDP A (encoded as a τ SDP -structure) and some δ > 0 (encoded as a τ Q -structure), Φ(A, δ) encodes a matrix X which is within δ of a feasible solution to A (e.g., in the L 2 -norm), and has value within δ of an optimal solution.
Notice how it is crucial that the index sets are unordered. If the entire universe was ordered, then the statement would follow immediately from the Immerman-Vardi Theorem, but would be useless. For example, in the SDP for MaxCut, the rows and columns of the matrices, as well as the linear constraints, correspond to vertices. If there was a relation symbol in τ SDP which must encode the order on these rows, columns and constraints, then, to define the SDP from the MaxCut instance we would have to define that order, which is impossible if the vertices are not ordered to begin with. Since there is no such order on the index and constraint sorts, we may simply define the row sort to be the vertex set, and so on.
Setting up the rest of the MaxCut SDP is easy, but tedious, so here we just go through one example. Consider the task of defining the relations X C and D C . Recalling the SDP for MaxCut defined in Section 2.1.1, for i < j, the coefficient in row i, column j of the objective matrix is − 1 2 w ij . Thus, an arbitrary entry (i, j, m) is in the relation X C (respectively, D C ) if and only if the m th bit of the numerator (respectively, denominator) of − 1 2 w ij is a 1. Recall that, in the encoding for MaxCut instances, the weights are encoded as ternary relations N 1 and D 1 expressing the numerator and denominator in binary. Since multiplying by 1 2 is the same as shifting the bits of the denominator up by 1, we may define X C (i, j, m) to be true if and only if
is true. In this case, both (3.1) and (3.2) are FO formulas; all that we require is that they be FPC formulas. More complicated arithmetical operations can be translated into FPC formulas as well [22, Sec. 3.3] , so we ignore these details hereafter.
Thus, we have an interpretation of τ SDP in τ MaxCut , which we can compose with the interpretation Φ from Theorem 3.1.1 to obtain an approximately optimal solution matrix X. The next steps of the Goemans-Williamson algorithm are to find a matrix B such that X = B B and pick a random hyperplane h. From h and B, we would then be able to define the two sets of the cut, and from that, the value of the cut. The first difficulty is that the incomplete Choleski decomposition algorithm for extracting B contains symmetry-breaking steps, as it is similar to Gaussian elimination. The difficulty runs even deeper though. In fact, the whole approach to these latter steps of the algorithm is unattainable in FPC, since merely defining a cut at some intermediate step would break symmetry. For instance, if the input is a set of size 2n containing edges of nonzero weight only between n disjoint pairs of vertices, then there are 2 n optimal cuts in the graph with automorphisms taking any one to any other. Since FPC-interpretations must respect automorphisms of the input structure, if some sentence of FPC was able to select one of these cuts, it would have to simultaneously select all of them. This is impossible, since the output of an FPC-interpretation necessarily has polynomial size.
Therefore, we must compute the optimal value without ever computing a specific cut, or even computing a specific valid matrix B, for that matter. While we may not be able to compute in FPC the exact value returned by the algorithm, we can at least use Goemans' and Williamson's analysis to bound it. As mentioned in Section 2.1.1, the expected value of the cut returned by the algorithm is at least
Fortunately, this quantity is definable in FPC, since we have already constructed FPC definitions for w i,j (part of the input) and X i,j (coming from the interpretation Φ of Theorem 3.1.1). The rest is just simple arithmetic, so each bit can be defined by an FPC formula.
Thus, we have shown the following result, which completely parallels Goemans' and Williamson's result for polynomial time computation.
The −ε factor comes from the fact that, in applying Theorem 3.1.1, we cannot solve the SDP exactly, but only up to an additive δ. By choosing δ sufficiently small, we can ensure by continuity that the approximation ratio is at least α GW − ε.
The translation into FPC of Raghavendra's [2] general approximation algorithm for any CSP is similar in essence to that of MaxCut. We first define an SDP from a given instance, then apply Theorem 3. . For any constraint P ∈ P, let V(P ) denote the set of variables appearing in constraint P , and weight I (P ) denote the weight of that constraint. The variables of the SDP consist of a set of (q · |V|)dimensional vectors,
and a set of probability distributions over local assignments of variables within each constraint,
That is, each µ P variable is a distribution over [q] V(P ) . The LC relaxation 1 is as follows:
Raghavendra's original LC relaxation looks slightly different because it is written using a more general notation, in which constraints are arbitrary "payoff" functions from assignments to values in [−1, 1]. The SDP written here is what results when constraints are merely "satisfied" or "unsatisfied," with satisfied constraints yielding payoffs equal to their weights.
At first, the LC relaxation may look like an ordinary quadratic program, yet it is implicitly an SDP. To show that Raghavendra's algorithm can be defined in FPC, however, we have to put this SDP into the explicit form required by Theorem 3.1.1.
First observe that the probability distributions µ P can be defined as sets of numbers
summing to 1. Thus, we may rewrite the LC relaxation as:
µ P (f ) = 1 ∀P ∈ P
Since there are two kinds of variables, vectors and scalars, we take the variable matrix X to be block-diagonal, where the first block has rows and columns indexed by V × [q], with X (i,a),(j,b) representing the inner product b i,a , b j,b . The second block is indexed by P ∈P [q] V(P ) , where each diagonal entry X (P,f ),(P,f ) represents µ P (f ) and off-diagonal entries are zero. All of the constraints can then easily be written as linear constraints on entries of X. Also, observe that X is semidefinite if and only if both blocks are. Since the second block is diagonal and all entries are nonnegative anyway, it is always semidefinite, so X is semidefinite if and only if the first block is, which happens if and only if there exist vectors b i,a for each i ∈ V, a ∈ [q], such that
Thus, we indeed have a semidefinite program.
To define an interpretation of τ SDP in τ Λ , the first step is to define the universe of the index sort in τ SDP (the bit sort and constraint sort universes must be defined as well, but they are much easier, so we ignore them) in terms of the universe of τ Λ , which is V. As described in the previous paragraph, the universe of the index sort must represent
Let P 1 ,P 2 , . . . ,P m be the constraint types and let k be the maximum arity of any constraint (recall that there are only finitely many constraint types allowed, so k and m are universal constants for the problem Λ, and do not depend on the instance at hand). Adding extra (ignored) variables to the second block of the matrix, we can enlarge the index set to be
representing an index (P, f ) as (t, a 1 ,a 2 , . . . ,a k , i 1 ,i 2 , . . . ,i k ), where P is of type P t and the first set of consecutive i-variables up to the arity of P are assigned the corresponding a-values. Thus, the index sort can be constructed from q disjoint copies of V and mq k disjoint copies of V k . Since q, m and k are constants, a universe like this can be defined via FO formulas using the method of finite expansions [1, Sec. 2.2].
Similarly as with MaxCut, defining the rest of the interpretation is easy but tedious. Inspecting the LC relaxation (3.3), it is clear that all coefficients of the objective matrix, constraint matrices and constraint bounds can be defined via FO formulas and simple arithmetic, so the SDP can be defined via a FO interpretation.
After solving the SDP, Raghavendra's algorithm then proceeds to round the b i,a vectors to an integral solution [2, Theorem 5.1]. As with the Goemans-Williamson algorithm, there are many symmetry-breaking steps in this process, so we must find a different way to extract the approximately optimal value.
For any I ∈ Λ (that is, I is an instance of CSP Λ) let opt(I) denote the maximal value I, and let sdp(I) denote the maximal value of the LC relaxation of I (which may be greater). For any c ∈ R, define
As with MaxCut, we can compute the value of sdp(I) in FPC by applying Theorem 3.1.1. Using that value alone, the best approximation algorithm we can hope for would be to simply return Gap Λ (sdp(I)). If the goal is just to guarantee an approximation ratio of α for some fixed constant α which is the worst-case ratio between a and Gap Λ (a) overall all values a, then we are done, for we can just return α·sdp(I), which is computable in FPC. However, Raghavendra's rounding algorithm has a stronger performance guarantee: that it always returns a solution of value at least Gap Λ (sdp(I)−η)−η for any fixed constant η > 0. To meet this guarantee without breaking symmetry, we instead use another one of Raghavendra's results. This algorithm approximates the infimum over all instances by computing opt(I) and sdp(I) for a set of instances S of size exp(exp(poly(kq/η))). Note that k, q and η are constants that do not depend on I, so S is just a fixed, finite set of instances. So, in other words, the mapping c → Gap Λ (c) is essentially stored in a large, but finite, lookup Note that there are two sources for the ε error term, coming from the δ in Theorem 3.1.1 and the η in Theorem 3.2.1.
The performance guarantee of Raghavendra's algorithm is optimal in the following sense. Conjecture. For any CSP Λ, for all η > 0 and −1 < c ≤ 1, it is NP-hard to distinguish between instances I ∈ Λ with value at least c − η from those with value at most Gap Λ (c).
As a consequence, if we assume the UGC and P = NP, Raghavendra's algorithm gives the best possible approximation ratio of any polynomial time algorithm. Our goal is to prove an FPC-analogue of this result, so first we must define an FPC-version of the UGC. (2) if at most a δ fraction of constraints in A can be satisfied, then A |= φ. Theorem 3.3.1 is proved via a series of gap-preserving reductions from UniqueGames to Λ. We show that each of these is an FPC-reduction.
First is an elementary reduction of Khot [10, Sec. 2.4] taking as input an arbitrary UniqueGames instance and producing a new instance with approximately the same satisfiability such that the underlying graph structure is bipartite. Basically, two duplicate copies of the variable set are created, and for each constraint of the input instance between a pair of variables (u, v), we have constraints in the new instance between u in the first copy and v in the second copy, and vice versa. Next is a series of three reductions due to Khot and Regev [23, Lemmas 3.3, 3.4 and 3.6] taking as input a bipartite, possibly weighted UniqueGames instance and producing a bipartite, unweighted instance of approximately the same optimal value, with some additional useful properties in the case where the input is highly satisfiable. With the exception of Lemma 3.4, all of these reductions are "gadget reductions" which are easily implemented as FO reductions, with FO formulas defining what constraints appear and simple arithmetical operations defining their weights. Lemma 3.4 passes from a weighted to an unweighted instance by replacing weighted edges by multiple edges sharing the same constraint 2 . Inevitably, there is a slight bit of rounding error that occurs. To ensure that all vertices on the left side of the bipartite graph have the same degree (an important property used later), each vertex x on the left side is assigned an arbitrary vertex y 0 (x) of positive weight on the right side, then weights are rounded down on all edges from x besides the one to y 0 (x), and any extra edges are added to y 0 (x) in the end. Choosing y 0 (x) for each x arbitrarily clearly breaks symmetry, preventing this reduction from being translated into an FPC-interpretation. To circumvent this problem, we may simply define y 0 (x) to be the variable corresponding to x from Khot's reduction which duplicated the variable set (one can easily verify that the uniqueness of this choice is preserved by the reduction in Lemma 3.3 of [23] ).
Finally, we come to Raghavendra's reduction from UniqueGames to Λ. It is defined with respect to some fixed instance I of CSP Λ with variables taking values in [q] . The input to the reduction is an unweighted unique games instance Φ with label set [R], whose underlying graph G is bipartite, with vertex set V (G) = W Φ ∪ V Φ . The output is a verifier, which is an algorithm that randomly selects a constraint of the form allowed by Λ and returns a numeric "payoff" if the constraint is satisfied, and zero if it is not satisfied. The verifier can therefore be viewed as an instance of Λ, where the weight of a constraint is the probability it is selected by the verifier multiplied by the payoff.
The input to the verifier is an assignment F of values in [q] to every element of V Φ × [q] R . The verifier performs the following steps 3 :
(1) Pick a constraint P of I, uniformly at random 4 . Denote the variables in P by V(P ) =: {s 1 ,s 2 , . . . ,s k }.
(2) Pick a random vertex w ∈ W Φ .
(3) Independently pick k neighbours v 1 ,v 2 , . . . ,v k ∈ V Φ of w, uniformly at random (there may be duplicates).
(4) Independently generate k [q]-valued vectors of length R,z s 1 ,z s 2 , . . . ,z s k using a random procedure that depends only on the instance I and not on Φ.
(5) For each i ∈ [k], permute the components of the vectorz s i by π w,v i to obtain the vector z i := π w,v i (z s i ), then check the value of the variable
If P is satisfied by k-tuple of values obtained in step (5), return the weight of P , otherwise return 0.
One can view this verifier as an instance f (Φ) of the CSP Λ where the variable set is V Φ × [q] R . Similarly as discussed in Section 3.2, it is possible to define this universe as q R disjoint copies of V Φ in FPC. So, in order prove that the reduction Φ → f (Φ) can be realized as an FPC-interpretation, all that remains is to show that the weights of each of the constraints of f (Φ) can be defined in FPC.
The weight of an arbitrary constraint P of type t occurring on an arbitrary
The product of the first and last of these three terms is 0 if there is no such constraint P of type t occurring on those variables in I, and
weight I (P ) # of constraints in I otherwise (in which case P is unique). This is clearly definable in FPC, so all that remains is to check that the middle term is definable in FPC as well.
This can be rewritten as
P{v i is the i th vertex chosen in step (3) given w is chosen in step (2)} · P{z i is the i th vector computed in step (5) given w is chosen in step (2)
P{z i is the i th vector computed in step (5) given w is chosen in step (2)
Since the procedure in step (4) depends only on the fixed instance I and not Φ, computing the probabilities in the last line can be done by lookup, e.g., by writing out all of the cases in a long FPC sentence. Hence, this entire formula boils down to simple arithmetic and case analysis, so it can be translated into an FPC-interpretation using the methods discussed in previous sections.
Composing all of the FPC-interpretations together, we have the following result, paralleling Theorem 3.3.1. Proof. Suppose there was such a φ. As Raghavendra shows, the reduction from UniqueGames to Λ maps highly satisfiable UniqueGames instances to τ Λstructures with maximal value at least c − η, and maps highly unsatisfiable UniqueGames instances to Λ instances with maximal value at most Gap Λ (c).
As we have argued in this section, this reduction is definable as an FPCinterpretation Θ. Therefore, if we "compose" Θ with φ (replacing relation symbols in φ by their definitions as τ UG(q) -formulas according to Θ, etc.), we get an FPC sentence in vocabulary τ UG(q) violating Conjecture 3.3.2. Hence, no such φ exists.
As a consequence, if we assume the FPC-UGC, there is no better FPCdefinable approximation algorithm than that of Theorem 3.2.2.
Chapter 4
As Chapter 3 has shown, understanding the limits to which UniqueGames can be approximated in FPC is the key gap in our knowledge of definable inapproximability of CSPs. Thus, in this chapter, we examine UniqueGames in detail. The fundamental question we ask is, given some fixed integer k, to what extent can a sentence φ of FPC where µ(φ) = k separate instances of different optimal values? To build intuition, we begin by considering the simple cases where k ∈ {1, 2, 3}. We then present a novel CFI-construction proving that there is no FPC-interpretation giving the exact optimal value of a UG(4) instance. This construction is then generalized to prove the main result of this chapter (Theorem 4.4.7), that it is impossible to approximate the optimal value of a UG(q) instance to within any constant factor α in FPC (where q = poly( 1 α )).
While none of the constructions in this chapter yield stronger lower bounds on the approximability of UniqueGames than what are known for polynomial time computation, they are still valuable for two main reasons. First, the lower bounds do not rely on the assumption that P = NP, so the results are truly novel. Second, the constructions themselves are qualitatively quite different from existing UniqueGames constructions in that they exploit a particular weakness of FPC-definable algorithms: the inability to solve systems of linear equations. As such, they provide a new set of tools with which to attack Conjecture 3.3.2.
Recall from Sections 2.2.4 and 2.3 that, to establish FPC inapproximability results for a given problem, it suffices to produce, for any integer k, two instances A k and B k (for UniqueGames, these are τ UG(q) -structures, using the unweighted encoding) with very different optimal values such that Duplicator wins the k-pebble bijective game played on A k and B k .
For k = 1, this is fairly trivial. Just let A 1 and B 1 be UniqueGames instances on the same number of variables, whose underlying graphs are simple, such that A 1 is completely satisfiable and B 1 is highly unsatisfiable (such instances B 1 are easy to construct; an explicit construction is given in Appendix A).
Since the two structures have the same size, Duplicator is always able to give a bijection between their universes. No matter what bijection Duplicator chooses, Spoiler can never win, since all relations in τ UG(q) have arity 2 and there is only one pebble (and B 1 has no self-loops).
For k = 2, we must be more clever, since we now have to ensure that, when there is already one pebble pair on the board, Duplicator's bijection preserves all of the edge labels incident to the pebbled vertices. To this end, we define an operator G on GroupUniqueGames instances (defined at the end of Section 2. Given a GroupUniqueGames instance U with group A and variable set
For every equation
in the constraint set of U and every g 1 , g 2 ∈ A, we have the equation
in the constraint set of G(U ). We call G(U ) the label-lifted instance 1 of U .
The hope is that it is easier for Duplicator to win the k-pebble bijective game on G(U 1 ) and G(U 2 ) than on the original pair U 1 and U 2 , while at the same time, applying G does not change how satisfiable an instance is. Formally, for any s ∈ [0, 1], we say that an (unweighted) UniqueGames instance U is s-satisfiable if there is some assignment of variables satisfying at least an s-fraction of the constraints of U . We say that the satisfiability of U is the maximum s such that U is s-satisfiable. Proof sketch. If x v is an assignment 2 satisfying at least an s fraction of the constraints of U , then it is not too hard to see that the assignment x g v := x v +g satisfies at least an s fraction of the constraints of G(U ). For the other direction, given an assignment x g v satisfying an s-fraction of the constraints of G(U ), we argue that there exists some mapping f : V → A such that an sfraction of the constraints between the variables {x
It is then shown that the assignment 1 This construction is similar to the label-extended graph of a UniqueGames instance (see, for example, [24, 25] ), but it is not the same thing. The label extended-graph is obtained by taking all of the edges with identity constraints in the label-lifted instance. 2 We sometimes use a symbol like x v or x g v to denote a specific variable, and sometimes to denote the value assigned to that variable. When v is unspecified, as it is here, we mean a function assigning a value to each variable. Throughout this chapter, it should be clear from context which of the three meanings we intend.
We are now able to prove the FPC-UGC (Conjecture 3.3.2) in the special case where µ(φ) = 2. In fact, the result is slightly stronger because it holds even for ε = 0. 
Proof. Let δ be given, and suppose toward a contradiction that there did exist some sentence φ satisfying (1) and (2) . Let U 2 be any GroupUniqueGames defined over an underlying graph G that is simple such that U 2 is not δsatisfiable (see Appendix A). We then define U 1 to be the GroupUniqueGames instance obtained by turning all of the constraints in U 2 into identity constraints (so U 1 is completely satisfiable). We claim that G(U 1 ) ≡ C 2 G(U 2 ).
To prove this, let the variable sets of U 1 and U 2 be
so that the variable sets of G(U 1 ) and G(U 2 ) are
as in the definition of the label-lifted instance. Duplicator's strategy in the 2-pebble bijective game is to always give a bijection f : X → X (from the universe of G(U 1 ) to the universe of G(U 2 )) with the following property:
So, in any given round, Duplicator's bijection is completely determined by a map g * : V → A.
If there are no pebbles on the board when duplicator is giving a bijection, then Duplicator can choose any g * . Otherwise, suppose that one pebble pair is on x g 1 v 0 in the universe of U 1 and the corresponding pebble is on x g 2 v 0 in the universe of U 2 (it must be the same v 0 for both elements, since we may assume inductively all of Duplicator's previous bijections satisfied (4.1)). Then, for any v ∈ V , we define
anything otherwise
Note that the middle case is uniquely defined and disjoint from the first case since G has no multiple edges or self-loops. The bijection f : X → X determined by g * is valid because it respects the pebble pair which is already placed:
Suppose that Spoiler places the second pair of pebbles on some arbitrary (x g v , f (x g v )). The only way Spoiler could win at this step in the game is if there was some equation between x g v and x g 1 v 0 in G(U 1 ) with no matching equation between f (x g v ) and x g 2 v 0 , or vice versa. Such an equation can only exist in either graph if v and v 0 are neighbours, in which case g * (v) is defined according to the middle case, implying that, for any g 3 ∈ A,
Therefore, for any arbitrary group element g 4 ∈ A,
so Spoiler is unable to reveal a difference between the two structures. Since Spoiler can never win, Duplicator wins, and hence G(U 1 ) ≡ C 2 G(U 2 ). However, by Lemma 4.1.1, G(U 1 ) must satisfy φ since it is completely satisfiable, while G(U 2 ) must not satisfy φ since it is not δ-satisfiable. As µ(φ) = 2, this contradicts the fact that G(U 1 ) ≡ C 2 G(U 2 ); hence, no such sentence φ exists.
This kind of argument is used several more times throughout this chapter, with slight variation. The meta-theorem is that, for every constraint in U which is satisfied by g * , the corresponding function f is a partial isomorphism over all of the corresponding constraints in G(U ). We do not state this as a formal theorem because there are some technicalities involved when we ascribe a different meaning to the word "satisfied" in later sections.
exactly Starting at k = 3, we run into trouble in proving FPC-inapproximability bounds, due to the following fact: where µ(φ) = 3, expressing the property that a UG(q) instance (encoded as a τ UG(q) -structure) is completely satisfiable.
Proof. For each fixed label i ∈ [q], we define q unary relations U i,1 , U i,2 , . . . , U i,q , parameterized by a free variable x, by simultaneous induction:
Note that the "∃x" term creates a new variable x, different from the x in the first line (this is done purely in an effort to reduce the total number of variables). The meaning of U i,j (y) is that, given x has label i, it is implied by the constraints that y has label j. Thus, U i,i (x) is defined to be true, and whenever a constraint P π holds on a pair of elements (y, x) and we know what the label of x must be, we inductively derive what the label of y must be. We claim that the following sentence expresses the property that a UG(q) instance is completely satisfiable:
If f is a satisfying assignment, then picking i = f (x) must satisfy the formula. Conversely, if the formula is satisfied, one can obtain a satisfying assignment by picking one x from each connected component of the underlying graph and one satisfying witness i, then assigning labels to every y in that component by taking the unique j such that U i,j (y) holds. (It is not too hard to see that the component being connected implies j exists, and the formula being satisfied implies that j is unique).
Using Since LFP is a restriction of FPC, it is therefore impossible to prove a result along the lines of Theorem 4.2.1 if µ(φ) ≥ 3. However, even though it is possible to determine in FPC whether an instance is completely satisfiable, we now prove that, in the case where the input is not completely satisfiable, it is impossible to determine in FPC what the optimal value actually is. This result is, in a way, superseded by that of Section 4.4, but the construction is interesting in its own right, and serves as a motivation for the more complicated construction in the latter proof.
Fix a positive integer k. We exhibit a pair of τ UG(q) -structures, A k and B k , such that A k has a strictly greater optimal value than B k , but A k ≡ C k B k . Let H = H k be a simple graph satisfying the following four properties:
(1) H is connected.
(2) H is 3-regular.
(3) H is bipartite.
(4) The robber player wins the (k − 1)-cop edge-robber game 3 , as defined below.
The k-cop edge-robber game played on a connected graph H:
There are k cops, controlled by the cop player, which may be placed on vertices of H; and 1 robber, controlled by the robber player, which may be placed on edges of H. The robber is initially placed on an arbitrary edge in H, and the cops are initially not placed anywhere. The cop player and robber player take turns, starting with the robber player. On the robber player's turn, the robber player may move the robber along any path of edges in H that is unobstructed by a cop. On the cop player's turn, the cop player may move one cop to any vertex of the graph without restriction. The cop player wins if the cops can capture the robber on an edge {u, v}, meaning surround it with cops on both vertices u and v. The robber player wins by infinitely evading capture.
It is not too hard to show that such graphs exist; see Appendix C for details. Similarly as done by Atserias, Bulatov and Dawar [17, Lemma 3], we use the robber player's winning strategy on the (k − 1)-cop edge-robber game played on H as part of Duplicator's strategy in the k-pebble bijective game on A k and B k .
The UniqueGames instances we construct are GroupUniqueGames instances using the Klein four-group as A. For convenience, we denote the underlying set of A by {e, a, b, c} where e is the identity element. Then group addition is completely defined by the rules that
and adding any two distinct elements from {a, b, c} yields the third element.
It is well known [29] that any d-regular bipartite graph always has a perfect matching, and thus by induction, that the edge set decomposes into a disjoint union of d perfect matchings. Choose such a decomposition for H and assign each of the 3 matchings to a distinct element of the set {a, b, c}. Let m : E(H) → A be the map the sends each edge to the element of A assigned to the matching containing that edge. In other words, m labels each edge with either a, b or c such that every vertex is incident to three edges that each have a different label.
Define a GroupUniqueGames instance U 1 with group A and variable set
For every edge {v 1 , v 2 } ∈ E(H) we have two constraints:
and redefining the constraints involving that edge to be Proof. Clearly, no more than 1 2 of the constraints of U 1 can be satisfied, since the constraints come in inconsistent pairs: if one is satisfied, the other must not be satisfied. The assignment x v := e attains this bound of 1 2 by satisfying the constraint x v 1 + x v 2 = e in each pair. The claim about G(U 1 ) follows from Lemma 4.1.1. Proof sketch. This follows from a parity argument, considering how the number of satisfied constraints changes with respect to individual changes in an assignment of variables. See Appendix D for the details.
Proof. While playing the k-pebble bijective game on G(U 1 ) and G(U 2 ), Duplicator simultaneously plays the (k − 1)-cop edge-robber game on graph H, making use of the robber player's winning strategy to hide the edge where G(U 1 ) and G(U 2 ) differ. Initially, this edge is
Every time Duplicator needs to give a bijection between the two universes, Duplicator first updates the positions of the cops on H to be
Note that, since the previous round, Spoiler has placed one pebble pair down and picked up another, so there are at most k − 1 cops, at most one of which has moved from the previous turn. This constitutes a valid move of the cop player, so there must exist a winning response from the robber player. So suppose that, on the i th round, this winning strategy dictates that the robber be moved from edge r i−1 to edge r i , through a path of vertices 
Define g * (0, v) := e for all v. On every round i (the i th time Duplicator is giving a bijection), Duplicator's strategy is to set
where p j and e j are determined by the robber's move on round i as described in the previous paragraph. Note that the only vertices for which the bijection is different from the bijection in the previous round are those involving the vertices in {p 1 ,p 2 , . . . ,p }. Since the robber's move is valid, none of these vertices are occupied by a cop, and hence none of these variables are pebbled.
Thus, the bijection f i is valid (assuming inductively that the bijection from the previous round f i−1 was valid).
All that remains to prove is that Spoiler cannot expose a difference between G(U 1 ) and G(U 2 ). This follows from the following stronger claim, which we prove by induction on i: 
To see how this implies that Spoiler never wins, suppose to the contrary that there was a constraint between two pebbled elements x g 1 v 1 and x g 2 v 2 in one structure with no matching constraint between the corresponding elements in the other structure. Lemma 4.3.5 says that f i is a partial isomorphism everywhere except around the edge r i , so the only way this can happen is if {v 1 , v 2 } = r i . But this means that the cops have trapped the robber, which is a contradiction.
The full proof of Lemma 4.3.5 is rather tedious, and hence is relegated to Appendix E. Instead, let us work through a simple example where H := K 4 , the complete graph on four vertices (this graph is not bipartite, but its edge set does decompose into a disjoint union of 3 perfect matchings, which is all we actually need). The robber player has a winning strategy in the 2-cop edge-robber game on H by always moving to an edge between 2 vertices which do not have cops on them. Let us see how this strategy can be used by Duplicator to survive the first 3 rounds of the 3-pebble bijective game on G(U 1 ) and G(U 2 ), where U 1 and U 2 are the GroupUniqueGames instances depicted in Initially, the robber is on the edge r 0 = {v 3 , v 4 } ∈ E(H); this is the only edge where U 1 differs from U 2 , and hence the only place where Spoiler could potentially expose a difference between G(U 1 ) and G(U 2 ). As Spoiler is about to place its first pebble, there is no reason for the robber to move, so Duplicator gives the identity bijection, corresponding to g * (1, v) ≡ e. Suppose Spoiler places the first pebble pair on x g 1 v 1 in both instances for some g 1 ∈ A. Accordingly, Duplicator places a cop on v 1 . As there is still no movement required from the robber, Duplicator again gives the identity bijection. Now suppose Spoiler places the second pebble pair on x g 4 v 4 in both instances for some g 4 ∈ A. After Duplicator places a corresponding cop on v 4 , the win-ning strategy for the robber player requires the robber to move through v 3 to {v 2 , v 3 }, as illustrated in Figure 4 Why does Lemma 4.3.5 still hold? Let us verify that it holds for a particular pair of variables, x e v 1 and x e v 3 . The main idea is that permuting the variables involving v 3 by adding b does not change the set of equations between v 1 variables and v 3 variables, so if Lemma 4.3.5 held in round 2, it will still hold in round 3. We initially have the equations
in G(U 1 ), and correspondingly,
in which case the pair of equations between the G(U 2 ) variables becomes
which is the same set of equations as between x e v 1 and the property that at least half of the constraints of a τ UG(q) structure are satisfiable (and hence no FPC-definable algorithm returning the exact satisfiability). This holds even when restricting to GroupUniqueGames instances using the Klein four-group defined over an underlying graph that is 6-regular and bipartite.
We now generalize the construction from Section 4.3 to show that UniqueGames is inapproximable to within any constant factor in FPC. Specifically, we show a ( 1 2 , α 2 ) inapproximability gap for UG(2 m ) for arbitrarily small α, where m and are both O(log( 1 α )).
Let us begin with a high-level overview of how the construction presented in this section compares with that of Section 4.3. In that construction, the instances U 1 and U 2 use the Klein four-group, which is the additive part of F 2 2 , the 2-dimensional vector space over the finite field with 2 elements. Each pair of constraints (henceforth bundle of constraints) between each pair of vertices gives Duplicator a choice when defining the bijection f between the universes of G(U 1 ) and G(U 2 ): given the value of g * (v 1 ) there are always 2 choices of g * (v 2 ) which satisfy at least one of the constraints of the bundle between v 1 and v 2 , which is useful, since satisfying a bundle makes f locally consistent with the corresponding relations of the two structures (meaning that it preserves constraints involving v 1 and v 2 ). Furthermore, these choices can be concatenated so that there are 4 ways to satisfy at least one constraint from each bundle along a path of length 2. Since F 2 2 only has 4 elements, this means that any path of length 2 can be made locally consistent given the values of its two endpoints, i.e., Duplicator can always find a value for g * (u) satisfying the bundles between u and v 1 , and between u and v 2 , given arbitrary values for g * (v 1 ) and g * (v 2 ). The construction presented in this section replaces F 2 2 with F m 2 , with a bundle of 2 constraints between every pair of vertices, for suitably large integers 0 < < m. A key difference is that it is no longer possible to make an arbitrary path of length 2 locally consistent. However, we are able to show that there exists some r such that it is possible to make any path of length r locally consistent (see Lemma 4.4.4) . This allows Duplicator to win as long as the base graph H has suitably high girth.
Formally, we begin by fixing constants ε, γ ∈ (0, 1 2 ), e.g., they might as well just be defined as 1 4 . Let α ∈ (0, 1] be given; the goal is to show that there is no FPC-definable α-approximation algorithm for UniqueGames. First, choose a positive integer d (the degree of every vertex in H) large enough so that
(Note that (4.3) automatically follows from (4.2) for γ := 1 4 .) Next, define the integers and m to be
(where e = 2.718 . . . is the base of the natural logarithm)
Note that the logarithm in (4.5) is well-defined because of (4.3) and the fact that γ < 1 2 . Finally, define the integer r to be r := m ln(2) − ln(γ) . Proof. See Appendix F. 4 Regular graphs of arbitrarily high girth and degree are known to exist; see Lazebnik, Ustimenko and Woldar [30] , for example. 5 What this means is, randomly choose a set of linearly independent vectors and take the span. Choose the first vector uniformly at random from We define Group Unique Games instances U 1 , U 1 , U 2 and U 2 using the additive group structure on F m 2 . The variable sets of all four instances are
For every edge {v 1 , v 2 } ∈ E( H), U 1 and U 2 have 2 constraints between the corresponding variables. In U 1 , the constraints are
whereas in U 2 , the constraints are
Finally, U 1 and U 2 are obtained from U 1 and U 2 by removing all constraints on pairs of variables corresponding to bad edges, i.e., with constraints defined in the exact same way as U 1 and U 2 , but only for edges {v 1 , v 2 } ∈ E(H).
Lemma 4.4.2. The satisfiability of U 1 (and thus of G(U 1 )) is 1 2 .
Proof. As in the proof of Lemma 4.3.2, at most one constraint can be satisfied from each bundle, so the total satisfiability is at most 1 2 . The assignment x g v := g attains this bound by satisfying the z = 0 constraint in each bundle (every subspace Z(v 1 , v 2 ) must contain z = 0).
With probability at least 1 2 − ε, the satisfiability of U 2 (and thus of G(U 2 )) is less than α 2 .
Proof sketch. The main idea is that, since very few edges are bad edges by Lemma 4.4.1, the satisfiability of U 2 closely approximates the satisfiability of U 2 . Since U 2 is sufficiently dense and the constraints are random, it is highly unlikely that there is any assignment satisfying significantly more constraints than a random assignment. See Appendix G for the details. 
is a partial isomorphism between G(U 1 ) and G(U 2 ) over the set
Proof sketch. If f is a partial isomorphism, we can add any vector z ∈ Z(v i−1 , v i ) to g * (v i−1 ) or g * (v i ) and f will still preserve the constraints involving v i−1 and v i . Since all edges are good, the set of all such vectors z in each subspace along p spans F m 2 , so we can add vectors at the appropriate places in the path to obtain any desired difference between g * (v 0 ) and g * (v n ). See Appendix H for the details.
Proof. It is without loss of generality to assume H is connected, for otherwise Duplicator can apply the strategy presented here on each connected component separately. On every round i of the k-pebble bijective game played on G(U 1 ) and G(U 2 ), for any u ∈ V (H), let T i (u) be a minimal tree containing u and all pebbled vertices of H (that is, vertices v ∈ V (H) such that some variable x g v is pebbled in one of the two structures) just after Spoiler has picked up a pebble. Let P i (u) denote the set of all of the vertices in T i (u) which have degree at least 3 or contain a pebbled vertex, also including u. Define T i := T i (u * i ) and P i := P i (u * i ), where u * i is the new vertex pebbled in round i. Finally, define the forest F i (u) to be the subgraph of T i (u) \ T i−1 (what this notation means is, remove all edges in T i−1 from T i (u), then remove isolated vertices) consisting of all segments in T i (u) between vertices in P i (u) ∪ V (T i−1 ) which have length less than r. See This is a minimal tree that includes all pebbled vertices, which are filled in red, and vertex u, which is near the top left corner. The green dashed line outlines the boundary of T i−1 (not all vertices and edges of this tree are shown, just those that intersect T i (u)). Assuming that r = 3 (which is not nearly large enough for this many pebbles; this is just for the purpose of illustration), the forest F i (u) is as depicted in blue, consisting of the lettered vertices A through H and all of the edges between those vertices.
We need the following lemma, which is proved in Appendix I. The proof uses the fact that H has girth at least (k + 1) 2 r. Let X i (u) denote the variable set of G(U 1 ) and G(U 2 ) restricted to T i (u),
On each round i, Duplicator's strategy is to define functions
for each u ∈ V (H), satisfying the following two properties:
(2) The map f i,u :
gives a partial isomorphism between G(U 1 ) and G(U 2 ).
Duplicator then presents Spoiler with the bijection
which is valid by property (1) . No matter which vertex u * i Spoiler chooses, the map f i,u * i agrees with f i over u * i , so we know that f i,u * i respects all pebble pairs since f i does. Therefore, since the edge between any pair of adjacent pebbled vertices of H must be in T i (by applying Lemma 4.4.6 to round i+1), Spoiler cannot win, as the map sending each pebbled element in the universe of G(U 1 ) to the correspondingly-pebbled element of G(U 2 ) is a restriction of f i,u * i , which is a partial isomorphism by property (2) . All that remains is to show how Duplicator can satisfy properties (1) and (2) on each round i, assuming inductively that they are satisfied on round i − 1. Fix a vertex u ∈ V (G). Duplicator defines g * (i, u, ·) in three steps:
Over V (T i (u)) ∩ V (T i−1 ), Duplicator simply sets
which is well-defined over V (T i−1 ) and clearly satisfies both properties (1) and
(2), inductively assuming that g * (i − 1, u * i−1 , ·) did. Since V (T i (u)) ∩ V (T i−1 ) contains all pebbled vertices, we no longer have to worry about property (1); we just have to define g * (i, u, ·) on the remainder of V (T i (u)) so that property (2) is satisfied.
Duplicator then uses the following algorithm to define g * (i, u,
Observe that the constraints involving each edge in F i (u) considered in the first case are preserved by f i,u : for all g 1 , g 2 , z ∈ F m 2 ,
For example, if F i (u) is as in Figure 4 .4, then the first iteration of the algorithm would define g * (i, u, B) so that the constraints involving A and B are consistent under f i,u . The next iteration would then define g * (i, u, C) so that the constraints involving B and C are consistent. Similarly, the next two iterations would set g * (i, u, D) and g * (i, u, E) (these could happen in either order). On the fifth iteration, we would hit the second case of the algorithm and set one of g * (i, u, F ), g * (i, u, G) or g * (i, u, H) arbitrarily. The final two iterations would set the other two values according to the first case.
Since the edges encountered in the first case are always made consistent, the only way that f i,u could fail to be a partial isomorphism over F i (u) is if, at some iteration, there were two different edges satisfying the condition in the first case. Since F i (u) is a forest, the only way that this could happen is if some connected component of F i (u) had two distinct vertices v 1 and v 2 on which g * (i, u, ·) was already defined before the algorithm started, which can only happen if v 1 , v 2 ∈ V (T i−1 ). But this means that there is a path in F i (u) from v 1 to v 2 that violates Lemma 4.4.6. Thus, property (2) Putting these lemmas together, we can now prove the main result of this chapter. O( 1 α 2 log( 1 α )) such that there is no FPC-definable α-approximation algorithm for UG(q). This holds even when restricting to GroupUniqueGames instances.
Proof. Suppose toward a contradiction that there was an FPC-definable αapproximation algorithm for UG(q), i.e., an FPC-interpretation Θ of τ Q in τ UG(q) . Let k := µ(Θ). Then fix γ := ε := 1 4 and use the construction defined in this section to pick a sufficiently high integer m. Let q := 2 m (see Appendix J for a derivation of the bound on q). It follows from Lemmas 4.4.2, 4.4.3 and 4.4.5 that, with probability at least 1 2 − ε = 1 4 , this construction succeeds in producing a pair of C k -equivalent τ UG(q) -structures, G(U 1 ) and G(U 2 ) (which are, in fact, GroupUniqueGames instances), whose optimal values differ by a factor of α. Specifically, when the construction succeeds, the optimal value of G(U 1 ) is n 2 and the optimal value of G(U 2 ) is strictly less than αn 2 , where n is the total number of constraints. Since the probability of success is nonzero, there is some pair of structures produced by this construction satisfying those properties. As G(U 1 ) ≡ C k G(U 2 ), Θ must yield the same value x ∈ Q on both instances. Since Θ gives an α-approximation on G(U 1 ), we have α · n 2 ≤ x (recall the definition from Section 2.3). However, since Θ gives an α-approximation on G(U 2 ), we have x < αn 2 . We have a contradiction, so no such interpretation Θ exists.
On the surface, the main takeaway from this thesis is, "Nothing is really different with regard to approximating CSPs when we restrict to FPC-definable algorithms." The best known approximation algorithms turn out to be FPCdefinable, and so are the reductions proving that these algorithms are optimal. The status of UniqueGames remains a key missing piece of the puzzle, yet while the existence of a (1 − ε, δ) inapproximability gap is unknown, weaker bounds still hold.
However, there are some key respects in which the FPC-definability requirement makes reasoning about approximating CSPs quite different. First, the need for a "rounding" algorithm to run in polynomial time completely disappears. All that matters is the analysis of such an algorithm-specifically, that it provides an elementary way of computing the optimal value, without breaking the symmetry of the SDP solution matrix. Second, the method for proving lower bounds is completely different, as we no longer rely on the assumption that P = NP. It is so different that the fundamental problem which is shown to be inexpressible in FPC, distinguishing G(U 1 ) from G(U 2 ) as defined in Section 4.4, is not even NP-hard 1 . As such, there is hope that the technique used to prove Theorem 4.4.7 can be extended to eventually resolve the FPC-UGC (Conjecture 3.3.2) before the ordinary UGC is resolved.
Besides the FPC-UGC, there are several interesting open FPC-approximability questions which are not addressed by this work. Not all problems can be phrased as CSPs in Raghavendra's framework (for example, VertexCover, TravelingSalesman), so the optimal FPC-approximabilities of these problems are yet unknown.
If all of these equations could be simultaneously satisfied by some assignment, then, adding these equations together, the left-hand sides cancel, so we have
This is impossible, since the fact that cycles have length at least 3 with no repeated vertices implies that each term on the right-hand side is a distinct basis element, so their sum cannot possibly be zero. Thus, no assignment can satisfy any cycle of constraints, so at most a spanning tree of n−1 constraints can be satisfied. Thus, the maximal satisfiability of U 2 is
as desired.
B Proof of Lemma 4.1.1 (the label-lifted instance has the same satisfiability)
Here we prove Lemma 4.1.1. Proof. We begin by introducing some notation which is not used outside of this proof. Suppose there are n variables in U , denoted x v 1 , x v 2 , . . . , x vn . For every i, j ∈ [n], write c(i, j) for the number of constraints between variables
x v i and x v j , and enumerate them as
Let opt(·) denote the optimal value of a UniqueGames instance. In the context of some fixed assignment of variables, for any constraint equation β let I(β) be the function that evaluates to 1 if β is satisfied under the assignment and 0 if β is not satisfied.
Suppose there are q group elements. Since G(U ) contains a factor of q 2 more constraints than U , to prove that U and G(U ) have the same satisfiability, we must show that opt(U ) = 1 q 2 opt(G(U )).
For one direction, let x v be an assignment of variables attaining the optimum satisfiability of U , i.e.,
From this, define an assignment of variables of G(U ) by
Then the optimal value of G(U ) is at least the number of constraints satisfied by this assignment, i.e.,
Rearranging, we have opt(U ) ≤ 1 q 2 opt(G(U )).
For the other direction, let x g v be an assignment of variables attaining the optimum satisfiability of G(U ). Then 
is counted exactly q n−2 times. Rearranging the order of summation, we have opt(G(U )) = 1 q n−2 g 1 ,g 2 ,...,gn∈A i,j∈[n] k∈[c(i,j)]
(1) Therefore, there must be some fixed g 1 ,g 2 , . . . ,g n ∈ A such that i,j∈[n] k∈[c(i,j)]
for otherwise, if all of the q n choices of g 1 ,g 2 , . . . ,g n ∈ A failed to satisfy (2), we could strictly upper-bound the right-hand side of (1) by 1 q n−2 (q n ) 1 q 2 opt(G(U )) = opt(G(U )), contradicting (1). Using these fixed g i values, we define an assignment of variables of U by
It then follows that the optimal value of U is at least the number of constraints satisfied by this assignment, i.e., (2)), as desired.
We remark that, with very slight modification, this argument also shows that the G operator of Atserias and Dawar [1] preserves the exact satisfiability of a 3XOR instance. In other words, part (2) of Lemma 3 of [1] can be strengthened, and as a consequence, the third paragraph in the proof of Lemma 4 of [1] is unnecessary.
Here we show how to construct a graph H = H k satisfying the following four properties stated in Section 4.3:
(1) H is connected.
(2) H is 3-regular.
(3) H is bipartite.
(4) The robber player wins the (k − 1)-cop edge-robber game.
Start with the complete graph on k vertices. Replace every vertex with a cycle of 2(k − 1) vertices, and replace every edge with two "bridge" edges joining distinct pairs of adjacent vertices in each cycle, as in Figure It is easily verified that H is connected, 3-regular, and bipartite. The robber player's strategy is to always have the robber occupy one of the k cycles without one of the k − 1 cops in it. After a cop moves into the cycle occupied by the robber, the robber moves around its cycle to one of the bridges to an unoccupied cycle and crosses over. Since there is only one cop in the robber's cycle, it cannot block both bridges. Thus, the robber player can infinitely avoid capture.
Here we prove Lemma 4.3.3. Proof. Suppose we have some assignment of variables and we change the value of one of these variables, x v , by adding some group element g ∈ A to it. Let u 1 , u 2 , u 3 ∈ V (H) be the three neighbours of v in H. If v / ∈ {v * 1 , v * 2 }, then the list of constraints involving x v (up to a relabeling of u 1 , u 2 and u 3 ) is
If g = e then nothing changes. Otherwise, without loss of generality, assume g = a. After adding a to x v , if the value of x v + x u 2 was in the set {e, a}, it will still be in {e, a}, and if the value was not in {e, a}, then it will still not be. Thus, after adding a to x v , the satisfiability of the first pair of equations will remain the same. For the second pair of equations, if the value of x v +x u 2 was in the set {e, b}, then after adding a the value will be in the set {a, c}, and vice versa. Thus, either one of these two equations will become satisfied or one of these two equations will become unsatisfied; in other words, the satisfiability will change by one. Similarly, for the second pair of equations, if the value of x v + x u 3 was in the set {e, c}, then after adding a the value will be in the set {a, b}, and vice versa, so again, the satisfiability will change by one. Thus, the total satisfiability of the 6 equations involving the variable x v will either remain the same or change by 2.
On the other hand, in the special case where v ∈ {v * 1 , v * 2 }, the list of constraints involving x v (up to a relabeling of u 1 , u 2 and u 3 ) is
If g = e then nothing changes. If g = a then the satisfiability of the first pair of equations will remain the same (since adding a takes b to c and c to b), and in the second and third pairs of equations the satisfiabilities will each change by one, for a total change of 0 or 2, as in the previous case. If g = b or g = c, one can analogously check that the satisfiability of the 6 equations again changes by 0 or 2.
Thus, in all cases, changing x v by adding any group element g preserves the parity of the number of constraints of U 2 that are satisfied. There are a total of 2 |E(H)| constraints between variables of U 2 , coming in inconsistent pairs. Since the assignment x v := e satisfies exactly |E(H)| − 1 of these constraints (one from every pair, except none from the pair between x v * 1 and x v * 2 ), and every time a variable assignment is changed, the parity stays the same, no assignment can satisfy exactly |E(H)| constraints. Thus, no assignment can satisfy at least |E(H)| constraints, since that is the maximum number that can possibly be satisfied.
Here we prove Lemma 4.3.5. We begin by recording some easy but important observations about these two instances.
Lemma E.1. The variable set of both G(U 1 ) and G(U 2 ) is
In both instances, for every v 1 , v 2 ∈ V (H), there exist distinct y 1 , y 2 ∈ A such that, for all g 1 , g 2 ∈ A, the constraints between the pair of variables x g 1 v 1 and
x g 2 v 2 are of the form
Proof. This follows from inspection of the definitions of U 1 and U 2 from Section 4.3.
Now we can prove Lemma 4.3.5.
Lemma 4.3.5. For all i ≥ 0, for all g ∈ A, for all variables x g 1 v 1 and x g 2 v 2 :
Proof. We proceed by induction on i. For the base case (i = 0), recall that f 0 is the identity map and r 0 = {v * 1 , v * 2 }. Since G(U 1 ) and G(U 2 ) agree everywhere except on the relations between variables involving the vertices of r 0 , condition (1) holds. Between a pair of vertices x g 1 v *
1 and x g 2 v * 2 for g 1 , g 2 ∈ A, the constraints in G(U 1 ) are
while the corresponding constraints in G(U 2 ) are
Since g 1 + g 2 , g 1 + g 2 + a, g 1 + g 2 + b and g 1 + g 2 + c are all distinct, condition (2) holds as well. Now fix some i ≥ 1 and suppose that (1) and (2) hold for i − 1. If the robber does not move, then f i = f i−1 , so there is nothing to prove. So suppose that the robber does move, i.e., r i = r i−1 . To prove that f i satisfies (1) for an arbitrary pair of vertices {v 1 , v 2 } = r i , there are three cases to consider. It may be helpful for the reader to refer back to Figure 4 .1 from Section 4.3.
Say that v 1 = p 0 and v 2 = p 1 . Let y 1 , y 2 , y 2 , y 4 ∈ A be as in Lemma E.1, so that for each g 1 , g 2 ∈ A, the two constraints in G(U 1 ) between x g 1 v 1 and x g 2 v 2 are
Since (2) held for f i−1 , it follows that the right-hand sides of all four equations are all distinct, so A = {y 1 , y 2 , y 3 , y 4 }. From the group addition law in the Klein four-group, it follows that y 1 + y 2 + y 3 = y 4 . Since
To show that these constraints are the same as those in G(U 1 ), we must argue that m(e 1 ) + y 3 and m(e 1 ) + y 4 are both in the set {y 1 , y 2 }. We give the proof for m(e 1 ) + y 3 ; the proof for m(e 1 ) + y 4 is completely analogous. Suppose first that m(e 1 ) + y 3 = y 3 . This is a contradiction because m never takes on the value of the identity e ∈ A. Suppose instead that m(e 1 ) + y 3 = y 4 . This implies that m(e 1 ) = y 1 + y 2 = m({v 1 , v 2 }),
where the second equality follows from Lemma E.1. This is a contradiction since e 1 and {v 1 , v 2 } are different edges incident to the same vertex p 1 , so they must have different values under m. Thus, the only remaining possibilities are that m(e 1 ) + y 3 = y 1 or m(e 1 ) + y 3 = y 2 , as desired.
Let y 1 , y 2 , y 2 , y 4 ∈ A be as in Lemma E.1, so that for each g 1 , g 2 ∈ A, the two constraints in G(U 1 ) between x g 1 v 1 and x g 2 v 2 are
and the constraints in G(U 2 ) between f i−1 (x g 1 v 1 ) and
Since (1) held for f i−1 , it follows that {y 1 , y 2 } = {y 3 , y 4 }.
As in the previous case, we must show that m(e i ) + m(e i+1 ) + , so assume that {v 1 , v 2 } = e i where v 1 = p i . Again, let y 1 , y 2 , y 2 , y 4 ∈ A be as in Lemma E.1, so that for each g 1 , g 2 ∈ A, the two constraints in G(U 1 ) between x g 1 v 1 and x g 2 v 2 are
Since (1) held for f i−1 , it follows that {y 1 ,
As in the previous cases, we must show that m(e i ) + That concludes the proof of (1). To prove (2), let {v 1 , v 2 } = r i , where v 1 = p and v 2 = p +1 , and again let y 1 , y 2 , y 2 , y 4 ∈ A be as in Lemma E.1, so that for each g 1 , g 2 ∈ G, the two constraints in G(U 1 ) between x g 1 v 1 and x g 2 v 2 are
Since (1) held for f i−1 , it follows that {y 1 , y 2 } = {y 3 , y 4 }. Here we prove Lemma 4.4.1. First, we need the following two sub-lemmas. The proof of the first one is inspired by [31] .
Lemma F.1. For any two positive integers m and n, the probability that n vectors in F m 2 , chosen independently and uniformly at random, fail to span F m 2 is at most 2 m−n .
Proof. It is well known [32, Sec. III.4] that every d-dimensional subspace of a vector space of dimension m has a unique complement subspace of dimension m − d. Therefore, since there are exactly 2 m − 1 one-dimensional subspaces of F m 2 , there are exactly 2 m − 1 subspaces of dimension m − 1. The probability that a randomly chosen vector lies within a given (m − 1)dimensional subspace is 1 2 . As the vectors are chosen independently, the probability that all n vectors lie within any given (m − 1)-dimensional subspace is 2 −n . Since there are at most 2 m different (m − 1)-dimensional subspaces of F m 2 , by the union bound, the probability that all n vectors lie within some (m − 1)-dimensional subspace is at most 2 m · 2 −n = 2 m−n . Therefore, the probability that the n vectors fail to span F m 2 is bounded by 2 m−n , since the only way this can happen is if they lie within some (m − 1)-dimensional subspace of F m 2 .
Lemma F.2. For any positive integers d and r, in a d-regular graph of girth greater than r there are exactly r(d − 1) r−1 distinct paths of length r passing through any given edge.
Proof. Fix an edge e 0 = {u 1 , u 2 }. To enumerate all of the ways in which we can choose a path p = v 0 , v 1 ,v 2 , . . . ,v r passing through e 0 , we first orient p so that u 2 occurs at a greater index in p than u 1 , ensuring that we do not double-count a path and its reverse. The first choice we make is the position in the path where e 0 lies, i.e., the index of u 1 in p. There are r such choices of index, since it is impossible to have u 1 = v r . We choose each of the remaining r − 1 edges by growing the path out from e 0 . Since the girth is greater than r, there are no constraints about repeating vertices to worry about, so at each step, there are exactly d − 1 neighbors to choose from. Thus, the total number of paths is r(d − 1) r−1 .
We can now prove Lemma 4.4.1. Proof. By Lemma F.1, the probability that the vectors in the Z-subspaces along a given path of length r fail to span F m 2 is at most 2 m−r . Since, by Lemma F.2, there are r(d − 1) r−1 ≤ rd r paths of length r through any given edge e 0 , it follows from the union bound that the probability that e 0 is a bad edge is at most rd r · 2 m−r = exp(ln(rd r · 2 m−r )) (where exp(x) ≡ e x ) = exp(ln(r) + r ln(d) + (m − r ) ln (2)) ≤ exp(r + r ln(d) + (m − r ) ln(2)) = exp(r((ln(d) + 1) − ln(2)) + m ln (2)) ≤ exp (r((ln(d) + 1) − (log 2 (d) + 2 log 2 (e)) ln(2)) + m ln (2)) (from (4.4)) = exp r((ln(d) + 1) − ln(d) + 2 ln(2) ln(2)) + m ln (2) = exp(m ln(2) − r) ≤ exp(m ln(2) − (m ln(2) − ln(γ))) (from (4.6)) = exp(ln(γ)) = γ.
Therefore, the expected fraction of bad edges of H is at most γ. With probability at least 1 2 , the fraction of bad edges in H is less than or equal to this expectation.
Here we prove Lemma 4.4.3. We begin by showing that, with high probability, U 2 is highly unsatisfiable. The central proof technique used here, applying Hoeffding's inequality and the union bound, is used by Atserias and Dawar [1, Lemma 4 ] to argue that a random 3XOR instance is probably only slightly more than 1 2 -satisfiable. The main challenge in adapting this technique is that our domain has size 2 m instead of 2, so there are far too many assignments to consider. To circumvent this obstacle, we only consider those assignments which satisfy a spanning tree of constraints.
Lemma G.1. With probability at least 1 − ε, the satisfiability of U 2 is less than (1 − γ) α 2 .
Proof. Say that a bundle of constraints in U 2 is satisfied by a given assignment of variables if one of the 2 constraints in the bundle is satisfied. Consider the following nondeterministic algorithm for satisfying a maximal number of constraints in U 2 , where v 0 is an arbitrarily chosen vertex of H:
(1) Nondeterministically choose a spanning tree T ⊆ E( H).
(2) For each {v 1 , v 2 } ∈ T , nondeterministically choose a vector z * (v 1 , v 2 ) ∈ Z(v 1 , v 2 ).
(3) Assign x v 0 := 0, then assign all of the other variables so that, for all {v 1 , v 2 } ∈ T , x v 1 + x v 2 = z * (v 1 , v 2 ) (this assignment is unique after fixing x v 0 , and can be defined inductively through the edges of T ).
Note that it is without loss of generality to assume x v 0 = 0 under any optimal assignment of variables, for if it was not, we could subtract x v 0 from all of the variables and the exact same set of constraints would be satisfied. By similar reasoning, the set of edges of H whose bundles are satisfied under a given optimal assignment must contain a spanning tree of H, for if it contained two connected components separated by an edge e 0 , we could add some group element to all of the variables in one component so that all previously satisfied edges are still satisfied, and the bundle of e 0 is satisfied as well. Therefore, any optimal assignment must be one of the possible assignments output by this algorithm.
Suppose H has n vertices. Since there are at most d n spanning trees of H [33] that could be chosen in step (1), and (2 ) n−1 ≤ 2 n functions z * that could be chosen in step (2), this algorithm has at most d n 2 n computation paths.
As H has nd 2 edges, the expected number of bundles satisfied by any given assignment x v output by this algorithm is
since the n − 1 bundles within T are all satisfied, and each of the other ( nd 2 − (n − 1)) bundles are satisfied with probability 2 −m , independently 2 . Applying Hoeffding's inequality [34] , the probability that x v satisfies more than
bundles is at most exp −2 α 2 2 nd 2 − (n − 1) .
By the union bound, the probability that there is some computation path giving an assignment satisfying more than this many bundles is at most H Proof of Lemma 4.4.4 (paths of length r can be made consistent)
Here we prove Lemma 4.4.4. is a partial isomorphism between G(U 1 ) and G(U 2 ) over the set {x g v | v ∈ p, g ∈ F m 2 }.
Proof. Since H contains only good edges and p has length at least r, there exists a set of vectors B ⊆ i∈[n]
forming a basis of F m 2 . Write h(i) for the number of basis vectors in Z(v i−1 , v i ), and denote these vectors by
where each z i,j ∈ Z(v i−1 , v i ). Since B is a basis, there exist coefficients c i,j such that
For each i in order from 1 to n, inductively define
Note that, by expanding the inductive definition for g * (v n ), we have 
Note that such a vertex always exists when v i has degree at least 3, and is necessarily different from all other vertices in the image of h. Thus, h is injective. Also, since vertices in P i (u) of degree less than 3 must be pebbled, the output of h(v i ) must always be a pebbled vertex. Thus, we have an injection from p∩P i (u) to a set of pebbled vertices (plus u), of which there are at most k (since one pebble pair has been picked up), so |p ∩ P i (u)| ≤ k. Proof. Suppose toward a contradiction that there was such a path p 1 , joining v 1 , v 3 ∈ T i−1 . Let v 2 be the first vertex along the path p 1 which is contained T i−1 , excluding v 1 (it could just be v 3 if there are no earlier places where p crosses T i−1 ). Since T i−1 is connected, there must be some path p 2 joining v 1 and v 2 in T i−1 . Since p 1 is contained in F i (u), which shares no edges with T i−1 , p 1 and p 2 share no edges. Aside from v 1 and v 2 , they do not share any common vertices either, from the way that v 2 was chosen. So together, p 1 and p 2 form a cycle. Since p 1 is contained within T i (u), by Lemma I.1 it intersects at most k vertices in P i (u). Since, additionally, p 1 is contained in F i (u), the length of each of the ≤ (k + 1) segments between vertices in P i (u) and the endpoints is strictly less than r. Thus, p 1 has length strictly less than (k + 1)r. Since p 2 is contained within T i−1 , which is minimal, p 2 cannot contain any subpaths of length (k + 1)r which do not intersect P i−1 , for otherwise, swapping out such a subpath for p 1 would yield a strictly smaller tree. Applying Lemma I.1 to round i − 1 and vertex u * i−1 , we have that at most k vertices of p 2 intersect P i−1 , so p 2 has length at most k(k + 1)r. Thus, concatenating p 1 and p 2 yields a cycle of size strictly less than (k + 1)r + k(k + 1)r = (k + 1) 2 r in H. This contradicts the fact that H was chosen to have girth at least (k + 1) 2 r. Hence, no such path p 1 can exist.