Computing exact solutions of consensus halving and the Borsuk-Ulam theorem[^6]

We study the problem of finding an exact solution to the Consensus Halving problem. While recent work has shown that the approximate version of this problem is <span>$\mathtt{PPA}$</span>-complete@FG18 [@FG18a], we show that the exact version is much harder. Specifically, finding a solution with $n$ agents and $n$ cuts is <span>$\mathtt{FIXP}$</span>-hard, and deciding whether there exists a solution with fewer than $n$ cuts is <span>$\mathtt{ETR}$</span>-complete. Along the way, we define a new complexity class, called <span>$\mathtt{BU}$</span>, which captures all problems that can be reduced to solving an instance of the Borsuk-Ulam problem exactly. We show that ${\ensuremath{\mathtt{FIXP}}\xspace}\subseteq {\ensuremath{\mathtt{BU}}\xspace}\subseteq {\ensuremath{\mathtt{TFETR}}\xspace}$ and that ${\ensuremath{\mathtt{LinearBU}}\xspace}= {\ensuremath{\mathtt{PPA}}\xspace}$, where <span>$\mathtt{LinearBU}$</span>is the subclass of <span>$\mathtt{BU}$</span>in which the Borsuk-Ulam instance is specified by a linear arithmetic circuit.

 \

 \

