Asymptotically tight bounds on subset sums

Abstract: For a subset A of a finite abelian group G we define Sigma(A)={sum_{a\in B}a:B\subset A}. In the case that Sigma(A) has trivial stabiliser, one may deduce that the size of Sigma(A) is at least quadratic in |A|; the bound |Sigma(A)|>= |A|^{2}/64 has recently been obtained by De Vos, Goddyn, Mohar and Samal. We improve this bound to the asymptotically best possible result |Sigma(A)|>= (1/4-o(1))|A|^{2}.We also study a related problem in which A is any subset of Z_{n} with all elements of A coprime to n; it has recently been shown, by Vu, that if such a set A has the property Sigma(A) is not Z_{n} then |A|=O(sqrt{n}). This bound was improved to |A|<= 8sqrt{n} by De Vos, Goddyn, Mohar and Samal, we further improve the bound to the asymptotically best possible result |A|<= (2+o(1))sqrt{n}.

\section{Introduction}

For a subset $A$ of a finite abelian group $G$ we define, \begin{equation*} \Sigma(A)=\Big\{\sum_{a\in B}a:\, B\subset A\Big\}\end{equation*} the set of all elements which may be expressed as a sum of elements of $A$ (with repetition not allowed).  For a subset $S\subset G$ the stabiliser $\stab(S)$ of $S$ is the set of elements $g\in G$ such that $S+g=S$; the stabiliser is a subgroup of $G$.  We say that $S$ has trivial stabiliser if $\stab(S)=\{0\}$.  A recent result of De Vos, Goddyn, Mohar and \v S\' amal \cite{dvgms} shows that if $\Sigma(A)$ has trivial stabiliser then its size is at least quadratic in the size of $A$.

\begin{theorem}\label{dvgms} \cite{dvgms} Let $A\subset G\setminus \{0\}$, and suppose that $\Sigma (A)$ has trivial stabiliser, then $|\Sigma(A)|\ge |A|^{2}/64$\end{theorem}

It is noted in \cite{dvgms} that the above theorem can be proved with $1/64$ replaced by $1/48-o(1)$; where $o(1)$ denotes a function which converges to $0$ as $|A|\to \infty$.  Our aim is to improve this further by showing the result holds with the constant replaced by $1/4-o(1)$.  This result is asymptotically best possible as seen by considering $A=\{-n,-(n-1),...,n-1,n\}\subset \mathbb{Z}_{N}$, with $N$ large.

\begin{theorem}\label{ismain} Let $A\subset G\setminus \{0\}$, and suppose $\Sigma (A)$ has trivial stabiliser, then $|\Sigma(A)|\ge (1/4-o(1))|A|^{2}$\end{theorem}

We follow \cite{dvgms} in deducing related results for the case $A$ has non-trivial stabiliser.

\begin{theorem}\label{wstab} Let $A\subset G$, and let $H$ be the stabiliser of $\Sigma (A)$ then, \begin{equation*} |\Sigma(A)|\ge (1/4-o(1))|A\setminus H|^{2}\end{equation*} where $o(1)$ denotes a function which converges to $0$ as $|A\setminus H|/|H|\to \infty$.\end{theorem}

\begin{remark} As the $o(1)$ term of the above statement converges to zero as $|A\setminus H|/|H|\to \infty$, rather than as $|A\setminus H|\to \infty$, our result is only an improvement on the result of \cite{dvgms} in the case that $|A\setminus H|$ is large relative to $|H|$.\end{remark}

Erd\H os and Heilbronn \cite{EH} proved that if $A\subset \mathbb{Z}_{p}$, the integers modulo $p$ (with $p$ prime), and $|A|\ge 3\sqrt{6p}\,$ then $\Sigma (A)=\mathbb{Z}_{p}\,$ -- the connection of this result to the current discussion is that this result is proved by giving a quadratic lower bound on $|\Sigma (A)|$ for $A\subset \mathbb{Z}_{p}$.  They conjectured that the constant $3\sqrt{6}$ of their theorem could be replaced by $2$, this was proved by Olson \cite{O} and further sharpened by Dias da Silva and Hamidoune \cite{DdSH}.  To prove a similar result in $\mathbb{Z}_{n}$, for $n$ composite, one must put extra conditions on the set $A$.  The following theorem of Vu \cite{Vu} shows one way in which this can be done is to demand that $A$ is contained in $\mathbb{Z}_{n}^{*}$, the elements coprime to $n$.

\begin{theorem} (Vu \cite{Vu}) There is a constant $c$ such that every subset $A\subset \mathbb{Z}_{n}^{*}\subset \mathbb{Z}_{n}$ with $|A|\ge c\sqrt{n}$ satisfies $\Sigma(A)=\mathbb{Z}_{n}$\end{theorem}

The constant obtained in the original proof of the theorem is quite large.  As a corollary of their main theorem De Vos, Goddyn, Mohar and \v S\' amal \cite{dvgms} improved the constant to $c=8$.  We improve this further, by replacing the constant by $2+o(1)$.

\begin{theorem}\label{asymptoticolson} Let $A\subset \mathbb{Z}_{n}^{*}\subset \mathbb{Z}_{n}$ be such that $\Sigma(A)\neq\mathbb{Z}_{n}$, then $|A|\le (2+o(1))\sqrt{n}$\end{theorem}

\begin{remark} This result is asymptotically best possible, consider for example the case $n=p^{2}$, where $p$ is a large prime, and consider $A=\{-(p-1),...,-1,1,...,p-1\}$.  All elements of $A$ are coprime to $n$, and the element $p(p-1)/2+1$ is not in $\Sigma(A)$ so that $\Sigma(A)\neq \mathbb{Z}_{n}$, while $|A|=2p-2=(2-o(1))\sqrt{n}$.\end{remark}

The results Theorem \ref{ismain} and Theorem \ref{wstab} will be deduced from Theorem \ref{main} which we state below.  Theorem \ref{main} will state that if $A\subset G\setminus \{0\}$ is such that $\Sigma(A)$ has trivial stabiliser, and has the extra property that $A\cap (-A)=\phi$ then $\Sigma(A)\ge (1/2-o(1))|A|^{2}$.  We now state this result formally.

Let $n_{9}=1$, and for $k\ge 10$ let $n_{k}=2^{k^{2}}$.  We define also a sequence of real numbers $\alpha_{k}$ as follows: $\alpha_{9}=1/64$ and for $k\ge 10$ we define\begin{equation*} \alpha_{k}=\min\Big\{\,\frac{6}{5}\alpha_{k-1}\, ,\frac{1}{2}-\frac{1}{2^{k-1}}\Big\}\end{equation*} It is clear that the sequence $\alpha_{k}$ is increasing and converges to $1/2$ as $k\to \infty$.

\begin{theorem}\label{main} Let $A\subset G\setminus\{0\}$ and let $k\ge 9$.  Suppose that $A\cap (-A)=\phi$, that $\Sigma(A)$ has trivial stabiliser and that $|A|\ge n_{k}$, then $|\Sigma(A)|\ge \alpha_{k}|A|^{2}$\end{theorem}

The layout of the article is as follows.  We shall conclude the introduction by introducing definitions and observations that will be used throughout the article.  In Section \ref{pp} we assume Theorem \ref{main} and deduce Theorems \ref{ismain} and \ref{wstab}.  In Section \ref{prel} we establish preliminary lemmas required for the proof of Theorem \ref{main}, we then prove Theorem \ref{main} in Section \ref{pom}.  We then turn to Theorem \ref{asymptoticolson}, which is proved in Section \ref{poao}.

Given a set $S\subset G$ and an element $c\in G$ we write $S+c$ for the set $\{s+c:s\in S\}$.  We define $\lambda_{S}(c)$, or simply $\lambda(c)$, to be the number of elements in $S+c$ which are not in $S$, ie. $\lambda(c)=|(S+c)\setminus S|$.  The following properties of $\lambda$ are elementary.

\noindent (i) $\lambda(0)=0$ \\ (ii) $\lambda(-c)=\lambda(c) \!\qquad\qquad \qquad \text{for all}\,\,c\in G$ \\ (iii)$\lambda(b+c)\le \lambda(b)+\lambda(c) \qquad \text{for all}\, \,b,c\in G$ \qquad (subadditivity of $\lambda$)\vspace{0.1cm}

For sets $A_{1},...,A_{r}\subset G$, we define their sumset, \begin{equation*}\Sigma_{i=1}^{r}A_{i}=\{a_{1}+...+a_{r}:\, a_{i}\in A_{i}\, \,\text{for }\,i=1,...,r \}\end{equation*} We shall also use the notation $rA$ to denote $\sum_{i=1}^{r}A=\{a_{1}+...+a_{r}:a_{i}\in A \}$.  The key sumset inequality we shall use is Kneser's addition theorem.

\begin{theorem} (Kneser \cite{K}) Let $A_{1},...,A_{r}\subset G$ and let $H$ be the stabiliser of $\sum_{i=1}^{r}A_{i}$, then, \begin{equation*}\big|\sum_{i=1}^{r}A_{i}\big|\ge \sum_{i=1}^{r}|A_{i}|-(r-1)|H|\end{equation*}\end{theorem}

Let $B\subset A\subset G$.  We may express $\Sigma(A)$ as $\Sigma(A)= \Sigma(B)+\Sigma(A\setminus B)$.  It is then easily observed that,\begin{equation*} \stab(\Sigma(B))\subset \stab(\Sigma(A))\end{equation*} In particular if $\Sigma(A)$ has trivial stabiliser then so does $\Sigma(B)$.  These observations shall be used throughout.

\section{Proofs of Theorem \ref{ismain} and Theorem \ref{wstab}}\label{pp}

In this section we assume Theorem \ref{main} and prove Theorem \ref{ismain} and Theorem \ref{wstab}.  Let $(n_{k})_{k\ge 9}$ and $(\alpha_{k})_{k\ge 9}$ be the sequences defined above, for a natural number $n$ let $k(n)$ be the largest integer $k$ such that $n\ge 2n_{k}$.  We define, \begin{equation*} f(n)=\alpha_{k(n)}/2-1/n^{2}\end{equation*} It is clear that $f(n)$ satisfies $f(n)\to 1/4$ as $n\to \infty$, ie. $f$ is of the form $1/4-o(1)$.

\begin{proof}[Proof of Theorem \ref{ismain}] Let $A\subset G\setminus \{0\}$ be such that $\Sigma (A)$ has trivial stabiliser, let $n=|A|$.  We prove Theorem \ref{ismain} by showing $|\Sigma(A)|\ge f(n)n^{2}$.  Let $m=\lfloor n/2\rfloor$, it is possible to partition $A$ into two subsets $A_{1},A_{2}$ with cardinalities $m$ and $n-m$ respectively, with the property $A_{i}\cap (-A_{i})=\phi$ for $i=1,2$.  Let $k=k(n)$, by the definition of $k(n)$ we have that $m\ge n_{k}$, and so applying Theorem \ref{main} to $A_{1},A_{2}$ individually we obtain, $|\Sigma(A_{1})|\ge \alpha_{k}m^{2}$ and $|\Sigma(A_{2})|\ge \alpha_{k}(n-m)^{2}$.  We have that, $\Sigma(A)=\Sigma(A_{1})+\Sigma(A_{2})$, and so applying Kneser's theorem (and using the fact that $\Sigma(A)$ has trivial stabiliser) we obtain,\begin{equation*} |\Sigma(A)|\ge |\Sigma(A_{1})|+|\Sigma(A_{2})|-1\ge \alpha_{k} m^{2}+\alpha_{k} (n-m)^{2}-1\end{equation*} We note $m^{2}+(n-m)^{2}\ge n^{2}/2$ and so, \begin{equation*} |\Sigma(A)|\ge \frac{\alpha_{k}n^{2}}{2}-1=f(n)n^{2}\vspace{-0.6cm}\end{equation*}\end{proof} \vspace{0.1cm}

Let $A\subset G\setminus \{0\}$, and suppose $\Sigma(A)$ has trivial stabiliser, Theorem \ref{ismain} gives that $|\Sigma(A)|\ge f(|A|)|A|^{2}$ for some function $f(n)\to 1/4$ as $n\to \infty$.  Of course by setting $f'(n)=f(n)-1/n^{2}$, we have \begin{equation}\label{fprime} |\Sigma(A)|\ge 1+f'(|A|)|A|^{2}\end{equation} for a function $f'(n)\to 1/4$ as $n\to \infty$.  Let $m(n)=\lfloor \sqrt{n}\rfloor$, we define, \begin{equation*}f_{2}(n)=(1-m(n)^{-1})^{2}f'(m(n))\end{equation*}  It is clear that $f_{2}(n)\to 1/4$ as $n\to \infty$, ie. $f_{2}(n)$ is of the form $1/4-o(1)$

