

\documentclass[preprint,12pt]{elsarticle}

\usepackage{amssymb,amsthm}

\usepackage[english]{babel}

\newtheorem{theorem}{Theorem}[section]
\newtheorem{prop}[theorem]{Proposition}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{cor}[theorem]{Corollary}
\newtheorem{ques}[theorem]{Question}
\newtheorem{example}[theorem]{Example}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{conj}[theorem]{Conjecture}

\newcommand{\eqref}[1]{(\ref{#1})}
\newcommand{\calA}{\mathcal{A}}
\newcommand{\calB}{\mathcal{B}}
\newcommand{\calC}{\mathcal{C}}
\newcommand{\calV}{\mathcal{V}}
\newcommand{\calW}{\mathcal{W}}
\newcommand{\calN}{\mathcal{N}}
\newcommand{\calD}{\mathcal{D}}
%\newcommand{\calS}{\mathcal{S}}
\newcommand{\calF}{\mathcal{F}}
%\newcommand{}{\mathcal{M}}
\newcommand{\calP}{\mathcal{P}}
\newcommand{\Ri}{\mathbb{P}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\T}{\mathbb{T}}
\newcommand{\Trop}{\mathbb{T}{\! {\tiny \mbox{rop}}}}
\newcommand{\Rtrop}{\mathbb{R}{\! {\tiny \mbox{trop}}}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\GL}{\mathbb{G}L}
\newcommand{\SL}{\mathbb{S}L}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\rk}{\mbox{rk} \,}
\renewcommand{\P}{\mathbb{P}}

\newcommand\NN{{\mathbb{N}}}
\newcommand\KK{{\mathbb{K}}}
\newcommand\ZZ{{\mathbb{Z}}}
\newcommand\PP{{\mathbb{P}}}
\newcommand\RR{{\mathbb{R}}}
\newcommand\CC{{\mathbb{C}}}
\newcommand\QQ{{\mathbb{Q}}}
%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand\CQFD{\hfill $\Box$ \newline}


\journal{Journal of Symbolic Computation}

\begin{document}

\begin{frontmatter}

\title{Maximally positive polynomial systems supported on circuits}

\author{Fr\'ed\'eric Bihan}

\address{Laboratoire de Math\'ematiques\\
         Universit\'e de Savoie\\
         73376 Le Bourget-du-Lac Cedex\\
         France, Frederic.Bihan@univ-savoie.fr}

\begin{keyword}
%% keywords here, in the form: keyword \sep keyword
Polynomial sytems \sep Fewnomial \sep Circuits
%% PACS codes here, in the form: \PACS code \sep code
%% MSC codes here, in the form: \MSC code \sep code
\MSC[2010] 14T05
%% or \MSC[2008] code \sep code (2000 is the default)
\end{keyword}

%\subjclass[2000]{Primary }
%    The 2010 edition of the Mathematics Subject Classification is
%    now available.  If you are citing a classification from the
%    new scheme, use the following input coding instead.
%\subjclass[2010]{14T05}

%\date{}

\begin{abstract}

A real polynomial system with support $\calW \subset \Z^n$ is called {\it maximally positive} if all its complex solutions are positive solutions. A support $\calW$ having $n+2$ elements is called a circuit.  We previously showed that the number of non-degenerate positive solutions of a system supported on a circuit $\calW \subset\Z^n$ is at most $m(\calW)+1$, where $m(\calW) \leq n$ is the degeneracy index of $\calW$. We prove that if a circuit $\calW \subset \Z^n$ supports a maximally positive system with the maximal number $m(\calW)+1$ of non-degenerate positive solutions, then it is unique up to the obvious action of the group of invertible integer affine transformations of $\Z^n$. In the general case, we prove that any maximally positive system supported on a circuit can be obtained from another one having the maximal number of positive solutions by means of some elementary transformations. As a consequence, we get for each $n$ and up to the above action a finite list of circuits $\calW \subset \Z^n$ which can support maximally positive polynomial systems. We observe that the coefficients of the primitive affine relation of such circuit have absolute value $1$ or $2$ and make a conjecture in the general case for supports of maximally positive systems.
\end{abstract}


\end{frontmatter}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section*{Introduction and statement of the main results}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

We consider systems of $n$ polynomial equations in $n$ variables with real coefficients and monomials having integer exponents. The support of such a system
is the set of points $a \in \Z^n$ corresponding to monomials $x^a=x_1^{a_1} \cdots x_n^{a_n}$ appearing with a non-zero coefficient.
We are  only interested in the solutions in the complex torus $(\C^*)^n$ and call them simply complex solutions.
By Kouchnirenko's theorem \cite{K}, the number of isolated complex solutions is bounded from above by the normalized volume of the convex-hull $\Delta$ of $\calW$, which is the usual euclidian volume of $\Delta$ scaled by $n!$. We will always assume that $\calW$ is not contained in some hyperplane of $\R^n$, for otherwise this volume would vanish.
Kouchnirenko's bound is attained by 
{\it non-degenerate} systems. These are systems whose solutions are non-degenerate, that is, at which
the differentials of the defining polynomials are linearly independent.
Non-degenerate systems are generic within systems with given support. 

A solution of a system is called positive if all its coordinates are positive real numbers. A polynomial system is called {\it maximally positive} if all its complex solutions are positive solutions.
For simplicity, we consider here only non-degenerate systems whose number of complex solutions is the normalized volume of $\Delta$ (in other words, systems reaching Kouchnirenko's bound).
Any sufficiently small perturbation of the coefficient matrix of
such a system produces another non-degenerate system with the same support and the same number of non-degenerate complex solutions.

Consider for instance the case $n=1$ of a polynomial in one variable $f(x)=\sum_{i=1}^s c_ix^{a_i} \in \R[x^{\pm1}]$, where $a_i < a_{i+1}$ for $i=1, \ldots,s-1$ and all coefficients
$c_i$ are non-zero.  This polynomial is maximally positive if all its complex roots are positive. It follows from Descartes' rule of signs that if $f$ is maximally positive then $a_{i+1}=a_i+1$ and $c_{i} \cdot c_{i+1}<0$ for $i=1,\ldots,s-1$.

Another example is provided by systems with support the set of vertices $\calW
=\{w_0,w_1,\ldots,w_n\}$ of an $n$-dimensional simplex in $\R^n$. Multipliying each equation by $x^{-w_0}$ if necessary, we may assume that $w_0$ is the origin. Then Gaussian elimination transforms this system into an equivalent system of the form $x^{w_i}=c_i$, $i=1,\ldots,n$, where $c_1,\ldots,c_n$ real non-zero numbers.  The number of complex solutions
of this last system is the absolute value of the determinant of the matrix with columns $w_i$ for $i=1,\ldots,n$, which is precisely the normalized volume of the convex-hull of $\calW$.
On the other hand, it is easy to see that such a system has at most one positive solution. It follows that if $\calW=\{w_0,w_1,\ldots,w_n\}$ is the support of a maximally positive system, then the vectors
$w_i-w_0$ for $i=1,\ldots,n$ generate the lattice $\Z^n$.

In the general case, it is not difficult to show that
if $\calW \subset \Z^n$ is the support of a maximally positive polynomial system, then the
integer affine span $\Z\calW$ of $\calW$ is equal to
$\Z^n$ (see Proposition~\ref{P:primitive}). Such supports are called {\it primitive}.

In the present paper, we initiate the study of maximally positive systems in the first non-trivial case: when the support of the system is a (possibly degenerate) circuit.
We define a circuit in $\Z^n$ as a subset of $n+2$ points.
Up to renumbering the elements of a circuit $\calW=\{w_1,\ldots,w_{n+2}\} \subset \Z^n$, there is only one affine relation
\begin{equation}\label{E:relationcircuit}
\sum_{i=1}^s \lambda_i w_i=\sum_{i=s+1}^{n+2} \lambda_i w_i, 
\end{equation}
where the $\lambda_i$'s are  nonnegative coprime integer numbers and $\sum_{i=1}^s \lambda_i=\sum_{i=s+1}^{n+2} \lambda_i$.
This affine relation is called the {\it primitive affine relation} of $\calW$.
The {\it degeneracy index} $m(\calW)$ is the dimension of the affine span of a minimal affinely dependent subset.
Thus $1 \leq m(\calW) \leq n$ and $\calW$  is called {\it non-degenerate} when $m(\calW)= n$.
Equivalently, $m(\calW)+2$ is the number of non-zero coefficients in \eqref{E:relationcircuit}.
The following result has been proved in~\cite{B}.
\begin{theorem}[\cite{B}]\label{T:bound}
The number of positive solutions of a polynomial system supported on a circuit $\calW \subset \Z^n$
does not exceed $m(\calW)+1$. Moreover, for any positive integers $m,n$ with $m \leq n$, there exists a circuit $\calW \subset \Z^n$ such that $m(\calW)=m$,
and a polynomial system with support
$\calW$ and having $m(\calW)+1$ positive solutions.
\end{theorem}
The proof for the sharpness (the second assertion of Theorem~\ref{T:bound}) given in~\cite{B} uses the notion of {\it real dessins d'enfant}. This technique is constructive but explicit values for the coefficients of the system are not given. Explicit systems reaching this bound have been given by Kaitlyn Phillipson and J. Maurice Rojas in~\cite{P-R}. It turns out that the polynomial systems constructed in~\cite{B} are maximally positive: they have $m(\calW)+1$ positive solutions and no other complex solutions.
The corresponding dessins d'enfant have a lot of symmetries, and it was then natural to ask to what extent these dessins d'enfant are special.
The present note answers this question. We prove that the dessins d'enfant constructed in~\cite{B} are the unique ones (up to the obvious action of the real projective linear group of the Riemann sphere) which correspond to maximally positive systems supported on a circuit $\calW \subset \Z^n$ and having the maximal number $m(\calW)+1$ of positive solutions.
As a consequence, we obtain the following result, where $(e_1,\ldots,e_n)$ stands for the canonical basis of $\Z^n$.

\begin{theorem}\label{T:maxpositive}
For any pair of positive integers $(m,n)$ such that $m \leq n$, there is up to action of the group of invertible integer affine transformations of $\Z^n$ only one circuit $\calW \subset \Z^n$ with $m(\calW)=m$ and which is the support of a maximally positive polynomial system with the maximal number $m+1$ of positive solutions.
Namely,
\begin{enumerate}
\item if $m$ is even, $m=2k>1$, then, $\calW=\{0,e_1,\ldots,e_m, e_{m+1},\ldots, e_n, w\}$
with
$$w=2(e_1+\cdots+e_{k})-2(e_{k+1}+\cdots+e_m).$$
Equivalently, $\calW=\{w_1,\ldots,w_{n+2}\}$ is, up to action of the group of invertible integer affine transformations of $\Z^n$, the unique primitive circuit in $\Z^n$ with affine relation
$$w_1+2(w_2+\cdots+w_{k+1})=w_{k+2}+2(w_{k+3}+\cdots+w_{m+2}).$$

\item if $m$ is odd, $m=2k+1>1$, then $\calW=\{0,e_1,\ldots,e_m,e_{m+1},\ldots,e_n, w\}$ with
$$w=2(e_{k+1}+\cdots+e_{m})-2(e_{1}+\cdots+e_k).$$
Equivalently, $\calW=\{w_1,\ldots,w_{n+2}\}$ is, up to action of the group of invertible integer affine transformations of $\Z^n$, the unique primitive circuit in $\Z^n$ with affine relation
$$w_1+w_2+2(w_3+\cdots+w_{k+2})=2(w_{k+3}+\cdots+w_{m+2}).$$
\end{enumerate}
\end{theorem}
\smallskip

For instance, the unique primitive circuit $\calW \subset \Z^5$ such that $m(\calW)=3$ and which is the support of a maximally positive system is
the set of points $(0,0,0,0,0)$, $(1,0,0,0,0)$, $(0,1,0,0,0)$, $(0,0,1,0,0)$, $(0,0,0,1,0)$, $(0,0,0,0,1)$ and $(-2,2,2,0,0)$,
up to action of the group of invertible integer affine transformations of $\Z^n$.

Gale duality for polynomial systems supported on circuits (see~\cite{B,BBS}) gives a correspondence between the solutions of a system supported on $\calW=\{w_1,\ldots,w_{n+2}\} \subset \Z^n$
and the solutions of $\Phi=1$, where $\Phi$ is some real rational function determined by the system.
Precisely, the function $\Phi$ has the special form $(\prod_{i=1}^{s}g_i^{\lambda_i})/(\prod_{i=s+1}^{n+2}g_i^{\lambda_i})$, where $g_1,\ldots,g_{n+2}$ are homogeneous real polynomials of degree $1$ in two variables, and $\lambda_1,\ldots,\lambda_{n+2}$ are the coefficients of the primitive affine relation of \eqref{E:relationcircuit}.
Any real rational function whose denominator and numerator have only real roots has this form and is associated to a polynomial system supported on a circuit.
The real dessin d'enfant associated to any real rational map $\Phi$ is the inverse image of the real projective line under $\Phi$.
If $\Phi=(\prod_{i=1}^{s}g_i^{\lambda_i})/(\prod_{i=s+1}^{n+2}g_i^{\lambda_i})$ and if $\lambda_i$ is some exponent bigger than $1$, we may perturb slightly the factor $g_i^{\lambda_i}$ into $g_i^{\lambda_i-k} \cdot (g_i+\varepsilon)^k$ where $k \leq \lambda_i$ is a positive integer and $0 < \varepsilon \ll 1$. The resulting rational map corresponds to a polynomial system supported on a circuit $\widetilde{\calW}$ with $m(\widetilde{\calW})=m(\calW)+1$ and with the same numbers of complex and positive roots than the starting system. In particular,  if one system is maximally positive, so is the other. We call this operation a {\it splitting}. Its effect on a dessin d'enfant associated to $g$ is clear. The inverse operation on dessins d'enfant is easy to describe, though it may not come from a small perturbation as above. This inverse operation called {\it collapsing} preserves maximally positive polynomial systems supported on circuits, and in fact the number of complex and positive solutions, but decreases the number $m(\calW)$ by $1$.
We prove the following result.

\begin{theorem}\label{T:positive}
Any dessin d'enfant associated to a maximally positive system supported on a circuit can be transformed by a finite sequence of collapsings into a dessin d'enfant
associated to a maximally positive system with support a circuit $ \calW$ and having the maximal number $m(\calW)+1$ of positive solutions.
\end{theorem}

Together with Theorem~\ref{T:maxpositive}, this leads to the complete classification of circuits supporting maximally positive polynomial systems.

\begin{theorem}\label{T:max}
If $m >2\ell$, there is no circuit with degeneracy index $m$ and which is the support of a maximally positive polynomial systems with $\ell +1$ positive (or complex) solutions.
Let $\ell, m,n$ be positive integers such that $\ell \leq  m \leq n$ and $m \leq 2\ell$. There is a up to the action of the group of invertible integer affine transformations of $\Z^n$ a finite number
of circuits in $\Z^n$ with degeneracy index $m$ and which are the supports of maximally positive polynomial systems with $\ell +1$ positive (or complex) solutions. These circuits are the following.

\begin{enumerate}
\item if $\ell$ is even, $\ell=2k>1$, then we have the circuits $\widetilde{\calW}_{c_1}$ defined over all integers $c_1$ such that $\frac{m-\ell}{2} \leq  c_1 \leq \mbox{min}(\frac{\ell}{2},m-\ell)$
as follows. The circuit $\widetilde{\calW}_{c_1}$ is the unique primitive  circuit in $\Z^n$ with affine relation
\begin{equation} \label{E:affineextrpair}
\tilde{w}_1+2\sum_{i \in \tilde{I}_1}\tilde{w}_{i}+\sum_{i \in \tilde{J}_1}\tilde{w}_{i}=\tilde{w}_{k+2}+2\sum_{i \in \tilde{I}_2}\tilde{w}_{i}
+\sum_{i \in \tilde{J}_2}\tilde{w}_{i},
\end{equation}
where $\{1,k+2\},\tilde{I}_1,\tilde{I}_2,\tilde{J}_1,\tilde{J}_2$ form a partition of $\{1,\ldots,m+2\}$, $|\tilde{I}_1|=k-c_1$, $|\tilde{J}_1|=2c_1$, $|\tilde{I}_2|=k-c_2$,
$|\tilde{J}_2|=2c_2$ and $c_2=m-\ell-c_1$. This gives $1+\lfloor \mbox{min}(\ell-\frac{m}{2},\frac{m-\ell}{2}) \rfloor$ distinct circuits.
\item if $\ell$ is odd, $\ell=2k+1>1$, then we have the circuits $\widetilde{\calW}_{c_1}$ defined over all integers $c_1$ such that  $\frac{m-\ell-1}{2} \leq  c_1 \leq \mbox{min}(\frac{\ell-1}{2},
m-\ell)$ as follows. The circuit $\widetilde{\calW}_{c_1}$ is the unique primitive  circuit in $\Z^n$ with affine relation
\begin{equation} \label{E:affineextr}
\tilde{w}_1+\tilde{w}_2+2\sum_{i \in \tilde{I}_1}\tilde{w}_{i}+\sum_{i \in \tilde{J}_1}\tilde{w}_{i}=2\sum_{i \in \tilde{I}_2}\tilde{w}_{i}
+\sum_{i \in \tilde{J}_2}\tilde{w}_{i},
\end{equation}
where $\{1,2\},\tilde{I}_1,\tilde{I}_2,\tilde{J}_1,\tilde{J}_2$ form a partition of $\{1,\ldots,m+2\}$, $|\tilde{I}_1|=k-c_1$, $|\tilde{J}_1|=2c_1$, $|\tilde{I}_2|=k+1-c_2$, 
$|\tilde{J}_2|=2c_2$ and $c_2=m-\ell-c_1$. This gives $1+\lfloor \mbox{min}(\ell-\frac{m}{2},\frac{m-\ell+1}{2}) \rfloor$ distinct circuits.
\end{enumerate}
\end{theorem}
(Here $\lfloor x\rfloor$ stands for the integer part of $x$). We illustrate Theorem~\ref{T:max} in Section~\ref{S:proof}, see Example~\ref{E:l4m6} and Example~\ref{E:lm}.

The {\it signature} of a circuit $\calW$ with affine relation~\eqref{E:relationcircuit} is the pair $(a,b)$ where $a$ (resp. $b$) is the number of non-zero coefficients $\lambda_i$
with $1\leq i \leq s$ (resp.  $s+1 \leq i \leq n+2$). Thus $a+b=m(\calW)+2$ and $\calW$ has also signature $(b,a)$. Interestingly enough, we note the following immediate consequences of
Theorem~\ref{T:max}.

\begin{theorem}\label{T:undeux}
For any positive integers $n$ and $\ell$, there are at most $1+\frac{\ell+1}{4}$ circuits $\calW$ in $\Z^n$ up to the action on $\Z^n$ which support
a maximally positive polynomial system with $\ell+1$ positive solutions. If $\calW$ is such a circuit, then all (non-zero) coefficients in its primitive affine relation
have absolute values $1$ or $2$ and its signature $(a,b)$ satisfies $a,b \geq \frac{\ell+1}{2}$.
\end{theorem}

In the case $n=1$, we already saw that if  a polynomial in one variable
with support $a_1 < a_2 < \cdots <a_s$ is maximally positive, then $a_{i+1}=a_i+1$ for $i=1,\ldots,s-1$. In particular, a basis of affine relations
for the support is given by  $a_{i-1}+a_{i+1}=2a_i$ for  $i=2,\ldots,s-1$.
Again the coefficients in these affine relations have absolute values $1$ or $2$.
Together with Theorem~\ref{T:undeux}, this motivates the following conjecture.
\begin{conj}
If $\calW \subset \Z^n$ is the support of a maximally positive polynomial system,
then it has a basis of affine relations whose non-zero coefficients have absolute values $1$ or $2$.
\end{conj}

\section{Basics on polynomial systems supported on circuits}
We recall basic facts on polynomial systems supported on circuits.
Let $\calW=\{w_1,\ldots,w_{n+2}\}$ be a circuit in $\Z^n$. Up to renumbering, there is
only one affine relation
\begin{equation}\label{E:relationcircuitbis}
\sum_{i=1}^s \lambda_i w_i=\sum_{i=s+1}^{n+2} \lambda_i w_i, 
\end{equation}
where the coefficients $\lambda_i$ are  nonnegative coprime integer numbers and $\sum_{i=1}^s \lambda_i=\sum_{i=s+1}^{n+2} \lambda_i$.
This affine relation is called the {\it primitive affine relation} of $\calW$.

If we denote by $S_i$ the convex hull of $\calW \setminus\{w_i\}$, then we have the formula
\begin{equation}\label{E:volrel}
\mbox{vol}(S_i)=\lambda_i \cdot [\Z^n : \Z \calW],
\end{equation}
where $\mbox{vol}(\cdot)$ is the normalized volume on $\R^n$ obtained by multiplying the euclidian volume by $n!$
and $[\Z^n : \Z \calW]$ is the index of the subgroup of $\Z^n$ generated by $\calW$.
Indeed, let $A$ be any square matrix of size $n$ and $B$ be any column matrix $B$ with $n$ rows.
Cramer's rule says that $A \cdot X= \mbox{det}(A) \cdot B$ if $X$ is the column matrix whose $i$-th coefficient is equal to the determinant of the matrix $A_i$ obtained by substituting $B$
to the $i$-th column of $A$. In our situation, if we write for simplicity $\calW=\{w_0,w_1,\ldots,w_{n+1}\}$, then 
Cramer's rule applied to the matrix $A$ with columns $w_1-w_0,\ldots,w_{n}-w_0$ and to the column matrix $B=w_{n+1}-w_0$ yields
$\sum_{i=1}^n \mbox{det}(A_i) \cdot (w_i-w_0)=\mbox{det}(A) \cdot (w_{n+1}-w_0)$. It remains to note that the normalized volume of the convex-hull of
$\calW \setminus \{w_i\}$ is equal to the absolute value of $\mbox{det}(A_i)$ for $i=1,\ldots,n$ and to the absolute value of
$\mbox{det}(A)$ for $i=n+1$. Moreover, it is easy to prove that the greatest common divisor of $\mbox{det}(A_1),\ldots,\mbox{det}(A_n), \mbox{det}(A)$ is the index of
$[\Z^n : \Z \calW]$.

\begin{remark}\label{R:uniquecircuit}
Once at least one of its coefficients is equal to $1$, a primitive affine relation \eqref
{E:relationcircuitbis} determines uniquely a primitive circuit $\calW=\{w_1,\ldots,w_{n+2}\} \subset \Z^n$ up to the action of group of invertible integer affine transformations $\Z^n$. Indeed, if $\lambda_i=1$ then the vectors $w_j-w_k$ for any given fixed $k$ in $\calW \setminus \{w_i\}$ and for $j$ varying in $\calW \setminus \{w_i, w_k\}$ form a basis of $\Z^n$.
\end{remark}

We come back to the notation $\calW=\{w_1,\ldots,w_{n+2}\}$.
The (possibly degenerate) simplices $S_i$ for $i=1,\ldots,s$ form (together with their faces) a polyhedral subdivision of the convex-hull $\Delta$ of $\calW$,
and the same holds true for the simplices $S_i$ with  $i=s+1,\ldots,n+2$ (see \cite{GKZ}, p. 217). This shows that the normalized volume of $\Delta$ is equal to
$(\sum_{i=1}^s \lambda_i) \cdot [\Z^n : \Z \calW]=(\sum_{i=s+1}^{n+2} \lambda_i) \cdot [\Z^n : \Z \calW]$.
Consider a non-degenerate system supported on $\calW$
\begin{equation}\label{E:System}
\sum_{j=1}^{n+2}c_{ij}x^{w_j}=0 \; , \quad i=1,\ldots,n.
\end{equation}
Since the system is non-degenerate, we may perturb slightly the coefficients $c_{ij}$ without
changing the number of complex or positive solutions of the system. Thus we may assume that the matrix $(c_{ij})_{1 \leq i,j \leq n}$ is invertible, so that
left multiplication with the inverse of this matrix produces an equivalent system of the form
$$x^{w_i}=g_i(x^{w_{n+1}},x^{w_{n+2}}) \; ,  \quad i=1,\ldots,n,$$
where $g_1,\ldots,g_{n}$ are homogeneous polynomials of degree $1$.
Set $y=(y_1,y_2)$ with $y_1=x^{w_{n+1}}$, $y_2=x^{w_{n+2}}$ and set $g_{n+1}(y)=y_1$, $g_{n+2}(y)=y_2$. Perturbing further the system \ref{E:System}, we may also assume that the polynomials $g_i$ have distincts roots.
If $x$ is a complex (with non-zero coordinates) solution of the system, then $y$ is a root of the polynomial
\begin{equation}\label{E:eliminant}
g(y)=\prod_{i=1}^s((g_i(y))^{\lambda_i}-\prod_{i=s+1}^{n+2}((g_i(y))^{\lambda_i}
\end{equation}
and $g_i(y) \neq 0$ for $i=1,\ldots,n+2$. The polynomial $g$ is called an
{\it eliminant} of the system. It  is homogeneous of degree $\sum_{i=1}^s \lambda_i=\sum_{i=s+1}^{n+2} \lambda_i$. Thus, the degree of $g$ is
the normalized volume of $\Delta$  divided by the lattice index $[\Z^n : \Z \calW]$. Denote by $\P$ the complement of the roots of $g_1,\ldots, g_{n+2}$
in the complex projective line $\C P^1$. We may assume from the beginning that $w_{n+1}=0$ so that $y_1=1$ and see each
$g_i$ as a polynomial $g_i(1,y_2)$ of degree $1$ in the variable $y_2$. Let $\P_+$ be the subset of the real projective line $\R P^1$ where all these polynomials
$g_i$ are positive. This is either empty, or a connected component (an interval) of $\P \cap \R P^1$.
\begin{prop}\label{P:bijection}(\cite{B,BBS})
The map $x \mapsto y$ is:
\begin{enumerate}
\item a $[\Z : \Z \calW]$-to-$1$ map from the set of complex solutions of the system \eqref{E:System} to the set of roots of $g$ in $\P$,
\item a bijection between the set of positive solutions of the system \eqref{E:System} and the set of roots of $g$ contained in $\P_+$.
\end{enumerate}
\end{prop}

Write the eliminant $g$ as $P-Q$ where $P=\prod_{i=1}^s g_i^{\lambda_i}$ and $Q=\prod_{i=s+1}^{n+2} g_i^{\lambda_i}$.
The associated rational function is $\Phi=P/Q: {\C}P^1 \rightarrow {\C}P^1$, $y \mapsto (1,\frac{P(y)}{Q(y)})$.
We have $\mbox{deg} \, \Phi= \mbox{deg} \, g= \sum_{i=1}^s \lambda_i=\sum_{i=s+1}^{n+2} \lambda_i$. The associated {\it real dessin d'enfant} is the graph
$$\Gamma:=\Phi^{-1}({\R}P^1)$$

The following description of properties of real dessins d'enfant is taken from \cite{B} with minor changes. We address the reader to \cite{Br,O,NSV} for other useful descriptions. The graph $\Gamma$ is invariant with respect to the complex conjugation and contains the real line ${\R}P^1$.
Each vertex of $\Gamma$ has even valency, and the multiplicity of a critical point with real critical value of $\Phi$ is half its valency. Thus critical points of $\Phi$ with real critical values are exactly the vertices of $\Gamma$ with valency greater than two.
The graph $\Gamma$ contains the inverse images of $(1,0)$, $(0,1)$ and $(1,1)$ which are the sets of roots of $P$, $Q$ and $g$, respectively. Denote by the same letter $p$ (resp. $q$ and $r$) the points of $\Gamma$ which are mapped to $(1,0)$ (resp. $(0,1)$ and $(1,1)$).
Orient the real axis on the target space via the arrows $(1,0) \rightarrow (0,1) \rightarrow (1,1) \rightarrow (1,0)$ and pull back this orientation by $\phi$. The graph $\Gamma$ becomes an oriented graph,
with the orientation given by arrows $p \rightarrow q \rightarrow r \rightarrow p$.
Since the graph $\Gamma$ is invariant under complex conjugation,  it is determined by its intersection $H\Gamma$ (one half of $\Gamma$) with a connected component of $\C P^1 \setminus \R P^1$. To represent $\Gamma$, we represent a given component of $\C P^1 \setminus \R P^1$ by an half plane situated below an horizontal line representing $\R P^1$ and draw $H\Gamma$ in this half plane. 

The mutual position (with respect to any given orientation of $\R P^1$) of the real roots of $g$, $P$ and $Q$ together with their multiplicities can be seen on $\Gamma$. We encode this information by what is called a root scheme \cite{Br}.
A root scheme is a $k$-uple $((l_1,m_1),\ldots,(l_k,m_k)) \in (\{p,q,r\} \times \N)^k$.
We say that a root scheme is {\it realizable} by polynomials of degree $d$ if there exist real polynomials
$P$ and $Q$ such that $g=P-Q$ has degree $d$ and if
$\rho_1< \rho_2 < \ldots < \rho_k < \rho_1$ are the real roots of $g$, $P$ and $Q$ ordered with respect to a given orientation of $\R P^1$, then $l_i=p$ (resp. $q$, $r$)
if $\rho_i$ is root of $P$ (resp. $Q$, $g$) and $m_i$ is the multiplicity of $\rho_i$
(see Example~\ref{E:dessin}).

Conversely, suppose we are given a real graph $\Gamma \subset {\C}P^1$
together with a real continuous map $\varphi: \Gamma \rightarrow {\R}P^1$.
Denote the inverse images of $(1,0)$, $(0,1)$ and $(1,1)$ by letters $p$, $q$ and $r$, respectively, and
orient $\Gamma$ with the pull back by $\varphi$ of the above orientation of ${\R}P^1$.
This graph is called {\it a real rational graph}~\cite{Br} if
\begin{itemize}
\item any vertex of $\Gamma$ has even valence,
\item any connected component of ${\C}P^1 \setminus \Gamma$ is homeomorphic to an open disk,
\end{itemize}
Then, for any connected component $D$ of ${\C}P^1 \setminus \Gamma$, the map $\varphi_{| \partial D}$
is a covering of ${\R}P^1$ whose degree $d_D$ is the number of letters $p$ (resp. $q$, $r$)
in $\partial D$ (see Figure~\ref{deg}). We define the {\it degree} of $\Gamma$ to be half the sum of the degrees $d_D$ over all connected components of ${\C}P^1 \setminus \Gamma$. Since $\varphi$ is a real map, the degree of $\Gamma$ is also the sum of the degrees $d_D$
over all connected components $D$ of ${\C}P^1 \setminus \Gamma$ contained in one connected component of ${\C}P^1 \setminus {\R}P^1$.

\begin{figure}[!h]
\begin{center}
\includegraphics[scale=0.5]{MEGACircuit3.pdf}
\caption{One component of $\CC P^1 \setminus \Gamma$ of degree $2$.}  
  \label{deg}\end{center}
\end{figure}
\bigskip

\begin{prop}[\cite{Br,O}] \label{P:rootgraph}
A root scheme is realizable by polynomials of degree $d$ if and only if it
can be extracted from a real rational graph of degree $d$ on ${\C}P^1$.
\end{prop}

We explain the proof of the if direction of Proposition~\ref{P:rootgraph}.
For each connected component $D$ of ${\C}P^1 \setminus \Gamma$, extend $\varphi_{|\partial D}$ to a, branched if $d_D>1$,
covering of one connected component of ${\C}P^1 \setminus {\R}P^1$, so that two adjacent connected components of
${\C}P^1 \setminus \Gamma$ project to differents connected components of ${\C}P^1 \setminus {\R}P^1$.
Then, it is possible to glue continuously
these maps in order to obtain a real branched covering $\varphi:{\C}P^1 \rightarrow {\C}P^1$ of degree $d$.
The map $\varphi$ becomes a real rational map of degree $d$ for the standard complex structure
on the target space and its pull-back by $\varphi$ on the source space.
There exist then real polynomials $P$ and $Q$ such that $g=P-Q$ has degree $d$ and
$\varphi =P/Q$, so that the points $p$ (resp. $q$, $r$)
correspond to the roots of $P$ (resp. $Q$, $g$) and $\Gamma=\varphi^{-1}({\R}P^1)$.
\bigskip

\begin{figure}[!h]
\begin{center}
\includegraphics[scale=0.5]{Bihfig6}
\caption{A real dessin d'enfant of degree $8$.}  
  \label{F:dessin}\end{center}
\end{figure}
\bigskip

\begin{example} \label{E:dessin}
In Figure~\ref{F:dessin}, we have represented a real dessin d'enfant
associated with the root scheme
$$(p,2,),(q,3),(r,1),(r,1),(r,1),(r,1),(r,1),(q,2), (r,1),(p,4),(r,1),(q,3)).$$
It can realized by polynomials $P$ and $Q$ such that
$$P(y)=(y_2-p_1y_1)^2(y_2-p_2y_1)^2(y_2-p_3y_1)^4, \,Q(y)=(y_2-q_1y_1)^3(y_2-p_2y_1)^2(y_2-p_3y_1)^3$$
and the real roots of the polynomials $P(1,y_2)$, $Q(1,y_2)$ and $g(1,y_2)=P(1,y_2)-Q(1,y_2)$ are ordered as follows
$$p_1 < q_1 <r_1<p_2<r_2<r_3<r_4<r_5<r_6<q_2<r_7<p_3<r_8<q_3.$$ Note that in this example all roots of $g(1,y_2)$ are real simple roots.
\end{example}

Note that we did not assume that all letters $p$ and $q$ lie on the real axis.
This is clearly the case precisely when $\Phi$ comes from a polynomial system supported on a circuit as above. The following lemma is useful in order to apply part (2) of Proposition~\ref{P:bijection}.
 
\begin{lemma}\label{L:exist}
Consider a real dessin d'enfant $\Gamma$ associated with a real rational map $\Phi=P/Q: {\C}P^1 \rightarrow {\C}P^1$.
Assume that the set $G$ of all letters $p,q$ (the set of zeroes of $P$ and $Q$) is contained in the real axis $\R P^1$. Let $I$ be any open interval in $\R P^1$ with endpoints in $G$
such that $I \cap G =\emptyset$ and $I$ contains a root of $g=P-Q$ . Then, there are homogeneous coordinates $(y_1,y_2)$ on $\C P^1$, homogeneous degree one polynomials $g_i(y_1,y_2)$, $i=1,\ldots,n+2$, two of them being $y_1$ and $y_2$ respectively, and positive integers $\lambda_1,\ldots\lambda_{n+2}$ such that $P=\prod_{i=1}^s g_i^{\lambda_i}$,  $Q=\prod_{i=s+1}^{n+2} g_i^{\lambda_i}$ and
$I=\{(1,y_2) \in \R P^1 \; | \; g_i(1,y_2) >0 \; \mbox{for} \; i=1,\ldots,n+2\}.$
\end{lemma}
\begin{proof}
We choose coordinates on the source space $\C P^1$ so that $I=(0,+\infty) \subset \R$ ($I$ is the set of positive real numbers) under the usual identification of
$\R P^1 \setminus \{(0,1)\}$ with $\R$ via $(y_1,y_2) \mapsto y_2 / y_1$. 
Let $p_1,\ldots,p_s \in \R$ be the roots of $P$ and $q_{s+1},\ldots,q_{n+2} \in \R$ the roots of $Q$ under the previous identification. Let $\lambda_i$ be half the valency of $p_i$ (or $q_i$ if $i \geq s+1$) as a vertex of $\Gamma$. Since all roots of $P$ and $Q$ are real, there are real numbers $\alpha$ and $\beta$ such that $P=\alpha \prod_{i=1}^s g_i^{\lambda_i}$
and $Q=\beta \prod_{i=s+1}^{n+2} g_i^{\lambda_i}$, where $g_i(y_1,y_2)=y_2-p_iy_1$ if $i \leq s$ and $g_i(y_1,y_2)=y_2-q_iy_1$ otherwise. Note that the endpoints of $I$ belong to $G$, hence $y_1$ and $y_2$ appear among these polynomials $g_i$. Since
$I$ is the set of positive real numbers and $I \cap G =\emptyset$, all elements of $G$ are non positive, hence each $g_i(1,y_2)$ is positive on $I$.
It follows then that $I$ is the common domain of positivity of these polynomials again because $I \cap G =\emptyset$. The fact that $I$ contains a root of $P-Q$ implies that
$\alpha / \beta >0$. Thus we may replace for instance $g_1$ with $(\alpha/\beta)^{1/\lambda_1} g_1$ to have the desired form for $\Phi$ and keep the property that $I$ is the common domain of positivity of $g_1(1,y_2),\ldots,g_{n+2}(1,y_2)$.
\end{proof} 

\begin{remark}\label{R:syst}
A real dessin d'enfant as in Lemma~\ref{L:exist} is the real dessin d'enfant associated to a polynomial system $x^{w_i}=g_i(x^{w_{n+1}},x^{w_{n+2}})$, $i=1,\ldots,n$,
where $\{w_1,\ldots,w_{n+2}\}$ is any non-degenerate circuit in $\Z^n$ with affine relation $\sum_{i=1}^s \lambda_i w_i=\sum_{i=s+1}^{n+2} \lambda_iw_i$.
\end{remark}

\section{Maximally positive systems}
As an easy consequence of Proposition~\ref{P:bijection}, we get the following result.
\begin{prop}\label{P:maximally positiveprimitive}
If a polynomial system supported on a circuit $\calW$ is maximally positive, then $\calW$ is primitive.
If a circuit $\calW$ is primitive, then a polynomial system supported on $\calW$ is maximally positive if and only if all roots of the eliminant $g$ in $\P$
are in $\P_+$.
\end{prop}
In fact Proposition~\ref{P:bijection} has a more general version called Gale duality (\cite{BS08}),
which shows that Proposition~\ref{P:maximally positiveprimitive} may be generalized for any polynomial system.
Nevertheless, it is easy to prove directly the following result. 
\begin{prop}\label{P:primitive}
The support of a maximally positive polynomial system is primitive.
\end{prop}
\begin{proof}
Take a basis $\{v_1,\ldots,v_n\}$ for the subgroup $\Z\calW \subset \Z^n$. Any polynomial with support $\calW$ can be written as a polynomial in the variables
$y_i=x^{v_i}$, $i=1,\ldots,n$. Therefore, a polynomial system supported on $\calW$ can be solved by first solving an intermediate system in the variables $y_i$,
and then for each solution $(c_1,\ldots,c_n)$, by solving the system $x^{v_i}=c_i$, $i=1,\ldots,n$. But the last system has at most one positive solution and $[\Z^n : \Z\calW]$ complex solutions (this is a system supported on a simplex). Thus in order to have the same number of positive and complex solutions for the starting system, we should have $[\Z^n : \Z\calW]=1$.
\end{proof}

We recall now a proof of the bound in Theorem~\ref{T:bound}. This will be useful later in the proof of Theorem~\ref{T:maxpositive}. Set $m=m(\calW)$ and assume that the minimal affinely dependent subset of $\calW$ is $\{w_1,\ldots,w_{m+2}\}$. Let $k$ be the number of roots $r$ of $g$ in the interval $\P_+$ (we assume that $\P_+$ is not empty).
Since this interval does not contain letters $p$ and $q$
(roots of $P$ and $Q$), the restriction of $\Phi$ to an interval formed by two consecutive roots $r$ may be seen as a real valued map taking the same value at
the endpoints of this interval. Thus $\Phi$ has at least one critical point between two consecutive roots $r$, and therefore at least $k-1$ critical points in $\P_+$.
An easy computation shows that the derivative of $\Phi$ is $\Phi'=\frac{P'Q-PQ'}{Q^2}=\frac{1}{Q^2} \cdot (\prod_{i=1}^{m+2}
g_i^{\lambda_i-1}) \cdot H$, where $H$ is a polynomial of degree not larger than $m+1$. Looking more closely at this polynomial $H$, we compute that the coefficient
of the monomial of degree $m+1$ is $(\prod_{i=1}^{m+2} c_i) \cdot (\sum_{i=1}^s \lambda_i-\sum_{i=s+1}^{m+2} \lambda_i)$, where the $c_i$ are the higher coefficients of the $g_i$.
Thus the degree of $H$ is in fact not larger than $m$. The $k+1$ critical points of $\Phi$ contained in $\P_+$ are roots of $H$, and thus $k-1 \leq m$ which gives the desired bound
$k \leq m+1$.

\subsection{Passing from non-degenerate to degenerate circuits}
\label{SS:passing}

Consider a system supported on a non-degenerate circuit $\calV \subset \Z^m$. Let $n$ be any integer such that $m <n$.
We may identify $\Z^m$ with $\Z e_1+\cdots+\Z e_m$ where $(e_1,\ldots,e_n)$ is the standard basis of $\Z^n$. Assuming that $0 \in \calV$, the system obtained from the previous one
by adding the $n-m$ equations $x_i=1$ for $i=m+1,\ldots,n$ is a system supported on $\calW=\calV \cup \{e_{m+1},\ldots,e_n\} \subset \Z^n$.
This support $\calW$ is a degenerate circuit with $m(\calW)=m(\calV)=m$. These systems have the same number of positive (resp. complex) solutions, thus if one is maximally positive, so is the other.

Conversely, let $\calW =\{w_1,\ldots,w_{n+2}\}\subset \Z^n$ be a circuit with $m(\calW)=m<n$ and which is the support of a maximally positive system. Renumbering the elements of $\calW$ if necessary,
we may assume that $w_1=0$ and that the minimal affinely dependent subset of $\calW$ is $\calV=\{0,w_2,\ldots,w_{m+2}\}$.
Since $\calW$ is the support of a maximally positive system, we have $\Z\calW=\Z^n$ by Proposition~\ref{P:maximally positiveprimitive}. This implies that $\calV$ generates the rank $m$ sub-lattice $\Z^n \cap \R \calV$, and that we may complete the family $(e_{m+1},\ldots,e_n):=(w_{m+3},\ldots,w_{n+2})$ into a basis $(e_1,\ldots,e_m,e_{m+1},\ldots,e_n)$ of $\Z^n$ so that $\Z\calV=\Z e_1+\cdots+\Z e_m$.

Doing the monomial change of coordinates given by this new basis of $\Z^n$ transforms the system supported on $\calW$ into a system which becomes equivalent (after a small perturbation)
to the conjunction of a system $x^{w_i}=g_i(1,x^{w_{m+2}})$, $i=1,\ldots,m,$ supported on the non-degenerate circuit $\calV \subset \Z^m \subset \Z^n$ and the system
$x_i=g_i(1,x^{w_{m+2}})$, $ i=m+1,\ldots,n,$, where all $g_i$ are degree $1$ homogeneous polynomials. Clearly, if the system supported on $\calW$ is maximally positive, then so is the previous
non-degenerate system supported on $\calV$, and both systems have the same number of positive (and complex) solutions.

\section{Proof of the main results}
 \label{S:proof}

\subsection{Proof of Theorem~\ref{T:maxpositive}.}
Consider a maximally positive system supported on a circuit $\calW \subset \Z^n$ with $m(\calW)=m$ and having the maximal number $m(\calW)+1$ of positive solutions.
Then the corresponding eliminant has $m+1$ roots $r$ in $\P_+$, and the proof of the bound in Theorem~\ref{T:bound} which is recalled above
shows that $\Phi$ has exactly one critical point of multiplicity $2$ between two consecutive roots $r$ in $\P_+$.
Moreover, the critical points of $\Phi$ are precisely these  $m$ critical points contained in $\P_+$  and the roots of the polynomials $g_i$ such that
$\lambda_i  \geq 2$. In particular $\Phi$ does not have non-real critical points. Each critical point $c$ of $\Phi$ contained in some interval formed by two consecutive roots $r$ is
a vertex of $\Gamma$ of valency $4$ (since it has multiplicity $2$): among the four branches of $\Gamma$ which start from $c$, two lie on the real line, while the two others are symmetric with respect to the complex conjugation. In particular, there is only one branch of $H\Gamma$ which starts from $c$ (we will say that this branch goes down from $c$).
Since $\Gamma$ has no vertex in $H$, it follows that this branch gives rise to an arc of $H\Gamma$ joining $c$ and another critical point of $\Phi$ contained in the real line.
This last critical point cannot be a critical point contained between two consecutive roots $r$, hence it is a root of some $g_i$ with $\lambda_i \geq 2$.
Therefore, for each of the $m$ critical points $c$ contained in $\P_+$, we get one arc of $H\Gamma$ joining this $c$ to a vertex $p$ or $q$ of $\Gamma$ of valency larger than $4$ (that is, having at least one going down branch). We note that two different such arcs cannot go to the same vertex $p$ (resp. $q$) for otherwise this would give a connected component of $H \setminus H\Gamma$ without letters $q$ (resp. $p$) in its boundary. Thus, we get an injective map from the set of $m$ critical points of $\Phi$
contained in $\P_+$ to the set of roots of the $g_i$ with $\lambda_i \geq 2$. Therefore at least $m$ coefficients among $\lambda_1,\ldots,\lambda_{m+2}$ satisfy $\lambda_i \geq 2$. We also note that each root $r$ of $g$ is in the boundary of exactly one connected component of $H \setminus H\Gamma$. Thus $H \setminus H\Gamma$ has at least $m+1$ connected components. But the degree of $\Phi$ is $m+1$ (since the system is maximally positive) and is the sum of local degrees at each connected component of $H \setminus H\Gamma$.
This means that $H \setminus H\Gamma$ has exactly $m+1$ connected components, and each local degree is equal to $1$.
\bigskip

\begin{figure}[!ht]
\begin{center}
\includegraphics[scale=0.5]{MEGACircuit1}
\caption{A real dessin d'enfant with $m+1$ roots in $\P_+$ for $m=m(\calW)=4$.}  
  \label{Extr}\end{center}
\end{figure}
\bigskip

Since the degree of $\Phi$ is $m+1$, we have
\begin{equation}\label{E:eq}
m+1=
\sum_{i=1}^s \lambda_i=\sum_{i=s+1}^{m+2} \lambda_i. 
\end{equation}
At least $m$ coefficients among the $m+2$ positive integers $\lambda_1,\ldots,\lambda_{m+2}$ are greater than or equal to $2$, thus at most two of them are equal to $1$.
Using \eqref{E:eq}, it is easy to prove that exactly two of them should be equal to $1$.
Indeed, suppose on the contrary that only one coefficient is equal to $1$. Permuting $s$ with $m+2-s$ if necessary, we may assume that this coefficient is some $\lambda_i$ with $i \leq s$.
Then  \eqref{E:eq} gives $m+1 \geq 1+2(s-1)$  and $m+1 \geq 2(m+2-s)$, which imply $2s-1 \leq m+1 \leq 2s-2$: a contradiction.
Therefore, up to renumbering the $\lambda_i$, and up to permuting $s$ with $m+2-s$,  we have two cases:
\smallskip

\begin{enumerate}
\item  $\lambda_1=\lambda_2=1$ and $\lambda_i \geq 2$ for $i \neq 1,2$,
\item $\lambda_1=\lambda_{s+1}=1$ and $\lambda_i \geq 2$ for $i \neq 1, s+1$.
\end{enumerate}
\smallskip

\noindent In the first case, we get $m+1=\lambda_1+\cdots+\lambda_s \geq 2+2(s-2) \Rightarrow s \leq \frac{m+3}{2}$
and $m+1=\lambda_{s+1}+\cdots+\lambda_{m+2} \geq 2(m+2-s) \Rightarrow s \geq \frac{m+3}{2}$. Thus $s=\frac{m+3}{2}$,
$m$ is odd, and $\lambda_1=\lambda_2=1$, $\lambda_i =2$ for $i \neq 1,2$.
Similarly, the second case leads to $s=\frac{m+2}{2}$,
$m$ is even, and $\lambda_1=\lambda_{s+1}=1$, $\lambda_i =2$ for $i \neq 1,s+1$.

Therefore for $m$ odd, $m=2k+1$, we get the affine relation
$$w_1+w_2+2(w_3+\cdots+w_{k+2})=2(w_{k+3}+\cdots+w_{m+2}).$$
Since the coefficient of $w_2$ is $1$ and $\calW$ is primitive, we get from \eqref{E:volrel} (see
Remark \ref{R:uniquecircuit}) that $(w_3-w_1, \ldots,w_{n+2}-w_1)$ is a basis for $\Z^n$.
Setting $w_1=0$, $w=w_2$ and $(e_1,\ldots,e_n)=(w_3,\ldots,w_{n+2})$ leads to
$\calW=\{0,e_1,\ldots,e_n, w\}$ with
$w=2(e_{k+1}+\cdots+e_{m})-2(e_{1}+\cdots+e_k)$ as desired.
Similarly,  if $m$ is even, $m=2k$, then we obtain the affine relation
$$w_1+2(w_2+\cdots+w_{k+1})=w_{k+2}+2(w_{k+3}+\cdots+w_{m+2}).$$
Setting $w_1=0$, $w=w_{k+2}$ and $(e_1,\ldots,e_n)=(w_2,\ldots, w_{k+1}, w_{k+3},\ldots,w_{n+2})$ leads to
$\calW=\{0,e_1,\ldots,e_n, w\}$ with  $w=2(e_1+\cdots+e_{k})-2(e_{k+1}+\cdots+e_m)$.
In any case, the fact that the resulting $\calW$ is indeed the support of a maximally positive polynomial system follows from Lemma~\ref{L:exist} and Remark~\ref{R:syst} (and Subsection~\ref{SS:passing} when $m<n$).

\subsection{Splitting maximally positive systems}
Write the eliminant $g$ as an affine polynomial in $y_2$ by setting $y_1=1$ (equivalently, translate $\calW$ so that $w_{n+1}=0$).
Write any $g_i$ as $g_i=c_i(y_2-\alpha_i)$ so that $\alpha_i$ is the real root of $g_i$. Hence $\alpha_i$ is encoded by a letter $p$ or $q$ in $\Gamma$ according as $i \leq s$ or not.
For any $i$ such that $\lambda_i \geq 2$, and any positive integer $k < \lambda_i$, we may deform slightly $g_i(y_2) ^{\lambda_i}$ to $g_i(y_2) ^{\lambda_i-k}\cdot c^k(y_2-(\alpha_i+\varepsilon))^k$, where $\varepsilon$ is any real number with sufficiently small absolute value. This induces a small deformation of the eliminant $g$ to $g_{\varepsilon}$ that we will call a {\it splitting}. Obviously, $g_{\varepsilon}$ is the eliminant of a new system supported on a circuit and having one more equation (and variable). Moreover, 
the number of roots of $g$ in $\P$ is equal to the number of roots of $g_{\varepsilon}$ in  the corresponding $\P_{\varepsilon}=\P \setminus\{\alpha_i+\varepsilon\}$, and the same is true for the number of roots in $\P_+$ and ${(\P_{\varepsilon})}_+$. It means that a splitting transforms one maximally positive system into another maximally positive system with one equation (and one variable) more.
The effect of a splitting on the corresponding dessin d'enfant is clear (see Figure~\ref{split}): a root $p$ (resp. $q$) with valency $2\lambda_i$ gives rise to two close points $p$ (resp. $q$), one with valency $2k$, the other with valency $2\lambda_i-2k$, and a vertex of $\Gamma$, not equal to some $p$ or $q$,  of valency $4$ (a critical point of multiplicity $2$ of $\Phi$) between these two points.
Indeed, the number of branches going down should be locally constant.  Thus $\lambda_i-1= \lambda_i-k-1+k-1+b$, where $b$ is the total number of branches going down from critical points of $\Phi$ between the two points $p$ (resp.  $q$). Thus $b=1$ which means that there is exactly one critical point of multiplicity $2$ between the two nearby points $p$ (resp.  $q$).
\bigskip

\begin{figure}[!h]
\begin{center}
\includegraphics[scale=0.5]{MEGACircuit4}
\caption{Splitting with $\lambda_i=3$ and $k=1$.}  
  \label{split}\end{center}
\end{figure}
\bigskip

The "inverse" operation can easily be made on a dessin d'enfant (though it is not really the inverse of the previous deformation).
If two letters $p$ (resp. $q$) are endpoints of some interval of the real projective line which does not contain other letters $p$, $q$, $r$,
then we may collapse these two letters into a single same letter with a number of going down branches equal to the total number of going down branches starting from the two letters
and the vertices of $\Gamma$ situated between them (see Figure~\ref{collaps}). We call this inverse operation a {\it collapsing}. Clearly, a collapsing transforms one maximally positive system into another maximally positive system with one equation (and one variable) less.
\bigskip

\begin{figure}[!h]
\begin{center}
\includegraphics[scale=0.5]{MEGACircuit5}
\caption{Collapsing.}  
  \label{collaps}\end{center}
\end{figure}
\bigskip

\subsection{Proof of Theorem~\ref{T:positive}.}
Consider a maximally positive system supported on a circuit. Then all complex roots $r$ of $g$ are in the interval $\P_+$.
This implies that $\Phi$ does not have non-real critical points since otherwise at least one connected component
of $H \setminus H\Gamma$ will not have the three letters $p$, $q$, $r$ in its boundary. This means that $H\Gamma$ consists of arcs joining real critical points of $\Phi$. Let $J$ be the largest open interval contained in $\P_+$ and delimited by two letters $r$.
The previous argument also shows that there is no critical point of $\Phi$ in $\P_+ \setminus J$, that an
arc of $H\Gamma$ should join a critical point contained in $J$ to a critical point in $\R P^1 \setminus \P_+$, and that there is at most one such arc joining each critical point. Thus all critical points of $\Phi$ are double points, and we have a bijection between the set of critical points of $\Phi$ contained in $J$ and the set of critical points of $\Phi$ contained in $\R P^1 \setminus \P_+$.  Moreover, each connected component $I$ (an open interval) of $\R P^1$ minus the set of letters $p$, $q$, $r$ contains at most one critical point of $\Phi$. Let us now perform as many collapsings as possible on $\Gamma$. This results in a new dessin d'enfant which still corresponds to a maximally positive system supported on a circuit $\calW$. We have to show that this maximally positive system has the maximal $m(\calW)+1$ number of positive solutions. For simplicity, we denote again by $\Gamma$ this new dessin d'enfant and by $\Phi=\frac{P}{Q}$ the associated rational function.
Then $\Gamma$ has all the properties described above, with the additional one that if an open interval $I$ of $\R P^1$ minus the union of the letters $p$, $q$, $r$ has no letter $r$ as endpoint, then one endpoint is a letter $p$ and the other is a letter $q$ (for otherwise we may perform another collapsing). But such an open interval cannot have only one critical point of the rational function $\Phi$. This means that the critical points of $\Phi$ which are not contained in $J$ are among the letters $p$ and $q$. Recall now that the critical points of $\Phi$ which are not roots of $P$ or $Q$ are the roots of a polynomial $H$ of degree $m(\calW)$. We have obtained that the roots of $H$ are all simple roots (since they are double points of $\Phi$) contained in $J$ and that each open interval delimited by two consecutive letters $r$ contains one and only one root of $H$. Consequently, there are $m(\calW)$ such open intervals, and thus the number of letters $r$ is equal to $m(\calW)+1$.

\subsection{Proof of Theorem~\ref{T:max}.}

Consider a system supported on a circuit $\widetilde{\calW} \subset \Z^n$ with degeneracy index $m(\widetilde{\calW})=m$ and having $\ell +1$ positive solutions. Let $\widetilde{\Gamma}$ be the associated real dessin d'enfant. Since a collapsing decreases by $1$ the degeneracy index,
it follows from Theorem~\ref{T:maxpositive} and Theorem~\ref{T:positive} that up to the action of the real projective linear group on $\C P^1$ the dessin $\widetilde{\Gamma}$ can be obtained by a sequence of $c=m(\widetilde{\calW})-\ell$ splittings from the unique real dessin d'enfant $\Gamma$ associated to a polynomial system having $\ell+1$ positive solutions and supported on a circuit with degeneracy index $\ell$. Vertices $p$ or $q$ with valency not less than $2$ in $\Gamma$ have all valency $4$ (correspond to double points) and there are $\ell$ such vertices.  Thus the $c$ consecutive splittings occur at $c$ distinct vertices among these $\ell$ vertices.
In particular, we should have $c=m-\ell \leq \ell$, and therefore there is no maximally positive system when $2\ell < m$.
\bigskip

\begin{figure}[!hbt]
\begin{center}
\includegraphics[scale=0.5]{MEGACircuit1a}
\bigskip

\includegraphics[scale=0.5]{MEGACircuit1b}
\bigskip

\includegraphics[scale=0.5]{MEGACircuit1c}
\bigskip

\includegraphics[scale=0.5]{MEGACircuit1d}
\bigskip

\includegraphics[scale=0.5]{MEGACircuit1e}
\bigskip

\includegraphics[scale=0.5]{MEGACircuit1f}
\caption{Real dessins d'enfant for $\ell=4$ and $m=6$.}  
\label{Extremes}\end{center}
\end{figure}
\bigskip

Assume from now on that $m \leq 2 \ell$.
It follows that $c$ consecutive splittings produces a dessin d'enfant with $\ell+c+2$ letters $p,q$, where $\ell-c$ of them have valency $4$ while the remaining $2c+2$ letters have valency $2$.
Assume that $\ell$ is odd, $\ell=2k+1$. Up to permuting $p$ and $q$, the $\ell$ vertices of $\Gamma$ with valency $4$ are $k$ letters $p$ and $k+1$ letters $q$.
Let $c_1$ be the number of splittings at letters $p$ and $c_2$ be the number of splittings at letters $q$. Thus $c=c_1+c_2$ with $0 \leq c_1 \leq k$ and $0\leq c_2 \leq k+1$.

By Theorem~\ref{T:maxpositive}, the affine relation for $ \calW$ is
$$w_1+w_2+2\sum_{i\in I_1}w_{i}=2\sum_{i \in I_2}w_{i},$$
where $\{1,2\},I_1,I_2$ form a partition of $\{1,\ldots,\ell+2\}$, $|I_1|=k$, $|I_2|=k+1$.
Therefore, the primitive affine relation for $\widetilde{\calW}$ is
\begin{equation} \label{E:affineextr}
\tilde{w}_1+\tilde{w}_2+2\sum_{i \in \tilde{I}_1}\tilde{w}_{i}+\sum_{i \in \tilde{J}_1}\tilde{w}_{i}=2\sum_{i \in \tilde{I}_2}\tilde{w}_{i}
+\sum_{i \in \tilde{J}_2}\tilde{w}_{i},
\end{equation}
where $\{1,2\},\tilde{I}_1,\tilde{I}_2,\tilde{J}_1,\tilde{J}_2$ form a partition of $\{1,\ldots,\ell+2+c\}$, $|\tilde{I}_1|=k-c_1$, $|\tilde{J}_1|=2c_1$, $|\tilde{I}_2|=k+1-c_2$ and
$|\tilde{J}_2|=2c_2$.
We note that if $c_2 \geq 1$, then $(c_1,c_2)$ and $(c_2-1,c_1+1)$ give the same affine relation up to renumbering.
Moreover, we have $(c_1,c_2)=(c_2-1,c_1+1)$ when $c_2=c_1+1$.
Therefore, we get the pairs $(c_1,c_2)=(c_1,c-c_1)$ with $c_1 \geq \frac{c-1}{2}=\frac{m-\ell-1}{2}$, $c_1 \leq k=\frac{\ell-1}{2}$ and  $c_1 \leq c=m-\ell$ for the distinct possible affine relations
\eqref{E:affineextr} of $\widetilde{\calW}$. This gives the minimum between $ 1+\lfloor \ell-\frac{m}{2}\rfloor$ and  $1+\lfloor \frac{m-\ell+1}{2}\rfloor$ distinct possible affine relations for $\widetilde{\calW}$. Now since in each affine relation the coefficient of $\tilde{w}_2$ is $1$ and $\widetilde{\calW}$ is primitive, we have that $(\tilde{w}_3-\tilde{w}_1, \ldots,\tilde{w}_{n+2}-\tilde{w}_1)$ is a basis of $\Z^n$ (see Remark \ref{R:uniquecircuit}). Thus each affine relation corrresponds to an unique circuit in $\Z^n$ up to action of the group of invertible integer affine transformations of $\Z^n$.
The case $\ell$ even is similar. Set $\ell=2k$.
By Theorem~\ref{T:maxpositive}, the affine relation for $ \calW$ is
$$w_1+2\sum_{i\in I_1}w_{i}=w_{k+2}+2\sum_{i \in I_2}w_{i},$$
where $\{1,k+2\},I_1,I_2$ form a partition of $\{1,\ldots,\ell+2\}$ and $|I_1|=|I_2|=k$.
The affine relation for $\widetilde{\calW}$ is
\begin{equation} \label{E:affineextrpair}
\tilde{w}_1+2\sum_{i \in \tilde{I}_1}\tilde{w}_{i}+\sum_{i \in \tilde{J}_1}\tilde{w}_{i}=\tilde{w}_{k+2}+2\sum_{i \in \tilde{I}_2}\tilde{w}_{i}
+\sum_{i \in \tilde{J}_2}\tilde{w}_{i},
\end{equation}
where $\{1,k+2\},\tilde{I}_1,\tilde{I}_2,\tilde{J}_1,\tilde{J}_2$ form a partition of $\{1,\ldots,\ell+2+c\}$, $|\tilde{I}_1|=k-c_1$, $|\tilde{J}_1|=2c_1$, $|\tilde{I}_2|=k-c_2$,
$|\tilde{J}_2|=2c_2$, $c=c_1+c_2 \leq \ell$ and $c_1,c_2$ are integers satisfying $0 \leq c_1,c_2 \leq k$. The pairs $(c_1,c_2)$ and $(c_2,c_1)$ give the same affine relation \eqref{E:affineextrpair}
up to renumbering. Thus we get the pairs $(c_1,c_2)=(c_1,c-c_1)$ with $c_1 \geq \frac{c}{2}=\frac{m-\ell}{2}$, $c_1 \leq k=\frac{\ell}{2}$ and $c_1 \leq m-\ell$ for the distinct possible affine relations
\eqref{E:affineextr} of $\widetilde{\calW}$. This gives the minimum between $ 1+\lfloor \ell-\frac{m}{2}\rfloor$ and  $1+\lfloor \frac{m-\ell}{2}\rfloor$ distinct possible affine relations for $\widetilde{\calW}$, each of them corresponding to an unique circuit in $\Z^n$ up to action of the group of invertible integer affine transformations of $\Z^n$.

\begin{example} \label{E:l4m6}
All possible real dessin d'enfants associated to maximally positive systems in the case $\ell=4$ and $m=6$ are depicted in Figure~\ref{Extremes}.
Each of them is obtained by splitting two vertices of valency $4$ of the dessin d'enfant depicted in Figure~\ref{Extr}.
This gives six primitive affine relations, one for each dessin, for the support of the starting circuit. Namely,
$$
\begin{array}{lll}
w_1+w_2+2w_3+w_4 & = & w_5+w_6+2 w_7 + w_8 \\
2w_1+2w_2+w_3 & = & w_4 +w_5+w_6+w_7 + w_8 \\
2w_1+w_2+w_3+w_4 & = & w_5+w_6+2 w_7 + w_8 \\

w_1+w_2+2w_3+w_4 & = &2 w_5+w_6+ w_7 + w_8 \\
w_1+w_2+w_3+w_4 +w_5 & = & 2w_6+2 w_7 + w_8 \\
2w_1+w_2+w_3+w_4 & = & 2w_5+w_6+w_7 + w_8
\end{array}
$$

We have ordered the dessins d'enfant from the top to the bottom and the coefficients of the left member of each affine relation correspond to half the valencies of the letters $p$.
We see that up to renumbering, the first, third, fourth and sixth relations give the same relation, while the two remaining are also identical.
Thus we have in fact two distinct affine relations, which give for any $n \geq m=6$ two distinct possible circuits in $\Z^n$ (up to the action of the group of invertible integer affine transformations) with degeneracy index $m=6$ and supporting a maximally positive system with $\ell+1=5$ positive solutions.
\end{example}
\smallskip

\begin{example}\label{E:lm}
Once at least one of its coefficients is equal to $1$, a primitive affine relation $\sum_{i=1}^s \lambda_i w_i = \sum_{i=s+1}^{m+2} \lambda_i w_i$,
determines uniquely a primitive circuit $\calW=\{w_1,\ldots,w_{n+2}\} \subset \Z^n$ (where $n \geq m$) up to the action of group of invertible integer affine transformations $\Z^n$
(see Remark \ref{R:uniquecircuit}). In fact (up to the previous action on $\Z^n$) this circuit is uniquely determined by the set $\{(\lambda_1,\ldots,\lambda_s), (\lambda_{s+1},\ldots,\lambda_{m+2})\}$, where we renumber the coefficients so that $0 <\lambda_1 \leq \cdots \leq \lambda_s$ and $0 < \lambda_{s+1} \leq \cdots \leq \lambda_{m+2}$. We use this encoding
to represent any possible primitive circuit supporting a maximally positive system for different values of $m$ and $\ell$ according to Theorem~\ref{T:max}. 

\begin{enumerate}
\item For $\ell=4$ and $m=6$, we have two circuits represented by the sets $\{(1,1,1,2),(1,1,1,2)\}$ and $\{(1,2,2),(1,1,1,1)\}$.
This is what we obtained in Example~\ref{E:l4m6}.
\item For $\ell=m=3$, we have only one circuit $\{(1,1,2),(2, 2)\}$ according to Theorem~\ref{T:maxpositive}.
\item For $\ell=3$ and $m=4$, we have two possible circuits $\{(1,1,1,1),(2,2)\}$ and $\{(1,1,2),(1,1, 2)\}$
obtained by replacing one $2$ in the set $\{(1,1,2),(2, 2)\}$ corresponding to the case $\ell=m=3$ with two $1$
(we make $m-\ell=1$ splitting).
\item For $\ell=4$ and $m=5$, we have to make $m-\ell=1$ splitting starting from the case $\ell=m=4$ corresponding to the set $\{(1,2,2),(1,2, 2)\}$
(according to Theorem~\ref{T:maxpositive}). This gives only one circuit corresponding to the set $\{(1,1,1,2),(1,2, 2)\}$.
\end{enumerate}
\end{example}

\section*{References}
\bibliographystyle{elsarticle-harv}
 \begin{thebibliography}{00}

\bibitem{B} F. Bihan,
\emph{Polynomial systems supported on circuits and dessins
  d'enfant}, Journal of the London Mathematical Society \textbf{75} (2007),
  no.~1, 116--132.

\bibitem{BBS}
B.~Bertrand, F.~Bihan, and F.~Sottile, \emph{Polynomial systems with few real
  zeroes}, Math. Z. \textbf{253} (2006), no.~2, 361--385.

\bibitem{Br} E. Brugall\'e,
\emph{Real plane algebraic curves with asymptotically
maximal number of even ovals}, 2006, Duke Mathematical Journal 131 (3):575--587.

\bibitem{BS07}
F.~Bihan and F.~Sottile, \emph{{New fewnomial upper bounds from {G}ale dual
  polynomial systems}}, 2007, Moscow Mathematical Journal, Volume 7, Number 3.

\bibitem{BS08} F.~Bihan and F.~Sottile, \emph{{Gale duality for complete intersection}},
2008, Annales de l'Institut Fourier, 58, no.~3, 877--891.

\bibitem{GKZ} I. M. Gel'fand, M. M. Kapranov, and A. V. Zelevinsky,
\emph{Discriminants, resultants, and
multidimensional determinants,} Birkhauser Boston Inc., Boston, MA, 1994.

\bibitem{K} A.~G. Kouchnirenko, \emph{A Newton polyhedron and the number of solutions of a system of k
equations in k unknowns} Usp. Math. Nauk. 30, (1975), 266–-267.

\bibitem{NSV} S. Natanzon, B. Shapiro, and A. Vainshtein,
\emph{Topological classification of generic real rational functions},
J. Knot Theory Ramifications {\bf 11} (2002), no. 7, 1063--1075. 

\bibitem{O} S. Yu Orevkov, \emph{Riemann existence theorem and construction of real algebraic curves},
Ann. Fac. Sci. Toulouse Math. (6) {\bf 12} (2003), no. 4, 517--531. 


\bibitem{P-R} K. Phillipson, J. Maurice Rojas,
\emph{Fewnomial systems with Many Roots, and an Adelic Tau Conjecture,}
Proceedings of Bellairs workshop on tropical and non-Archimedean geometry (May 6-13, 2011, Barbados), Contemporary Mathematics, vol. 605, 45--71, AMS Press.

\end{thebibliography}
\end{document}