Introduction {#sec:intro}
============

Dividing resources among agents in a fair manner is among the most fundamental problems in multi-agent systems @brams1996fair. Cake cutting @amanatidis2018improved [@aziz2016discrete; @aziz2016any; @brams1995envy], and rent division @brams2001competitive [@haake2002bidding; @edward1999rental] are prominent examples of problems that lie in this category. At their core, each of these problems has a desired solution whose existence is usually proved via a theorem from algebraic topology such as Brouwer's fixed point theorem, Sperner's lemma, or Kakutani's fixed point theorem.

In this work we focus on a fair-division problem called *Consensus Halving*: an object $A$ represented by $[0, 1]$ is to be divided into two halves $A_+$ and $A_-$, so that $n$ agents agree that $A_+$ and $A_-$ have the same value. Provided the agents have bounded and continuous valuations over $A$, this can always be achieved using at most $n$ cuts, and this fact can be proved via the Borsuk-Ulam theorem from algebraic topology @SS03. The necklace splitting and ham-sandwich problems are two other examples of fair-division problems for which the existence of a solution can be proved via the Borsuk-Ulam theorem @alon1987splitting [@alon1986borsuk; @papadimitriou1994complexity].

Recent work has further refined the complexity status of *approximate* Consensus Halving, in which we seek a division of the object so that every agent agrees that the values of $A_+$ and $A_-$ differ by at most ${\ensuremath{\epsilon}}$. Since the problem always has a solution, it lies in <span>$\mathtt{TFNP}$</span>, which is the class of function problems in <span>$\mathtt{NP}$</span>that always have a solution. More recent work has shown that the problem is <span>$\mathtt{PPA}$</span>-complete @FG18, even for ${\ensuremath{\epsilon}}$ that is inverse-polynomial in $n$ @FG18a. The problem of deciding whether there exists an approximate solution with $k$-cuts when $k < n$ is <span>$\mathtt{NP}$</span>-complete @FFGZ18. These results are particularly notable, because they identify Consensus Halving as one of the first natural <span>$\mathtt{PPA}$</span>-complete problems.

While previous work has focused on approximate solutions to the problem, in this work we study the complexity of solving the problem *exactly*. For problems in the complexity class <span>$\mathtt{PPAD}$</span>, which is a subclass of both <span>$\mathtt{TFNP}$</span>and <span>$\mathtt{PPA}$</span>, prior work has found that there is a sharp contrast between exact and approximate solutions. For example, the Brouwer fixed point theorem is the theorem from algebraic topology that underpins <span>$\mathtt{PPAD}$</span>. Finding an approximate Brouwer fixed point is <span>$\mathtt{PPAD}$</span>-complete @papadimitriou1994complexity, but finding an exact Brouwer fixed point is complete for (and the defining problem of) a complexity class called <span>$\mathtt{FIXP}$</span> @EY10.

It is believed that <span>$\mathtt{FIXP}$</span>is significantly harder than <span>$\mathtt{PPAD}$</span>. While <span>$\mathtt{PPAD}$</span>$\subseteq$ <span>$\mathtt{TFNP}$</span>$\subseteq$ <span>$\mathtt{FNP}$</span>, there is significant doubt about whether <span>$\mathtt{FIXP}$</span>$\subseteq$ <span>$\mathtt{FNP}$</span>. One reason for this is that there are Brouwer instances for which all solutions are irrational. This is not particularly relevant when we seek an approximate solution, but is a major difficulty when we seek an exact solution. For example, in the PosSLP problem, a division free arithmetic circuit with operations $+, -,*$, inputs $0$ and $1$ and a designated output gate are given, and we are asked to decide whether the integer at the output of the circuit is positive. This fundamental problem is not known to lie in <span>$\mathtt{NP}$</span>, and can be reduced to the problem of finding an approximation of 3-player Nash equilibrium @EY10. Due to the aforementioned paper, the later problem reduces to the problem of finding an exact Brouwer fixed point, which provides evidence that <span>$\mathtt{FIXP}$</span>may be significantly harder than <span>$\mathtt{FNP}$</span>.

Contribution
------------

In this work we study the complexity of solving the Consensus Halving problem exactly. In our formulation of the problem, the valuation function of the agents is presented as an arbitrary arithmetic circuit, and the task is to cut $A$ such that all agents agree that $A_+$ and $A_-$ have exactly the same valuation. We study two problems. The $(n, n)$-<span>$\textsc{Consensus Halving}$</span>problem asks us to find an exact solution for $n$-agents using at most $n$-cuts, while the $(n, k)$-<span>$\textsc{Consensus Halving}$</span>problem asks us to decide whether there exists an exact solution for $n$-agents using at most $k$-cuts, where $k < n$.

Our results for $(n, n)$-<span>$\textsc{Consensus Halving}$</span>are intertwined with a new complexity class that we call <span>$\mathtt{BU}$</span>. This class consists of all problems that can be reduced in polynomial time to the problem of finding a solution of the Borsuk-Ulam problem. We show that $(n, n)$-<span>$\textsc{Consensus Halving}$</span>lies in <span>$\mathtt{BU}$</span>, and is <span>$\mathtt{FIXP}$</span>hard. The hardness for <span>$\mathtt{FIXP}$</span>implies that the exact variant of Consensus Halving is significantly harder than the approximate variant: while the approximate problem is <span>$\mathtt{PPA}$</span>-complete, the exact variant is unlikely to be in <span>$\mathtt{FNP}$</span>.

We show that $(n, k)$-<span>$\textsc{Consensus Halving}$</span>is <span>$\mathtt{ETR}$</span>-complete. The complexity class <span>$\mathtt{ETR}$</span>consists of all decision problems that can be formulated in the *existential theory of the reals*. It is known that ${\ensuremath{\mathtt{NP}}\xspace}\subseteq {\ensuremath{\mathtt{ETR}}\xspace}\subseteq
{\ensuremath{\mathtt{PSPACE}}\xspace}$ @C88, and it is generally believed that <span>$\mathtt{ETR}$</span>is distinct from the other two classes. So, our result again shows that the exact version of the problem seems to be much harder than the approximate version, which is <span>$\mathtt{NP}$</span>-complete @FFGZ18.

Just as <span>$\mathtt{FIXP}$</span>can be thought of as the exact analogue of <span>$\mathtt{PPAD}$</span>, we believe that <span>$\mathtt{BU}$</span>is the exact analogue of <span>$\mathtt{PPA}$</span>, and we provide some evidence to justify this. It has been shown that ${\ensuremath{\mathtt{LinearFIXP}}\xspace}= {\ensuremath{\mathtt{PPAD}}\xspace}$ @EY10, which is the version of the class in which arithmetic circuits are restricted to produce piecewise *linear* functions (<span>$\mathtt{FIXP}$</span>allows circuits to compute piecewise polynomials). We likewise define <span>$\mathtt{LinearBU}$</span>, which consists of all problems that can be reduced to a solution of a Borsuk-Ulam problem using a piecewise linear function, and we show that <span>$\mathtt{LinearBU}$</span>= <span>$\mathtt{PPA}$</span>.

The containment ${\ensuremath{\mathtt{LinearBU}}\xspace}\subseteq {\ensuremath{\mathtt{PPA}}\xspace}$ can be proved using similar techniques to the proof that ${\ensuremath{\mathtt{LinearFIXP}}\xspace}\subseteq {\ensuremath{\mathtt{PPAD}}\xspace}$. However, the proof that ${\ensuremath{\mathtt{PPA}}\xspace}\subseteq {\ensuremath{\mathtt{LinearBU}}\xspace}$ utilises our <span>$\mathtt{BU}$</span>containment result for Consensus Halving. In particular, when the input to Consensus Halving is a piecewise linear function, our containment result shows that the problem actually lies in <span>$\mathtt{LinearBU}$</span>. The <span>$\mathtt{PPA}$</span>-hardness results for Consensus Halving show that piecewise-linear-Consensus Halving is <span>$\mathtt{PPA}$</span>-hard, which completes the containment @FG18 [@FG18a].

Let us present a roadmap of this work. In Section \[sec: preliminaries\] we give formal definitions for the notions and models that are used throughout the paper. In Section \[sec:class\_bu\] we introduce the complexity class <span>$\mathtt{BU}$</span>and its linear version <span>$\mathtt{LinearBU}$</span>, and show that ${\ensuremath{\mathtt{LinearBU}}\xspace}\subseteq {\ensuremath{\mathtt{PPA}}\xspace}$. Then, in Section \[sec:bu\] we focus on the Consensus Halving problem and show containment results for variations of it. Following this, in Section \[sec:hardness\_res\] the most challenging set of this paper's results is presented, namely hardness of the Consensus Halving variations in already known complexity classes. Finally, the most technical parts of the paper are presented in Sections \[app:circuit-embed\], \[app:CH\_is\_FIXP-hard\], \[app:Feas\_is\_etr-c\], \[app:CH\_is\_etr-c\].

Related work
------------

Although for a long period there were a few results about <span>$\mathtt{PPA}$</span>, recently there has been a flourish of <span>$\mathtt{PPA}$</span>-completeness results. The first <span>$\mathtt{PPA}$</span>-completeness result was given by @grigni2001sperner who showed <span>$\mathtt{PPA}$</span>-completeness of the Sperner problem for a non-orientable 3-dimensional space. In @friedl2006locally this result was strengthened for a non-orientable and locally 2-dimensional space. In @ABB15, 2-dimensional Tucker was shown to be <span>$\mathtt{PPA}$</span>-complete; this result was used in @FG18 [@FG18a] to prove <span>$\mathtt{PPA}$</span>-completeness for approximate Consensus Halving. In @DE+16 <span>$\mathtt{PPA}$</span>-completeness was proven for a special version of Tucker and for problems of the form "given a discrete fixed point in a non-orientable space, find another one". Finally, in @DFK17 it was shown that octahedral Tucker is <span>$\mathtt{PPA}$</span>-complete. In @M14, a subclass of ${\ensuremath{\mathtt{2DLinearFIXP}}\xspace}\subseteq {\ensuremath{\mathtt{FIXP}}\xspace}$ that consists of 2-dimensional fixed-point problems was studied, and it was proven that ${\ensuremath{\mathtt{2DLinearFIXP}}\xspace}={\ensuremath{\mathtt{PPAD}}\xspace}$. A large number of problems are now known to be <span>$\mathtt{ETR}$</span>-complete: geometric intersection problems @mat14 [@scha09], graph-drawing problems  @ADD+16 [@Bien91; @CaHo17; @scha13], matrix factorization problems @shi16 [@shi17], the Art Gallery problem @AAM18, and deciding the existence of constrained (symmetric) Nash equilibria in (symmetric) normal form games with at least three players @BM12 [@BM14; @BM16; @BM17; @GMV+; @BH19].

Preliminaries {#sec: preliminaries}
=============

Arithmetic circuits and reductions between real-valued search problems {#sec:ar_cir_red}
----------------------------------------------------------------------

An arithmetic circuit is a representation of a continuous function $f : {\mathbb{R}}^n \to {\mathbb{R}}^m$. The circuit is defined by a pair $(V, {\ensuremath{\mathcal{T}}})$, where $V$ is a set of nodes and ${\ensuremath{\mathcal{T}}}$ is a set of gates. There are $n$ nodes in $V$ that are designated to be *input nodes*, and $m$ nodes in $V$ that are designated to be *output nodes*. When a value $x \in {\mathbb{R}}^n$ is presented at the input nodes, the circuit computes values for all other nodes $v \in V$, which we will denote as $x[v]$. The values of $x[v]$ for the $m$ output nodes determine the value of $f(x) \in {\mathbb{R}}^m$.

Every node in $V$, other than the input nodes, is required to be the output of exactly one gate in $\mathcal{T}$. Each gate $g \in {\ensuremath{\mathcal{T}}}$ enforces an arithmetic constraint on its output node, based on the values of some other node in the circuit. Cycles are not allowed in these constraints. We allow the operations $\{\zeta,
+, -, *\zeta, *, \max, \min\}$, which correspond to the gates shown in Table \[tbl:gates\]. Note that every gate computes a continuous function over its inputs, and thus any function $f$ that is represented by an arithmetic circuit of this form is also continuous.

  **Gate**                                **Constraint**
  --------------------------------------- --------------------------------------------------------------------
  $G_{\zeta}(\zeta, v_{out})$             $x[v_{out}] = \zeta$, where $\zeta \in \mathbb{Q}$
  $G_{+}(v_{in1}, v_{in2}, v_{out})$      $x[v_{out}] = x[v_{in1}] + x[v_{in2}]$
  $G_{-}(v_{in1}, v_{in2}, v_{out})$      $x[v_{out}] = x[v_{in1}] - x[v_{in2}]$
  $G_{*\zeta}(\zeta, v_{in}, v_{out})$    $x[v_{out}] = x[v_{in1}]\cdot \zeta$, where $\zeta \in \mathbb{Q}$
  $G_{*}(v_{in1}, v_{in2}, v_{out})$      $x[v_{out}] = x[v_{in1}] \cdot x[v_{in2}]$
  $G_{\max}(v_{in1}, v_{in2}, v_{out})$   $x[v_{out}] = \max \{ x[v_{in1}], x[v_{in2}]\}$
  $G_{\min}(v_{in1}, v_{in2}, v_{out})$   $x[v_{out}] = \min \{ x[v_{in1}], x[v_{in2}]\}$

  : The types of gates and their constraints.<span data-label="tbl:gates"></span>

We study two types of circuits in this work. *General* arithmetic circuits are allowed to use any of the gates that we have defined above. *Linear* arithmetic circuits allow only the operations $\{\zeta, +, -, *\zeta, \max,
\min\}$, and the $*$ operation (multiplication of two variables) is disallowed. Observe that a linear arithmetic circuit computes a continuous, piecewise linear function.

In this work we do not deal with the usual discrete search problems, but instead we study continuous problems whose solutions are exact, and involve representation of real numbers. However, the computation model on which we work is still the discrete Turing machine model and not a computation model over the reals like the BSS machine @BSS89. For this reason, when we consider reductions from a problem $P$ to a problem $Q$ with real-valued solutions, we have to be restricted to functions $f$, $g$ with certain properties, that transform instances of $P$ to instances of $Q$ and solutions of $Q$ to solutions of $P$ respectively. In particular, $f$ and $g$ should be polynomial time computable, and $g$ has to map efficiently (discrete) solutions of $Q$ back to (discrete) solutions of $P$, for the corresponding discrete versions of $P$ and $Q$.

In the proof of Theorem \[thm:CHinBU\] we analytically present what function $g$ is allowed to do. For both the cases where the input to problem $P$ is a set of (a) general circuits (which represent functions whose roots are possibly irrational numbers) or (b) linear circuits (where roots are rational), $g$ is implemented by a polynomial size arithmetic circuit with an additional type of gate $G_{>}$. This is a <span>*comparison gate*</span> with a single input which outputs 1 if the input is positive and 0 otherwise. We highlight that the extra gate type implements a discontinuous function, but this does not matter since the comparison gate is only used for function $g$, and not for $f$. Note that our reductions use more powerful functions than the "SL-reductions" used by Etessami and Yannakakis in @EY10, but nevertheless computable in polynomial time.

The Consensus Halving problem {#sec:CH_definition}
-----------------------------

In the Consensus Halving problem there is an object $A$ that is represented by the $[0, 1]$ line segment, and there are $n$ agents. We wish to divide $A$ into two (not necessarily contiguous) pieces such that every agent agrees that the two pieces have equal value. Simmons and Su @SS03 have shown that, provided the agents have bounded and continuous valuations over $A$, then we can find a solution to this problem using at most $n$ cuts.

In this work we consider instances of Consensus Halving where the valuations of the agents are presented as arithmetic circuits. Each agent has a valuation function $f_i : [0, 1] \rightarrow {\mathbb{R}}$, but it is technically more convenient if they give us a representation of the *integral* of this function. So for each agent $i$, we are given an arithmetic circuit computing $F_i : [0, 1] \rightarrow {\mathbb{R}}$ where for all $x \in [0, 1]$ we have $F_i(x) = \int_0^x f(y) \, dy$. Then, the value of any particular segment of $[a, b]$ to agent $i$ can be computed as $F_i(b) - F_i(a)$.

A solution to Consensus Halving is given by a *$k$-cut* of the object $A$, which is defined by a vector of *cut-points* $(t_1, t_2, \dots,
t_k) \in [0,1]^k$, where $t_1 \leq \dots \leq t_k$. The cut-points $t_i$ split $A$ into up to $k+1$ pieces. Note that they may in fact split $A$ into fewer than $k+1$ pieces in the case where two cut-points $t_i =
t_j$ overlap. We define $X_i$ to be the $i$-th piece of $A$, meaning that $X_i = [t_{i-1}, t_{i}]$ for all $i \in [k+1]$, where we set $t_0 := 0$ and $t_{k+1} := 1$.

In a Consensus Halving solution the object $A$ is divided into two "super-pieces" $A_+$ and $A_-$ formed by the $k+1$ pieces induced by the $k$-cut. Each piece is assigned a sign $``+''$ or $``-''$ and all of the pieces with positive sign consist super-piece $A_+$ while the rest consist $A_-$. For each agent $i$, we denote the value $A_+$ as $F_i(A_+) := \sum_{[a, b] \in A_+} \left(F_i(b)
- F_i(a) \right)$, and we define $F_i(A_-)$ analogously. The $k$-cut is a solution to the Consensus Halving problem if $F_i(A_+) = F_i(A_-)$ for all agents $i$. Without loss of generality we can consider only solutions of Consensus Halving where the signs of the pieces are alternating. That is because in any solution that has two consecutive pieces of same sign, the cut that separates them can be removed and transferred at the right end of $A$, taking value 1, and the two pieces can be merged into a single one. Throughout the paper we implicitly consider this definition of a solution. Notice that the solutions come in symmetric pairs, where the cuts are at the exact same points, and the signs are opposite.

We define two computational problems. Simmons and Su @SS03 have proved that there always exists a solution using at most $n$-cuts, and our first problem is to find that solution.

\[title = <span>$(n,n)$-<span>$\textsc{Consensus Halving}$</span></span>\] <span>**Input:**</span> For every agent $i \in [n]$, an arithmetic circuit $F_i$ computing the integral of agent $i$'s valuation function.\
<span>**Task:**</span> Find an $n$-cut for $A$ such that $F_i(A_{+})=F_i(A_{-})$, for every agent $i \in [n]$.

For $k < n$ a solution to the problem may or may not exist. So we define the following decision variant of the problem.

\[title = <span>$(n,k)$-<span>$\textsc{Consensus Halving}$</span></span>\] <span>**Input:**</span> For every agent $i \in [n]$, an arithmetic circuit $F_i$ computing the integral of agent $i$'s valuation function.\
<span>**Task:**</span> Decide whether there exists a $k$-cut for $A$ such that $F_i(A_{+})=F_i(A_{-})$, for every agent $i \in [n]$.

For either of these two problems, if all of the inputs are represented by linear arithmetic circuits, then we refer to the problem as <span>$\textsc{Linear Consensus Halving}$</span>. We note that the known hardness results @FFGZ18 [@FG18] for Consensus Halving fall into this class. Specifically, those results produce valuations that are piecewise constant, and so the integral of these functions is piecewise linear, and these functions can be written down as linear arithmetic circuits @O02.

The Class <span>$\mathtt{BU}$</span> {#sec:class_bu}
====================================

The Borsuk-Ulam theorem states that every continuous function from the surface of an $(d+1)$-dimensional sphere to the $d$-dimensional Euclidean space maps at least one pair of antipodal points to the same point.

\[Borsuk-Ulam\] \[thm:borsuk-ulam\] Let $f : S^d \to {\mathbb{R}}^d$ be a continuous function, where $S^d$ is a $(d+1)$-dimensional sphere. Then, there exists an $x \in S^d$ such that $f(x)=f(-x)$.

This theorem actually works for any domain $D$ that is an antipode-preserving homeomorphism of $S^d$, where by "antipode-preserving" we mean that for every $x \in D$ we have that $-x \in D$. In this work, we choose $S^d$ to be the sphere in $d+1$ dimensions with respect to $L_1$ norm: $$\begin{aligned}
    S^d := \left \{ x\ |\ x=(x_1, x_2, \dots, x_{d+1}),\ \sum_{i=1}^{d+1}|x_i| = 1 
    \right \}.\end{aligned}$$ We define the *Borsuk-Ulam* problem as follows.

\[title= <span>$\textsc{Borsuk-Ulam}$</span>\] <span>**Input:**</span> A continuous function $f : {\mathbb{R}}^{d+1} \to {\mathbb{R}}^d$ presented as an arithmetic circuit.\
<span>**Task:**</span> Find an $x \in S^d$ such that $f(x)=f(-x)$.

Note that we cannot constrain an arithmetic circuit to only take inputs from the domain $S^d$, so we instead put the constraint that $x \in S^d$ onto the solution.

The complexity class <span>$\mathtt{BU}$</span>is defined as follows.

\[<span>$\mathtt{BU}$</span>\] \[def:BU\] The complexity class <span>$\mathtt{BU}$</span>consists of all search problems that can be reduced to <span>$\textsc{Borsuk-Ulam}$</span>in polynomial time under a reduction of the type described in Section \[sec:ar\_cir\_red\].

<span>$\mathtt{LinearBU}$</span>
--------------------------------

When the input to a <span>$\textsc{Borsuk-Ulam}$</span>instance is a linear arithmetic circuit, then we call the problem <span>$\textsc{Linear-Borsuk-Ulam}$</span>, and we define the class <span>$\mathtt{LinearBU}$</span>as follows.

\[<span>$\mathtt{LinearBU}$</span>\] \[def:linBU\] The complexity class <span>$\mathtt{LinearBU}$</span>consists of all search problems that can be reduced to <span>$\textsc{Linear-Borsuk-Ulam}$</span>in polynomial time.

We will show that ${\ensuremath{\mathtt{LinearBU}}\xspace}= {\ensuremath{\mathtt{PPA}}\xspace}$. The proof that ${\ensuremath{\mathtt{LinearBU}}\xspace}\subseteq {\ensuremath{\mathtt{PPA}}\xspace}$ is similar to the proof that Etessami and Yannakakis used to show that ${\ensuremath{\mathtt{LinearFIXP}}\xspace}\subseteq
{\ensuremath{\mathtt{PPAD}}\xspace}$ @EY10, while the fact that ${\ensuremath{\mathtt{PPA}}\xspace}\subseteq {\ensuremath{\mathtt{LinearBU}}\xspace}$ will follow from our results on Consensus Halving in Section \[sec:bu\].

To prove ${\ensuremath{\mathtt{LinearBU}}\xspace}\subseteq {\ensuremath{\mathtt{PPA}}\xspace}$ we will reduce to the *approximate* Borsuk-Ulam problem. It is well known that the Borsuk-Ulam theorem can be proved via Tucker's lemma, and Papadimitriou noted that this implies that finding an approximate solution to a Borsuk-Ulam problem lies in <span>$\mathtt{PPA}$</span> @papadimitriou1994complexity. This is indeed correct, but the proof provided in @papadimitriou1994complexity is for a slightly different problem[^7]. Since our results will depend on this fact, we provide our own definition and self-contained proof here. We define the approximate Borsuk-Ulam problem as follows.

\[title= <span>${\ensuremath{\epsilon}}\textsc{-Borsuk-Ulam}$</span>\] <span>**Input:**</span> A continuous function $f: {\mathbb{R}}^{d+1} \to {\mathbb{R}}^d$ presented as an arithmetic circuit, along with two constants ${\ensuremath{\epsilon}}, \lambda \in {\mathbb{R}}$.

<span>**Task:**</span> Find one of the following.

1.  A point $x \in S^d$ such that $\|f(x) - f(-x)\|_\infty \le {\ensuremath{\epsilon}}$.

2.  Two points $x, y \in S^d$ such that $\|f(x) - f(y)\|_\infty > \lambda
            \cdot \|x - y\|_\infty$.

The first type of solution is an approximate solution to the Borsuk-Ulam problem, while the second type of solution consists of any two points that witness that the function is not $\lambda$-Lipschitz continuous in the $L_\infty$-norm. The second type of solution is necessary, because an arithmetic circuit is capable, through repeated squaring, of computing doubly-exponentially large numbers, and the reduction to <span>$\textsc{Tucker}$</span>may not be able to find an approximate solution for such circuits. Note however that later in Lemma \[lem:linborsuk-in-ppa\] we reduce <span>$\textsc{Linear-Borsuk-Ulam}$</span>to <span>${\ensuremath{\epsilon}}\textsc{-Borsuk-Ulam}$</span>, where the former has as input a linear arithmetic circuit and therefore Lipschitzness in the <span>${\ensuremath{\epsilon}}\textsc{-Borsuk-Ulam}$</span>we reduce to is guaranteed. In other words, for the purposes of this section it would suffice to assume Lipschitzness of the input function of <span>${\ensuremath{\epsilon}}\textsc{-Borsuk-Ulam}$</span>, but here we state a more general version of the problem and show that it is also included in <span>$\mathtt{PPA}$</span>. We now re-prove the result of Papadimitriou in the following lemma.

\[@papadimitriou1994complexity\]\[lem:eps-borsuk-PPA\] <span>${\ensuremath{\epsilon}}\textsc{-Borsuk-Ulam}$</span>is in <span>$\mathtt{PPA}$</span>.

This proof is essentially identical to the one given by Papadimitriou, but various minor changes must be made due to the fact that our input is an arithmetic circuit, and our domain is the $L_1$-sphere. His proof works by reducing to the <span>$\textsc{Tucker}$</span>problem. In this problem we have a antipodally symmetric triangulation of $S^d$ with set of vertices $V$, and a labelling function $L: V \to \{-1, 1, -2, 2, \dots, -d, d\}$ that satisfies $L(v) = -L(-v)$ for all $v \in V$. The task is to find two adjacent vertices $v$ and $u$ such that $L(v) = -L(u)$, whose existence is guaranteed via Tucker's lemma. Papadimitriou's containment proof goes via the hypercube, but in @FFGZ18 it is pointed out that this problem also lies in PPA when the domain is the $L_1$-sphere $S^d$.

To reduce the <span>${\ensuremath{\epsilon}}\textsc{-Borsuk-Ulam}$</span>problem for $(f, {\ensuremath{\epsilon}}, \lambda)$ to <span>$\textsc{Tucker}$</span>, we choose an arbitrary triangulation of $S^n$ such that the distance between any two adjacent vertices is at most ${\ensuremath{\epsilon}}/\lambda$. Let $g(x) = f(x) - f(-x)$. To determine the label of a vertex $v \in V$, first find the coordinate $i$ that maximises $|g(v)_i|$ breaking ties arbitrarily, and then set $L(v) = i$ if $g(v)_i > 0$ and $L(v) = -i$ otherwise.

Tucker's lemma will give us two adjacent vertices $v$ and $u$ satisfying $L(v) = -L(u)$, and we must translate this to a solution to <span>${\ensuremath{\epsilon}}\textsc{-Borsuk-Ulam}$</span>. If $\| g(u) - g(v) \|_\infty > \lambda \cdot \| u - v \|_\infty$, then we have a violation of Lipschitz continuity. Otherwise, we have $$\begin{aligned}
        \| g(u) - g(v) \|_\infty &\le \lambda \cdot \| u - v \|_\infty \\
        &\le \lambda \cdot \frac{{\ensuremath{\epsilon}}}{\lambda}\\ 
        &\le {\ensuremath{\epsilon}}\end{aligned}$$ Let $i =
    L(v)$. Note that by definition we have that $|g(v)_j| \le |g(v)_i|$ for all $j$, that $|g(u)_j| \le |g(u)_i|$ for all $j$, and that that $g(u)_i$ and $g(v)_i$ have opposite signs. These three facts, along with the fact that $\| g(u) - g(v) \|_\infty \le {\ensuremath{\epsilon}}$ imply that $|g(v)_j| \le {\ensuremath{\epsilon}}$ for all $j$. Hence we can conclude that $\| f(v) - f(-v) \|_\infty \le {\ensuremath{\epsilon}}$ meaning that $v$ is a solution to <span>${\ensuremath{\epsilon}}\textsc{-Borsuk-Ulam}$</span>.

To show that <span>$\mathtt{LinearBU}$</span>$\subseteq$ <span>$\mathtt{PPA}$</span>we will provide a polynomial-time reduction from <span>$\textsc{Linear-Borsuk-Ulam}$</span>to <span>${\ensuremath{\epsilon}}\textsc{-Borsuk-Ulam}$</span>. To do this, we follow closely the technique used by Etessami and Yannakakis to show that ${\ensuremath{\mathtt{LinearFIXP}}\xspace}\subseteq {\ensuremath{\mathtt{PPAD}}\xspace}$ @EY10. The idea is to make a single call to <span>${\ensuremath{\epsilon}}\textsc{-Borsuk-Ulam}$</span>to find an approximate solution to the problem for a suitably small ${\ensuremath{\epsilon}}$, and to then round to an exact solution by solving a linear program. To build the LP, we depend on the fact that we have access to the linear arithmetic circuit that represents $f$.

\[lem:linborsuk-in-ppa\] <span>$\textsc{Linear-Borsuk-Ulam}$</span>is in <span>$\mathtt{PPA}$</span>.

Suppose that we have a function $f$ that is represented as a linear arithmetic circuit. We will provide a polynomial-time reduction to <span>${\ensuremath{\epsilon}}\textsc{-Borsuk-Ulam}$</span>.

The first step is to argue that, for all ${\ensuremath{\epsilon}}> 0$, we can make a single call to <span>${\ensuremath{\epsilon}}\textsc{-Borsuk-Ulam}$</span>in order to find an ${\ensuremath{\epsilon}}$-approximate solution to the problem. The only technicality here is that we must choose $\lambda$ so as to ensure that no violations of $\lambda$-Lipschitzness in the $L_\infty$-norm can be produced as a solution.

Fortunately, every linear arithmetic circuit computes a $\lambda$-Lipschitz function where the bit-length of $\lambda$ is polynomial in the size of the circuit. Moreover, an upper bound on $\lambda$ can easily be computed by inspecting the circuit.

-   An input to the circuit has a Lipschitz constant of 1.

-   A $+$ gate operating on two gates with Lipschitz constants $x$ and $y$ has a Lipschitz constant of at most $x + y$.

-   A $*\zeta$ gate operating on a gate with Lipschitz constant $x$ has a Lipschitz constant of at most $|\zeta| \cdot x$.

-   A max or min gate operating on two gates with Lipschitz constants $x$ and $y$ has a Lipschitz constant of at most $\max(x, y)$.

The Lipschitz constant for the circuit in the $L_\infty$-norm is then the maximum of the Lipschitz constants of the output nodes of the circuit. So, for any given ${\ensuremath{\epsilon}}> 0$ that can be represented in polynomially many bits, we can make a single call to <span>${\ensuremath{\epsilon}}\textsc{-Borsuk-Ulam}$</span>, in order to find an ${\ensuremath{\epsilon}}$-approximate solution to the Borsuk-Ulam problem.

The second step is to choose an appropriate value for ${\ensuremath{\epsilon}}$ so that the approximate solution can be rounded to an exact solution using an LP. Let $g(x) = f(x) - f(-x)$. Note that $g(x)$ can also be computed by a linear arithmetic circuit, and that $g(x) = 0$ if and only if $f(x) = f(-x)$.

We closely follow the approach of Etessami and Yannakakis @EY10. They use the fact that the function computed by a linear arithmetic circuit is piecewise-linear, and defined by (potentially exponentially many) hyperplanes. They give an algorithm that, given a point $p$ in the domain of the circuit, computes in polynomial time the linear function (which represents the hyperplane) that defines the output of the circuit for $p$. Furthermore, they show that the following can be produced in polynomial time from the representation of the circuit and from $p$.

-   A system of linear constraints $Ax \le b$ such that a point $x$ satisfies the constraints only if the linear function (which represents the hyperplane) that defines the output of the circuit for $p$ also defines the output of the circuit for $x$.

-   A linear formula $Cx + C'$ that determines the output of the circuit for all points that satisfy $Ax \le b$.

To choose ${\ensuremath{\epsilon}}$, the following procedure is used. Let $n$ be the number of inputs to $g$, and let $m$ be an upper bound on the bit-size of the solution of any linear system with $n+1$ equations where the coefficients are drawn from the hyperplanes that define the function computed by $g$. This can be computed in polynomial time from the description of the circuit, and $m$ will have polynomial size in relation to the description of the circuit. We choose ${\ensuremath{\epsilon}}< 1/2^m$.

We make one call to <span>${\ensuremath{\epsilon}}\textsc{-Borsuk-Ulam}$</span>to find a point $p \in S^n$ such that $\|f(p) -
    f(-p)\|_\infty \le {\ensuremath{\epsilon}}$, meaning that $\|g(p)\|_\infty \le {\ensuremath{\epsilon}}$. The final step is to round this to an exact solution of <span>$\textsc{Borsuk-Ulam}$</span>. To do this, we can modify the linear program used by Etessami and Yannakakis @EY10. We apply the operations given above to the circuit $g$ and the point $p$ to obtain the system of constraints $Ax \le b$ and the formula $Cx + C'$ for the hyperplane defining the output of $g$ for $p$. We then solve the following linear program. The variables of the LP are a vector $x$ of length $n$, and a scalar $z$. The goal is to minimize $z$ subject to: $$\begin{aligned}
        Ax &\le b \\
        (Cx)_i + C'_i &\le z & \text{for $i = 1, \dots, n$} \\
        -((Cx)_i + C'_i) &\le z & \text{for $i = 1, \dots, n$} \\
        x_i &\ge 0 & \text{for each $i$ with $p_i \ge 0$} \\
        x_i &\leq 0 & \text{for each $i$ with $p_i < 0$} \\
        \sum_{i = 1}^n |x_i| &= 1 & \text{(see below regarding $|x_i|$)}
    \end{aligned}$$ The first constraint ensures that we remain on the same cell as the one defining the output of $g$ for $p$. The second and third constraints ensure that $\|g(x)\|_{\infty} \le z$. The fourth and fifth constraints ensure that $x_i$ has the same sign as $p_i$, while the sixth constraint ensures that $x$ lies on the surface $S^n$. Note that the $|x_i|$ operation in the sixth constraint is not a problem, since the fourth and fifth constraints mean that we know the sign of $x_i$ up front, and so we just need to add either $x_i$ or $-x_i$ to the sum. All of the above implies that that $x$ is a $z$-approximate solution of <span>$\textsc{Borsuk-Ulam}$</span>for $f$.

We must now argue that the solution sets $z = 0$. First we note that the LP has a solution, because the point $(p, {\ensuremath{\epsilon}})$ is feasible, and the LP is not unbounded since $z$ cannot be less than zero due to the second and third constraints. So let $(x^*, z^*)$ be an optimal solution. This solution lies at the intersection of $n+1$ linear constraints defined by rationals drawn from the circuit representing $g$, and so it follows that $z^*$ is a rational of bit length at most $m$. Since $0 \le z^* \le {\ensuremath{\epsilon}}< 1/2^m$, it follows that $z^* = 0$, and thus $x^*$ is an exact solution to <span>$\textsc{Borsuk-Ulam}$</span>for $f$.

Containment Results for <span>$\textsc{Consensus Halving}$</span> {#sec:bu}
=================================================================

$(n, n)$-<span>$\textsc{Consensus Halving}$</span>is in <span>$\mathtt{BU}$</span>and <span>$\mathtt{LinearBU}$</span>= <span>$\mathtt{PPA}$</span> {#sec:CHinBU}
---------------------------------------------------------------------------------------------------------------------------------------------------

We show that $(n,n)$-<span>$\textsc{Consensus Halving}$</span>is contained in <span>$\mathtt{BU}$</span>. Simmons and Su @SS03 show the existence of an $n$-cut solution to the Consensus Halving problem by applying the Borsuk-Ulam theorem, and we follow their approach in this reduction. However, we must show that the approach can be implemented using arithmetic circuits. We take care in the reduction to avoid $G_{*}$ gates, and so if the inputs to the problem are all linear arithmetic circuits, then our reduction will produce a <span>$\textsc{Linear-Borsuk-Ulam}$</span>instance. Hence, we also show that $(n, n)$-<span>$\textsc{Linear Consensus Halving}$</span>is in <span>$\mathtt{LinearBU}$</span>.

\[thm:CHinBU\] The following two containments hold.

-   $(n,n)$-<span>$\textsc{Consensus Halving}$</span>is in <span>$\mathtt{BU}$</span>.

-   $(n, n)$-<span>$\textsc{Linear Consensus Halving}$</span>is in <span>$\mathtt{LinearBU}$</span>.

Let us first summarise the approach used by Simmons and Su @SS03. Given valuation functions $F_i$ for the $n$ agents, they construct a Borsuk-Ulam instance given by a function $b : S^n \rightarrow
    {\mathbb{R}}^n$. Each point $(x_1, x_2, \dots, x_{n+1}) \in S^n$ can be interpreted as an $n$-cut of $[0, 1]$, where $|x_i|$ gives the *width* of the $i$th piece, and the sign of $x_i$ indicates whether the $i$th piece should belong in $A_+$ or $A_-$. They then define $b(x)_i = F_i(A_+)$ for each agent $i$. The fact that $-x$ flips the sign of each piece, but not the width, implies that $b(-x)_i =
    F_i(A_-)$. Hence, any point that satisfies $b(x) = b(-x)$ has the property that $F_i(A_+) = F_i(A_-)$ for all agents $i$, and so is a solution to Consensus Halving.

Our task is to implement this reduction using arithmetic circuits and construct in polynomial time a <span>$\textsc{Borsuk-Ulam}$</span>instance from a $(n,n)$-<span>$\textsc{Consensus Halving}$</span>instance. Suppose that we are given arithmetic circuits $F_i$ implementing the integral of each agent's valuation function. We show how to map each $F_i$ to a function $b(x)_i = F_i(A_+)$ computable via a linear arithmetic circuit, where $x \in S^n$, i.e. a <span>$\textsc{Borsuk-Ulam}$</span>instance. The tricky part of this, is that for each agent $i$ we must include the $j$-th piece in the sum if and only if $x_j$ is positive. Then we show how to map a solution $x$ back to a solution of $(n,n)$-<span>$\textsc{Consensus Halving}$</span>.

We begin by observing that the operation of $|x|$ can be implemented via a linear arithmetic circuit. Specifically, via the following construction: $$|x| := \max(x, 0) + \max(-x, 0).$$ Hence, we can implement $|x|$ using only gates $G_{\max}$, $G_{+}$, and $G_{\zeta}$. Then, we define $t_0 := 0$, and for each $j$ in the range $1 \le j  \le n+1$, define: $$\label{eq:cut_points}
        t_{j}:= t_{j-1} +  |x_{j}|.$$ The value of $t_j$ gives the end of the $j$-th piece, and note that $t_{n+1} = 1$. Next, for each $j$ in the range $1 \le j \le n+1$ we define: $$p_{j}:= \max(x_j, 0).$$ Note that $p_j$ is $x_j$ whenever $x_j$ is positive, and zero otherwise. Finally, for $1 \le j \le n+1$ define: $$q_{j}:= F_i(t_{j-1} + p_j) - F_i(t_{j-1}).$$ Using the reasoning above, we can see that $q_j$ is agent $i$'s valuation for piece $j$ whenever $x_j$ is positive, and zero otherwise. So we can define $$b(x)_i = \sum_{j=1}^{n+1} q_j,$$ implying that $b(x)_i = F_i(A_+)$, as required.

Finally, we need to map a solution $x$ of <span>$\textsc{Borsuk-Ulam}$</span>to a pair of $(n,n)$-<span>$\textsc{Consensus Halving}$</span>solutions, i.e. a vector of cut-points $(t_1, t_2, \dots, t_n)$. Recall that the cut points correspond to a pair of symmetric solutions where, in each, the signs of the resulting pieces are alternating (by definition) and the two solutions have opposite signs.

Let the input to $(n,n)$-<span>$\textsc{Consensus Halving}$</span>be a general circuit with gates $G_{\zeta}, G_{+}, G_{-}, G_{*\zeta}, G_{*}, G_{\max}, G_{\min}$, or a linear circuit, where gate $G_{*}$ is disallowed. From a solution of <span>$\textsc{Borsuk-Ulam}$</span>we map back to a solution of $(n,n)$-<span>$\textsc{Consensus Halving}$</span>by constructing a circuit in which we allow the use of an extra <span>*comparison*</span> gate $G_{>}$. This gate takes an input $v_{in}$ and outputs $1$ if $v_{in} > 0$ and $0$ otherwise. One can see that the function this gate implements is discontinuous only for $v_{in} = 0$, contrary to the rest of the gates that implement continuous functions. This fact, however, does not affect the validity of the reduction (see also Section \[sec:ar\_cir\_red\]). Whether a mapping can be constructed without the use of $G_{>}$, or in general, with using only gates that implement continuous functions is left as an open problem.

We denote the operation this gate implements in the following way: $\{ x \}_{>} := 1$, if $x > 0$, and $\{ x \}_{>} := 0$, otherwise. This circuit computes the $n$-cut that is a solution to $(n,n)$-<span>$\textsc{Consensus Halving}$</span>. Given a solution of <span>$\textsc{Borsuk-Ulam}$</span>, i.e. a vector $(x_1, x_2, \dots, x_{n+1}) \in S^n$, we construct a circuit that has two stages: (i) first it shifts all $x_{j} = 0$ to position $n+1$ of the vector, (ii) then for every two consecutive $x_{j}$'s it merges them if they have the same sign, thus resulting to a vector $x$ with coordinates of alternating sign and consecutive zeros at the rightmost positions. One should note that merging a pair of consecutive coordinates of $x$ that have the same sign, and transferring all coordinates of value zero at the rightmost position of $x$ while maintaining the order of the rest of the coordinates, does not affect the Consensus Halving solution. That is because by such operations, the positive and negative intervals remain the same; only cuts between two consecutive pieces or cuts that are more than one on the same position are transferred to position $1$ of the interval $[0,1]$. In other words, the positive and negative valuations $F_{i}(A_{+})$ and $F_{i}(A_{-})$ remain the same after such operations since the positive and negative intervals remain at the same positions on $[0,1]$. What we want is to bring the Consensus Halving solution into the form of a valid $(n,n)$-<span>$\textsc{Consensus Halving}$</span>solution, i.e. an $n$-cut whose pieces have alternating signs.

For the implementation of checking whether a coordinate $x_{j}$ is zero and shifting it one position to the right, we make the following construction: $$\begin{aligned}
        x_{j} &= \left(\{x_{j}\}_{>} + \{-x_{j}\}_{>}\right)*x_{j} + \left(1 - \{x_{j}\}_{>} - \{-x_{j}\}_{>}\right)*x_{j+1}, \\
        x_{j+1} &= \left(\{x_{j}\}_{>} + \{-x_{j}\}_{>}\right)*x_{j+1} + \left(1 - \{x_{j}\}_{>} - \{-x_{j}\}_{>}\right)*x_{j}.
    \end{aligned}$$ Therefore, to move a zero (if it exists) to the rightmost position of $x$ we need to implement the above two functions for every $j \in [n]$ in increasing order, meaning that after we implement the circuit for the pair $x_1$, $x_2$ we then implement $x_2$, $x_3$ and so on until $x_n$, $x_{n+1}$. To implement stage (i) we have to iterate this procedure $n$ times, since in the worst case there will be $n$ coordinates with value zero in $x$. Note that for stage (i) we need no more than $O(n^2)$ gates.

Now in our vector, starting from the left, there are consecutive non-zero values and after them consecutive zero values. What remains to be done is to implement stage (ii), i.e. to merge pairs of consecutive coordinates with the same sign. To do that for a pair $x_{j}$, $x_{j+1}$, we make the following construction: $$\begin{aligned}
        x_{j} &= x_{j} + \{x_{j} * x_{j+1}\}_{>}*x_{j+1}, \\
        x_{j+1} &= \left(1 - \{x_{j} * x_{j+1}\}_{>}\right)*x_{j+1}.
    \end{aligned}$$ Therefore, either there will be no change in the values of $x_j$ and $x_{j+1}$ if they are of opposite sign, or $x_{j}$ becomes $x_{j}+x_{j+1}$ and $x_{j+1}$ becomes zero. In the latter case we will have introduced a zero to the vector. That is why right after the above construction for some $j \in [n]$ we implement a shifting of the (possibly introduced) zero to the rightmost position of $x$ using the aforementioned procedure of stage (i). We do this for every $j \in [n]$ in an increasing order. Note that for stage (ii) we need no more than $O(n^2)$ gates.

After implementing the aforementioned two stages, the resulting vector $x = (x_1, x_2, \dots, x_{n+1})$, starting from the left, has coordinates of alternating sign and at its rightmost positions it has zeros. Finally, we compute the $n$-cut $(t_1, t_2, \dots, t_n)$ in a straight-forward way using equation , where we initialize $t_0 := 0$. Also, always $t_{n+1} = 1$ and it is discarded. Note that for the above constructions no more than $O(n^2)$ gates were needed in total. Since the pieces of these cuts have alternating sign, this is a valid solution to $(n,n)$-<span>$\textsc{Consensus Halving}$</span>and the proof is complete.

Theorem \[thm:CHinBU\] also implies that ${\ensuremath{\mathtt{PPA}}\xspace}\subseteq {\ensuremath{\mathtt{LinearBU}}\xspace}$, thereby completing the proof that ${\ensuremath{\mathtt{PPA}}\xspace}= {\ensuremath{\mathtt{LinearBU}}\xspace}$. Specifically, Filos<span>-</span>Ratsikas and Goldberg have shown that *approximate*-$(n, n)$-<span>$\textsc{Consensus Halving}$</span>is PPA-complete, and their valuation functions are piecewise constant @FG18. Therefore, the integrals of these functions are piecewise linear, and so their approximate-$(n, n)$-<span>$\textsc{Consensus Halving}$</span>instances can be reduced to $(n, n)$-<span style="font-variant:small-caps;">Linear</span> <span>$\textsc{Consensus Halving}$</span>. Hence $(n, n)$-<span>$\textsc{Linear Consensus Halving}$</span>is <span>$\mathtt{PPA}$</span>-hard, which along with Lemma \[lem:linborsuk-in-ppa\] implies the following corollary.

\[cor:PPA-linBU\] ${\ensuremath{\mathtt{PPA}}\xspace}= {\ensuremath{\mathtt{LinearBU}}\xspace}$.

$(n,k)$-<span>$\textsc{Consensus Halving}$</span>is in <span>$\mathtt{ETR}$</span> {#sec:dch-in-etr}
----------------------------------------------------------------------------------

The existential theory of the reals consists of all true existentially quantified formulae using the connectives $\{\land, \lor, \lnot\}$ over polynomials compared with the operators $\{<, \le, =, \ge, >\}$. The complexity class <span>$\mathtt{ETR}$</span>captures all problems that can be reduced in polynomial time to the existential theory of the reals.

We prove that $(n,k)$-<span>$\textsc{Consensus Halving}$</span>is in ${\ensuremath{\mathtt{ETR}}\xspace}$. The reduction simply encodes the arithmetic circuits using ETR formulas, and then constrains $F_i(A_+) =
F_i(A_-)$ for every agent $i$.

\[thm:CHinETR\] $(n,k)$-<span>$\textsc{Consensus Halving}$</span>is in <span>$\mathtt{ETR}$</span>.

The first step is to argue that an arithmetic circuit can be implemented as an ETR formula. Let $(V, \mathcal{T})$ be the arithmetic circuit. For every vertex $v \in V$ we introduce a new variable $x_v$. For every gate $g \in \mathcal{T}$ we introduce a constraint. For the gates in the set $\{G_{\zeta}, G_{+}, G_{-}, G_{*\zeta},
    G_{*}\}$ the constraints simply implement the gate directly, eg., for a gate $G_{+}(v_{\text{in1}}, v_{\text{in2}}, v_{\text{out}})$ we use the constraint $x[v_{\text{out}}] =
    x[v_{\text{in1}}] + x[v_{\text{in2}}]$. For a gate $G_{\max}(v_{\text{in1}},
    v_{\text{in2}}, v_{\text{out}})$ we use the formula $$\big((x[v_{\text{out}}] = x[v_{\text{in1}}]) \land (x[v_{\text{in1}}] \geq
        x[v_{\text{in2}}])\big) \lor
        \big((x[v_{\text{out}}] = x[v_{\text{in2}}]) \land (x[v_{\text{in2}}] \geq
        x[v_{\text{in1}}])\big),$$ and likewise for a gate $G_{\min}(v_{in1}, v_{in2}, v_{out})$ we use the formula $$\big((x[v_{\text{out}}] = x[v_{\text{in1}}]) \land (x[v_{\text{in1}}] \leq
        x[v_{\text{in2}}])\big) \lor
        \big((x[v_{\text{out}}] = x[v_{\text{in2}}]) \land (x[v_{\text{in2}}] \leq
        x[v_{\text{in1}}])\big).$$ Taking the conjunction $C$ of the constraints for each of the gates yields an ETR formula that implements the circuit.

Now we perform the reduction from Consensus Halving to the existential theory of the reals. Suppose that we have been given, for each agent $i$, an arithmetic circuit $F_i$ implementing the integral of agent $i$'s valuation function. We have already shown in the proof of Theorem \[thm:CHinBU\] that, given a description of a $k$-cut given as a point in $S^k$, we can create a circuit implementing $F_i(A_+)$ and a circuit implementing $F_i(A_-)$ for each agent $i$. We also argued in that proof that $\sum_{j = 1}^{k+1} |x_j|$ can be implemented as an arithmetic circuit. Our ETR formula is as follows. $$\exists x \cdot \left( \bigwedge\limits_{i=1}^n F_i(A_+) = F_i(A_-) \right) \land C \land 
        \left(\sum_{j = 1}^{k+1} |x_j| = 1 \right).$$ The first set of constraints ensure that $x$ is a solution to the Consensus Halving problem, the second one implements as showed above the $\max$ and $\min$ operations that are not allowed in an ETR formula, and the final constraint ensures that $x \in S^n$.

Using the same technique, we can also reduce ${\ensuremath{\textsc{Borsuk-Ulam}}\xspace}$ to an <span>$\mathtt{ETR}$</span>formula. In this case, we get an ETR formula that always has a solution. Let us define here the class <span>$\mathtt{FETR}$</span>(`Function \mathtt{ETR}`) which contains all search problems whose corresponding decision version lies in <span>$\mathtt{ETR}$</span>. We also define the class <span>$\mathtt{TFETR}$</span>(`Total Function \mathtt{ETR}`) as the subclass of <span>$\mathtt{FETR}$</span>which contains the search problems whose decision version outputs always "yes". As <span>$\mathtt{ETR}$</span>is the analogue of <span>$\mathtt{NP}$</span>, <span>$\mathtt{FETR}$</span>and <span>$\mathtt{TFETR}$</span>are the analogues of <span>$\mathtt{FNP}$</span>and <span>$\mathtt{TFNP}$</span>respectively in the Blum-Shub-Smale computation model @BSS89.

\[thm:butfetr\] ${\ensuremath{\mathtt{BU}}\xspace}\subseteq {\ensuremath{\mathtt{TFETR}}\xspace}$.

The proof is essentially identical to the proof of Theorem \[thm:CHinETR\], and the only difference is that instead of starting with a Consensus Halving instance, we start with an arbitrary arithmetic circuit representing the function $f : S^d \to {\mathbb{R}}^d$, for which we wish to find a point $x$ satisfying $f(x) = f(-x)$. We implement the arithmetic circuit in the same way as in Theorem \[thm:CHinETR\], and our ETR formula is: $$\exists x \cdot \left( \bigwedge\limits_{i=1}^d f_i(x) = f_i(-x) \right) \land C \land 
        \left(\sum_{j = 1}^{d+1} |x_j| = 1 \right),$$ where $C$ is the conjunction of the constraints that implement $\max$ and $\min$ gates.

Hardness Results for <span>$\textsc{Consensus Halving}$</span> {#sec:hardness_res}
==============================================================

In this section we give an overview of our hardness results for Consensus Halving. Full proofs will be given in subsequent sections. We prove that $(n,n)$-<span>$\textsc{Consensus Halving}$</span>is <span>$\mathtt{FIXP}$</span>-hard and that $(n,n-1)$-<span>$\textsc{Consensus Halving}$</span>is <span>$\mathtt{ETR}$</span>-hard. These two reductions share a common step of embedding an arithmetic circuit into a Consensus Halving instance. So we first describe this step, and then move on to proving the two individual hardness results. An outline of the embedding step is described in Section \[subsec: cir-to-ch\], which concludes to Lemma \[lem:circuit-embed\]. The detailed proof of that lemma is presented in Section \[app:circuit-embed\].

Then, in Section \[subsec:FIXP-hard\] we present a polynomial-time reduction from the <span>$\mathtt{FIXP}$</span>-complete problem of computing a Nash equilibrium in a $d$-player strategic form game to the problem of computing a $(n,n)$-<span>$\textsc{Consensus Halving}$</span>solution. Finally, in Section \[sec:ETR\], after proving <span>$\mathtt{ETR}$</span>-completeness for an auxiliary problem, we reduce from it to the $(n,n-1)$-<span>$\textsc{Consensus Halving}$</span>problem. The implied <span>$\mathtt{ETR}$</span>-hardness of the latter problem, together with its <span>$\mathtt{ETR}$</span>-membership by Theorem \[thm:CHinETR\] proves the required <span>$\mathtt{ETR}$</span>-completeness.

Embedding a circuit in a <span>$\textsc{Consensus Halving}$</span>instance: an outline {#subsec: cir-to-ch}
--------------------------------------------------------------------------------------

Our approach is inspired by @FFGZ18, who provided a reduction from ${\ensuremath{\epsilon}}$-<span>$\textsc{GCircuit}$</span> @chen2009settling [@Rub18] to approximate Consensus Halving. However, our construction deviates significantly from theirs due to several reasons.

Firstly, the reduction in @FFGZ18 works *only* for approximate Consensus Halving. Specifically, some valuations used in that construction have the form of $1/{\ensuremath{\epsilon}}$, where ${\ensuremath{\epsilon}}$ is the approximation guarantee, so the construction is not well-defined when ${\ensuremath{\epsilon}}=0$ as it is in our case. Many of the gate gadgets used in @FFGZ18 cannot be used due to this issue, including the $\max$ gate, which is crucially used in that construction to ensure that intermediate values do not get too large. We provide our own implementations of the broken gates. Our gate gadgets only work when the inputs and outputs lie in the range $[0, 1]$, and so we must carefully construct circuits for which this is always the case. The second major difference is that the reduction in @FFGZ18 does not provide any method of multiplying two variables, which is needed in our case. We construct a gadget to do this, based on a more primitive gadget for squaring a single variable.

### Special circuit {#sec:special_cir}

Our reduction from an arithmetic circuit to Consensus Halving will use a very particular subset of gates. Specifically, we will not use $G_{\text{min}}$, $G_{\text{max}}$, or $G_{*}$, and we will restrict $G_{*\zeta}$ so that $\zeta$ must lie in $(0, 1]$. We do however introduce three new gates, shown in Table \[tbl:special\_gates\]. The gate $G_{()^2}$ squares its input, the gate $G^{[0, 1]}_{*2}$ multiplies its input by two, but requires that the input be in $[0, 1/2]$, and the gate $G^{[0, 1]}_{-}$ is a special minus gate that takes as inputs $a,b \in [0,1]$ and outputs $\max \{a-b , 0\}$.

  **Special Gate**                             **Constraint**                                          **Ranges**
  -------------------------------------------- ------------------------------------------------------- ------------------------------------
  $G_{()^2}(v_{in}, v_{out})$                  $x[v_{out}] = (x[v_{in}])^2$                            $x[v_{in}] \in [0,1]$
  $G_{*2}^{[0,1]}(v_{in}, v_{out})$            $x[v_{out}] = x[v_{in}] \cdot 2 $                       $x[v_{in}] \in [0,1/2]$
  $G_{-}^{[0,1]}(v_{in1}, v_{in2}, v_{out})$   $x[v_{out}] = \max \{ x[v_{in1}] - x[v_{in2}] , 0\} $   $x[v_{in1}], x[v_{in2}] \in [0,1]$

  : The special types of gates, their constraints and ranges of input.<span data-label="tbl:special_gates"></span>

We note that $G_{\text{min}}$, $G_{\text{max}}$, and $G_{*}$ can be implemented in terms of our new gates according to the following identities. $$\begin{aligned}
    \max\{a, b\} &= \frac{a+b}{2} + \frac{|a-b|}{2} = \frac{a}{2} + \frac{b}{2}  + \frac{1}{2} 
    \max\{a - b, 0\} + \frac{1}{2}  \max\{b - a, 0\}, \\
    \min\{a, b\} &= \frac{a+b}{2} - \frac{|a-b|}{2} = \frac{a}{2} + \frac{b}{2}  - \frac{1}{2} 
    \max\{a - b, 0\} - \frac{1}{2}  \max\{b - a, 0\} , \\
    a\cdot b &= 2  \left[ \left( \frac{a}{2}   +  \frac{b}{2}  \right)^2 - \left( \left( \frac{a}{2}   \right)^2 + \left( \frac{b}{2}  \right)^2 \right) \right].\end{aligned}$$

Also, a very important requirement of the special circuit is that both inputs of any $G_{+}$ gate are in $[0,1/2]$. To make sure of that, we downscale the inputs before reaching the gate, and upscale the output, using the fact that $a+b = (a/2 + b/2) \cdot 2$.

### The reduction to <span>$\textsc{Consensus Halving}$</span>

![Gates and their corresponding functions $G_{\pi}(t)$.<span data-label="gates-table"></span>](All-gates.pdf)

The reduction follows the general outline of the reduction given in @FFGZ18. The construction is quite involved, and so we focus on the high-level picture here.

Each gate is implemented by 4 agents, namely $ad, mid, cen, ex$ in the Consensus Halving instance. The values computed by the gates are encoded by the positions of the cuts that are required in order to satisfy these agents. Agent $ad$ performs the exact mathematical operation of the gate, and feeds the outcome in $mid$, who "trims" it in accordance with the gate's actual operation. Then $mid$ feeds her outcome to $cen$ and $ex$, who make a copy of $mid$'s correct value of the gate, with "negative" and "positive" labels respectively. This value with the appropriate label will be input to other gates.

The most important agents are the ones that perform the mathematical operation of each gate, i.e. agents $ad$. Figure \[gates-table\] shows the part of the valuation functions of these agents that perform the operation. Each figure shows a valuation function for one of the agents, meaning that the blue regions represent portions of the object that the agent desires. The agent's valuation for any particular interval is the integral of this function over that interval.

To understand the high-level picture of the construction, let us look at the construction for $G_{*\zeta}$. The precise valuation functions of the agents in the construction (see ) ensure that there is exactly one *input* cut in the region $v_{in}^{+}$. The leftmost piece due to that cut in that region will belong to $A_+$, while the rightmost will belong to $A_-$. It is also ensured that there is exactly one *output* cut in the region $v_{out}^{a}$, and that the first piece in that region will belong to $A_-$ and the second will belong to $A_+$.

Suppose that gate $g_i$ in the circuit is of type $G_{*\zeta}$ and we want to implement it through a <span>$\textsc{Consensus Halving}$</span>instance. If we treat $v_{in}^{+}$ and $v_{out}^{a}$ in Figure \[gates-table\] as representing $[0, 1]$, then agent $ad_i$ will take as input a cut at point $x \in v_{in}^{+}$. In order to be satisfied, $ad_i$ will impose a cut at point $y \in v_{out}^{a}$, such that $F_i(A_+) = F_i(A_-)$, where: $F_i(A_+) = x + (\zeta - y)/\zeta$ and $F_i(A_-) = (1 - x) + y/\zeta$. Simple algebraic manipulation can be used to show that $ad_i$ is satisfied only when $y = \zeta\cdot x$, as required.

We show that the same property holds for each of the gates in Figure \[gates-table\]. Two notable constructions are for the gates $G_{()^2}$ and $G^{[0, 1]}_{-}$. For the gate $G_{()^2}$ the valuation function of agent $ad$ is non-constant, which is needed to implement the non-linear squaring function. For the gate $G^{[0, 1]}_{-}$, note that the output region $v_{out}^{a}$ only covers half of the possible output space. The idea is that if the result of $x[v_{in1}] - 
x[v_{in2}]$ is negative, then the output cut will lie before the output region, which will be interpreted as a zero output by agents $mid, cen, ex$ in the construction. On the other hand, if the result is positive, the result will lie in the usual output range, and will be interpreted as a positive number. An example where $x[v_{in1}] = 1/4$ and $x[v_{in2}] = 3/4$ is shown in Figure \[example\_minus\].

![An example where the computation at the output $v_{out}:=v_{i}$ of a $G_{-}^{[0,1]}$ gate with inputs $v_{in1}:=v_j$ and $v_{in2}:=v_k$ is simulated by the <span>$\textsc{Consensus Halving}$</span>instance. Here $x[v_{j}] = 1/4$ and $x[v_{k}] = 3/4$, hence $x[v_{i}] = 0$. The information about the values of the inputs is encoded by the cuts (red lines) in intervals $v_{j}^{+}$, and $v_{k}^{-}$ imposed by agents $ex_j$ and $cen_{k}$ respectively. The blue and green shapes depict the area below the valuation function of each of the 4 agents. The pink regions have label "$+$" while the yellow have label "$-$". Agent $ad_i$ performs the subtraction, by demanding that she is satisfied, and places a cut $1/10$ to the left of the left endpoint of interval $v_{i}^a$. Then agent $mid_i$ gets satisfied by placing a cut at exactly the left endpoint of interval $v_{i}^m$, thus encoding the value 0 which is the correct output value of the gate. Finally, agents $cen_i, ex_i$ copy this value by enforcing similar cuts at the left endpoints of intervals $v_{i}^{-}$ and $v_{i}^{+}$ respectively. The encoded values in the latter two intervals are the "negative" and "positive" version of $x[v_{i}]$.<span data-label="example_minus"></span>](example-minus.pdf)

Ultimately, this allows us to construct a Consensus Halving instance that implements this circuit. This means that for any $x \in [0, 1]^n$, we can encode $x$ as a set of cuts, which then force cuts to be made at each gate gadget that encode the correct output for that gate.

\[lem:circuit-embed\] Suppose that we are given an arithmetic circuit with the following properties.

-   The circuit uses the gates $G_{\zeta}, G_{+}, G_{*\zeta}, G_{()^2}, G_{-}^{[0,1]}, G_{*2}^{[0,1]}$.

-   Every $G_{\zeta}$ and $G_{* \zeta}$ has $\zeta \in \mathbb{Q} \cap (0, 1]$.

-   For every input $x \in [0, 1]^n$, all intermediate values computed by the circuit lie in $[0, 1]$.

We can construct a Consensus Halving instance that implements this circuit.

The proof of this lemma is presented in Section \[app:circuit-embed\].

$(n,n)$-<span style="font-variant:small-caps;">Consensus Halving</span> is <span>$\mathtt{FIXP}$</span>-hard {#subsec:FIXP-hard}
------------------------------------------------------------------------------------------------------------

We show that $(n,n)$-<span>$\textsc{Consensus Halving}$</span>is <span>$\mathtt{FIXP}$</span>-hard by reducing from the problem of finding a Nash equilibrium in a $d$-player game, which is known to be <span>$\mathtt{FIXP}$</span>-complete @EY10. As shown in @EY10, this problem can be reduced to the Brouwer fixed point problem: given an arithmetic circuit computing a function $F
: [0, 1]^n \to [0, 1]^n$, find a point $x \in [0, 1]^n$ such that $F(x) = x$. In a similar way to @FFGZ18, we take this circuit and embed it into a Consensus Halving instance, with the outputs looped back to the inputs. Since Lemma \[lem:circuit-embed\] implies that our implementation of the circuit is correct, this means that any solution to the Consensus Halving problem must encode a point $x$ satisfying $F(x) = x$.

One difficulty is that we must ensure that the arithmetic circuit that we build falls into the class permitted by Lemma \[lem:circuit-embed\]. To do this, we carefully analyse the circuits produced in @EY10, and we modify them so that all of the preconditions of Lemma \[lem:circuit-embed\] hold. This gives us the following result.

\[thm:CH\_is\_FIXP-hard\] $(n,n)$-<span>$\textsc{Consensus Halving}$</span>is <span>$\mathtt{FIXP}$</span>-hard.

The proof of this theorem is presented in Section \[app:CH\_is\_FIXP-hard\]. Theorem \[thm:CH\_is\_FIXP-hard\], together with Theorem \[thm:CHinBU\] give the following corollary.

<span>$\mathtt{FIXP}$</span>$\subseteq$ <span>$\mathtt{BU}$</span>.

$(n,n-1)$-<span>$\textsc{Consensus Halving}$</span>is <span>$\mathtt{ETR}$</span>-complete {#sec:ETR}
------------------------------------------------------------------------------------------

We will show the <span>$\mathtt{ETR}$</span>-hardness of $(n,n-1)$-<span>$\textsc{Consensus Halving}$</span>by reducing from the following problem <span>$\textsc{Conjuction}_{[0,1]}$</span>, which we prove it is <span>$\mathtt{ETR}$</span>-complete.

\[<span>$\textsc{Conjuction}_{[0,1]}$</span>\] Let $p_1, \ldots, p_k : [0,1]^n \to {\mathbb{R}}$ be a family of polynomials, where each one of them is given as a sum of monomials with integer coefficients. <span>$\textsc{Conjuction}_{[0,1]}$</span>asks whether the polynomials have a common zero.

Then, we reduce the above problem to the following one.

\[<span>$\textsc{Feasible}$</span>, <span>$\textsc{Feasible}_{[0,1]}$</span>\] \[def:feas\] Let $p(x_1, \dots, x_m)$ be a polynomial. <span>$\textsc{Feasible}$</span>asks whether there exists a point $(x_1, \dots, x_m) \in {\mathbb{R}}^m $ that satisfies $p(x_1, \dots, x_m) = 0$. <span>$\textsc{Feasible}_{[0,1]}$</span>asks whether there exists a point $(x_1, \dots, x_m) \in [0,1]^m$ that satisfies $p(x_1, \dots, x_m) = 0$.

The idea is to turn the polynomial into a circuit, and then embed that circuit into a Consensus Halving instance using Lemma \[lem:circuit-embed\]. As before, the main difficulty is ensuring that the preconditions of Lemma \[lem:circuit-embed\] are satisfied. To do this, we must ensure that the inputs to the circuit take values in $[0, 1]$, which is not the case if we reduce directly from <span>$\textsc{Feasible}$</span>. Instead, we first consider the problem ${\ensuremath{\textsc{Feasible}_{[0,1]}}\xspace}$, in which $x$ is constrained to lie in $[0, 1]^n$ rather than ${\mathbb{R}}^n$, and we show the following result.

\[lem:Feas\_is\_etr-c\] <span>$\textsc{Feasible}_{[0,1]}$</span>is <span>$\mathtt{ETR}$</span>-complete even for a polynomial of maximum sum of variable exponents in each monomial equal to 4.

The proof of that lemma is presented in Section \[app:Feas\_is\_etr-c\]. Consequently, via a polynomial-time reduction from <span>$\textsc{Feasible}_{[0,1]}$</span>to $(n,n-1)$-<span>$\textsc{Consensus Halving}$</span>and Theorem \[thm:CHinETR\], we prove the following result.

\[thm:CH\_is\_etr-c\] $(n,n-1)$-<span>$\textsc{Consensus Halving}$</span>is <span>$\mathtt{ETR}$</span>-complete.

The proof of the above theorem is presented in Section \[app:CH\_is\_etr-c\].

Proof of Lemma \[lem:circuit-embed\] {#app:circuit-embed}
====================================

In this section, the detailed construction of a <span>$\textsc{Consensus Halving}$</span>instance from an arbitrary given special circuit is presented. A special circuit is an arithmetic circuit with the properties described in the statement of Lemma \[lem:circuit-embed\] (see Section \[sec:special\_cir\] for a detailed definition). After the construction, a correspondence of circuit to <span>$\textsc{Consensus Halving}$</span>solutions is proven, which completes the proof of the lemma.

Special circuit to <span>$\textsc{Consensus Halving}$</span>instance {#app:cir_to_ch}
--------------------------------------------------------------------

Consider a circuit $H = (V, {\ensuremath{\mathcal{T}}})$ that uses gates in $\{G_{\zeta}, G_{+}, G_{*\zeta}, G_{()^2}, G_{-}^{[0,1]}, G_{*2}^{[0,1]}\}$, with $\zeta \in \mathbb{Q} \cap (0,1]$, each gate's inputs/output are in $[0,1]$, and both inputs of $G_{+}$ are in $[0,1/2]$. The constraints of the special gates $G_{()^2}, G_{-}^{[0, 1]}, G_{*2}^{[0,1]}$ are shown in Table \[tbl:special\_gates\].

In general, the input of $H$ is a $N$-dimensional vector $x \in [0,1]^N$ is given by $N$ nodes with in-degree 0 and out-degree 1, called *input-nodes*. Also, in general, the output of $H$ is a $M$-dimensional vector $x' \in [0,1]^M$ (the dimension of the circuit's output is of no importance here). Moreover, it could be the case that $H$ is *cyclic*, meaning that it has no input and no output, but here we will consider the general case. Without loss of generality, let the rest of the nodes be of in-degree 1 and out-degree 1, located right after each gate's output. By "right after" we mean that if a gate's output has a branching, the node is placed before the branching. Suppose that the total number of nodes in $H$ is $r := N + |{\ensuremath{\mathcal{T}}}| = poly(N)$, since by definition $H$ has polynomial size.

If the node $v_{i} \in V$ for $i \in [r]$ is at the output of gate $g_i$ we will call it the *output-node of $g_i$* (otherwise it will be an input-node). For an example see Figure \[pl-node2\].

![A node in series with the output of an addition gate. $v$ is the *output-node* of $g$.<span data-label="pl-node2"></span>](pl-node2.pdf)

Consider the node $v_i$, the output-node of gate $g_i$. $v_i$ corresponds to 4 Consensus Halving agents, named $ad_i$, $mid_i$, $cen_i$ and $ex_i$. Player $ad_i$ (Latin for "to") represents the incoming edge *to* node $v_i$ and agent $ex_i$ (Latin for "from") the outgoing edge *from* $v_i$, while both $mid_i$ and $cen_i$ represent an edge at the *middle* (*center*) of node $v_i$ that connects its input and output. The number of agents created in $H$ is $n := 4r$. The domain of the valuation functions of the agents is $[0,12r]$. Furthermore, this interval is split to $r$ blocks, with the $i$-th block being $[b_i, b_{i+1}]$, where $b_i := 12(i-1)$, $i \in [r]$.

According to the definition of the <span>$\textsc{Consensus Halving}$</span>problem, the domain of the valuation functions of the agents is $[0,1]$. Although the domain of the valuation functions of the <span>$\textsc{Consensus Halving}$</span>instance that we reduce to is $[0,12r]$, this is just for convenience of presentation. In fact, by scaling down each block to length $1/(12r)$ (divide by $12r$), the domain becomes $[0,1]$ and the correctness of the reduction is preserved.

Let us define the function $border_{i}(t)$, $t \in [0,12r]$ for each node $v_i$, $i \in [r]$. The idea for this function is from @FFGZ18. If $v_i$ is the output-node of gate type $G_{*\zeta}$, then $$\begin{aligned}
    border_{i}(t) &= \begin{cases}
        4 , \quad &t \in [b_{i}, b_{i}+1] \cup [b_{i}+1+\zeta, b_{i}+2+\zeta] \\
        0 , \quad &\text{otherwise}
    \end{cases}\end{aligned}$$ If $v_i$ is the output-node of any gate type other than $G_{*\zeta}$, then $$\begin{aligned}
    border_{i}(t) &= \begin{cases}
        4 , \quad &t \in [b_{i}, b_{i}+1] \cup [b_{i}+2, b_{i}+3] \\
        0 , \quad &\text{otherwise}
    \end{cases}\end{aligned}$$ and also:

-   $v_{i}^{a} := [b_{i} + 1, b_{i} + 2] := [v_{i,l}^{a}, v_{i,r}^{a}]$

-   $v_{i}^{m} := [b_{i} + 4, b_{i} + 5] := [v_{i,l}^{m}, v_{i,r}^{m}]$

-   $v_{i}^{-} := [b_{i} + 7, b_{i} + 8] := [v_{i,l}^{-}, v_{i,r}^{-}]$

-   $v_{i}^{+} := [b_{i} + 10, b_{i} + 11] := [v_{i,l}^{+}, v_{i,r}^{+}]$

-   $G_{\pi}(t)$ is the function corresponding to gate of type $G_{\pi} \in \{ G_{\zeta}, G_{*\zeta}, G_{+}, G_{()^2}, G_{-}^{[0,1]}, G_{*2}^{[0,1]}\}$ (see Figure \[gates-table\]).

The valuation functions of the agents $ad_i$, $mid_i$, $cen_i$ and $ex_i$ corresponding to node $v_i$ are, $$\begin{aligned}
\label{val-functions}
    ad_i(t) &= \begin{cases}
        border_{i}(t) + G_{\pi}(t) , \quad &\text{if $v_i$ is the output-node of gate type $G_{\pi}$}\\
        border_{i}(t) , \quad &\text{if $v_i$ is input-node (input of $H$)}.
    \end{cases} \\
    mid_i(t) &= \begin{cases}
        4 , \quad &t \in [b_{i}+3, b_{i}+4] \cup [b_{i}+5, b_{i}+6] \\
        1 , \quad &t \in v_{i}^{a} \cup v_{i}^{m} \\
        0 , \quad &\text{otherwise}
    \end{cases} \nonumber \\
    cen_i(t) &= \begin{cases}
        4 , \quad &t \in [b_{i}+6, b_{i}+7] \cup [b_{i}+8, b_{i}+9] \\
        1 , \quad &t \in v_{i}^{m} \cup v_{i}^{-} \\
        0 , \quad &\text{otherwise}
    \end{cases} \nonumber \\
    ex_i(t) &= \begin{cases}
        4 , \quad &t \in [b_{i}+9, b_{i}+10] \cup [b_{i}+11, b_{i}+12] \\
        1 , \quad &t \in v_{i}^{-} \cup v_{i}^{+} \\
        0 , \quad &\text{otherwise}
    \end{cases} \nonumber\end{aligned}$$

The intuition for the synergy of the 4 agents is the following: Take as a given that in a solution of the created <span>$\textsc{Consensus Halving}$</span>instance with at most $n$ cuts, a cut is placed only (almost always[^8]) in the intervals $v_{i}^{a}, v_{i}^{m}, v_{i}^{-}, v_{i}^{+}$ for every $i \in [r]$. Since the length of each of those intervals is 1, each such cut encodes a number in $[0,1]$. Consider $v_i$, the output-node of gate $g_i$ with inputs $v_{j}, v_{k}$. Think of the agents $ad_i$, $mid_i$, $cen_i$, $ex_i$ as being sequential, meaning that each of them "computes" a value via a cut in $v_{i}^{a}, v_{i}^{m}, v_{i}^{-}$ or $v_{i}^{+}$ respectively, and feeds it in the next agent. In particular, agent $ad_i$ takes as input the values (in the form of cuts) that nodes $v_{j}, v_{k}$ give her, and computes the exact operation that $g_i$ prescribes (e.g. if $g_i$ is type $G_{-}^{[0,1]}$, $ad_i$ performs subtraction of the input values without capping at 0, see Figure \[example\_minus\]). Then $ad_i$ feeds this value in $mid_i$ via creating a cut in $v_{i}^{a}$, and $mid_i$ computes the actual value in $[0,1]$ that $g_i$ should output (e.g. if $g_i$ is type $G_{-}^{[0,1]}$, in this step $mid_i$ caps the value at 0), and feeds it in $cen_i$ via creating a cut in $v_{i}^{m}$. This correct value should be exported for further use from other gates to which $v_i$ is input, but depending on these gates, the positive or negative of that value might be needed (by "positive" and "negative" we mean the label, not the actual sign of the value). That is why a negative version of this value is produced by $cen_{i}$ and a positive by $ex_i$, via a cut in $v_{i}^{-}$ and $v_{i}^{+}$ respectively. A negative(resp. positive) value is one encoded by a cut that defines an interval at its left which is *negative*(resp *positive*). Moreover, for every input-node $v_j$ we arbitrarily consider $ad_j$ to encode a negative value, therefore, since (by the structure of the <span>$\textsc{Consensus Halving}$</span>instance) the labels of the values induced by the 4 agents are alternating, the agents $mid_{i}$, $cen_{i}$, $ex_{i}$ encode a positive, negative, and positive value, respectively.

One-to-two correspondence of circuit values to <span>$\textsc{Consensus Halving}$</span>cuts
--------------------------------------------------------------------------------------------

Here we show that a solution of the special circuit maps to one pair of <span>$\textsc{Consensus Halving}$</span>solutions (since the solutions come by definition in pairs of opposite signs of pieces), and any pair of <span>$\textsc{Consensus Halving}$</span>solutions maps to exactly one solution of the special circuit.

Let us define the functions $z_{i}(x)$, $i \in [r]$ that depend on the input vector $x \in [0,1]^N$, and compute the value of each node $v_i$ of the arithmetic circuit $H$. Let us also, without loss of generality, set $(z_1, \dots, z_N) := (x_1, \dots, x_N)$. First, we will show that for every tuple $(z_{1}(x), \dots, z_{r}(x))$ of values that satisfy $H$, a solution in the constructed <span>$\textsc{Consensus Halving}$</span>instance with $n$ agents and $n$ cuts ($n := 4r$) encodes the same values via its cuts. We will then show that for every solution of the <span>$\textsc{Consensus Halving}$</span>instance with $n$ agents and $n$ cuts, the cuts correspond to a unique tuple $(z_1, \dots, z_r)$ that satisfies $H$.

In the sequel, we call a cut $t$ *negative*(resp. *positive*) if the interval that it defines at its left has negative(resp. positive) label. Also, in the following subsections, the analysis is done for the case where the resulting <span>$\textsc{Consensus Halving}$</span>solution has its leftmost interval being negative. However, there is one more solution symmetric to this, in which the leftmost interval is positive. In any solution we remind that the intervals are of alternating signs (see definition of a <span>$\textsc{Consensus Halving}$</span>solution in Section \[sec:CH\_definition\]). We omit the analysis of the solution where the leftmost interval is positive since it is identical to the presented one.

### Circuit values to cuts {#par:cir-to-ch}

Suppose the tuple $(z_{1}^*, \dots, z_{r}^*)$ satisfies $H$. We will show that from this solution we can create a <span>$\textsc{Consensus Halving}$</span>solution with $n:=4r$ cuts, i.e. all of the agents are satisfied. Consider node $v_{i}$ of $H$. Let us translate the values $z_{i}^{*}$, $i \in [r]$ into cuts as follows:

-   If $g_{i}$'s type is one of $G_{\zeta}, G_{*\zeta}, G_{+}, G_{()^2}, G_{*2}^{[0,1]}$ or $v_i$ is an input-node.

    -   Place a cut at $t = v_{i,l}^{a} + z_{i}^{*}$,

    -   Place a cut at $t = v_{i,l}^{m} + z_{i}^{*}$,

    -   Place a cut at $t = v_{i,l}^{-} + z_{i}^{*}$,

    -   Place a cut at $t = v_{i,l}^{+} + z_{i}^{*}$.

-   If $g_{i}$'s type is $G_{-}^{[0,1]}$, i.e. $g_{i} = \max\{g_j - g_k , 0\}$, and $z_j^* \geq z_k^*$.

    -   Place a cut at $t = v_{i,l}^{a} + z_{i}^{*}$,

    -   Place a cut at $t = v_{i,l}^{m} + z_{i}^{*}$,

    -   Place a cut at $t = v_{i,l}^{-} + z_{i}^{*}$,

    -   Place a cut at $t = v_{i,l}^{+} + z_{i}^{*}$.

-   If $g_{i}$'s type is $G_{-}^{[0,1]}$, i.e. $g_{i} = \max\{g_j - g_k , 0\}$, and $z_j^* < z_k^*$

    -   Place a cut at $t = v_{i,l}^{a} - (z_{k}^{*} - z_{j}^{*})/5$,

    -   Place a cut at $t = v_{i,l}^{m} + z_{i}^{*}$,

    -   Place a cut at $t = v_{i,l}^{-} + z_{i}^{*}$,

    -   Place a cut at $t = v_{i,l}^{+} + z_{i}^{*}$.

By construction of the valuation functions of the agents, these cuts are placed one after the other, where there is one cut in each of the intervals $v_{i}^{a}$, $v_{i}^{m}$, $v_{i}^{-}$, $v_{i}^{+}$ in that order, and each such sequence of four cuts is in an increasing order of $i$. By definition, any solution of <span>$\textsc{Consensus Halving}$</span>has alternating signs of the resulting pieces, and, as mentioned earlier, each solution comes with another symmetric solution with the same cuts and opposite signs of pieces. The analysis here is shown for the solution where the leftmost piece is negative, and we omit the analysis of the symmetric solution since it is identical. Let us now prove that for every $i \in [r]$, the $ad_i$ agent is satisfied.

#### $\mathbf{G_{\zeta}:}$ {#mathbfg_zeta .unnumbered}

This gate has no input. Consider its output $z_{i}^* = \zeta$ and its output-node $v_i$. By our constructed $n$-cut, a cut is placed at $t = v_{i,l}^{a} + \zeta$. Since the valuation function of $ad_i$ is symmetric around $v_{i, l}^{a} + \zeta$ (see aforementioned equation that describes the valuation functions), the total valuation is cut exactly in half (see Figure \[gates-table\]), therefore agent $ad_i$ is satisfied.

#### $\mathbf{G_{*\zeta}:}$ {#mathbfg_zeta-1 .unnumbered}

Consider its input $z_{j}^*$, output $z_{i}^* = \zeta \cdot z_{j}^*$ and its output-node $v_i$. By our constructed $n$-cut, a positive cut is placed at $t = v_{j,l}^{+} + z_{j}^*$ and a negative cut is placed at $t = v_{i,l}^{a} + z_{i}^*$. Agent $ad_i$ is satisfied since her positive valuation equals her negative one. In particular, $z_{j}^* \cdot 1 + (\zeta - z_{i}^{*}) \cdot \frac{1}{\zeta} + 1 \cdot 4 = (1 - z_{j}^*) \cdot 1 + 1 \cdot 4 + z_{i}^{*} \cdot \frac{1}{\zeta}$ is true.

#### $\mathbf{G_{+}:}$ {#mathbfg_ .unnumbered}

Consider its inputs $z_{j}^*$, $z_{k}^*$, its output $z_{i}^* = z_{j}^* + z_{k}^*$ and its output-node $v_i$. By our constructed $n$-cut, a positive cut is placed at $t = v_{j,l}^{+} + z_{j}^*$, another positive cut is placed at $t = v_{k,l}^{+} + z_{k}^*$ and a negative cut is placed at $t = v_{i,l}^{a} + z_{i}^*$. Agent $ad_i$ is satisfied since her positive valuation equals her negative one. In particular, $z_{j}^* \cdot 1 + z_{k}^* \cdot 1 + (1 - z_{i}^*) \cdot 1 + 1 \cdot 4 = (1/2 - z_{j}^*) \cdot 1 + (1/2 - z_{k}^*) \cdot 1 + 1 \cdot 4 + z_{i}^{*} \cdot 1$ is true.

#### $\mathbf{G_{()^2}:}$ {#mathbfg_2 .unnumbered}

Consider its input $z_{j}^*$, output $z_{i}^* = (z_{j}^*)^2$ and its output-node $v_i$. By our constructed $n$-cut, a positive cut is placed at $t = v_{j,l}^{+} + z_{j}^*$ and a negative cut is placed at $t = v_{i,l}^{a} + z_{i}^*$. Agent $ad_i$ is satisfied since her positive valuation equals her negative one. In particular, $(z_{j}^*)^2 + (1 - z_{i}^{*}) \cdot 1 + 1 \cdot 4 = (1 - (z_{j}^*)^2) + 1 \cdot 4 + z_{i}^{*} \cdot 1$ is true.

#### $\mathbf{G_{*2}^{[0,1]}:}$ {#mathbfg_201 .unnumbered}

Consider its input $z_{j}^*$, output $z_{i}^* = 2 \cdot z_{j}^*$ and its output-node $v_i$. By our constructed $n$-cut, a positive cut is placed at $t = v_{j,l}^{+} + z_{j}^*$ and a negative cut is placed at $t = v_{i,l}^{a} + z_{i}^*$. Agent $ad_i$ is satisfied since her positive valuation equals her negative one. In particular, $z_{j}^* \cdot 1 + (1 - z_{i}^{*}) \cdot \frac{1}{2} + 1 \cdot 4 = (1/2 - z_{j}^*) \cdot 1 + 1 \cdot 4 + z_{i}^{*} \cdot \frac{1}{2}$ is true.

#### $\mathbf{G_{-}^{[0,1]}:}$ {#mathbfg_-01 .unnumbered}

Consider its inputs $z_{j}^*$, $z_{k}^*$, its output $z_{i}^* = \max \{ z_{j}^* - z_{k}^* , 0 \}$ and its output-node $v_i$. By our constructed $n$-cut,

-   if $z_j^* \geq z_k^*$, then $z_{i}^* = z_{j}^* - z_{k}^*$. By our constructed $n$-cut, a positive cut is placed at $t = v_{j,l}^{+} + z_{j}^*$, a negative cut is placed at $t = v_{k,l}^{-} + z_{k}^*$ and another negative cut is placed at $t = v_{i,l}^{a} + z_{i}^*$. Agent $ad_i$ is satisfied since her positive valuation equals her negative one. In particular, $z_{j}^* \cdot 1 + (1 - z_{k}^*) \cdot 1 +  (1 - z_{i}^*) \cdot 1 + 1 \cdot 4 = (1 - z_{j}^*) \cdot 1 + z_{k}^* \cdot 1  + 1 \cdot (1+4) + z_{i}^{*} \cdot 1$ is true.

-   if $z_j^* < z_k^*$, then $z_{i}^* = 0$. By our constructed $n$-cut, a positive cut is placed at $t = v_{j,l}^{+} + z_{j}^*$, a negative cut is placed at $t = v_{k,l}^{-} + z_{k}^*$ and another negative cut is placed at $t = v_{i,l}^{a}   - (z_{k}^{*} - z_{j}^{*})/5$. Agent $ad_i$ is satisfied since her positive valuation equals her negative one. In particular, $z_{j}^* \cdot 1 + (1 - z_{k}^*) \cdot 1 + \frac{z_{k}^* - z_{j}^*}{5} \cdot (1+4) + 1 \cdot 1 + 1 \cdot 4  = (1 - z_{j}^*) \cdot 1 + z_{k}^* \cdot 1 + (1 - \frac{z_{k}^* - z_{j}^*}{5}) \cdot (1+4)$ is true.

 \
We will now prove that in our constructed $n$-cut, the agents $mid_i$, $cen_i$, $ex_i$ are also satisfied. If $g_i$ is not a $G_{-}^{[0,1]}$ gate, let us prove that $mid_i$ is satisfied. In our $n$-cut there is a negative cut at $t = v_{i,l}^{a} + z_{i}^{*}$ and a positive one at $t = v_{i,l}^{m} + z_{i}^{*}$. Agent $mid_i$ is satisfied since her negative valuation equals her positive one. In particular, $z_{i}^* \cdot 1 + (1 - z_{i}^*) \cdot 1 + 1 \cdot 4  = (1 - z_{i}^*) \cdot 1 + 1 \cdot 4 + z_{i}^* \cdot 1 $ is true.

If $g_i$ is a $G_{-}^{[0,1]}$ gate, let us prove that $mid_i$ is satisfied.

-   if $z_j^* \geq z_k^*$, then a negative cut is placed at $t = v_{i,l}^{a} + z_{i}^*$, and a positive cut is placed at $t = v_{i,l}^{m} + z_{i}^*$. Agent $mid_i$ is satisfied since her negative valuation equals her positive one. In particular, $z_{i}^* \cdot 1 + (1 - z_{i}^*) \cdot 1 + 1 \cdot 4  = (1 - z_{i}^*) \cdot 1 + 1 \cdot 4 + z_{i}^* \cdot 1 $ is true.

-   if $z_j^* < z_k^*$, then a negative cut is placed at $t = v_{i,l}^{a} - (z_{k}^{*} - z_{j}^{*})/5$ and a positive cut is placed at $t = v_{i,l}^{m}$. Agent $mid_i$ is satisfied since her negative valuation equals her positive one. In particular, $ \frac{z_{k}^{*} - z_{j}^{*}}{5} \cdot 0 + 1 \cdot 1 + 1 \cdot 4 = 1 \cdot 1 + 1 \cdot 4 + 0 \cdot 1 $ is true.

For the agents $cen_i$ and $ex_i$, since their valuation functions are the same as $mid_i$ shifted to the right, it is easy to see that the $n$-cut we provide forces them to have positive valuation equal to their negative one.

### Cuts to circuit values {#par:ch-to-cir}

Now suppose that the tuple $(t_{1}^*, \dots, t_{n}^*)$ with $0 \leq t_{1}^* \leq \dots \leq t_{n}^* \leq 12r$, represents an $n$-cut ($n := 4r$) that is a solution of the constructed <span>$\textsc{Consensus Halving}$</span>instance with $n$ agents, where w.l.o.g. the first $4N$ cuts correspond to the $N$ input-nodes. We will show that from this solution we can construct a tuple $(z_{1}, \dots, z_{r})$ that satisfies the circuit $H$. Again, note that solutions of <span>$\textsc{Consensus Halving}$</span>come in pairs, where the two solutions have the same cuts but opposite signs of pieces. We will only analyse the solution where the leftmost interval has negative sign and omit the symmetric case with positive leftmost interval since the analysis is identical and both <span>$\textsc{Consensus Halving}$</span>solutions map to the same circuit solution.

Consider node $v_{i}$ which is the output-node of gate $g_{i}$ or it is an input-node. Observe that the valuation function of each of $ad_i, mid_i, cen_i$ and $ex_i$ has more than half of her total valuation inside the interval $[b_i , b_i + 3], [b_i + 3, b_i + 6], [b_i + 6, b_i + 9]$ and $[b_i + 9, b_i + 12]$ respectively. This means that in a solution, each of them has to have at least one cut in her corresponding aforementioned interval. But since these intervals are not overlapping for all $n$ agents, and we need to have at most $n$ cuts, exactly one cut has to be placed by each agent in her corresponding interval.

Consider now the first $4N$ cuts that correspond to the input-nodes. As it is apparent from the definition of these nodes' valuation functions, each agent of $ad_i, mid_i, cen_i, ex_i$ for $i \in [N]$ has to place her single cut in the interval $v_{i}^{a}, v_{i}^{m}, v_{i}^{-}, v_{i}^{+}$ respectively. Given the latter fact, the definition of valuation functions for non input-node agents dictates that there will always be a cut in $v_{i}^{+}$ for every $i \in [r]$. Since $0 \leq t_{1}^* \leq \dots \leq t_{n}^* \leq 12r$, the sequential nature of our agents indicates that the cut $t_{4i}^*$, i.e. with index $4 \cdot i$, is found in interval $v_{i}^{+}$. Now, let us translate the position of the cut $t_{4i}^*, i \in [r]$ into the value $z_i = t_{4i}^* - v_{i,l}^{+} $. By a similar argument as that of the previous paragraph showing that the $ad_i$ agents are satisfied, it is easy to see that, by the aforementioned translation, the created tuple $(z_{1}, \dots, z_{r})$ satisfies circuit $H$.

### Valuation functions to circuits {#par:fun-to-cir}

In the <span>$\textsc{Consensus Halving}$</span>instances we construct, we have described the valuation functions of the agents mathematically. However, in a <span>$\textsc{Consensus Halving}$</span>instance the input is an arithmetic circuit, therefore we have to turn each valuation function of each agent $j \in [n]$ into its integral, and subsequently into an arithmetic circuit. Here we describe a method to do that.

The valuation functions we construct in our reduction (see Section \[app:cir\_to\_ch\]) are piecewise polynomial functions of a single variable and their degree is at most 1, with $k$ pieces where $k$ is constant. Therefore, their integrals, which are the input of the <span>$\textsc{Consensus Halving}$</span>problem (captured by arithmetic circuits), are piecewise polynomial functions (with the same pieces) with degree at most 2. Consider the valuation function $f$ of an arbitrary player. Let the pieces of $f$ be $[p_0,p_1), [p_1,p_2), \dots , [p_{k-1},p_{k}]$ where $p_0 = 0$ and $p_k = 1$ and denote $P_1, P_2, \dots, P_k$ the above pieces respectively. Let us also denote by $f^{P_s}$ the polynomial in interval $P_s$, $s \in \{1,2, \dots, k\}$. In particular, $f$ can be defined as $$\begin{aligned}
\label{f(t)}
    f(t) = \begin{cases}
        f^{P_1}(t) \quad, t \in [p_0,p_1) \\
        f^{P_2}(t) \quad, t \in [p_1,p_2) \\
        \vdots \\
        f^{P_k}(t) \quad, t \in [p_{k-1},p_{k}],
    \end{cases}\end{aligned}$$ and according to the valuation functions used in the reduction (see Section \[app:cir\_to\_ch\]), for any given piece $P_s$ there are two kinds of possible functions

1.  $f^{P_s}(t) = c_s$, where $c_s \geq 0$ is a constant, or

2.  $f^{P_s}(t) = 2 \cdot ( t - p_{s-1} )$.

(The latter comes from the valuation function of an $ad$ agent that corresponds to an output node of a $G_{()^2}$ gate.)

We would like to find a formula for the integral of $f(t)$, denoted $F(t)$, and we also require that $F(t)$ is computable by an arithmetic circuit, so that it is a proper input (together with the other agents' integrals of valuation functions) to the <span>$\textsc{Consensus Halving}$</span>instance. For each piece $P_s$ we will construct an integral, denoted by $F^{P_s}(t)$, such that each such integral will be computable by an arithmetic circuit, and so that it will be $F(t) = \sum_{s \in \{1,2,\dots,k\}} F^{P_s}(t)$. First, let us construct the function $D_{s}(t)$ using the domain $P_s$ of $f^{P_s}(t)$: $$\begin{aligned}
    D_{s}(t) := \min\left\{ \max\left\{ t, p_{s-1} \right\}, p_{s} \right\},\end{aligned}$$ which takes values $$\begin{aligned}
    D_{s}(t) = \begin{cases}
        p_{s-1} , &t < p_{s-1} \\
        t , &t \in [p_{s-1},p_{s}] \\
        p_{s} , &t > p_{s}.
    \end{cases}\end{aligned}$$

Now, for function $f^{P_s}(t)$ of case (a), we construct its integral: $$\begin{aligned}
    F^{P_s}(t) := c_{s} \cdot \left( D_{s}(t) - p_{s-1} \right),\end{aligned}$$ which takes values $$\begin{aligned}
    F^{P_s}(t) = \begin{cases}
        0 , &t < p_{s-1} \\
        c_{s} \cdot \left( t - p_{s-1} \right) , &t \in [p_{s-1},p_{s}] \\
        c_{s} \cdot \left( p_{s} - p_{s-1} \right) , &t > p_{s}.
    \end{cases}\end{aligned}$$ Similarly, for function $f^{P_s}(t)$ of case (b), we also construct its integral: $$\begin{aligned}
    F^{P_s}(t) := \left( D_{s}(t) - p_{s-1} \right)^2,\end{aligned}$$ which takes values $$\begin{aligned}
    F^{P_s}(t) = \begin{cases}
        0 , &t < p_{s-1} \\
        \left( t - p_{s-1} \right)^2 , &t \in [p_{s-1},p_{s}] \\
        \left( p_{s} - p_{s-1} \right)^2 , &t > p_{s}.
    \end{cases}\end{aligned}$$ Finally, for the agent with valuation function $f(t)$, the corresponding function computable by the arithmetic circuit that is input to the <span>$\textsc{Consensus Halving}$</span>problem is: $$\begin{aligned}
    F(t) := \sum_{s \in \{1,2,\dots,k\}} F^{P_s}(t).\end{aligned}$$ For the integral function $F(t)$ indeed it holds that $F(t) = \int_0^t f(x) \, dx$ as required. That is because, by the way we defined each $F^{P_s}(t)$, for any $t \in P_{s^*}$ it is $$\begin{aligned}
    F(t) = \sum_{s \in \{1,2,\dots,k\}} F^{P_s}(t) &= \sum_{s \in \{1,2,\dots,s^{*}-1\}} F^{P_s}(t) + F^{P_s^{*}}(t) + \sum_{s \in \{s^{*}+1,\dots,k\}} 0 \\
    &= \sum_{s \in \{1,2,\dots,s^{*}-1\}} \int_{P_s} f^{P_s}(x) \, dx +  \int_{p_{s^{*}-1}}^{t} f^{P_s^{*}}(x) \, dx \\
    &= \sum_{s \in \{1,2,\dots,s^{*}-1\}} \int_{p_{s-1}}^{p_{s}} f(x) \, dx +  \int_{p_{s^{*}-1}}^{t} f(x) \, dx \\
    &= \int_0^t f(x) \, dx\end{aligned}$$ For each player with some valuation function $f$ as defined above, we can compute the functions $F^{P_s}$, $s \in [k]$ by using gates $G_{\zeta}, G_{*\zeta}, G_{-}, G_{*}, G_{min}, G_{max}$. Then $F(t)$ can be computed by using $G_{+}$ gates. The arithmetic circuits that compute the functions $F(t)$ (one for each agent $j \in [n]$) constitute a proper <span>$\textsc{Consensus Halving}$</span>instance. This completes the proof of Lemma \[lem:circuit-embed\].

Proof of Theorem \[thm:CH\_is\_FIXP-hard\] {#app:CH_is_FIXP-hard}
==========================================

In this section we give a detailed proof of Theorem \[thm:CH\_is\_FIXP-hard\] which states that $(n,n)$-<span>$\textsc{Consensus Halving}$</span>is <span>$\mathtt{FIXP}$</span>-hard. This is accomplished by finding a polynomial-time reduction from the <span>$\mathtt{FIXP}$</span>-complete problem of computing a "$d$-player Nash equilibrium" to the $(n,n)$-<span>$\textsc{Consensus Halving}$</span>problem. Using the machinery of @EY10, the <span>$\mathtt{FIXP}$</span>-complete problem is first expressed as a circuit with particular properties, which is then embedded into a $(n,n)$-<span>$\textsc{Consensus Halving}$</span>instance using Lemma \[lem:circuit-embed\]. We prove that all of these steps can be executed in polynomial time.

In particular, in @EY10 it is shown that the problem of finding a Nash equilibrium of a $d$-player normal form game with $d \geq 3$ ("$d$-player Nash equilibrium" problem) is <span>$\mathtt{FIXP}$</span>-complete. Given an instance of this problem, we will construct a polynomial-time reduction to $(n,n)$-<span style="font-variant:small-caps;">Consensus Halving</span>. We will start from an arbitrary instance of "$d$-player Nash equilibrium" and, according to it, design a circuit using only the gates $G_{\zeta}, G_{+}, G_{-}, G_{*}, G_{\max}, G_{\min}$ with $\zeta \in \mathbb{Q}$. This step is done by a straightforward application of the procedure described in the proofs of Lemma 4.5 and Lemma 4.6 in @EY10. This circuit computes a function whose fixed points correspond precisely to the Nash equilibria of the initial game. Then, we create an equivalent circuit by "breaking down" the initial gates to some more suitable ones (by introducing "special gates", see Table \[tbl:special\_gates\]), whose inputs and outputs are guaranteed to be in $[0,1]$. From this, we will create a cyclic circuit, introduce Consensus Halving players on the "wires" of the circuit, and show that a Consensus Halving solution with at most as many cuts as the number of players in this instance can be efficiently translated back to a Nash equilibrium of the initial game.

Expressing the game as a circuit without division gates
-------------------------------------------------------

Here, given an arbitrary $d$-player game, we will employ a function presented in @EY10 whose fixed points are precisely the Nash equilibria of that game. Consider a given instance $I$ of the "$d$-player Nash equilibrium" problem, i.e. a $d$-player normal form game where each player $i$ has a set $S_i$ of pure strategies. We will use the following notation similar to the one in @EY10: $N_i := |S_i|$, $N := \sum_{i}^{d} N_{i}$ and $v_{i}$ is the payoff function of player $i$ with domain $D_{I} := \times_{i=1}^{d} \Delta_{N_{i}}$, where $\Delta_{N_{i}}$ is the unit $(N_{i}-1)$-simplex. Define the *mixed strategy profile* $x:=(x_{11}, \dots, x_{1N_1}, x_{21}, \dots, x_{2N_2}, \dots, x_{d1}, \dots, x_{dN_d})$ to be a $N$-dimensional vector with the entry $x_{ij}$ being the probability that player $i \in [d]$ plays pure strategy $j \in S_i$. Also, $v(x)$ is an $N$-dimensional vector with entries indexed as in $x$, with $v_{ij}(x) := v_{i}(j, x_{-i})$, the latter being the expected payoff of player $i$ when she plays the pure strategy $j \in S_i$ against the partial profile $x_{-i}$ of the rest of the players. The payoff function of each player is normalized by scaling in $[0,1/N]$ so that the Nash equilibria of the game are precisely the same. Thus, $v_{ij}(x) \in [0,1/N]$. Finally, let $h(x) := x + v(x)$.

Now, define for each player $i$ the function $f_{i,x}(t) := \sum_{j\in S_i} \max(h_{ij}(x) - t, 0)$ with parameter $x$. This function is defined in $\mathbb{R}$ and it is continuous, piecewise linear, strictly decreasing with values from $0$ to $+\infty$, thus there is a unique value $t_i \in \mathbb{R}$ such that $f_{i,x}(t_i)=1$. The required function whose set of fixed points is identical to the set of Nash equilibria of instance $I$ is $G_{I}(x)_{ij} := \max(h_{ij}(x)-t_i, 0)$ for $i \in [d]$, $j \in S_i$. The function $G_{I}$ takes as input the $n$-dimensional vector $x$ and outputs an $N$-dimensional vector $G_{I}(x)$ with entries defined as above. By definition of $G_{I}$ and choice of $t_i$, it is $\sum_{j \in S_i} G_{I}(x)_{ij} = 1$ for every $i \in [d]$, and therefore $G_{I}$ is a mapping of the domain $D_I$ to itself.

\[LEMMA 4.5, @EY10\]\[lem: EY1\] The fixed points of the function $G_{I}$ are precisely the Nash equilibria of the game $I$.

In fact, the structure of function $G_{I}$ allows for it to be efficiently constructed using only the required types of gates.

\[LEMMA 4.6, @EY10\] We can construct in polynomial time a circuit with basis $\{ +, -, *, \max, \min \}$ (no division) and rational constants that computes the function $G_{I}$.

For the proofs of the above lemmata the reader is referred to the indicated work by Etessami and Yannakakis.

In the proof of the latter lemma in @EY10 it is shown how to construct an arithmetic circuit $C_{I}$ that computes the function $G_{I}$ using only gates of type $G_{\zeta}, G_{+}, G_{-}, G_{*}, G_{\max}, G_{\min}$, where $\zeta \in \mathbb{Q}$. The construction of $C_{I}$ is the following: Compute the function $y=h(x)=x + v(x)$ using only $G_{+}, G_{*}$ type of gates, allowed by the definition of $v(x)$. Vector $y$ has $d$ sub-vectors, where $y_{i}=(y_{i1}, y_{i2}, \dots, y_{iN_i})$. Then, each $y_i$ is sorted using a sorting network $Z_i$ thus creating a vector $z_{i}=(z_{i1}, z_{i2}, \dots, z_{iN_i})$ with sorted entries $z_{i1} \geq z_{i2} \geq \dots \geq z_{iN_i}$; sorting networks can be implemented in arithmetic circuits using only gates $G_{\max}, G_{\min}$ (for more see e.g. @K98). Using $z_{ij}$'s the function $t_{i}:= \max_{l \in [N_i]} \left\{ (1/l) * \left( \left( \sum_{j=1}^{l} z_{ij} \right) - 1 \right) \right\}$ is computed and the final output of the whole circuit is $$\begin{aligned}
\label{output_C_{I}}
    x_{ij}' := \max \{ y_{ij} - t_i , 0 \} \quad \text{ for each } i \in [d], j \in S_{i}.\end{aligned}$$

A circuit with gates whose inputs/outputs are in $[0,1]$
--------------------------------------------------------

One can easily observe that some of the gates of circuit $C_{I}$ may have inputs and outputs outside of $[0,1]$. For example, the $G_{+}$ gate that computes $y_{ij}=x_{ij} + v(x)_{ij}$ can be 2 and the arguments of $G_{\max}$ in $t_i$ can be negative. We will transform this circuit into an equivalent one that guarantees its gates' inputs and outputs to be in $[0,1]$, using only gates $G_{\zeta}, G_{+}, G_{-}^{[0,1]}, G_{*}, G_{*2}^{[0,1]}, G_{\max}, G_{\min}$, where $\zeta \in \mathbb{Q}\cap(0,1]$.

In particular, instead of constructing the circuit $C_{I}$ as described in the previous paragraph, we will construct an equivalent one, called $C_{I}'$, whose input and output are the same as that of $C_{I}$, namely $x_{ij}$ and $x_{ij}'$, $i \in [d]$, $j \in [N_i]$ respectively, but its gates have inputs/outputs in $[0,1]$. We do this by manipulating the formula for the required function $G_I$ under computation, by suitably scaling up or down the input values of each gate, using additional gates $G_{\zeta}, G_{+}, G_{-}^{[0,1]} , G_{*}$.

We construct $C_{I}'$ as follows: First, we compute the vector $p := h(x)/2 = x*\frac{1}{2} + v(x)*\frac{1}{2}$ using only $G_{+}, G_{*}$ gates. Note that $x_{ij}, v_{ij}(x), p_{ij} \in [0,1]$, $\forall i\in[d],j \in S_i$ (recall that the payoff function is normalized in $[0,1]$). Then, we sort each of the sub-vectors $p_{i}$, $i \in [d]$ via a sorting network $Q_i$ that can be constructed using $G_{\max}$ and $G_{\min}$ gates, thus computing the sorted vectors $q_{i} = (q_{i1}, q_{i2}, \dots, q_{iN_i})$ with sorted entries $q_{i1} \geq q_{i2} \geq \dots \geq q_{iN_i}$. Now, for every $i \in [d]$ and $l \in [N_i]$ we compute the following sub-function $$\begin{aligned}
    t_{il}'' :=   \frac{1}{2} * \frac{1}{l} * \sum_{j=1}^{l} q_{ij}  + \frac{1}{2} - \frac{1}{4} * \frac{1}{l},\end{aligned}$$ by using $l+1$ $G_{+}$ gates, 3 $G_{+}$ gates and 1 $G_{-}^{[0,1]}$ gate, where the subtraction gate is the last to take place. One should observe that since $\sum_{j=1}^{N_i} x_{ij} = 1$ and $\sum_{j=1}^{N_i} v_{ij}(x) \leq 1$ (by definition of payoff function in $[0,1/N]$), it is $\sum_{j=1}^{N_i} q_{ij}  \leq \frac{1}{2} \cdot \left( 1 + 1 \right) = 1$, therefore none of the individual computations of $t_{il}''$ is outside $[0,1]$. Moreover, in the subtraction, the value of the subtrahend is at most the value of the minuend so the subtraction is precise (not capped at 0).

Now, for each $i \in [d]$ we compute the sub-function $$\begin{aligned}
    t_{i}'' := \max_{l \in [N_i]} \{ t_{il}'' \},\end{aligned}$$ by using $N_i - 1$ $G_{\max}$ gates, and consequently compute $$\begin{aligned}
    t_{i}' := \left( t_{i}'' - \frac{1}{2} \right) * 2,\end{aligned}$$ by using one $G_{-}^{[0,1]}$ and one special $G_{*2}^{[0,1]}$ gate where the computations happen from left to right. Note that $t_{i}'' \geq 1/2$, therefore the subtraction is precise (not capped at 0). Also, note that, by definition of $t_{il}''$, it is $t_{i}'' \leq 1$, therefore $t_{i}'' - 1/2 \leq 1/2$ and the output of the $G_{*2}^{[0,1]}$ gate of $t_{i}'$ is in $[0,1]$. Finally, the output of the circuit $C_{I}'$ is computed by $$\begin{aligned}
\label{output_C_{I}'}
    x_{ij}' := \max\{ p_{ij} - t_i', 0 \} * 2, \quad \text{ for each } i \in [d], j \in S_i,\end{aligned}$$ using one $G_{-}^{[0,1]}$ and one special $G_{*2}^{[0,1]}$ gate.

\[lem:C'=C\] Circuit $C_{I}'$ is equivalent to $C_{I}$, i.e. it computes the function $G_{I}$.

We will show that for every $i \in [d], j \in S_i$, the value $x_{ij}$ of (\[output\_C\_<span>I</span>'\]) is the same as that of (\[output\_C\_<span>I</span>\]), i.e. the output of the circuits $C_{I}'$ and $C_{I}$ is the exact same. Using the formulas for $t_{il}'', t_{i}''$ and $t_{i}'$, we can re-write algebraically $x_{ij}$ by substituting the circuit's operations with the regular mathematical ones, i.e. $G_{+}, G_{-}^{[0,1]}, G_{*2}^{[0,1]}, G_{*}, G_{\max}, G_{\min}$ translate to $+, -, \cdot 2, \cdot, \max, \min$ respectively. Observe that this is possible since the $G_{-}^{[0,1]}$ gate, excluding the one in (\[output\_C\_<span>I</span>'\]), actually performs subtraction without capping the output to 0. Thus, starting from (\[output\_C\_<span>I</span>'\]) we have $$\begin{aligned}
        x_{ij}' &= \max\{ p_{ij} - t_i', 0 \} \cdot 2 \\
        &= \max\{2 \cdot p_{ij} - 2 \cdot t_i', 0 \} \\
        &= \max\left\{y_{ij} - 4 \cdot \left( t_{i}'' - \frac{1}{2} \right), 0 \right\}   \quad \text{($y_{ij}$ from construction of $C_{I}$)} \\
        &= \max\left\{y_{ij} - 4 \cdot \left( \max_{l \in [N_i]} \{ t_{il}'' \} - \frac{1}{2} \right), 0 \right\}  \\
        &= \max\left\{y_{ij} - 4 \cdot \left( \max_{l \in [N_i]} \left\{ \frac{1}{2l} \cdot \left( \sum_{j=1}^{l} q_{ij} \right) + \frac{1}{2} - \frac{1}{4l}  \right\} - \frac{1}{2} \right), 0 \right\}  \\
        &= \max\left\{y_{ij} - 4 \cdot  \max_{l \in [N_i]} \left\{ \frac{1}{2l} \cdot \left( \sum_{j=1}^{l} q_{ij} \right) - \frac{1}{4l}  \right\} , 0 \right\}  \\
        &= \max\left\{y_{ij} -  \max_{l \in [N_i]} \left\{ \frac{1}{l} \cdot \left( \sum_{j=1}^{l} 2 \cdot q_{ij} \right) - \frac{1}{l}  \right\} , 0 \right\}  \\
        &= \max\left\{y_{ij} -  \max_{l \in [N_i]} \left\{ \frac{1}{l} \cdot \left( \left( \sum_{j=1}^{l} z_{ij} \right) - 1 \right) \right\} , 0 \right\}   \quad \text{($z_{ij}$ from construction of $C_{I}$)} \\
        &= \max\left\{y_{ij} -  t_i , 0 \right\}   \quad \text{($t_i$ from construction of $C_{I}$)},
    \end{aligned}$$ which is by definition equal to the output $x_{ij}'$ of (\[output\_C\_<span>I</span>\]).

The circuit $C_{I}'$ we constructed that computes the function $G_{I}$ uses gates of type in the set $\{G_{\zeta}, G_{+}, G_{*}, G_{\max}, G_{\min}, G_{-}^{[0,1]}, G_{*2}^{[0,1]} \}$, where $\zeta \in \mathbb{Q}\cap(0,1]$.

The $(n,n)$-<span style="font-variant:small-caps;">Consensus Halving</span> instance
------------------------------------------------------------------------------------

At this point we are ready to construct the $(n,n)$-<span style="font-variant:small-caps;">Consensus Halving</span> instance. The final circuit $C_{I}'$ computes the function $G_{I}$, where $G_{I}: D_{I} \to D_{I}$, whose fixed points are precisely the Nash equilibria of the initial instance $I$ of the $d$-player game, due to Lemma \[lem: EY1\]. The output of $C_{I}'$ is the $N$-dimensional vector $x'$ with entries $x_{ij}'$ computed from (\[output\_C\_<span>I</span>'\]). Let us close the circuit by connecting the output $x_{ij}'$ with the input $x_{ij}$ for every $i \in [d]$, $j \in S_i$. This new circuit, called $C_{I}^{o}$, is *cyclic*, meaning that it has no input and no output.

The cyclic circuit $C_{I}^{o}$ (like $C_{I}'$) uses only gates in $\{G_{\zeta}, G_{+}, G_{*}, G_{\max}, G_{\min}, G_{-}^{[0,1]}, G_{*2}^{[0,1]} \}$, where $\zeta \in \mathbb{Q}\cap(0,1]$. In Section \[subsec: cir-to-ch\] we describe how to turn such circuits into <span style="font-variant:small-caps;">Consensus Halving</span> instances. Suppose that $C_{I}^{o}$ uses $l$ gates. Then, by the procedure of Section \[subsec: cir-to-ch\] let us turn $C_{I}^{o}$ into a special circuit $C_{I}^{o'}$ with $r = linear(l)$ gates which uses only the required gates by Lemma \[lem:circuit-embed\]. Finally, still following that procedure, let us turn $C_{I}^{o'}$ into a <span>$\textsc{Consensus Halving}$</span>instance with $n := 4r$ agents.

We can now prove Theorem \[thm:CH\_is\_FIXP-hard\].

In Section \[app:circuit-embed\] it was proven that a solution to the above $(n,n)$-<span>$\textsc{Consensus Halving}$</span>instance, i.e. a solution with $n$ cuts, in linear time can be translated back to a tuple $z^* := (z_1^*, z_2^*, \dots, z_r^*)$ of satisfying values for the nodes of $C_{I}^{o'}$. Recall that $C_{I}^{o'}$ was created by another cyclic equivalent circuit $C_{I}^{o}$ which was also created by merging the input and output nodes of an acyclic circuit $C_{I}'$.

Let us denote by $v_1, v_2, \dots, v_N$ and $v'_1, v'_2, \dots, v'_N$ the input and output nodes respectively of $C_{I}'$ and denote by $V_1, V_2, \dots, V_N$ the merged nodes in $C_{I}^{o}$ and $C_{I}^{o'}$. Let us denote by $x^* := (x_1^*, x_2^*, \dots, x_N^*)$ the $N$ entries of $z^*$ that correspond to the values of nodes $(V_1, V_2, \dots, V_N)$. Since the procedure in Section \[subsec: cir-to-ch\] which turns $C_{I}^{o}$ into $C_{I}^{o'}$ preserves the computation of the values of $V_1, V_2, \dots, V_N$, it follows that $x^*$ satisfies $C_{I}^{o}$. Consequently, if the values $x^*$ are copied as values of both input $(v_1, v_2, \dots, v_N)$ and output $(v'_1, v'_2, \dots, v'_N)$ nodes of $C_{I}'$ then $C_{I}'$ is satisfied, since these nodes of $C_{I}'$ compute the same values as those that $V_1, V_2, \dots, V_N$ compute in $C_{I}^{o}$.

As it was shown in Lemma \[lem:C'=C\], the output of $C_{I}'$ computes the same output as $C_{I}$, which computes the function $G_{I}$. Thus, for $x^*$ it holds that $G_{I}(x^*) = x^*$, i.e. it is a fixed point of $G_{I}$. Recall now that the fixed points of $G_{I}$ are precisely the Nash equilibria of instance $I$ of the initial "$d$-player Nash equilibrium" problem. Since, due to @EY10, "$d$-player Nash equilibrium" is <span>$\mathtt{FIXP}$</span>-complete, it follows that $(n,n)$-<span>$\textsc{Consensus Halving}$</span>is <span>$\mathtt{FIXP}$</span>-hard.

Proof of Lemma \[lem:Feas\_is\_etr-c\] {#app:Feas_is_etr-c}
======================================

Let us define the constrained version of <span>$\mathtt{ETR}$</span>, denoted ${\ensuremath{\mathtt{ETR}_{[0,1]}}\xspace}$, where the polynomials are over $[0,1]^n$. It is easy to see that ${\ensuremath{\mathtt{ETR}_{[0,1]}}\xspace}\subseteq {\ensuremath{\mathtt{ETR}}\xspace}$; an arbitrary <span>$\mathtt{ETR}_{[0,1]}$</span>instance $\exists (X_1, \dots, X_m) \in [0,1]^m \cdot \Phi$, where $\Phi$ is the <span>$\mathtt{ETR}_{[0,1]}$</span>formula, can be written as the following <span>$\mathtt{ETR}$</span>instance $\exists (X_1, \dots, X_m) \in {\mathbb{R}}^m \cdot \Phi \bigwedge_{i=1}^{m} \left( \left(X_{i} \geq 0 \right) \wedge \left(X_{i} \leq 1 \right) \right)$.

Lemma 3.9 of @scha13 proves that the problem of deciding whether a family of polynomials $p_i : {\mathbb{R}}^n \to {\mathbb{R}}$, $i \in [k]$ has a common root in the $n$-dimensional unit-ball (with center $0^n$ and radius 1) is <span>$\mathtt{ETR}$</span>-complete. Furthermore, this holds even when all $p_i$'s have maximum sum of variable exponents in each monomial equal to 2. Since the $n$-dimensional unit-ball is inscribed in the $n$-dimensional unit-cube, the aforementioned result implies that <span>$\textsc{Conjuction}_{[0,1]}$</span>is <span>$\mathtt{ETR}$</span>-hard, therefore ${\ensuremath{\mathtt{ETR}}\xspace}\subseteq {\ensuremath{\mathtt{ETR}_{[0,1]}}\xspace}$. Consequently, we get the following.

\[thm:betr-etr\] ${\ensuremath{\mathtt{ETR}_{[0,1]}}\xspace}= {\ensuremath{\mathtt{ETR}}\xspace}$.

Now we will prove that <span>$\textsc{Feasible}_{[0,1]}$</span>is <span>$\mathtt{ETR}$</span>-hard by reducing <span>$\textsc{Conjuction}_{[0,1]}$</span>to it. We do this by a standard way of turning a conjunction of polynomials into a single polynomial, so that all zeros of the conjunction are exactly the same as the zeros of the single polynomial. Consider an instance of <span>$\textsc{Conjuction}_{[0,1]}$</span>. Let us define the function $q = (p_1)^2 + (p_2)^2 + \dots + (p_k)^2$, which has again domain $[0,1]^n$. The instance of <span>$\textsc{Feasible}_{[0,1]}$</span>with function $q$ has exactly the same solutions as these of the <span>$\textsc{Conjuction}_{[0,1]}$</span>instance. Therefore <span>$\textsc{Feasible}_{[0,1]}$</span>is <span>$\mathtt{ETR}$</span>-complete, even when $q$ has maximum sum of variable exponents in each monomial equal to 4.

Proof of Theorem \[thm:CH\_is\_etr-c\] {#app:CH_is_etr-c}
======================================

As we show in Theorem \[thm:CHinETR\], $(n,k)$-<span>$\textsc{Consensus Halving}$</span>is in <span>$\mathtt{ETR}$</span>. In this section we prove that $(n,n-1)$-<span>$\textsc{Consensus Halving}$</span>is <span>$\mathtt{ETR}$</span>-hard, implying that it is complete for <span>$\mathtt{ETR}$</span>. This complements the results of @FFGZ18, where it was established that $(n,n-1)$-<span>$\textsc{Consensus Halving}$</span>is <span>$\mathtt{NP}$</span>-hard even when a solution is required to be $1/poly(n)$-approximately correct, i.e. it allows $|F_i(A_+)- F_i(A_-)| \leq {\ensuremath{\epsilon}}$ for every agent $i$, where ${\ensuremath{\epsilon}}= 1/poly(n)$.

We present a polynomial-time reduction from the <span>$\mathtt{ETR}$</span>-complete problem <span>$\textsc{Feasible}_{[0,1]}$</span>to $(n,n-1)$-<span>$\textsc{Consensus Halving}$</span>. Suppose we are asked to decide an arbitrary instance of $\textsc{Feasible}_{[0,1]}$, i.e. the existential sentence $$\begin{aligned}
\label{Feasible1}
    \left( \exists X \in [0,1]^N \right) (p(X) = 0),\end{aligned}$$ where $X := (X_1, \dots, X_N) \in [0,1]^N$ and $p$, is a polynomial function of $X_1, \dots, X_N$ written in the standard form (a sum of monomials with integer coefficients). Consider the integer coefficients $C_1, \dots, C_l$ of $p$, where the number of terms of the polynomial is $l$. We consider all of the coefficients to be positive, where some of them may be preceded by a "$+$" or a "$-$". Also, let us normalize the coefficients and create new ones $c_1,\dots, c_l$, where $$\begin{aligned}
    c_j := \frac{C_j}{l \cdot C_{max}}, \quad j \in [l],\end{aligned}$$ where $C_{max}:= \max_{j} C_j$. Note that our new polynomial $q(X)$ which uses the new coefficients has exactly the same roots as $p(X)$. Also, note that $c_j \in (0,\frac{1}{l}]$ for every $j \in [l]$, a fact that will play an important role at the last steps of our reduction.

Now, let us split polynomial $q$ into two polynomials $q_1$ and $q_2$, such that $$\begin{aligned}
    q(X):= q_{1}(X) - q_{2}(X),\end{aligned}$$ and both $q_1$ and $q_2$ are sums of *positive* terms; $l_1$ and $l_2$ terms of $q_1$ and $q_2$ respectively, where $l = l_1 + l_2$. In particular, $$\begin{aligned}
    q_{1}(X) &:= \sum_{j=1}^{l_1} r_j(X), \\
    q_{2}(X) &:= \sum_{j=l_1 + 1}^{l_2} r_j(X),\end{aligned}$$ where $r_j(X):= c_j \cdot X_{1}^{d_{1j}} \cdot \dots \cdot X_{N}^{d_{Nj}}$ is the term $j \in [l]$ and $d_{ij}$ is the exponent of variable $X_i$, $i \in [N]$, in the $j$-th term. Eventually, the existential sentence, equivalent to (\[Feasible1\]), that we ask to decide is $$\begin{aligned}
    \left( \exists X \in [0,1]^N \right) (q_{1}(X) = q_{2}(X)).\end{aligned}$$

Let us construct the algebraic circuit that takes as input the tuple $X$ and computes the value of $q_{1}(X)$. This circuit needs only to use gates in $\{G_{\zeta}, G_{+}, G_{*\zeta}, G_{*}, G_{()^2}\}$, where $\zeta \in \mathbb{Q} \cap (0,1]$. To see why, observe that since every $X_{i} \in [0,1]$, $i \in [N]$, any multiplication between them by a $G_{*}$ gate is done properly (the gate's inputs/output are in $[0,1]$), and obviously the same holds for $G_{()^2}$. Also, note that due to our downscaled coefficients $c_j$, it is $c_j \leq 1/2$ for every $j$, and also $$\begin{aligned}
\label{ub_of_sum}
    \sum_{j=1}^{l_1} r_j(X) \leq l_1/l \leq 1.\end{aligned}$$ Therefore, we guarantee that any of the $l_1 - 1$ additions of the terms $r_j$ of $q_1$ by a $G_{+}$ gate is done properly, (inputs in $[0,1/2]$ and output in $[0,1]$). Similarly, we construct a circuit that computes $q_2$.

At this point we are ready to prove Theorem \[thm:CH\_is\_etr-c\].

Let us construct a $(n,n-1)$-<span>$\textsc{Consensus Halving}$</span>instance, where $n$ is to be defined later. In Section \[subsec: cir-to-ch\] we have shown how to construct an equivalent circuit to the one that computes $q_1, q_2$, called "special circuit", that

-   uses only gates $G_{\zeta}, G_{+}, G_{*\zeta}, G_{()^2}, G_{-}^{[0,1]}, G_{*2}^{[0,1]}$,

-   every $G_{\zeta}$ and $G_{* \zeta}$ has $\zeta \in \mathbb{Q} \cap (0, 1]$,

-   for every input $x \in [0, 1]^N$, all intermediate values computed by the circuit lie in $[0, 1]$.

For the constraints of the above types of gates, see Tables \[tbl:gates\], \[tbl:special\_gates\].

Let the number of gates in that special circuit be $r := poly(N)$. Consider the last two nodes of the special circuit whose outgoing edges are $q_1$ and $q_2$ respectively. Without loss of generality, we name them $v_{r-1}$ and $v_{r}$ (see Figure \[pl-n\]).

![The last two nodes of the special circuit.<span data-label="pl-n"></span>](pl-n.pdf){width="0.35\linewidth"}

By Lemma \[lem:circuit-embed\] and the construction described in its proof (Section \[app:circuit-embed\]), we embed the special circuit in a <span>$\textsc{Consensus Halving}$</span>instance. This instance now consists of $4r$ agents, since to each node $i \in [r]$ correspond 4 agents: $ad_{i}, mid_{i}, cen_{i}$ and $ex_i$ with valuation functions described by .

According to the embedding described in Section \[app:circuit-embed\], a tuple $(z_{1}^*, \dots, z_{r}^*)$ of values that satisfies the special circuit, corresponds to a $(4r,4r)$-<span>$\textsc{Consensus Halving}$</span>solution, i.e. a tuple $(t_{1}^*, \dots, t_{4r}^*)$ with $0 \leq t_{1}^* \leq \dots \leq t_{4r}^* \leq 12r$, of the <span>$\textsc{Consensus Halving}$</span>instance we constructed, and vice versa. As shown in detail in Section \[app:circuit-embed\], every value $z_{i}^*$ in a solution can be translated to 4 cuts $t_{4i-3}^*, t_{4i-2}^*, t_{4i-1}^*, t_{4i}^*$ in the <span>$\textsc{Consensus Halving}$</span>solution by the transformation in Section \[par:cir-to-ch\]. Conversely, a 4-tuple $(t_{4i-3}^*, t_{4i-2}^*, t_{4i-1}^*, t_{4i}^*)$ of cuts in a <span>$\textsc{Consensus Halving}$</span>solution can be translated to a single value $z_{i}^*$ by the simple transformation $z_{i}^* = t_{4i}^* - v_{i,l}^{+}$ in Section \[par:ch-to-cir\].

Let us now introduce a $(4r + 1)$-st additional agent, named *finis* (from the Latin word for "end") who does not correspond to any node. The valuation function of this agent is non-zero only in the intervals $v_{r-1}^{+}$ and $v_{r}^{-}$ and, in particular is the following, $$\begin{aligned}
\label{finis}
        finis(t) &= \begin{cases}
            1 , \quad &t \in v_{r-1}^{+} \cup v_{r}^{-} \\
            0 , \quad &\text{otherwise}.
        \end{cases}
    \end{aligned}$$ Eventually, the number of agents in the embedding is $n := 4r + 1$.

We will show that the answer to the arbitrary <span>$\textsc{Feasible}_{[0,1]}$</span>instance is "yes", if and only if the answer to the $(n,n-1)-{\ensuremath{\textsc{Consensus Halving}}\xspace}$ problem is "yes", i.e. there exists a $(n-1)$-cut that satisfies $n$ agents.

Suppose that there exists a solution $X^*:=(X_{1}^*, \dots, X_{N}^*) \in [0,1]^{N}$ of , which equivalently means that $q_{1}(X^*) = q_{2}(X^*)$. Then, by the correct construction of our special circuit (following the procedure in Section \[subsec: cir-to-ch\]) which uses $r$ gates and computes $q_1$ and $q_2$, there is a tuple $z^*:=(z_{1}^*, \dots, z_{r}^*)$ that satisfies it. Let, without loss of generality, $(z_{1}^*, \dots, z_{N}^*) := (X_{1}^*, \dots, X_{N}^*)$. Then it holds that $q_1(z_{1}^*, \dots, z_{N}^*) = q_2(z_{1}^*, \dots, z_{N}^*)$, therefore $z_{r-1}^* = z_{r}^*$.

According to the aforementioned translation to cuts, in the <span>$\textsc{Consensus Halving}$</span>instance there will be a cut $t_{4(r-1)}^* = v_{r-1,l}^{+} + z_{r-1}^*$ in interval $v_{r-1}^{+}$ (i.e. a positive cut), and another one in $t_{4r-1}^* = v_{r,l}^{-} + z_{r}^*$ in interval $v_{r}^{-}$ (i.e. a negative cut). From the valuation function of agent $finis$, we can see that her positive total valuation equals her negative total valuation, since $z_{r-1}^* \cdot 1 + (1 - z_{r}^*) \cdot 1 = (1 - z_{r-1}^*) \cdot 1 + z_{r}^* \cdot 1$ holds from $z_{r-1}^* = z_{r}^*$. Therefore $finis$ is satisfied. Also, the agents $ad_i, mid_i, cen_i, ex_i$ for all $i \in [r]$ are satisfied as argued in Section \[app:circuit-embed\], and the answer to $(n,n-1)-{\ensuremath{\textsc{Consensus Halving}}\xspace}$ is "yes", since we have $4r+1$ agents satisfied by $4r$ cuts.

Suppose now that there exists a $4r$-cut $(t_{1}^*, \dots, t_{4r}^*)$ with $0 \leq t_{1}^* \leq \dots \leq t_{4r}^* \leq 12r$ that is a solution of the $(n,n-1)$-<span>$\textsc{Consensus Halving}$</span>instance we constructed, where $n := 4r + 1$. As argued in Section \[app:circuit-embed\], if the $ad_i, mid_i, cen_i, ex_i$ agents for $i \in [r]$ are satisfied then each of $cen_i, ex_i$ agents imposes a cut in interval $v_{i}^{-}$ and $v_{i}^{+}$ respectively. The cuts in intervals $v_{i}^{+}$, for all $i \in [r]$ can be translated back to values $z_i^*$, which successfully compute the values of the circuit, i.e. they satisfy the circuit. There are also two interesting cuts $t_{4(r-1)}^*$ and $t_{4r-1}^*$ imposed by $ex_{r-1}$ and $cen_{r}$ respectively which satisfy agent $finis$. Since this agent is satisfied with no additional cut, it holds that $z_{r-1}^* \cdot 1 + (1 - z_{r}^*) \cdot 1 = (1 - z_{r-1}^*) \cdot 1 + z_{r}^* \cdot 1$, or equivalently $z_{r-1}^* = z_{r}^*$. Since $z_{r-1}^*$ and $z_{r}^*$ correspond to the value of the circuit at $q_1$ and $q_2$ respectively, for the circuit's inputs $(z_{1}^*, \dots, z_{N}^*)$ it holds that $q_{1}(z_{1}^*, \dots, z_{N}^*) = q_{2}(z_{1}^*, \dots, z_{N}^*)$. Equivalently, $q(z_{1}^*, \dots, z_{N}^*) = 0$, and equivalently $p(z_{1}^*, \dots, z_{N}^*) = 0$. Therefore, we have found values that satisfy , and the answer to <span>$\textsc{Feasible}_{[0,1]}$</span>is "yes".

Conclusion and Open Problems
============================

In this work we studied the complexity of exact computation of a solution to <span>$\textsc{Consensus Halving}$</span>. We introduced the class <span>$\mathtt{BU}$</span>which captures all problems that are polynomial-time reducible to the Borsuk-Ulam problem. We showed that the complexity of $(n,n)$-<span>$\textsc{Consensus Halving}$</span>is lower bounded by <span>$\mathtt{FIXP}$</span>and upper bounded by <span>$\mathtt{BU}$</span>. A tight result on the complexity of $(n,n)$-<span>$\textsc{Consensus Halving}$</span>is the major open problem that remains. We believe that the problem is <span>$\mathtt{BU}$</span>-complete. Such a result would establish <span>$\mathtt{BU}$</span>as a complexity class that has a complete natural problem. We also believe that the best candidates of <span>$\mathtt{BU}$</span>-complete problems are function problems whose solution existence is provable by the Borsuk-Ulam theorem, but not known to be provable by any weaker one, for example, Brouwer's Fixed Point theorem. One such is the Ham Sandwich problem @S1942 whose complexity is still unresolved: given $n$ compact sets in $\mathbb{R}^n$, find an $(n-1)$-dimensional hyperplane that bisects all of them.

Our result that <span>$\mathtt{LinearBU}$</span>= <span>$\mathtt{PPA}$</span>is analogous to the result of @EY10 which shows that <span>$\mathtt{LinearFIXP}$</span>= <span>$\mathtt{PPAD}$</span>. In @M14, the classes `kD`-<span>$\mathtt{LinearFIXP}$</span>, $k \geq 1$ are implicitly defined as the subclasses of <span>$\mathtt{FIXP}$</span>which contain all problems that can be described by <span>$\mathtt{LinearFIXP}$</span>circuits with $k$ inputs. It was shown in @M14 that `2D`-<span>$\mathtt{LinearFIXP}$</span>= <span>$\mathtt{PPAD}$</span>, which uncovered a sharp dichotomy on the complexity of <span>$\mathtt{LinearFIXP}$</span>problems; $\texttt{1D}-{\ensuremath{\mathtt{LinearFIXP}}\xspace}\subseteq {\ensuremath{\mathtt{P}}\xspace}$ (by @AGMS11) while `kD`-<span>$\mathtt{LinearFIXP}$</span>= <span>$\mathtt{PPAD}$</span>for $k \geq 2$. An interesting open problem is to consider the analogue of these classes in <span>$\mathtt{LinearBU}$</span>, namely `kD`-<span>$\mathtt{LinearBU}$</span>, and study the complexity of the problem depending on values of $k$.

[^1]: Royal Holloway University of London, UK. Email: `scampbell@example.org`

[^2]: University of Liverpool, UK. Email: `scampbell@example.org`

[^3]: Technical University of Munich, Germany. Email: `scampbell@example.org`

[^4]: Department of Computer Science, University of Liverpool, UK. Email: `scampbell@example.org`

[^5]: Computer Engineering and Informatics Department, University of Patras, Greece.

[^6]: A preliminary version of this paper appeared in the Proceedings of the 46th International Colloquium on Automata, Languages and Programming (ICALP 2019) @I-DFMS19.

[^7]: The problem used in @papadimitriou1994complexity presents the function as a polynomial-time Turing machine rather than an arithmetic circuit, and the Lipschitzness of the function is guaranteed by constraining the values that it can take.

[^8]: With the only exception being a cut before $v_{i}^{a}$ when gate $g_i$ is $G_{-}^{[0,1]}$ and its result is negative. See Figure \[example\_minus\] for an example.

{'source': 'arXiv_out/1903'}