\begin{proof}[Proof of Theorem \ref{wstab}] Let $m(n)$ and $f_{2}(n)$ be as defined as above.  Let $A\subset G$, let $H$ be the stabiliser of $\Sigma(A)$, and let $n=|A\setminus H|/|H|$.  We prove Theorem \ref{wstab} by demonstrating that, \begin{equation*}|\Sigma(A)|\ge f_{2}(n)|A\setminus H|^{2}\end{equation*}  We work in $G/H$, an element $Q$ of $G/H$ is a coset of $H$.  We let $h=|H|$ and define a sequence $A_{1},...,A_{h}$ of subsets of $G/H$ by \begin{equation*} A_{i}=\{Q\in G/H:|A\cap Q|\ge i\} \end{equation*} Note that the coset $Q$ appears in exactly $|A\cap Q|$ of the sets $A_{i}$, this implies, \begin{equation*} \sum_{i=1}^{h}|A_{i}|=|A|\end{equation*} \vspace{-0.2cm} Writing $A'_{i}$ for $A_{i}\setminus \{H\}$ we have, \begin{equation*} \sum_{i=1}^{h}|A'_{i}|=|A\setminus H|\end{equation*} The key observation is that $\Sigma(A)$ consists exactly of those elements which lie in cosets in $\Sigma(A'_{1})+...+\Sigma(A'_{h})$.  So that,\begin{equation*} |\Sigma(A)|= h|\Sigma(A'_{1})+...+\Sigma(A'_{h})| \end{equation*} We now put a lower bound on $|\Sigma(A'_{1})+...+\Sigma(A'_{h})|$.  The sets $A'_{1},...,A'_{h}$ are decreasing in size, let $j$ be maximal such that $|A'_{j}|\ge m(n)$.  Now $\sum_{i> j}|A'_{i}|<h m(n)$ so that we have, \begin{equation*} \Sigma_{i=1}^{j}|A'_{i}|\ge |A\setminus H|-hm(n)\ge h(n-m(n))\ge hn(1-m(n)^{-1})\end{equation*} For all $i\le j$ we have $|A'_{i}|\ge m(n)$ so that from (\ref{fprime}), and the fact that $f'$ is increasing, we have, \begin{equation*} |\Sigma(A'_{i})|\ge 1+f'(|A'_{i}|)|A'_{i}|^{2}\ge 1+f'(m(n))|A'_{i}|^{2}\end{equation*} Since $H$ is the stabiliser of $\Sigma(A)$ we must have that $\Sigma(A'_{1})+...+\Sigma(A'_{j})$ has trivial stabiliser in $G/H$, and so by Kneser's theorem, $|\Sigma(A'_{1})+...+\Sigma(A'_{j})|\ge |\Sigma(A'_{1})|+...+|\Sigma(A'_{j})|-(j-1)$, it follows that, \begin{equation*} |\Sigma(A'_{1})+...+\Sigma(A'_{j})|\ge \sum_{i=1}^{j}\big( 1+f'(m(n))|A'_{i}|^{2}\big) -(j-1)\ge f'(m(n))\sum_{i=1}^{j}|A'_{i}|^{2}\end{equation*} We now apply Cauchy-Schwarz to obtain, \begin{equation*} |\Sigma(A'_{1})+...+\Sigma(A'_{j})|\ge \frac{f'(m(n))}{j}\Big(\sum_{i=1}^{j}|A'_{i}|\Big)^{2}\ge \frac{f'(m(n))}{h}\big(hn(1-m(n)^{-1})\big)^{2}\end{equation*} and so,  \begin{equation*} |\Sigma(A'_{1})+...+\Sigma(A'_{j})|\ge (1-m(n)^{-1})^{2}f'(m(n))hn^{2}\end{equation*} We now simply note that $|\Sigma(A'_{1})+...+\Sigma(A'_{h})|\ge |\Sigma(A'_{1})+...+\Sigma(A'_{j})|$ and recall that, $|\Sigma(A)|= h|\Sigma(A'_{1})+...+\Sigma(A'_{h})|$ to obtain, \begin{equation*} |\Sigma(A)|\ge (1-m(n)^{-1})^{2}f'(m(n))h^{2}n^{2}= f_{2}(n)|A\setminus H|^{2} \vspace{-0.6cm}\end{equation*}\end{proof}

\section{Some preliminary lemmas}\label{prel}

In this section we prove the key lemmas which are central to our proof of Theorem \ref{main} in Section \ref{pom}.  That proof will work by building up a set $B\subset A$ with $|\Sigma (B)|$ large.  During this process we shall inspect the current choice of $B$ and let $S=\Sigma(B)$, we shall then attempt to find an element $c\in C=A\setminus B$ with $\lambda_{S}(c)$ relatively large, and then add $c$ to $B$, this leads to set with size one more than $|B|$, with a significantly larger set of sums.  We shall recall results proved previously (Lemma \ref{ssmall} \cite{EH} and Lemma \ref{slarge} \cite{dvgms}) which enable one to put a lower bound on $\max_{c\in C}\lambda(c)$.  More importantly we strengthen Lemma \ref{slarge} to Lemma \ref{thegoodincrease}, a result which is best possible, up to an error term; furthermore for our applications of the lemma the error term is small asymptotically.

For a subset $Q\subset G$, we define $\defi_{Q}(S)=\min\{|S\cap Q|,|Q\setminus S|\}$.   Let $\rho(d)$ be the number of representations of $d$ as a difference of two elements of $S$, ie. $\rho(d)=|\{(x,y)\in S^{2}:x-y=d\}|=|S\cap (S+d)|$.  The equality $|(S+d)\cap S|+|(S+d)\setminus S|=|S|$ implies that $\lambda (d)=|S|-\rho(d)$.  A key fact will be that, \begin{equation*} \sum_{d\in G}\rho (d)= |S|^{2}\end{equation*} this follows from the fact that each pair of elements $(x,y)$ of $S$ have a unique difference $x-y$, so is counted exactly once by the sum.  In the following lemmas, $H$ denotes a finite abelian group.  The following two lemmas were originally proved in \cite{EH} and \cite{dvgms} respectively, we give proofs so that the reader may become familiar with ideas which we shall use in the more involved proof of Lemma \ref{thegoodincrease}.

\begin{lemma}\label{ssmall}\cite{EH} Let $C,S\subset H$ be such that $\defi_{H}(S)\le |C|/2$, then \begin{equation*} \frac{1}{|C|}\sum_{c\in C}\lambda (c)\ge \frac{\defi_{H}(S)}{2}\end{equation*} In particular $\lambda (c)\ge \defi_{H}(S)/2$ for some $c\in C$.\end{lemma}

\begin{proof} Exchanging $S$ for $H\setminus S$ if required we may assume $\defi_{H}(S)=|S|\le |H|/2$, this is allowed as $\lambda_{S}(c)=\lambda_{H\setminus S}(c)$ for all $c\in C$.  From the facts $\lambda(c)=|S|-\rho(c)$ and $\sum_{d\in H}\rho(d)=|S|^{2}$ we deduce that, \begin{equation*}\sum_{c\in C}\lambda(c) = |C||S|-\sum_{c\in C} \rho(c)\ge |C||S|-|S|^{2}\end{equation*} We have also that $|C|\ge 2\defi_{H}(S)=2|S|$ so that $|C|-|S|\ge |C|/2$, it follows that, \begin{equation*}\sum_{c\in C}\lambda(c) \ge |S|(|C|-|S|)\ge \,\frac{|C||S|}{2}=\,\frac{|C|\defi_{H}(S)}{2}\vspace{-0.6cm}\end{equation*}\end{proof}\vspace{0.1cm}

\begin{lemma}\label{slarge}\cite{dvgms}  Let $C,S\subset H$ be such that $H=\langle C\rangle$ and $\defi_{H}(S)\ge |C|/2$ then there exists $c\in C$ with $\lambda (c)\ge |C|/8$\end{lemma}

\begin{proof}[Sketch proof] Again we may assume $\defi_{H}(S)=|S|\le |H|/2$.  We cannot proceed as in the previous proof, because we obtain no information in the case $|C|\le |S|$.  Instead we consider not only the elements of $C$ but all elements which can be expressed as a sum of a small number of elements of $C$, we then obtain the required result from the subadditivity of $\lambda$.  Suppose for contradiction that $\lambda(c)<|C|/8$ for all $c\in C$, and suppose $d$ may be expressed as a sum of $k$ elements of $C$, then by the subadditivity of $\lambda$ we have $\lambda(d)<k|C|/8$.  Using the notation $rA$ for the set $\{a_{1}+...+a_{r}:a_{i}\in A\}$, we have that the set of elements that may be expressed as a sum of at most $r$ elements of $C$ is the set $rC^{*}$ where $C^{*}=C\cup \{0\}$.  We may assume for all $d\in rC^{*}$ that $\lambda(d)< r|C|/8$ and so $\rho(d)>|S|-r|C|/8$.  An application of Kneser (see \cite{dvgms} for details) now shows that for $r=\lfloor 4|S|/|C|\rfloor$ we have $|rC^{*}|\ge 2|S|$.  For this value of $r$ we have $\rho(d)>|S|-r|C|/8\ge |S|-|S|/2=|S|/2$ for all $d\in rC^{*}$, so that, \begin{equation*} \sum_{d\in rC^{*}}\rho (d)> |rC^{*}| \frac{|S|}{2}\ge |S|^{2}\end{equation*} This contradicts the equality $\sum_{d\in H}\rho(d)= |S|^{2}$, and the result is proved.\end{proof}

With greater care, and with extra conditions, the result of Lemma \ref{slarge} can be greatly improved; one can find an element $c\in C$ with $\lambda (c)$ almost $|C|/2$.  The extra conditions we need are that $C\cap (-C)=\phi$, that $|C|$ is large, and that $\defi_{H}(S)/|C|$ is large.  We will again use the subadditivity of $\lambda$; in our sketch proof of Lemma \ref{slarge} we used that if $\lambda(c)< \eta$ then for each $r$ we have $\lambda(d)<r\eta$ for all $d\in rC^{*}$ and so $\rho(d)>|S|-r\eta$ for all $d\in rC^{*}$.  To obtain an the improved result we must use this statement simultaneously for many values of $r$ rather than once for a single value of $r$.  Again it is important to have a lower bound on $|rC^{*}|$ (although in the sequel we take a different set $C^{*}$), we first prove Lemma \ref{rc} which gives an improved lower bound on $|rC^{*}|$, we will then prove Lemma \ref{thegoodincrease} which gives a new bound on $\lambda(c)$.  We define $C^{*}=C\cup (-C)\cup \{0\}$.

\begin{lemma}\label{rc} Let $C\subset H$ be such that $H=\langle C\rangle$, $C\cap (-C)=\phi$,  $\Sigma(C)$ has trivial stabiliser and $|C|\ge 2^{2k+11}$ then for all positive integers $r$ we have that either $rC^{*}=H$ or \begin{equation*} |rC^{*}|\ge 2\Big(1-\frac{1}{2^{k+2}}\Big)r|C| \end{equation*}\end{lemma}

\begin{proof} Let $K$ be the stabiliser of $rC^{*}$.  If $C\subset K$ then $K=H$ and $rC^{*}=H$ and we are done.  So we may assume $C^{*}$ meets at least one non-trivial coset of $K$, note that $C^{*}$ also meets $K$ as $0\in C^{*}\cap K$.  Let $Q_{1},...,Q_{p}$ be the non-trivial cosets of $K$ meeting $C^{*}$, it follow that $rC^{*}$ is the set of elements of the cosets in $r\{K,Q_{1},...,Q_{p}\}$.  By the definition of $K$ the set $r\{K,Q_{1},...,Q_{p}\}$ has trivial stabiliser in $H/K$ so that an application of Kneser's theorem yields, \begin{equation*} |r\{K,Q_{1},...,Q_{p}\}|\ge r(p+1)-(r-1)\ge rp\end{equation*} and so $|rC^{*}|\ge rp|K|$.  So to complete the proof we must show that,\begin{equation*} |K|\ge 2\Big(1-\frac{1}{2^{k+2}}\Big)\frac{|C|}{p} \end{equation*}  In the case that $|C\cap K|\ge |C|/2^{k+2}$ we use the fact that $K$ contains $\Sigma(C\cap K)$ together with Theorem \ref{dvgms} (which we may apply to $C\cap K$, as $\Sigma(C\cap K)$ has trivial stabiliser) to deduce, \begin{equation*} |K|\ge |\Sigma(C\cap K)|\ge \frac{|C\cap K|^{2}}{64}\ge \frac{1}{64}\frac{|C|^{2}}{2^{2k+4}}\ge 2|C|\end{equation*} the final inequality follows from $|C|\ge 2^{2k+11}$, and we are done.  We may now assume that $|C\cap K|\le |C|/2^{k+2}$, this implies $|C\setminus K|\ge (1-2^{-(k+2)})|C|$ and likewise $|C'\setminus K|\ge (1-2^{-(k+2)})|C'|$, where $C'$ denotes $C\cup (-C)$.  Alternatively $|C' \cap \bigcup_{i=1}^{p} Q_{i}|\ge (1-2^{-(k+2)})|C'|$, so by the pigeon hole principle some coset $Q$ must have, \begin{equation*} |C'\cap Q|\ge \Big(1-\frac{1}{2^{k+2}}\Big)\frac{|C'|}{p}= 2 \Big(1-\frac{1}{2^{k+2}}\Big)\frac{|C|}{p}\end{equation*} and so noting $|K|=|Q|\ge |C'\cap Q|$ we are done.\end{proof}

We now deduce the required strengthening of Lemma \ref{slarge},

\begin{lemma}\label{thegoodincrease} Let $C\subset H$ be such that $H=\langle C\rangle$, $C\cap (-C)=\phi$, $\Sigma(C)$ has trivial stabiliser and $|C|\ge 2^{2k+11}$, and let $S\subset H$ be such that $\defi_{H}(S)\ge 2^{k+1}|C|$ then there exists $c\in C$ with $\lambda (c)\ge (1-2^{1-k})|C|$\end{lemma}

\begin{proof} For all $d\in H$ we have $\lambda_{S}(d)=\lambda_{H\setminus S}(d)$, so that exchanging $S$ with $H\setminus S$ if required, we may assume $\defi_{H}(S)=|S|\le |H|/2$.  As in previous proofs we shall proceed by assuming the result fails and from this deduce that $\sum_{d} \rho(d)> |S|^{2}$, a contradiction.  On this occasion we must be much more precise in our lower bound on $\sum_{d}\rho(d)$.  It will be useful to use the fact that $\sum_{d}\rho(d)=\int_{0}^{|S|}|D_{t}| \, dt $ where $D_{t}=\{d\in H:\rho(d)\ge t\}$.
\footnote{We choose this representation, rather than the sum $\sum_{t=1}^{|S|}|D_{t}|$, as it means we do not have to concern ourselves with integer parts, etc.}
\\ \indent Suppose that every element $c\in C$ has $\lambda(c)<(1-2^{1-k})|C|$, this implies $\lambda(c)<(1-2^{1-k})|C|$ for all $c\in C^{*}$, since $\lambda(0)=0$ and $\lambda(-c)=\lambda(c)$.  So that by the subadditivity of $\lambda$ we have for all $r$ and for all $d\in rC^{*}$ that $\lambda (d)<r(1-2^{1-k})|C|$, and so $\rho(d)>|S|-r(1-2^{1-k})|C|$.  For each $r=1,...,\lfloor |S|/|C|\rfloor$, we define, \begin{equation*} I_{r}=(|S|-(r+1)(1-2^{1-k})|C|,|S|-r(1-2^{1-k})|C|]\end{equation*} For $t\in I_{r}$ we have $t\le |S|-r(1-2^{1-k})|C|$ and so $D_{t}\supset rC^{*}$, applying Lemma \ref{rc} we deduce, $|D_{t}|\ge 2(1-2^{-(k+2)})r|C|$.
\\ \indent Note also that for $t\le |S|-(\lfloor |S|/|C| \rfloor+1) (1-2^{1-k})|C|$ we have $D_{t}\supset \lfloor |S|/|C|\rfloor C^{*}$ and so $|D_{t}|\ge 2(1-2^{-(k+2)}) \lfloor |S|/|C|\rfloor |C|$.  Using the fact that $\lfloor |S|/|C|\rfloor\ge (|S|-|C|)/|C|\ge(1-2^{-(k+1)})|S|/|C|$ we have, \begin{equation*} |D_{t}|\ge 2\Big(1-\frac{1}{2^{k+2}}\Big)\Big\lfloor \frac{|S|}{|C|}\Big\rfloor |C|\ge 2\Big(1-\frac{1}{2^{k+2}}\Big) \Big(1-\frac{1}{2^{k+1}}\Big)|S| \end{equation*}
for all $t\le |S|-(\lfloor |S|/|C| \rfloor +1) (1-2^{1-k})|C|$.  Note that $\lfloor |S|/|C|\rfloor +1\le |S|/|C|+1\le (1+2^{-(k+1)})|S|/|C|$ so that the above bound on $|D_{t}|$ hold for all $t$ satisfying $t\le |S|-(1-2^{1-k})(1+2^{-(k+1)})|S|$ and so certainly for all $t\le 3|S|/2^{k+1}$.  We obtain, \begin{equation*}  \sum_{d\in H}\rho(d)= \int_{0}^{|S|}|D_{t}| \, dt\ge \sum_{r=1}^{\lfloor |S|/|C|\rfloor}\int_{t\in I_{r}}|D_{t}| \, dt+\int_{0}^{3|S|/2^{k+1}}|D_{t}| \, dt \end{equation*}
and so, \begin{equation*} \sum_{d\in H}\rho(d) \ge \sum_{r=1}^{\lfloor |S|/|C|\rfloor } 2\Big(1-\frac{1}{2^{k-1}} \Big) \Big(1-\frac{1}{2^{k+2}}\Big)r|C|^{2}+\frac{3|S|}{2^{k+1}}2\Big(1-\frac{1}{2^{k+2}}\Big) \Big(1-\frac{1}{2^{k+1}}\Big)|S|\end{equation*}
Since $\lfloor |S|/|C|\rfloor \ge (1-2^{-(k+1)})|S|/|C|$ we have that $\sum_{r=1}^{\lfloor |S|/|C|\rfloor }r= (\lfloor|S|/|C|\rfloor)(\lfloor|S|/|C|\rfloor+1)/2 \ge (1-2^{-(k+1)})|S|^{2}/2|C|^{2}$, and so, \begin{equation*}  \sum_{d\in H}\rho(d)\ge \Big(1-\frac{1}{2^{k+1}}\Big)  \Big(1-\frac{1}{2^{k-1}}\Big) \Big(1-\frac{1}{2^{k+2}}\Big)|S|^{2} + \frac{3}{2^{k}}\Big(1-\frac{1}{2^{k+2}}\Big) \Big(1-\frac{1}{2^{k+1}}\Big)|S|^{2}\end{equation*}  However this quantity is larger than $|S|^{2}$, a contradiction. \end{proof}

\section{Proof of Theorem \ref{main}}\label{pom}

Let us recall the sequences $(n_{k})_{k\ge 9}$ and $(\alpha_{k})_{k\ge 9}$ which appear in the statement of Theorem \ref{main}. The sequence $(n_{k})_{k\ge 9}$ is defined by $n_{9}=1$, and for $k\ge 10$ by $n_{k}=2^{k^{2}}$.  The only information we shall use about this sequence is that for $k\ge 10$ it satisfies, \begin{equation} n_{k}> 2^{5k+15} \qquad \text{and}\qquad \frac{n_{k}}{2^{k}}\ge n_{k-1} \end{equation}  We recall the sequence $(\alpha_{k})_{k\ge 9}$ defined by, $\alpha_{9}=1/64$ and for $k\ge 10$ by, \begin{equation*} \alpha_{k}=\min\Big\{\,\frac{6}{5}\alpha_{k-1}\, ,\frac{1}{2}-\frac{1}{2^{k-1}}\Big\}\end{equation*}

Having proved all the necessary preliminary results we now proceed towards our proof of Theorem \ref{main}.  Our proof is by induction on $k$, the case $k=9$ follows from Theorem \ref{dvgms}, so we turn to the induction step, we let $k\ge 10$ and suppose the result holds for all smaller values of $k$.  Let $A$ be a set of size $n$ satisfying the conditions of Theorem \ref{main}, we may assume $n\ge n_{k}$, else there is nothing to prove.  As mentioned previously we shall build up a set $B\subset A$ with $\Sigma (B)$ large.  We define a function $g(t)$ for $t\in\{\lfloor n/2^{k}\rfloor,...,\lceil n-n/2^{k}\rceil \}$ by $g(\lfloor n/2^{k}\rfloor) =0$ and then inductively by,\begin{equation*} g(t+1)=g(t)+\Big(1-\frac{1}{2^{k-1}}\Big)(n-t)\end{equation*} We shall deduce Theorem \ref{main} from the following lemma.

\begin{lemma}\label{mainlemma} Let $A$ be as above then for all $t\in\{\lfloor n/2^{k}\rfloor,...,\lceil n-n/2^{k} \rceil\}$ there is a subset $B\subset A$ of cardinality $t$ with either $|\Sigma(B)|\ge g(t)$ or $|\Sigma(B)|\ge \alpha_{k}n^{2}$.\end{lemma}

Theorem \ref{main} now follows by taking $B$ of cardinality $\lceil n-n/2^{k}\rceil$ with either $|\Sigma(B)|\ge g(\lceil n-n/2^{k}\rceil)$ or $|\Sigma(B)|\ge \alpha_{k}n^{2}$, in the latter case we are done immediately as $|\Sigma(A)|\ge |\Sigma(B)|$.  In the former case we note that, \begin{equation*}g(\lceil n-n/2^{k}\rceil)\ge \Big(1-\frac{1}{2^{k-1}}\Big)\sum_{t=n/2^{k}}^{n-n/2^{k}}n-t= \Big(1-\frac{1}{2^{k-1}}\Big)\sum_{t=n/2^{k}}^{n-n/2^{k}}t \end{equation*} and we may bound the sum by,\begin{equation*} \sum_{t=n/2^{k}}^{n-n/2^{k}}t  \ge \Big(1-\frac{1}{2^{k}}\Big)^{2}\frac{n^{2}}{2}-\frac{n^{2}}{2^{2k+1}} \ge \Big(\frac{1}{2}-\frac{1}{2^{k}}\Big)n^{2}\end{equation*} and so, \begin{equation*}|\Sigma(A)| \ge \Big(1-\frac{1}{2^{k-1}}\Big)\Big(\frac{1}{2}-\frac{1}{2^{k}}\Big)n^{2}\ge \Big(\frac{1}{2}-\frac{1}{2^{k-1}}\Big)n^{2}\ge \alpha_{k} n^{2}\end{equation*} and Theorem \ref{main} is proved.

We must now prove Lemma \ref{mainlemma}.  We do this by induction on $t$.  The result is trivial for $t=\lfloor n/2^{k}\rfloor$.  If we ever find a set $B$ with $|\Sigma(B)|\ge \alpha_{k}n^{2}$ then the induction is trivial from that point on.  So for the induction step we let $B$ be a set of size $t$ with $|\Sigma (B)|\ge g(t)$, and set $S=\Sigma (B)$ and $C=A\setminus B$, we will then show either that $|S|\ge \alpha_{k}n^{2}$ or that, \begin{equation} \lambda(c)\ge \Big(1-\frac{1}{2^{k-1}}\Big)|C|=\Big(1-\frac{1}{2^{k-1}}\Big)(n-t) \qquad \text{for some}\,\, c\in C\end{equation} the induction step is then completed by considering $B\cup \{c\}$, as $B\cup\{c\}$ is then a set of size $t+1$ with $\Sigma(B\cup\{c\})=S\cup (S+c)$ and so, \begin{equation*}|\Sigma(B\cup\{c\})|\ge |S|+\lambda(c)\ge g(t)+(1-2^{1-k})(n-t)=g(t+1)\end{equation*}

Let us first note a lower bound on $|S|$ which we shall use during the proof, since $|B|=t\ge \lfloor n/2^{k}\rfloor\ge n/2^{k+1}$, it is immediate from Theorem \ref{dvgms} that, \begin{equation}\label{Sbig} |S|\ge \frac{|B|^{2}}{64}\ge \frac{n^{2}}{2^{2k+8}}\ge 2^{3k+7}n \end{equation}

Let $H=\langle C\rangle$.  As in \cite{dvgms}, we must analyse the intersection of $S$ with the cosets of $H$.  We begin with some lower bounds on $|H|$ that we shall use during the proof.  The set $C$ is contained in $A$ so that $C\cap (-C)=\phi$ and $0\not \in C$, also this implies that $\Sigma(C)$ has trivial stabiliser, note also that $|C|=n-t\ge n/2^{k}$.  An application of Theorem \ref{dvgms} yields,
\begin{equation*} |H|\ge |\Sigma(C)|\ge \frac{|C|^{2}}{64}\ge \frac{n^{2}}{2^{2k+6}}\ge 2^{3k+9}n \end{equation*} while an application of the induction hypothesis of Theorem \ref{main} yields, \begin{equation*} |H|\ge |\Sigma(C)|\ge \alpha_{k-1}|C|^{2}\ge \frac{3}{4}\frac{\alpha_{k}n^{2}}{2^{2k}}\end{equation*}  We say that a coset $Q$ of $H$ is \emph{sparse} if $|S\cap Q|\le 2^{k+1}n$ and $Q$ is \emph{very sparse} if $|S\cap Q|\le |C|/2$, while $Q$ is \emph{dense} if $|Q\setminus S|\le 2^{k+1}n$, we note that if $Q$ is dense then $|S\cap Q|$ must be fairly large, in particular, \begin{equation}\label{SQbig} |S\cap Q|\ge |H|-2^{k+1}n\ge \frac{3}{4}\alpha_{k} n^{2}/2^{2k} -2^{k+1}n\ge \alpha_{k} n^{2}/2^{2k+1}\end{equation} as $\alpha_{k}n/2^{2k+2}\ge 2^{k+1}$.

\begin{lemma}\label{la} If any of the following conditions (i),(ii) or (iii) hold then there is an element $c\in C$ with $\lambda(c)\ge (1-2^{1-k})|C|$. \\ (i) There is a coset $Q$ which is neither sparse nor dense.\\ (ii) There are at least $2^{2k+5}$ cosets that are sparse but not very sparse \\ (iii) No coset $Q$ is dense.\end{lemma}

\begin{proof} (i) Suppose $Q$ is neither sparse nor dense, then we have $\defi_{Q}(S)\ge 2^{k+1}n\ge 2^{k+1}|C|$, an application of Lemma \ref{thegoodincrease} to a shift of $S\cap Q$ then shows that there exists $c\in C$ with $\lambda_{S\cap Q}(c)\ge (1-2^{1-k})|C|$, and we are done, as $\lambda_{S}(c)\ge \lambda_{S\cap Q}(c)$.
\\ \indent (ii) Suppose that $Q_{1},...,Q_{2^{2k+5}}$ are sparse but not very sparse, for each $i=1,...,2^{2k+5}$ let $S_{i}=S\cap Q_{i}$ and let $\bar{S}=\bigcup_{i=1}^{2^{2k+5}}S_{i}$, then, \begin{equation*}\lambda(c)=\lambda_{S}(c)\ge \lambda_{\bar{S}}(c)=\sum_{i=1}^{2^{2k+5}}\lambda_{S_{i}}(c) \end{equation*}   We write $\lambda_{i}(c)$ for $\lambda_{S_{i}}(c)$ and $\bar{\lambda}(c)$ for $\lambda_{\bar{S}}(c)$, we shall show that,\begin{equation*} \bar{\lambda}(c)= \sum_{i=1}^{2^{2k+5}}\lambda_{i}(c)\ge |C|\qquad \text{for some}\,\, c\in C\end{equation*} We first note that $|\bar{S}|\ge 2^{2k+5}|C|/2\ge 2^{2k+4}|C|$.  We work as in the proofs of results in Section \ref{prel}.   Suppose for contradiction that $\bar{\lambda}(c)<|C|$ for all $c\in C$, then by the subadditivity of $\bar{\lambda}$ (which follows from the subadditivity of the $\lambda_{i}$), we have that $\bar{\lambda}(d)<2^{2k+3}|C|$ for all $d\in 2^{2k+3}(C\cup \{0\})$.  For each $i$ we let $\rho_{i}(d)=|(S_{i}+d)\cap S_{i}|$, so that, $\rho_{i}(d)=|S_{i}|-\lambda_{i}(d)$ and, $\sum_{d\in G} \lambda_{i}(d)=|S_{i}|^{2}$.  We let $\bar{\rho}(d)=\sum_{i}\rho_{i}(d)$, it follows that, $\bar{\rho}(d)=|\bar{S}|-\bar{\lambda}(d)$.  So that, \begin{equation*} \bar{\rho}(d)>|\bar{S}|- 2^{2k+3}|C|\ge |\bar{S}|/2\qquad\text{for all}\,\,\, d\in 2^{2k+3}(C\cup \{0\}) \end{equation*} the final inequality follows from the bound $|\bar{S}|\ge 2^{2k+4}|C|$ obtained earlier. \\ \indent We shall reach a contradiction by putting a lower bound on $|2^{2k+3}(C\cup\{0\})|$, and using this to deduce that $\sum_{d\in G}\rho_{i}(d)>|S_{i}|^{2}$ for some $i$, a contradiction.  We show that $|2^{2k+3}(C\cup\{0\})|\ge 2^{k+2}n$.  Let $K$ be the stabiliser of $2^{2k+3}(C\cup\{0\})$, if $C\subset K$ then $K=H$ and $|K|= |H|\ge 2^{k+2}n$.  Hence we may assume $C\cup \{0\}$ meets a non-trivial coset of $K$, let $R_{1},...,R_{p}$ be the non-trivial cosets of $K$ which have non-empty intersection with $C$, then the elements of $2^{2k+3}(C\cup \{0\})$ are exactly the elements of the cosets in $2^{2k+3}\{K,R_{1},...,R_{p}\}$.  The definition of $K$ implies that $2^{2k+3}\{K,R_{1},...,R_{p}\}$ has trivial stabiliser in $H/K$, so that an application of Kneser's theorem yields, \begin{equation*} |2^{2k+3}(C\cup \{0\})|=|K| |2^{2k+3}\{H,R_{1},...,R_{p}\}|\ge |K| \big(2^{2k+3}(p+1)-(2^{2k+3}-1)\big)\ge  2^{2k+3}p|K|\end{equation*} An application of the pigeon hole principle shows that, $|K|\ge |C|/(p+1)\ge |C|/2p$, it is now immediate that $|2^{2k+3}(C\cup\{0\})|\ge 2^{2k+2}|C|\ge 2^{k+2}n$.  We now obtain the required contradiction, as we have, \begin{equation*} \sum_{d\in 2^{2k+3}(C\cup\{0\})} \bar{\rho}(d)>2^{k+2}n\, \frac{|\bar{S}|}{2}  =2^{k+1}n|\bar{S}|\end{equation*} and so, using that $\bar{\rho}=\sum_{i} \rho_{i}$ and $|\bar{S}|=\sum_{i}|S_{i}|$, we must have for some $i$ that, \begin{equation*} \sum_{d\in 2^{2k+3}(C\cup\{0\})}\rho_{i}(d)>2^{k+1}n|S_{i}|\ge |S_{i}|^{2}\end{equation*}
\\ \indent (iii) Suppose no coset is dense, now if some coset is not sparse we are done by (i), so we may assume all cosets are sparse.  If there are $2^{2k+5}$ or more cosets which are sparse but not very sparse, then we are done by (ii).  Hence we may assume there are at most $2^{2k+5}$ cosets which are sparse but not very sparse, since $|S\cap Q|\le 2^{k+1}n$ for all sparse cosets we may assume at most $2^{3k+6}$ elements of $S$ are in cosets that are sparse but not very sparse.  By (\ref{Sbig}) we have $|S|\ge 2^{3k+7}n$ so at least $2^{3k+6}n\ge 2n$ elements of $S$ belong to very sparse cosets.  Applying Lemma \ref{ssmall} to each very sparse coset, and averaging appropriately, we deduce that there exists $c\in C$ with \begin{equation*}\lambda(c)\ge \frac{1}{2}\sum_{Q}\defi_{Q}(S)=\frac{1}{2}\sum_{Q}|S\cap Q|\ge n\end{equation*} where the summation is taken over very sparse cosets $Q$, and so we are done.\end{proof}

A very simple addition theorem in finite abelian groups is that if $A,B\subset G$ satisfy $|A|+|B|>|G|$ then $A+B=G$.  Let $\mathcal{D}$ denote the set of dense cosets, \begin{equation*} \mathcal{D}=\{Q\in G/H \,:\, Q \,\text{is dense}\} \, \subset G/H\end{equation*}  Let $\bar{\mathcal{D}}$ denote the set of all elements of dense cosets, \begin{equation*} \bar{\mathcal{D}}=\bigcup_{Q\in \mathcal{D}}Q \, \subset G \end{equation*}

\begin{claim} $S$ is not contained in $\bar{\mathcal{D}}$. \end{claim}

\begin{proof} We have from Theorem \ref{dvgms} that, $|\Sigma(C)|\ge |C|^{2}/64 \ge n^{2}/2^{2k+6}> 2^{k+1}n$.  Let $Q$ be a dense coset, then $|S\cap Q|\ge |H|-2^{k+1}n$, and so $|\Sigma(C)|+|S\cap Q|>|H|$ so by considering an appropriate shift of $S\cap Q$ we obtain (from the simple addition theorem stated above) that $Q\subset \Sigma(C)+(S\cap Q)\subset \Sigma (A)$.  Suppose the Claim is false, then every coset $Q$ meeting $S$ is dense, then it follows that $\Sigma(A)$ is a union of cosets of $H$ and so has non-trivial stabiliser, a contradiction.\end{proof}

If either of the conditions (i) or (iii) of Lemma \ref{la} hold then we are done, using this together with the above Claim, we note that we may proceed with the following assumptions,

 I\quad  \,\,\, Every coset is either sparse or dense\\ \indent
II \quad There is a dense coset\\ \indent
III \quad \!\!\!\! $S$ is not contained in $\bar{\mathcal{D}}$

From this information we shall deduce that $|S|\ge \alpha_{k}n^{2}$, completing the proof.  To prove this it suffices by (\ref{SQbig}) to show that there are at least $2^{2k+1}$ dense cosets, ie. show $|\mathcal{D}|\ge 2^{2k+1}$.  We begin by recalling a Claim from \cite{dvgms}.

\begin{claim}\cite{dvgms} If $Q$ is dense and $b\in B$ then one of the cosets $Q+b$ or $Q-b$ is dense.\end{claim}

\begin{proof} If $b\in H$ then this is trivial.  So suppose $b\not \in H$, let $S_{-}$ be the set of elements in $S\cap Q$ which may be represented as a sum of elements of $B\setminus \{b\}$, and let $S_{+}$ be the set of elements in $S\cap Q$ which may be represented as $b$ plus a sum of elements of $B\setminus \{b\}$.  We note that $S\cap (Q+b)\supset S_{-}+b$ so that $|S\cap (Q+b)|\ge |S_{-}|$ and $S\cap (Q-b)\supset S_{+}-b$ so that $|S\cap (Q-b)|\ge |S_{+}|$.  As $|S_{-}|+|S_{+}|\ge |H|-2^{k+1}n> 2^{k+1}n$ we deduce that one of these sets and hence one of the sets $S\cap (Q+b),S\cap (Q-b)$ has cardinality greater than $2^{k+1}n$ the claim is then proved as we may assume all cosets are either sparse or dense.\end{proof}

Fix $Q_{0}\in \mathcal{D}$ and let $K$ be a maximal subgroup of $G/H$ for the property that $Q_{0}+K\subset \mathcal{D}$.  Let us also define a subgroup $\bar{K}$ of $G$ by, \begin{equation*} \bar{K}=\bigcup_{Q\in K}Q\end{equation*}

\begin{lemma} If $|B\cap \bar{K}|\ge 9|B|/10$ then $|S|\ge \alpha_{k}n^{2}$\end{lemma}

\begin{proof} We know that $B$ is not contained in $\bar{K}$, for if it were then we would have $S\subset \bar{K}\subset \bar{\mathcal{D}}$, contradicting III.  Let $b\in B\setminus \bar{K}$, we have from the above Claim that for each $Q\in Q_{0}+K$ that either $Q+b$ or $Q-b$ is dense.  This implies that there must be at least $|K|/2$ dense cosets outside of $Q_{0}+K$, so that the total number of dense cosets is at least $3|K|/2$.  Let us now estimate the size of $\bar{K}$.  Since $C\subset \bar{K}$ and $|B\cap \bar{K}|\ge 9|B|/10$ we deduce that $|A\cap \bar{K}|\ge 9|A|/10$.   Since $A'=A\cap \bar{K}$ is a subset of $A$, we have that $\Sigma(A')$ has trivial stabiliser, so that by applying the induction hypothesis of Theorem \ref{main} to $A'$ we obtain that $|\Sigma(A')|\ge 81\alpha_{k-1}n^{2}/100$, and since $\Sigma (A')\subset \bar{K}$ it follows that $|\bar{K}|\ge 81\alpha_{k-1}n^{2}/100$.  Since $|\bar{K}|=|K||H|$, it follows that $|H|\ge 81\alpha_{k-1}n^{2}/100|K|$.  We may assume that $|K|\le 2^{2k+1}$ since we are done if there are at least $2^{2k+1}$ dense cosets.  Let $Q$ be a dense coset then, \begin{equation*} |S\cap Q|\ge |H|-2^{k+1}n\ge \frac{81\alpha_{k-1}n^{2}}{100|K|}-2^{k+1}n\ge \frac{4\alpha_{k-1}n^{2}}{5|K|}\end{equation*} where the final inequality follows from $\alpha_{k-1}n/100|K|\ge n/2^{2k+15}\ge 2^{k}$.  Since there are at least $3|K|/2$ dense cosets $Q$ we have that, \begin{equation*} |S|\ge \frac{3|K|}{2}\frac{4\alpha_{k-1}n^{2}}{5|K|}=\frac{6\alpha_{k-1}n^{2}}{5}\ge \alpha_{k} n^{2}\vspace{-0.6cm} \end{equation*}\end{proof}

Hence we may assume that, \begin{equation}\label{out} |B\setminus \bar{K}|\ge \frac{|B|}{10}\ge \frac{n}{2^{k+4}}\ge 2^{4k+3}\end{equation}  Suppose that $B\setminus \bar{K}$ meets at least $2^{2k+2}$ distinct cosets of $H$, then it is possible to find cosets $Q_{1},...,Q_{2^{2k+1}}$ not in $\bar{K}$ which meet $B$ and have the property that $Q_{i}\neq -Q_{j}$ for each $i,j$.  From the Claim we have that for each $i=1,...,2^{2k+1}$ that one of the cosets $Q_{0}+Q_{i}$ or $Q_{0}-Q_{i}$ is dense.  Since we find a different dense coset for each $i=1,...,2^{2k+1}$ we find at least $2^{2k+1}$ dense cosets and we are done.

Hence we may assume that $B$ meets at most $2^{2k+2}$ cosets $Q$ of $H$ with $Q$ not in $\bar{K}$.  It follows from this, and (\ref{out}), that for one such coset $Q$ we have $|B\cap Q|\ge 2^{2k+1}$.  We write $\order(Q)$ for the order of $Q$ in $G/H$, the following lemma will allow us to deduce that $\order(Q)\ge 2^{2k+1}$.

\begin{lemma} Let $Q$ be a coset with $|B\cap Q|\ge \order(Q)$ and $\order(Q)\le 2^{2k+1}$, and let $R$ be a dense coset, then $R+Q$ is dense\end{lemma}

\begin{proof} Let $p=\order (Q)\le 2^{2k+1}$ and let $b_{1},...,b_{p-1}$ be $p-1$ elements of $B\cap Q$.  Since $R$ is dense we have $|S\cap R|\ge |H|-2^{k+1}n$.  We partition $S\cap R$ into, \begin{equation*}S^{+} = \big((b_{1}+...+b_{p-1})+\Sigma (B\setminus \{b_{1},...,b_{p-1}\}) \big)\cap R\end{equation*} the elements which can be expressed as a sum of elements of $B$ in such a way that all the elements $b_{1},...,b_{p-1}$ are included, and $S^{-}$ the elements of $S\cap R$ which can be expressed as a sum of elements of $B$, in which not all of the elements $b_{1},...,b_{p-1}$ are used.  We note that $-(b_{1}+...+b_{p-1})\in Q$ so we have that, $S\cap (R+Q)\supset S^{+}-(b_{1}+...+b_{p-1})$ and so $|S\cap (R+Q)|\ge |S^{+}|$.  We will also be able to relate $|S\cap (R+Q)|$ to $|S^{-}|$.  Consider the bipartite graph with vertex sets $S^{-}$ and $S\cap (R+Q)$ in which a vertex $x\in S^{-}$ is joined to $y\in S\cap (R+Q)$ if $y-x=b_{i}$ for some $i=1,...,p-1$; the vertices of $S^{-}$ all have positive degree, while the degree of vertices in $S\cap (R+Q)$ is certainly at most $p-1$, it follows that $|S\cap (R+Q)|\ge |S^{-}|/(p-1)$.  We now have $2|S\cap (R+Q)|\ge |S^{+}|+|S^{-}|/p\ge (|S^{+}|+|S^{-}|)/p\ge |S\cap R|/p$, recall that $R$ is dense so that by (\ref{SQbig}) we have, $|S\cap R|\ge \alpha_{k}n^{2}/2^{2k+1}\ge n^{2}/2^{2k+7}$, using this together with the fact $p\le 2^{2k+1}$ we obtain, \begin{equation*} |S\cap (R+Q)|\ge \frac{|S\cap R|}{2p}\ge \frac{n^{2}}{2^{4k+9}}>2^{k+1}n \end{equation*} the final inequality follows from the bound $n\ge n_{k}\ge 2^{5k+10}$.  This shows us that $R+Q$ is not sparse, since we are assuming that all cosets are either sparse or dense it follows that $R+Q$ is dense.\end{proof}

So if it were the case that $\order(Q)\le 2^{2k+1}$ then the above lemma would show that $Q$ is in the stabiliser of $\mathcal{D}$, but now the subgroup $\langle K\cup \{Q\}\rangle$ contradicts the maximality of $K$.  Hence we may assume $\order(Q)\ge 2^{2k+1}$, our proof of the theorem is completed with this final lemma.

\begin{lemma} Suppose there is a coset $Q$ with $|B\cap Q|\ge 2^{2k+1}$ and $\order(Q)\ge 2^{2k+1}$, then there are at least $2^{2k+1}$ dense cosets.\end{lemma}

\begin{proof} We know there is at least one dense coset $R$.  Consider the cosets $R-iQ$ for positive integers $i$, if they are all dense then we have found $\order (Q)\ge 2^{2k+1}$ dense cosets and we are done, hence we may assume there is some non-negative integer $i$ such that $R-iQ$ is dense, but $R-(i+1)Q$ is not.  Set $Q_{0}=R-(i+1)Q$ and $Q_{1}=R-iQ$, and for $j=2,...,2^{2k+1}$ let $Q_{j}=Q_{1}+(j-1)Q$.  We show for each $j=2,...,2^{2k+1}$ that $Q_{j}$ is dense.  Let $b_{1},...,b_{2^{2k+1}}$ be $2^{2k+1}$ elements of $B\cap Q$.  We partition of $S\cap Q_{1}$ into $S^{-}=\Sigma(B\setminus \{b_{1},...,b_{2^{2k+1}}\})$, the set of elements which may be expressed as a sum of elements of $B$ without using any of the elements $b_{1},...,b_{2^{2k+1}}$, and $S^{+}$ the elements of $S\cap Q_{1}$ which can be expressed as a sum of elements of $B$, in such a way that at least one of the elements $b_{1},...,b_{2^{2k+1}}$ is used.  We can relate the size of $S^{+}$ to the size of $S\cap Q_{0}$ and this will allow us to bound the size of $S^{+}$.  Consider the bipartite graph with vertex sets $S^{+}$ and $S\cap Q_{0}$ in which a vertex $x\in S^{+}$ is joined to $y\in S\cap Q_{0}$ if $x-y=b_{i}$ for some $i=1,...,2^{2k+1}$; the vertices of $S^{+}$ all have positive degree, while the degree of vertices in $S\cap Q_{0}$ is certainly at most $2^{2k+1}$, it follows that $|S^{+}|\le 2^{2k+1}|S\cap Q_{0}|$.  However we have that $Q_{0}$ is not dense, since we are assuming all cosets are either sparse or dense we may assume $Q_{0}$ is sparse, so that $|S\cap Q_{0}|\le 2^{k+1}n$, it follows that $|S^{+}|\le 2^{3k+2}n$.  As $Q_{1}$ is dense we have a lower bound on $|S\cap Q_{1}|$ from (\ref{SQbig}), noting that $S\cap Q_{1}=S^{+}\cup S^{-}$ we obtain,\begin{equation*} |S^{-}|\ge |S\cap Q_{1}|-|S^{+}|\ge \frac{\alpha_{k} n^{2}}{2^{2k+1}}-2^{3k+2}n\ge \frac{n^{2}}{2^{2k+7}}-2^{3k+2}n >2^{k+1}n  \end{equation*} the final inequality following from the fact $n\ge n_{k}> 2^{5k+10}$.  Now for each $i=2,...,2^{2k+1}$ we have $S\cap Q_{i}\supset S^{-}+b_{1}+...+b_{i-1}$ and so for each $i=2,...,2^{2k+1}$ we have $|S\cap Q_{i}|>2^{k+1}n$.  This implies that these cosets are not sparse, so they are dense.\end{proof}

\section{Proof of Theorem \ref{asymptoticolson}}\label{poao}

In this section we prove Theorem \ref{asymptoticolson}.  The first half of the section is devoted to proving Lemma \ref{thegoodincreaseolson}, which is the appropriate variant of Lemma \ref{thegoodincrease} for the new setting of $A\subset \mathbb{Z}_{n}^{*}\subset \mathbb{Z}_{n}$.  We then turn in the second half of the section to applying this, and previous lemmas, to prove the required result.  As in Section \ref{prel}, it is important to find lower bounds on the cardinalities of the sets $rC^{*}$, where $C^{*}=C\cup (-C)\cup \{0\}$.

\begin{lemma}\label{rcolson} Let $C\subset H$ be such that $H=\langle \{c\}\rangle$ for each $c\in C$ and $C\cap (-C)=\phi$, then for all positive integers $r$ we have that either $rC^{*}=H$ or, \begin{equation*} |rC^{*}|\ge 2r|C| \end{equation*}\end{lemma}

\begin{proof} Let $K$ be the stabiliser of $rC^{*}$.  If there is an element $c$ in $C\cap K$ then $K=H$ and $rC^{*}=H$ and we are done.  So we may assume $C^{*}\cap K=\{0\}$.  Let $Q_{1},...,Q_{p}$ be the non-trivial cosets of $K$ meeting $C^{*}$, it follow that $rC^{*}$ is the set of all elements of the cosets in $r\{K,Q_{1},...,Q_{p}\}$.  By the definition of $K$ the set $r\{K,Q_{1},...,Q_{p}\}$ has trivial stabiliser in $H/K$ so that an application of Kneser's theorem yields, \begin{equation*} |r\{K,Q_{1},...,Q_{p}\}|\ge r(p+1)-(r-1)\ge rp\end{equation*} and so $|rC^{*}|\ge rp|K|$.  So to complete the proof we must show that,\begin{equation*} |K|\ge \frac{2|C|}{p} \end{equation*}
However we have that the set $C'=C\cup (-C)$ has size $2|C|$ and is contained in $\bigcup_{i=1}^{p} Q_{i}$, so that we may deduce from the pigeon hole principle that for some coset $Q$ we have, \begin{equation*} |C'\cap Q|\ge \frac{|C'|}{p}= \frac{2|C|}{p}\end{equation*} and so noting $|K|=|Q|\ge |C'\cap Q|$ we are done.\end{proof}

We now deduce the key result we need for finding elements $c\in C$ with large $\lambda(c)$.

\begin{lemma}\label{thegoodincreaseolson} Let $C\subset H$ be such that $H=\langle \{c\} \rangle$ for each $c\in C$ and $C\cap (-C)=\phi$.  Let $\gamma > 2$ and let $S\subset H$ be such that $\defi_{H}(S)\ge \gamma |C|$ then there exists $c\in C$ with $\lambda (c)\ge (1-4\gamma^{-1})|C|$\end{lemma}

\begin{proof} For all $d\in H$ we have $\lambda_{S}(d)=\lambda_{H\setminus S}(d)$, so that exchanging $S$ with $H\setminus S$ if required, we may assume $\defi_{H}(S)=|S|\le |H|/2$.  As in the proofs of Section \ref{prel} we shall proceed by assuming the result fails and from this deduce that $\sum_{d} \rho(d)> |S|^{2}$, a contradiction.  It will be useful to use the fact that $\sum_{d}\rho(d)=\int_{0}^{|S|}|D_{t}| \, dt $ where $D_{t}=\{d\in H:\rho(d)\ge t\}$.\\ \indent Suppose that every element $c\in C$ has $\lambda(c)<(1-4\gamma^{-1})|C|$, this implies $\lambda(c)<(1-4\gamma^{-1})|C|$ for all $c\in C^{*}$, since $\lambda(0)=0$ and $\lambda(-c)=\lambda(c)$.  So that by the subadditivity of $\lambda$ we have for all $r$ and for all $d\in rC^{*}$ that $\lambda (d)<r(1-4\gamma^{-1})|C|$, and so $\rho(d)>|S|-r(1-4\gamma^{-1})|C|$.

For each $r=1,...,\lfloor |S|/|C|\rfloor$, we define, \begin{equation*} I_{r}=(|S|-(r+1)(1-4\gamma^{-1})|C|,|S|-r(1-4\gamma^{-1})|C|]\end{equation*} For $t\in I_{r}$ we have $t\le |S|-r(1-4\gamma^{-1})|C|$ and so $D_{t}\supset rC^{*}$, applying Lemma \ref{rcolson} we deduce, $|D_{t}|\ge 2r|C|$.
\\ \indent Note also that for $t\le |S|-(\lfloor |S|/|C| \rfloor+1) (1-4\gamma^{-1})|C|$ we have $D_{t}\supset \lfloor |S|/|C|\rfloor C^{*}$ and so $|D_{t}|\ge 2 \lfloor |S|/|C|\rfloor |C|$, so using the fact that $\lfloor |S|/|C|\rfloor\ge (|S|-|C|)/|C|\ge(1-\gamma^{-1})|S|/|C|$ we have, \begin{equation*} |D_{t}|\ge 2\Big\lfloor \frac{|S|}{|C|}\Big\rfloor |C|\ge 2(1- \gamma^{-1}) |S| \end{equation*} for all $t\le |S|-(\lfloor |S|/|C| \rfloor +1) (1-4\gamma^{-1})|C|$.    Note that $\lfloor |S|/|C|\rfloor +1\le |S|/|C|+1\le (1+\gamma^{-1})|S|/|C|$ so that the above bound on $|D_{t}|$ hold for all $t$ satisfying $t\le |S|-(1-4\gamma^{-1})(1+\gamma^{-1})|S|$ and so certainly for all $t\le 3\gamma^{-1}|S|$.  We obtain, \begin{equation*}  \sum_{d\in H}\rho(d)= \int_{0}^{|S|}|D_{t}|\, dt\ge \sum_{r=1}^{\lfloor |S|/|C|\rfloor}\int_{t\in I_{r}}|D_{t}|\, dt+\int_{0}^{3\gamma^{-1}|S|}|D_{t}|\, dt \end{equation*}
and so, \begin{equation*} \sum_{d\in H}\rho(d) \ge \sum_{r=1}^{\lfloor |S|/|C|\rfloor} 2(1-4\gamma^{-1})r|C|^{2}+6\gamma^{-1}(1-\gamma^{-1})|S|^{2}\end{equation*}
Since $\lfloor |S|/|C|\rfloor \ge (1-\gamma^{-1})|S|/|C|$ we have that $\sum_{r=1}^{\lfloor |S|/|C|\rfloor }r= (\lfloor|S|/|C|\rfloor)(\lfloor|S|/|C|\rfloor+1)/2 \ge (1-\gamma^{-1})|S|^{2}/2|C|^{2}$, and so, \begin{equation*}  \sum_{d\in H}\rho(d)\ge (1-\gamma^{-1})  (1-4\gamma^{-1}) |S|^{2} + 6\gamma^{-1}(1-\gamma^{-1})|S|^{2}\end{equation*}  However this quantity is larger than $|S|^{2}$, a contradiction. \end{proof}

\subsection*{Proof of Theorem \ref{asymptoticolson}}

Since the required result is asymptotic it suffices to prove it for $n\ge n_{0}$, for some $n_{0}$.  Let $n_{0}$ be chosen such that $\sqrt{n}\ge 160n^{1/4}$ and $\log_{3/2}(n)\le n^{1/4}$ for all $n\ge n_{0}$.  For $n\ge n_{0}$ we define $f_{4}(n)=1+15n^{-1/4}$ and $f_{3}(n)=2(f_{4}(n)+n^{-1/2})=2+30n^{-1/4}+2n^{-1/2}$.  It is clear that $f_{3}(n)$ is of the form $2+o(1)$.  To prove Theorem \ref{asymptoticolson} we show that a set $A\subset \mathbb{Z}_{n}^{*}\subset \mathbb{Z}_{n}$ with $|A|\ge f_{3}(n)\sqrt{n}$ must have $\Sigma(A)=\mathbb{Z}_{n}$.  Let us note that if $|A|\ge f_{3}(n)\sqrt{n}=2f_{4}(n)\sqrt{n}+2$ then it is possible to partition $A$ into subsets $A_{1}$ and $A_{2}$, each with cardinality at least $f_{4}(n)\sqrt{n}$ and satisfying $A_{i}\cap (-A_{i})=\phi$ for $i=1,2$.  Our proof will work by showing that, \begin{equation*} |\Sigma(A_{i})|>n/2 \qquad \text{for}\,\, i=1,2\end{equation*} We are then done as $\Sigma(A)\supset \Sigma(A_{1})+\Sigma(A_{2})$ and $S+T\supset \mathbb{Z}_{n}$ whenever $S,T\subset \mathbb{Z}_{n}$ are such that $|S|+|T|>n$.

During the proof we will rely essentially on the results we have proved which give us an element $c\in C$ with large value of $\lambda(c)$ we recall now the three bounds which we shall need for the sequel.  We write $\lambda(S,C)$ for the maximum value of $\lambda_{S}(c)$ over elements $c\in C$.
\begin{eqnarray*} \lambda(S,C)\ge \frac{|S|}{2} \qquad\text{for}\, \defi_{\mathbb{Z}_{n}}(S)\le |C|/2 \\ \\ \lambda(S,C)\ge \frac{|C|}{8} \qquad\text{for}\, \defi_{\mathbb{Z}_{n}}(S)\ge |C|/2 \\  \lambda(S,C)\ge (1-4n^{-1/4})|C| \qquad\text{for}\, \defi_{\mathbb{Z}_{n}}(S)\ge n^{1/4}|C| \end{eqnarray*}  These bounds are taken from Lemmas \ref{ssmall}, \ref{slarge} and \ref{thegoodincreaseolson} respectively.  It is valid to apply these lemmas for sets $C\subset A_{i}$, $i=1,2$, because this certainly implies $C\cap (-C)=\phi$ and that $C\subset\mathbb{Z}_{n}^{*}$ and so $\mathbb{Z}_{n}$ is generated by each element $c\in C$.

Fix $i\in\{1,2\}$, we show that $|\Sigma(A_{i})|>n/2$.  We show this by building up a set $B\subset A_{i}$ with $\Sigma(B)$ large.  We define, \begin{equation*} g(t)=\max_{B\subset A_{i}, \, |B|=t} |\Sigma(B)|\end{equation*} Given $B\subset A_{i}$ of cardinality $t$, and such that $|\Sigma(B)|=g(t)$, we let $S=\Sigma(B)$, and $C=A_{i}\setminus B$, let $\lambda(S,C)=\max_{c\in C}\lambda_{S}(c)$.  By considering $B\cup\{c\}$ a set of cardinality $t+1$ we deduce that, \begin{equation*}g(t+1)\ge g(t)+\lambda(S,C)\end{equation*}  Note that we may assume at all times that $|S|\le n/2$ so that $\defi_{\mathbb{Z}_{n}}(S)=|S|$, for we are immediately done if $|S|>n/2$, so we use the three inequalities above concerning $\lambda(S,C)$, with $|S|$ in the place of $\defi_{\mathbb{Z}_{n}}(S)$.

\begin{lemma}\label{asolson} Let $n\ge n_{0}$.  Let $A\subset \mathbb{Z}_{n}^{*}\subset \mathbb{Z}_{n}$ with $A\cap (-A)=\phi$ and $|A|\ge \sqrt{n}+15n^{1/4}$, then $|\Sigma(A)|>n/2$.\end{lemma}

\begin{proof} It suffices to prove this when the size of $A$ is the integer above $\sqrt{n}+15n^{1/4}$, so we may assume $|A|\le 9\sqrt{n}/8$.  We put lower bounds on $g(t)$ using the bounds on $\lambda(S,C)$ given above.  We work in three main stages, corresponding to the three different lower bounds we have on $\lambda(S,C)$.
\\ \indent \textbf{Stage 1:} Let $t_{1}$ be the least $t$ such that $g(t)\ge (|A|-t)/2$.  We note that $g(1)=2$.  Let $2\le t <t_{1}$, let $B$ be a set of size $t$ with $S=\Sigma(B)$ satisfying $|S|=g(t)$ and let $C=A\setminus B$, we have $|S|\le (|A|-t)/2=|C|/2$.  From our bounds on $\lambda$ we have, $\lambda(S,C)\ge |S|/2$ and so, $g(t+1)\ge 3g(t)/2$ so that $g(t)\ge 2(3/2)^{t-1}\ge (3/2)^{t}$.  It follows that, $t_{1}\le \log_{3/2} (|A|)\le \log_{3/2}(n)\le n^{1/4}$.
\\ \indent \textbf{Stage 2:} Let $t_{2}$ be the least $t$ such that $g(t)\ge 9n^{3/4}/8$.  Let $t_{1}\le t\le \min\{t_{1}+9n^{1/4},t_{2}\}$, let $B$ be a set of size $t$ with $S=\Sigma(B)$ satisfying $|S|=g(t)$, and let $C=A\setminus B$, we have that $|S|\ge |C|/2$ and $|C|=|A|-t \ge \sqrt{n}$, so that $\lambda(S,C)\ge |C|/8\ge \sqrt{n}/8$ and so, $g(t+1)\ge g(t)+\sqrt{n}/8$.  So that $g(t)\ge g(t_{1})+(t-t_{1})\sqrt{n}/8$ and so certainly $t_{2}\le t_{1}+9n^{1/4}\le 10n^{1/4}$
\\ \indent \textbf{Stage 3:} Let $t_{3}$ be the least $t$ such that $g(t)>n/2$.  Let $t_{2}\le t<t_{3}$ and let $B$ be a set of size $t$ with $S=\Sigma(B)$ satisfying $|S|=g(t)$, and let $C=A\setminus B$.  We have that $|S|=g(t)\ge g(t_{2})\ge 9n^{3/4}/8\ge n^{1/4}|C|$ (certainly we have that $|C|\le |A|\le 9\sqrt{n}/8$), so that we have, \begin{equation*} \lambda(S,C)\ge (1-4n^{-1/4})|C|=(1-4n^{1/4})(|A|-t)\end{equation*} which gives us that, $g(t+1)\ge g(t)+(1-4n^{-1/4})(|A|-t)$ for $t_{2}\le t <t_{3}$, we now use these to calculate $g(t)$ in this range, \begin{equation*} g(t)\ge g(t_{2})+(1-4n^{-1/4})\sum_{t'=t_{2}}^{t}(|A|-t')=g(t_{2})+(1-4n^{-1/4})\sum_{t'=|A|-t}^{|A|-t_{2}}t'\end{equation*} using the bound $\sum_{t'=r}^{s}t'\ge (s^{2}-r^{2})/2=(s+r)(s-r)/2\ge s(s-r)/2$ and the bound $|A|-t_{2}\ge \sqrt{n}+5n^{1/4}$ we obtain, \begin{equation*} g(t)\ge (1-4n^{-1/4})\frac{(|A|-t_{2})(t-t_{2})}{2}\ge (1-4n^{-1/4})\frac{(\sqrt{n}+5n^{1/4})(t-t_{2})}{2}> \frac{\sqrt{n}}{2} (t-t_{2})\end{equation*} it is immediate then that $t_{3}-t_{2}\le \sqrt{n}$, whence $t_{3}\le \sqrt{n}+10n^{1/4}$.  Of course we now have, $|\Sigma(A)|\ge g(t_{3})>n/2$.\end{proof}

A more delicate version of the above proof, in which there are $\log{n}$ stages (an initial stage as Stage 1 above, followed by $\log{n}$ stages in which $g(t)$ doubles) allows one to deduce Lemma \ref{asolson} with the condition on $|A|$ weakened to $|A|\ge \sqrt{n}+10\log_{2}{n}$.  This then implies that any subset $A\subset \mathbb{Z}_{n}^{*}\subset \mathbb{Z}_{n}$ with $|A|\ge 2\sqrt{n}+20\log_{2}{n}+2$ must have $\Sigma(A)=\mathbb{Z}_{n}$.

Number Theory (math.NT); Combinatorics (math.CO)


Approximating reals by sums of rationals

Abstract: We study how well a real number can be approximated by sums of two or more rational numbers with denominators up to a certain size.

\section{Introduction and main result}

Dirichlet's theorem on diophantine approximation tells us that we can approximate any real number by rational numbers quite well, namely:

\begin{thm}\label{theorem1}
  For any real $\theta$ and any positive integer $N$, there exist integers $a$ and $q$, with $1 \leq q \leq N$, such that
  \[
    \left| \theta - \frac{a}{q} \right| < \frac {1}{qN}.
  \]
\end{thm}

Moreover, the bound $1/(qN)$ is best possible, apart from the constant factor. To see this, it suffices to consider the golden ratio $\theta = (\sqrt{5} - 1)/2$ (see \cite[\S 11.8]{HW}). During his work in \cite{C}, the first author accidentally stumbled across the following analogous question:

\begin{question}\label{q1}
  For any real $\theta$ and any positive integer $N$, give an upper bound for
  \[
    \min_{ \substack{ a_1, a_2, q_1, q_2 \in \mathbb{Z}\\ 1 \leq q_1, q_2 \leq N}} \left| \frac{a_1}{q_1} + \frac{a_2}{q_2} - \theta \right|.
  \]
\end{question}

With the golden ratio in mind, we know that the upper bound can be no better than $O\big( 1/(q_1 q_2 N^2) \big)$. So, what is the best possible upper bound? More generally,

\begin{question}\label{q2}
  Let $k$ be a positive integer. For any real $\theta$ and any positive integer $N$, give an upper bound for
  \[
    \min_{ \substack{ a_1, \dots, a_k, q_1, \dots, q_k \in \mathbb{Z}\\ 1 \leq q_1, \dots, q_k \leq N}} \left| \frac{a_1}{q_1} + \dots + \frac{a_k}{q_k} - \theta \right|.
  \]
\end{question}

To these, we have the following result:

\begin{thm}\label{theorem2}
  Let $k$ be a positive integer. For any real $\theta$ and any positive integer $N$, there exist integers $a_1, \dots, a_k$, $q_1, \dots, q_k$, with $1 \le q_1, \dots q_k \le N$, such that
  \[
    \left| \frac {a_1}{q_1} + \dots + \frac {a_k}{q_k} - \theta \right| \ll N^{-k}.
  \]
\end{thm}

  The bound $N^{-k}$ is best possible in the sense that, for some $\theta$, the minimum in Question \ref{q2} can be as large as $N^{-k}$. For example, if one considers $\theta = 1/(2N^k)$,
  \[
    \left| \frac{a_1}{q_1} + \cdots + \frac{a_k}{q_k} - \theta \right| \ge \frac 1{2N^k}
  \]
  for any choice of $a_1, \dots, a_k, q_1, \dots, q_k$, with $1 \le q_1, \dots, q_k \le N$. However, one expects such pathological examples to be relatively rare, and so one may wonder if it is possible to obtain a sharper upper bound involving the $q_i$'s. For example, is it possible to replace $N^{-k}$ by $(q_1 \cdots q_k)^{-1}N^{-k}$ in Theorem \ref{theorem2}? We shall briefly address this issue in the last section.

\section{Proof of Theorem \ref{theorem2}}
\begin{lem}
\label{lemma1}
Suppose that $k \ge 1$ is an integer. There is a number $x_0(k) \ge 1$ such that
\[ \sideset{}{^*} \sum_{1 \le q_1, \dots, q_k \le x} q_1 \cdots q_k \gg x^{2k}, \] whenever $x \ge x_0(k)$. Here, $\sum^*$ denotes a summation over the $k$-tuples $q_1, \dots, q_k$ such that $(q_i, q_j) = 1$ whenever $1 \le i < j \le k$.
\end{lem}

\begin{proof}
  It suffices to show that
  \begin{equation}\label{1}
    \sum_{ \substack{ n \le x\\ (n, m) = 1}} \phi(n)^{\alpha}n^{1 - \alpha} \gg x^2\phi(m)m^{-1},
  \end{equation}
  whenever $0 \le \alpha \le k - 1$, $1 \le m \le x^{k - 1}$, and $x \ge x_0(k)$. The conclusion of the lemma will then follow by successive applications of \eqref{1} with $\alpha = 0, 1, \dots, k - 1$ to the summations over $q_k, q_{k - 1}, \dots, q_1$.

  We now proceed to establish \eqref{1}. We start by showing that
  \begin{equation}\label{2}
    \sum_{ \substack{ n \le x\\ (n, m) = 1}} \left( \frac n{\phi(n)} \right)^{\alpha} \ll x \phi(m)m^{-1}.
  \end{equation}
  Define the multiplicative functions
  \[
    f(n) = \begin{cases}
      \big( n/\phi(n) \big)^{\alpha} & \text{if } (n, m) = 1, \\
      0 & \text{if } (n, m) > 1,
    \end{cases} \qquad g(n) = \sum_{d \mid n} f(d)\mu(n/d).
  \]
  Then $g(n) \ge 0$, and
  \begin{align*}
    \sum_{n \le x} f(n) &= \sum_{n \le x} \sum_{d \mid n} g(d) = \sum_{d \le x} g(d) \left\lfloor \frac xd \right\rfloor \le x \sum_{d \le x} g(d)d^{-1}\\
    &\le x \prod_{p \le x} \sum_{\nu = 0}^{\infty} g(p^{\nu})p^{-\nu} = x \prod_{p \le x} \left( 1 - p^{-1} \right) \sum_{\nu = 0}^{\infty} f(p^{\nu})p^{-\nu} \\
    &\le x \prod_{ \substack{ p \mid m\\ p \le x}} \left( 1 - p^{-1} \right) \prod_p \left( 1 + \frac {p^{\alpha} - (p - 1)^{\alpha}}{p(p - 1)^{\alpha}} \right) \\
    &\le x \prod_{p \mid m} \left( 1 - p^{-1} \right) \prod_p \left( 1 + \frac {p^{\alpha} - (p - 1)^{\alpha}}{p(p - 1)^{\alpha}} \right) + O(1).
  \end{align*}
  The last inequality follows on noting that $m$ has at most $k - 2$ prime divisors $p > x$, and hence,
  \[
    \prod_{ \substack{ p \mid m\\ p > x}} \left( 1 - p^{-1} \right) = 1 + O \big( x^{-1} \big).
  \]
  This proves \eqref{2}. On the other hand, when $\alpha = 0$, we have
  \[
    \sum_{ \substack{ n \le x\\ (n, m) = 1}} n = \sum_{d \mid m} \mu(d) d \sum_{k \le x/d} k = \frac {\phi(m)}{2m} x^2 + O(x\tau(m)),
  \]
  whence
  \begin{equation}\label{3}
    \sum_{ \substack{ n \le x\\ (n, m) = 1}} n^{1/2} \ge x^{-1/2} \sum_{ \substack{ n \le x\\ (n, m) = 1}} n \gg x^{3/2}\phi(m)m^{-1}.
  \end{equation}
  Finally, \eqref{1} follows from \eqref{2}, \eqref{3}, and Cauchy's inequality:
  \[
    \sum_{ \substack{ n \le x\\ (n, m) = 1}} \phi(n)^{\alpha}n^{1 - \alpha} \ge \bigg\{ \sum_{ \substack{ n \le x\\ (n, m) = 1}} n^{1/2} \bigg\}^2 \bigg\{ \sum_{ \substack{ n \le x\\ (n, m) = 1}} \left( \frac n{\phi(n)} \right)^{\alpha} \bigg\}^{-1} \gg x^2\phi(m)m^{-1}.
  \]
\end{proof}

\begin{proof}[Proof of Theorem \ref{theorem2}]
  For $0 < \Delta < 1/2$, define
  \[
    t(x) = \max \big( 1 - |x|/\Delta, 0 \big), \qquad g(x) = \sum_{n = -\infty}^{\infty} t(x - n).
  \]
  The function $g$ has a Fourier expansion
  \[
    g(x) = \sum_{h = -\infty}^{\infty} \hat g_h e(h x), \qquad \hat g_h = \Delta \left( \frac{\sin \pi \Delta h}{\pi \Delta h} \right)^2.
  \]
  We consider the sum
  \begin{equation}\label{4}
    \mathcal S = \sideset{}{^*} \sum_{1 \le q_1, \dots, q_k \le N} \sum_{a_1 = 1}^{q_1} \dots \sum_{a_k = 1}^{q_k} g \left( \frac{a_1}{q_1} + \dots + \frac{a_k}{q_k} - \theta \right),
  \end{equation}
  where $\sum^*$ has the same meaning as in the Lemma. Putting in the Fourier expansion for $g$, we get
  \begin{align}\label{5}
    \mathcal S =& \sideset{}{^*} \sum_{1 \le q_1, \dots, q_k \le N} \sum_{a_1 = 1}^{q_1} \dots \sum_{a_k = 1}^{q_k} \sum_{h = -\infty}^{\infty} \hat g_h e \left( h \left ( \frac{a_1}{q_1} + \dots + \frac {a_k}{q_k} - \theta \right) \right) \\
    =& \sideset{}{^*} \sum_{1 \le q_1, \dots, q_k \le N} \sum_{h = -\infty}^{\infty} \hat g_h e(-h \theta) \sum_{a_1 = 1}^{q_1} e \big( ha_1/ q_1 \big) \dots \sum_{a_k = 1}^{q_k} e \big( ha_k/ q_k \big) \notag\\
    =& \sideset{}{^*} \sum_{1 \le q_1, \dots, q_k \le N} q_1 \cdots q_k \sum_{ \substack{ h = -\infty\\ q_1 \cdots q_k \mid h}}^{\infty} \hat g_h e(-h \theta) \notag,
  \end{align}
  as
  \[
    \sum_{a = 1}^{q} e(ha/q) = \begin{cases}
      q & \text{if } q \mid h, \\
      0 & \text{otherwise}.
    \end{cases}
  \]
  If $m$ is a positive integer and $\Delta \le m^{-1}$, we have
  \begin{equation}\label{6}
  \begin{split}
    \sum_{h \ne 0} \big| \hat g_{mh} \big| &\le 2 \bigg\{ \sum_{h = 1}^H \Delta + \frac 1{\Delta m^2} \sum_{h = H + 1}^{\infty} h^{-2} \bigg\} \\
    &\le 2 \bigg( H\Delta + \frac 1{H\Delta m^2} \bigg) \le 6m^{-1},
  \end{split}
  \end{equation}
  where $H = \big\lceil (\Delta m)^{-1} \big\rceil$; whereas if $\Delta > m^{-1}$, we have
  \begin{equation}\label{7}
    \sum_{h \ne 0} \big| \hat g_{mh} \big| \le \frac {2\zeta(2)}{\Delta m^2} \le 4m^{-1}.
  \end{equation}
  Putting \eqref{6} and \eqref{7} (with $m = q_1 \cdots q_k$) into \eqref{5}, we obtain
  \[
    \mathcal S = \Delta \sideset{}{^*} \sum_{1 \le q_1, \dots, q_k \le N} q_1 \cdots q_k + O \big( N^k \big),
  \]
  the $O$-implied constant being absolute (in fact, it is $6$). Therefore, upon choosing $\Delta = cN^{-k}$ with a sufficiently large $c > 0$, it follows from the Lemma that $\mathcal S > 0$. Hence, by \eqref{4},
  \[
    g\left( \frac {a_1}{q_1} + \dots + \frac {a_k}{q_k} - \theta \right) > 0
  \]
  for some integers $a_1, \dots, a_k, q_1, \dots, q_k$ with $1 \le q_1, \dots, q_k \le N$. Then, by the definition of $g$,
  \[
    \left| \frac {a_1}{q_1} + \dots + \frac {a_k}{q_k} - n - \theta \right| \le cN^{-k}
  \]
  for some integer $n$. This establishes the theorem.
\end{proof}

\section{Closing remarks}
We conclude this note with a short discussion of possible improvement on the bound $N^{-k}$ in Theorem \ref{theorem2}. For example, is it possible to replace $N^{-k}$ by $(q_1 \cdots q_k)^{-1} N^{-k}$? While such a result may appear to be the right generalization of Dirichlet's theorem, it is not true in general. Indeed, suppose that for any real $\theta$, there exist integers $a_1, \dots, a_k, q_1, \dots, q_k$, with $1 \le q_1, \dots, q_k \le N$, such that
\begin{equation}\label{8}
\left| \frac{a_1}{q_1} + \cdots + \frac{a_k}{q_k} - \theta \right| \le \frac C{q_1 \cdots q_kN^k}.
\end{equation}
Then
\begin{equation}\label{9}
[0, 1] \subseteq \bigcup_{q \in \mathcal D_k(N)} \bigcup_{0 \le a \le q} \left\{ \theta \in \mathbb R \; : \; |\theta - a/q| \le C/(qN^k) \right\},
\end{equation}
where $\mathcal D_k(N)$ denotes the set of least common denominators of the sums appearing on the left side of \eqref{8}. By a result of Erd\"os \cite{E}, $\mathcal D_k(N)$ has cardinality
  \[
    |\mathcal D_k(N)| \ll N^k(\log N)^{-c}
  \]
  for some constant $c = c(k) > 0$, so it follows from \eqref{9} that
  \[
    1 \le \sum_{q \in \mathcal D_k(N)} \sum_{0 \le a \le q} \frac {2C}{qN^k} \le 4CN^{-k}|\mathcal D_k(N)| \ll (\log N)^{-c},
  \]
  which is impossible when $N \to \infty$. On the other hand, one may hypothesize that the set of fractions with denominators in $\mathcal D_k(N)$ is distributed similarly to the set of all fractions $a/q$ with denominators $q \le N^k$. Under such a hypothesis, one might hope for an estimate with $|\mathcal D_k(N)|^{-1}$ in place of the term $(\log 3N)^cN^{-k}$ on the right side of \eqref{10} below, and such an estimate, if true, would be essentially best possible. However, upon observing that
  \[
    |\mathcal D_k(N)| \ge \sum_{q_1 \le N} \cdots \sum_{q_k \le N} d(q_1 \cdots q_k)^{-1} \ge \bigg\{ \sum_{q \le N} d(q)^{-1} \bigg\}^{k} \gg N^k(\log 3N)^{-k},
  \]
  we will take a more cautious approach and pose the following
\begin{question}
Let $k$ be a positive integer. Determine the least value of $c_k$ such that for any real $\theta$ and any positive integer $N$, there exist integers $a_1, \dots, a_k$, $q_1, \dots, q_k$, with $1 \le q_1, \dots, q_k \le N$, such that
\begin{equation}\label{10}
\left| \frac {a_1}{q_1} + \dots + \frac {a_k}{q_k} - \theta \right| \ll \frac {(\log 3N)^{c_k}}{q_1 \cdots q_k N^k}.
\end{equation}
\end{question}
We leave the answer to this question to the future.

\bigskip

\begin{acknowledgement}
  The first author would like to thank the American Institute of Mathematics for support. The second author would like to thank Jeff Vaaler for several enlightening conversations on this and related topics.
\end{acknowledgement}


Collatz meets Fibonacci

Abstract: The Collatz map is defined for a positive even integer as half that integer, and for a positive odd integer as that integer threefold, plus one. The Collatz conjecture states that when the map is iterated the number one is eventually reached. We study permutations that arise as sequences from this iteration. We show that permutations of this type of length up to 14 are enumerated by the Fibonacci numbers. Beyond that excess permutations appear. We will explain the appearance of these excess permutations and give an upper bound on the exact enumeration.

\section{Introduction}
\label{sec:introduction}

A well-known conjecture due to Lothar Collatz from 1937 states that when the function
\[
f(x) = \left \{
  \begin{array}{ll}
    x/2 & \mathrm{if\ } x \equiv 0 \pmod{2} \\
    3x+1 & \mathrm{if\ } x \equiv 1 \pmod{2}
  \end{array}
\right.
\]
is iterated from an initial positive integer $x$ we eventually reach
the cycle $(1,4,2)$. Although many have tried to prove the conjecture, or find a counterexample
to it, it remains open to this day. In this paper we assume that the conjecture is true.
A collection edited by Lagarias \cite{MR2663745} contains many articles related to the conjecture and its generalizations, and an annotated bibliography. One of the intriguing features of this function is that, starting from any initial value $x$, the sequence of iterates: $x, f(x), f(f(x)), \dots$, behaves at first irregularly before its eventual apparent inevitable decline from some power of 2 down to the three element cycle. In this paper we consider the initial interesting phase of these iterations when seen from a distance, i.e., only with regard to their relative values, and not the actual numbers produced.

For example, starting the iteration at 12 provides the sequence:
\[
\underbrace{12,\, 6,\, 3,\, 10,\, 5}_{\text{trace}},\, 16,\, 8,\, 4,\, 2,\, 1,\, 4,\, 2,\, 1,\, \dotsc.
\]
The sequence of numbers up until the first power of two is the interesting phase of the iteration, which we will call its  \emph{trace}. The elements of a trace are all distinct,
and viewed from a distance we might replace each element of a trace by its rank (i.e., the $i^\th$ smallest number of the trace is replaced by $i$). The resulting sequence is a permutation, and we shall call permutations produced in this manner \emph{Collatz permutations}. We denote the Collatz permutation obtained from initial value $x$ by $C(x)$. So we have: $C(12) = 5\,3\,1\,4\,2$. Clearly, the map $C$ is not one to one. For instance:
\[
1 = C(5) = C(21) = C(85) = \cdots = C((2^{2k}-1)/3) = \cdots
\]
However, as the length of $C(x)$ increases, coincidences become more rare, e.g., the only other $x \leq 1000$ with $C(x) = C(12)$ is $x = 908$. It seems natural to ask:
\emph{Among the permutations of length $n$, how many are Collatz permutations?}

Considering only those $x \leq 10^8$ for which the length of $C(x)$ is at most 7 produces Table~\ref{tab:1-7}.
\begin{table}[ht]
\centering
\begin{tabular}{cc}
Length & Collatz permutations \\
\hline
1 & 1 \\
2 & 1 \\
3 & 2 \\
4 & 3 \\
5 & 5 \\
6 & 8 \\
7 & 13
\end{tabular}
\caption{Number of Collatz permutations of length less than 8 (experimentally).}
\label{tab:1-7}
\end{table}
As the reader will have noticed the values in the table are the Fibonacci numbers. In what follows we will explain this phenomenon and show that it persists through length $14$. Beyond that point, excess permutations appear -- and we will explain how and why this occurs as well.

\section{Types of traces}
\label{sec:types_of_traces}
The appearance of the Fibonacci numbers in the enumeration of Collatz permutations is easy to explain. The steps that occur in a trace are of two types depending on the parity of the argument. We can call them: \emph{up steps} ($x \mapsto 3x+1$ when $x$ is odd) denoted by $u$; and \emph{down steps} ($x \mapsto x/2$ when $x$ is even) denoted by $d$. Two up steps can never occur consecutively since $3x+1$ is even when $x$ is odd\footnote{Of course this is why some authors consider the ``fundamental'' steps of the Collatz iteration to be $x \mapsto (3x+1)/2$ for odd $x$, and $x \mapsto x/2$ for even $x$.}. The step types in a trace can be recovered from the resulting Collatz permutation according to the pattern of rises and descents. We call the resulting sequence of $u$'s and $d$'s the \emph{type} of the trace. As well as not containing consecutive $u$'s, the last symbol in such a sequence must be a $d$ (since there is a ``hidden'' $u$ occurring next to take us to a power of 2). As is well known, the number of such sequences of length $n$ is given by $F_n$, the $n^\th$ Fibonacci number (with $F_1 = F_2 = 1$ and $F_n = F_{n-1} + F_{n-2}$ for $n > 1$).

So, in order to show that there are at least $F_n$ Collatz permutations of length $n$ it will be enough to show that any sequence of $u$'s and $d$'s satisfying the necessary conditions above actually occurs as the type of some trace. To prove this, it is helpful to turn our focus to the end of a trace, rather than its beginning.

The final element of any trace is always a number of the form $(A-1)/3$ where $A = 2^a$ (of course $a$ must be even but we will be making further requirements shortly, so ignore this for the moment). Think of $u$ and $d$ as functions and let their inverses be denoted $U$ and $D$, that is:
\[
U(x) = u^{-1}(x) = (x-1)/3 \quad \text{ and } \quad D(x) = d^{-1}(x) = 2x.
\]
A \emph{witness} for a type, $\sigma$, is an $A = 2^a$ such that there is a trace ending at $(A-1)/3$ with type $\sigma$. For example, to find a witness for the type $uddud$ requires at least that $UDDUDU(A)$ be an integer. Note here that the ``hidden $u$'' has become explicit, and that the order of $U$'s and $D$'s in the functional application is the same as that in the type -- because the type is written in the reverse of ``normal'' function application order! Now
\[
UDDUDU(A) = \frac{8 A - 29}{27}.
\]
In order for this to be an integer requires $A = 7 \pmod{27}$, and remembering that $A = 2^a$, the least solution to this is $A = 2^{16} = 65536$. Unraveling the applications of $U$'s and $D$'s leads to $x = 19417$. The trace of $x$ is
\[
19417,\, 58252,\, 29126,\, 14563,\, 43690,\, 21845,
\]
and $C(x) = 2\,6\,4\,1\,5\,3$.

We now check that, given a type $\sigma$, it is enough to find a witness $A$ in this way (i.e., that the initial necessary integrality condition is also sufficient) and that infinitely many witnesses always exist.

\begin{proposition}
\label{pr:atLeastOne}
If a type $\sigma$ contains $k$ $u$'s then there is a single congruence of the form $A = c \pmod{3^{k+1}}$ which must be satisfied in order that a trace of type $\sigma$ ends with witness $A$. Consequently, there is a least witness $A = 2^a$ with $a \leq 2 \cdot 3^{k}$, and a general witness is of the form $2^{a + jd}$ where $j$ is a nonnegative integer and $d = 2 \cdot 3^{k}$.
\end{proposition}

\begin{proof}
From $\sigma$ construct the sequence, $\Sigma$ of $U$'s and $D$'s obtained by changing each $u$ to $U$ and each $d$ to $D$ and then appending a $U$. Now compute $\Sigma(A)$ formally obtaining an expression of the form:
\[
\frac{2^m A - b}{3^{k+1}}
\]
where $m$ is the number of $d$'s in $\sigma$ and $k$ the number of $u$'s. In order that $A$ be a witness to a trace of type $\sigma$ it is necessary that this be an integer which, since $2$ and $3^{k+1}$ are relatively prime, leads to a necessary condition of the form $A = c \mod{3^{k+1}}$. To see that this condition is also sufficient suppose inductively, that $\Gamma(A) \in \mathbb{Z}$ for some suffix $\Gamma$ of $\Sigma$. If $\Gamma$ begins with $D$ then formally $\Gamma (A) = (2^k A - 2 b)/3^m$ for some $k > 0$ and integer $b$. If this is an integer then so is $d \Gamma(A) = (2^{k-1} A - b)/3^m$ which is the next element of the trace we are trying to construct. The case when $\Gamma$ begins with $U$ is easier since $u \Gamma(A) = 3 \Gamma(A) + 1$ and so is still an integer as well. To finish, note that it is well known that 2 is a primitive root modulo $3^k$ for all $k$, and the remaining claims are simple consequences of that fact.
\end{proof}

This proposition shows that every potential type has a witness and thereby proves that there are at least $F_n$ Collatz permutations of length $n$.

Table~\ref{tab:1-21} shows that there are exactly $F_n$ Collatz permutations of length $n$ for $n = 1,2, \dotsc, 14$ but for greater $n$ there are more.
		\begin{table}[ht]
			\centering
			\begin{tabular}{cc|ccc}
		    length & \#perms & length & \#perms & excess \\
		    \hline
		    $1$  & $1$   & $15$ & $611$   & $1$ \\
		    $2$  & $1$   & $16$ & $989$   & $2$ \\
		    $3$  & $2$   & $17$ & $1600$  & $3$ \\
		    $4$  & $3$   & $18$ & $2587$  & $3$ \\
		    $5$  & $5$   & $19$ & $4185$  & $4$ \\
		    $6$  & $8$   & $20$ & $6771$  & $6$ \\
		    $7$  & $13$  & $21$ & $10953$ & $7$ \\
		    $8$  & $21$  & $22$ & $17720$ & $9$ \\
			$9$  & $34$  & $23$ & $28669$ & $12$ \\
			$10$ & $55$  & $24$ & $46383$ & $15$ \\
			$11$ & $89$  & $25$ & $75044$ & $19$ \\
			$12$ & $144$ & $26$ & $121417$ & $24$ \\
			$13$ & $233$ & $27$ & $196448$ & $30$ \\
			$14$ & $377$ & $28$ & $317850$ & $39$ \\
			     &       & $29$ & $514278$ & $49$ \\
			     &       & $30$ & $832101$ & $61$ \\
			     &       & $31$ & $1346346$ & $77$ \\
			     &       & $32$ & $2178405$ & $96$
			\end{tabular}
			\caption{Number of Collatz permutations of length less than $32$}
			\label{tab:1-21}
		\end{table}

	The shortest type that is associated with more than one Collatz permutation
    is the type $\sigma = uddudududduddd$ which has the integrality condition
	$2^a = 16 \bmod 729$. The smallest solution to this equation is $a = 4$
    corresponding to the trace $9, 28, 14, 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5$ and the first permutation in Figure~\ref{tab:firstExcessPerms}.
	However, the next solution to the integrality condition is $a = 490$. The initial number corresponding to this solution produces a different permutation than
	the smaller initial number, and is shown in the second line in Figure~\ref{tab:firstExcessPerms}.
		\begin{figure}[ht]
		    \centering
		    \begin{tabular}{ccccccccccccccc}
		        \circled{$3$} & $12$ & $7$ & $2$ & $10$ & $5$ & $13$ & $8$ & $15$ & $11$ & $6$ & $14$ & $9$ & \circled{$4$} & $1$ \\
		        \circled{$4$} & $12$ & $7$ & $2$ & $10$ & $5$ & $13$ & $8$ & $15$ & $11$ & $6$ & $14$ & $9$ & \circled{$3$} & $1$
		    \end{tabular}
		    \caption{Two different permutations associated with the type $uddudududduddd$}
			\label{tab:firstExcessPerms}
		\end{figure}

	In the next section we will explain why this type gives us
	two different permutations and when this should be expected.

\section{Excess permutations}
\label{sec:excess_permutations}
How can one type correspond to different permutations? Consider the type $\sigma = dududd$. If we are considering a potential witness $t$ for it, then the trace that would be generated is:
\[
DUDUDDU(t),\,UDUDDU(t),\,DUDDU(t), \ldots ,DU(t),\,U(t).
\]
Thought of as linear functions of $t$ these lines are shown in Figure~\ref{fig:lines}. We find a witness for the type wherever we find a vertical line $t = A$ where $A = 2^a$ and all the intersection points of $t=A$ with these lines are at integer heights. We can then read off the relative order of the lines at this point according to the order they are crossed as we move up the line $t = A$ from the $t$-axis.

\begin{figure}
	\centering
	\begin{tikzpicture}[scale=0.5]
	    \draw [<->] (0,10) -- (0,0) -- (17,0) node[right] {$t$};
	    \draw [->] (0,0) -- (0,-2);

	    \draw[domain=0:17] plot (\x, {1/3 * \x - 1/3}) node[right,above] {$\scriptstyle 7$};
	    \draw[domain=0:16] plot (\x, {2/3 * \x - 2/3}) node[right,below] {$\scriptstyle 6$};
	    \draw[domain=0:7.8333] plot (\x, {4/3 * \x - 4/9}) node[right,below] {$\scriptstyle 5$};
	    \draw[domain=0:17] plot (\x, {4/9 * \x - 7/9}) node[right,above] {$\scriptstyle 4$};
	    \draw[domain=0:13] plot (\x, {8/9 * \x - 14/9}) node[right,below] {$\scriptstyle 3$};
	    \draw[domain=0:17] plot (\x, {8/27 * \x - 23/27}) node[right,above] {$\scriptstyle 2$};
	    \draw[domain=0:17] plot (\x, {16/27 * \x - 46/27}) node[right,above] {$\scriptstyle 1$};

	    \draw[red,dashed] (15,10) -- (15,0) node[below] {$2^8$};

	    \draw[blue,thick] (25/4,10) -- (25/4,0) node[below] {$6.25$};

	\end{tikzpicture}
	\caption{Linear functions determining permutations associated with the type
	$dududd$. The labels on each line correspond to the point that the corresponding element would occur in a trace and so the permutation associated with the intersections on the line $x = 2^8$ is $4\,1\,6\,3\,7\,5\,2$.}
	\label{fig:lines}
\end{figure}

Consequently we see that if we have two potential witnesses such that there is no intersection point between two lines in the corresponding family lying between them, that they will determine the same permutation. On the other hand, if there were a witness between every pair of intersections of the lines for a type, and if these intersections all occurred at distinct abscissae, we might have up to $n \choose 2$ witnesses for any given type producing distinct permutations. However, we can rule out such a wealth of witnesses quite easily as we can show that the second potential witness always lies to the right of the rightmost intersection point among the lines. That is:

\begin{proposition}
\label{pr:atMostTwo}
For any type $\sigma$ there are at most two distinct permutations $C(x)$ arising from $x$ of type $\sigma$.
\end{proposition}

\begin{proof}
Suppose that $\sigma$ contains $k$ occurrences of $u$. The values of $a$ for which $A = 2^a$ are witnesses form an arithmetic progression with common difference $2 \cdot 3^k$, and in particular, the second witness is greater than $2^{2 \cdot 3^k}$. On the other hand we can crudely bound the greatest abscissa of a point of intersection between the lines arising from $\sigma$ as follows. Suppose that we have two such lines, one resulting from a suffix of $\Sigma$ (notation as above) containing $p$ occurrences of $D$ and $q$ occurrences of $U$ (call this the $pq$-line), and the other from a longer suffix containing $r$ occurrences of $D$ and $s$ occurrences of $U$ (call this the $rs$-line).  Suppose that the $y$ intercept of the $pq$-line is less than that of the $rs$-line. The $y$-intercept of the $pq$-line is certainly greater than $-2^{p-q}$, while that of the $rs$-line is less than or equal to $0$. So their intersection occurs to the left of the $x$-value determined by:
\[
\frac{2^p}{3^q} x - 2^{p-q} = \frac{2^r}{3^s} x
\]
which is
\[
x = \frac{2^{p-q}}{2^p - 2^r 3^{s-q}} 3^s
\]
In the other case, the $rs$-line has lesser $y$-intercept than the $pq$-line. Using similar bounds gives an intersection point to the left of
\[
x = \frac{2^{r-s}}{2^r - 2^p 3^{s-q}} 3^s.
\]
In both estimates the denominator is a non-zero integer multiple of $2^p$ (since $p \leq r$ and $q \leq s$ and at least one of these inequalities is strict) and hence the first factors are bounded by $2^{-q} 3^s$ and $2^{r-s -p} 3^s$ respectively. Therefore, $x \leq 3^s \leq 3^k < 2^{2 \cdot {3^k}}$.
\end{proof}

Recall that the type $\sigma = uddudududduddd$ had witnesses
$2^4, 2^{490}, \dotsc$. The greatest abscissa of an intersection point for the lines arising from this sequence is approximately
$44.04$. The first two witnesses are clearly on different sides of this intersection, explaining why we get two different Collatz permutations.

Propositions \ref{pr:atLeastOne}  and \ref{pr:atMostTwo} show that the number of types of length $n$ lies between $F_n$ and $2 F_n$. Moreover, the arguments leading up to Proposition \ref{pr:atMostTwo} allow one to compute, given a type whether it corresponds to one or two types, and it is by these means that the data of Table \ref{tab:1-21} were derived.

To get an exact enumeration of the Collatz permutations one would need to understand which types are associated with two permutations. We call these \emph{excess creating types} (\emph{ET's}). Given an ET we can always create a new ET by prepending a $d$. This is because the extra $d$ does not alter the integrality condition and can only increase the maximum intersection point. This at least shows that the number of ET's is non-decreasing

\section{Future work}

As with so many aspects of the whole Collatz disease, a few answers just seem to lead to more questions.

\begin{itemize}
\item
\item
How exactly does the number $e_n$ of ET's of length $n$ behave? The data above suggests that it might be something like ``half Fibonacci rate'' i.e., roughly proportional to the square root of the $n^\th$ Fibonacci number, or equivalently satisfy ing $e_n \sim e_{n-2} + e_{n-4}$.
\item
In our current dataset we always get $c = 16$ in the integrality conditions for ET's. This is probably just a result of our search procedure having explored only ``small'' values -- but perhaps it might be a necessary condition.
\item
We have an extrinsic way of creating the Collatz permutations: run the Collatz process and see what comes out. Is there an intrinsic way to recognize these permutations, beyond the obvious condition that they cannot contain consecutive rises?
\item
There are several other maps similar to the Collatz map and there is also the modified Collatz sequence (where $u$ is replaced with $ud$), as well as the Syracuse function where long down-steps are collapsed into one down-step. How do these analyses transfer to those contexts?
\end{itemize}

For the reader who is eager to start exploring Collatz permutations, we have a small code library supporting some basic features for working with their types. The code is written in the Sage open-source mathematics software system, but should run in Python with minor modifications. The code can be found at \url{https://github.com/SuprDewd/CollatzPermutations}.

\begin{section}{Acknowledgment.}
The authors are grateful to William Stein for access to the Sage Combinat
Cluster, supported by NSF Grant No.~DMS-0821725.
\end{section}

\begin{bibdiv}
\begin{biblist}

\bib{MR2663745}{collection}{
   title={The {U}ltimate {C}hallenge: the $3x+1$ {P}roblem},
   editor={Lagarias, Jeffrey C.},
   publisher={American Mathematical Society, Providence, RI},
   date={2010},
   pages={xiv+344},
   isbn={978-0-8218-4940-8},
   review={\MR{2663745 (2012a:11001)}},
}

\end{biblist}
\end{bibdiv}

\end{document}

Collatz meets Fibonacci