text:
\begin{document}

\def\tA{\tilde A}
\def\tX{\tilde X}
\def\tf{\tilde f}
\def\tpi{\tilde \pi}
\def\th{\tilde h}
\def\ta{\tilde \alpha}
\def\th{\tilde h}
\def\tp{\tilde p}
\def\tq{\tilde q}
\def\tl{\tilde l}

\def \vep {\varepsilon}

\def \cd {, \ldots ,}
\def \lf{\| f \|}
\def \bs{\setminus}
\def \ep{\varepsilon}
\def \sig{\Sigma}
\def \si {\sigma}
\def \gam {\gamma}
\def \cinf {C^\infty}
\def \cid {C^\infty (\partial D)}

\def\h#1{\widehat {#1}}
\def\hh#1{\widehat {#1} \bs  {#1}}
\def\hk#1#2{{\widehat {#2}}^{#1}}
\def\hhk#1#2{{\widehat {#2}}^{#1} \bs {#2}}

\def\hr#1{h_r({#1})}
\def\hhr#1{h_r({#1}) \bs {#1}}
\def\hrk#1#2{h_r^{#1}({#2})}
\def\hhrk#1#2{h_r^{#1}({#2}) \bs {#2}}

\def\kh#1#2{{}^{#1}{\widehat {#2}}}
\def\khr#1#2{{}^{#1}h_r({#2})}
\def\kshr#1#2{{}_{#1}h_r({#2})}

\def\<{\langle}
\def\>{\rangle}

\def\spshell{\{ z\in \CN: 1<\|z\| < \rho\}}

\def \C {\mathbb C}
\def \CN {\mathbb C^N}
\def\R {\mathbb R}

\def \Z {\mathbb Z}

\def \bbr {\mathbb R}
\def \bbrs {\mathbb R^2}
\def \bbrn {\mathbb R^n}

\def \cc {\mathscr C}
\def \kk {\mathscr K}
\def \mm {\mathfrak M}

\def \od {\overline D}
\def \ol {\overline L}
\def \oj {\overline J}

\def\sC{{\scr C}}
\def\sF{{\scr F}}
\def\sG{{\scr G}}

\def \cn {c_1, \ldots , c_n}
\def \zx { z \in \widehat X }
\def \zxx {\{ z \in \widehat X \} }
\def \siv {\sum^\infty _{j=1}}
\def \sivv {\sum^\infty _{j=n+1}}
\def \smv {\sum^m_{j=n+1}}
\def \snv {\sum^n_{j=j_0+1}}
\def \bjkz {B_{jk} (z_0)}
\def \epp {\varepsilon^2_n/2}
\def \epn {\varepsilon_{n+1}}
\def \nn { {n+1} }
\def \ff {F_{z_{0}}}
\def \fk {f_{k_{1}}}
\def \fkv {f_{k_{v}}}
\def \tf {\tilde{f}}

\def \ma {\mathfrak{M}_A}
\def \mb {\mathfrak{M}_B}
\def \mra {\mathfrak{M}_{R(A)}}

\def \xy {(x,y)}
\def \fg {f \otimes g}
\def \vp {\varphi}
\def \pl {\partial L}
\def \ad {A(D)}
\def \aid {A^\infty (D)}
\def \ot {\otimes}
\def \rbl {R_b (L)}
\def\Int {{\rm Int}}

\def\rowonly#1#2{#1_1,\ldots,#1_#2}
\def\row#1#2{(#1,\ldots,#1_#2)}
\def\diam{\mathop{\rm diam}\nolimits}

\def\pB{\partial B}
\def\oB{\overline B}

\def\endhat{\widehat{\phantom j}}
\def\endhatk{\widehat{\phantom j}{\phantom |}^k}

\def\pji{p_j^{-1}}
\def\oh{\overline H}

\subjclass[2000]{32E20, 32A65 46J10, 46J15}
\title[Equality of polynomial and rational hulls]{No topological condition implies equality of polynomial and rational hulls}
\author{Alexander J. Izzo}
\address{Department of Mathematics and Statistics, Bowling Green State University, Bowling Green, OH 43403}
\email{aizzo@bgsu.edu}

\begin{abstract}
\vskip 20pt
It is shown that no purely topological condition implies the equality of the polynomial and rational hulls of a set: For any uncountable, compact subset $K$ of a Euclidean space, there exists a set $X$, in some $\C^N$, that is homeomorphic to $K$ and is rationally convex but not polynomially convex.  In addition, it is shown that for the surfaces in $\C^3$ constructed by Izzo and Stout, whose polynomial hulls are nontrivial but contain no analytic discs, the polynomial and rational hulls coincide, thereby answering a question of Gupta.  Equality of polynomial and rational hulls is shown also for $m$-dimensional manifolds ($m\geq 2$) with polynomial hulls containing no analytic discs constructed by Izzo, Samuelsson Kalm, and Wold and by Arosio and Wold.
\end{abstract}

\maketitle

\vskip -2.4 true in
\centerline{\footnotesize\it Dedicated to Hari Bercovici}
\vskip  2.4 truein

 \section{Introduction}

Gabriel Stolzenberg \cite{Stol1} studied conditions for the equality of the polynomial and rational hulls of a set, and raised the question of whether every rationally convex subset of $\C^N$ whose first \v Cech cohomology group with
integer coefficients vanishes is polynomially convex.   He later answered this question in the negative \cite{Stol2} by constructing a set in $\C^2$ that is topologically a disjoint union of two discs and is rationally convex but not polynomially convex.

In the present paper, we will show that in fact {\it no\/} purely topological condition on a set in $\C^N$ implies the equality of its polynomial and rational hulls.  More precisely, we will show that every uncountable, compact subset of a Euclidean space can be embedded in $\C^N$, for some $N$, so as to be rationally convex but not polynomially convex.  As a complement to this result, we will show that every uncountable, compact subset of a Euclidean space can also be embedded in $\C^N$, for some $N$, so that the polynomial and rational hulls coincide and are nontrivial.  (Here and throughout the paper we say that a hull $X_H$ of a set $X \subset \CN$ is {\it nontrivial} if the set $X_H\setminus X$ is nonempty.)  In both cases, we will show that the embedding can be chosen so that the resulting hulls contain no analytic discs.

It was shown by the present author and Lee Stout \cite[Theorem~1.1]{IzzoS} that every compact surface, with or without boundary, can be embedded in $\C^3$ as a smooth totally real surface having nontrivial polynomial hull containing no analytic discs.  The question of whether the embedded surfaces can be chosen so as to be rationally convex was posed by Purvi Gupta \cite[Section~14]{IzzoS}.  In particular, this raises the question of whether the surfaces constructed by the present author and Stout in the proof of \cite[Theorem~1.1]{IzzoS} are rationally convex.

Results concerning polynomial convexity often have analogues concerning rational convexity for spaces of dimension one higher.  For instance, compact sets of zero one-dimensional Hausdorff measure are polynomially convex, while compact sets of zero two-dimensional Hausdorff measure are rationally convex.
Therefore, by analogy with the well-known theorem that every nontrivial polynomial hull of a smooth one-dimensional manifold is an analytic variety (see \cite[Corollary~3.1.2]{Stout} for instance), one might expect that every nontrivial rational hull of a smooth two-dimensional manifold must contain an analytic disc.
On the contrary though, by applying the work of Stolzenberg in \cite{Stol1}, we will show that for the surfaces constructed by the present author and Stout the polynomial and rational hulls in fact coincide.  At the end of \cite{IzzoS}, it is shown that for every compact surface without boundary other than the
sphere, the real projective plane, and the Klein bottle, an alternative construction yields {\em rationally convex}, totally real embeddings with nontrivial polynomial hulls containing no analytic discs.  Whether the embeddings can be taken to be rationally convex in the case of the sphere, the real projective plane, or the Klein bottle remains open.

Before the work of the present author and Stout discussed above, it was shown by the present author, H\aa kan Samuelsson Kalm, and Erlend
Forn\ae ss Wold that every manifold, with or without boundary, of dimension $m\geq 3$ can be smoothly embedded in $\C^{2m+4}$ so as to have nontrivial polynomial hull containing no analytic discs \cite{ISW}.  This was recently strengthened by
Leandro Arosio and Wold \cite{A-W} who showed that the embedding can be obtained in
$\C^{\lfloor \frac{3m}{2}\rfloor}$.  The proof we will give that the polynomial and rational hulls coincide for the surfaces constructed by the present author and Stout applies also to the manifolds constructed in \cite{ISW} and \cite{A-W}.

The precise statements of the main results of the present paper are as follows.

\begin {theorem} \label{maintheorem1}
Let $K$ be an arbitrary uncountable, compact subspace of $\R^n$. Then there exists a subspace $X$ of $\C^{n+3}$ homeomorphic to $K$ such that $X$ has nontrivial polynomial hull but is rationally convex and satisfies $R(X)=C(X)$.  In $\C^{n+4}$ there exists a subspace $X$ with the above properties such that, in addition, the polynomial hull
$\h X$ of $X$ contains no analytic discs.
\end {theorem}

\bthm  \label{maintheorem2}
Let $K$ be an arbitrary uncountable, compact subspace of $\R^n$. Then there exists a subspace $X$ of $\C^{n+4}$ homeomorphic to $K$ such that the polynomial and rational hulls of $X$ are nontrivial and coincide.  Furthermore, the set $X$ can be chosen so that the hulls contain no analytic discs.
\ethm

\bthm  \label{maintheorem3}
If  $S$ is a smooth compact manifold of dimension $m\geq 2$, with or without boundary, then there exists a $C^\infty$-smooth manifold $\Sigma$ embedded in $\C^{\lfloor \frac{3m}{2}\rfloor}$ that is homeomorphic to $S$ and that has the property that the polynomially convex hull $\h \Sigma$, although  strictly larger than $\Sigma$, contains no analytic discs.  Furthermore, the manifold $\Sigma$ can be chosen to be totally real and so that its polynomial and rational hulls coincide.
\ethm

As discussed above, the manifolds in Theorem~\ref{maintheorem3} were constructed by Arosio and Wold in \cite{A-W}, and in the 2-dimensional case, by the present author and Stout in \cite{IzzoS}.  What is new in Theorem~\ref{maintheorem3} is the final assertion that the polynomial and rational hulls of the constructed manifolds are equal.  Thus our proof of Theorem~\ref{maintheorem3} will be confined to establishing that equality.

Although our focus here is on the relation between the polynomial and rational hulls, in connection with Theorems~1.1 and~1.2, it should be pointed out that the existence, for each uncountable, compact subspace $K$ of $\R^n$, of a homeomorphic copy $X$ in $\C^{n+4}$ such that $\h X$ is nontrivial and contains no analytic discs was proved earlier by the author as \cite[Theorem~1.1]{Izzo}.  This is, of course, contained in each of Theorems~\ref{maintheorem1} and~\ref{maintheorem2} above.  We also point out that a space $K$ is homeomorphic to an uncountable, compact subspace of some Euclidean space if and only if $K$ is a compact metrizable space of finite topological dimension that contains a Cantor set.  This follows immediately from the theorem of Menger and N\"obeling about embedding spaces of finite topological dimension in Euclidean spaces \cite[Theorem~V.2]{HW} and the
Cantor-Bendixson theorem \cite[Theorem~2A.1]{Mos}.

One can also consider analogues of Theorems~\ref{maintheorem1} and~\ref{maintheorem2} in an abstract uniform algebra setting.  In fact, Theorems~\ref{maintheorem1} and~\ref{maintheorem2} will be obtained essentially as consequences of such abstract results.  These results will be stated in Section~\ref{definitions} after discussing the relevant notions.

The proofs of Theorems~\ref{maintheorem1} and~\ref{maintheorem2} are based on the existence of certain Cantor sets in complex Euclidean spaces.  In the proof of Theorem~\ref{maintheorem2}, we will use a Cantor set constructed by the author \cite{Izzo} in $\C^3$ whose polynomial and rational hulls are nontrivial and coincide and contain no analytic discs.  The proof of the first half of Theorem~\ref{maintheorem1} will use a Cantor set in $\C^2$ constructed by Vitushkin \cite{Vit} that is rationally convex but whose polynomial hull has interior in $\C^2$.  For the proof of the second part of Theorem~\ref{maintheorem1}, we will need a rationally convex Cantor set with a nontrivial polynomial hull that contains no analytic discs.  We will obtain such a Cantor set from Vitushkin's Cantor set by using a result from the paper \cite{IzzoL} of the author and Norman Levenberg.

\bthm\label{Cantor-rat-convex}
There exists a Cantor set $J$ in $\C^3$ such that $J$ has a nontrivial polynomial hull that contains no analytic discs, $J$ is ration\-ally convex, and $R(J)=C(J)$.
\ethm

In his work on conditions for the equality of polynomial and rational hulls, Stolzenberg introduced a condition that he called the {\em generalized argument principle}.  As discussed in the last section of the present paper, this condition can be thought of as a form of analytic structure in a polynomial hull.  The Cantor set of Theorem~\ref{Cantor-rat-convex} is the first example of a compact set with nontrivial polynomial hull that simultaneously fails to have analytic structure both in the usual sense of the polynomial hull containing no analytic discs and in the sense of the set failing to satisfy the generalized argument principle.

In the next section we briefly recall some standard definitions and notations already used above.
In Section~\ref{Theorem3} we recall some of Stolzenberg's work on his generalized argument principle and use it to prove Theorem~\ref{maintheorem3}.
As already mentioned, Section~\ref{definitions} is devoted to abstract uniform algebra analogous of Theorems~\ref{maintheorem1} and~\ref{maintheorem2}.
Theorems~\ref{maintheorem1} and~\ref{maintheorem2} themselves are proved in Section~\ref{polyvsrat}.  In the concluding Section~\ref{conclusion}, we discuss the relationship with the existence of forms of analytic structure in polynomial hulls and raise some open questions.

The inspiration for this paper came from an argument shown to the author by Stout and from the question of Gupta mentioned above.  The author thanks Stout and Gupta for their inspiring correspondence.

It is a pleasure to dedicate this paper to Hari Bercovici who made the year the  author spent as a visitor at Indiana University so enjoyable and stimulating.  Indeed the question posed to the author by Bercovici as to whether a (nonsmooth) one-dimensional manifold can have nontrivial polynomial hull containing no analytic discs (subsequently answered in the affirmative in the author's paper \cite{Izzo}) had a very stimulating effect on the author's research, and in particular, led to the discovery of the Cantor sets with hulls containing no analytic discs used in the present paper.

\section{Preliminaries}~\label{prelim}
For
$X$ a compact Hausdorff space, we denote by $C(X)$ the algebra of all continuous complex-valued functions on $X$ with the supremum norm
$ \|f\|_{X} = \sup\{ |f(x)| : x \in X \}$.  A \emph{uniform algebra} on $X$ is a closed subalgebra of $C(X)$ that contains the constant functions and separates
the points of $X$.  The maximal ideal space of a uniform algebra $A$ will be denoted by $\ma$.

For a compact set $X$ in $\CN$, the \emph{polynomial hull} $\h X$ of $X$ is defined by
$$\h X=\{z\in\CN:|p(z)|\leq \max_{x\in X}|p(x)|\
\mbox{\rm{for\ all\ polynomials}}\ p\},$$
and the
\emph{rational hull} $\hr X$ of $X$ is defined by
$$\hr X = \{z\in\C^N: p(z)\in p(X)\
\mbox{\rm{for\ all\ polynomials}}\ p
\}.$$
An equivalent formulation of the definition of $\hr X$ is that $\hr X$ consists precisely of those points $z\in \C^N$ such that every polynomial that vanishes at $z$ also has a zero on $X$.
The set $X$ is said to be \emph{polynomially convex} if $\h X=X$ and \emph{rationally convex} if $\hr X=X$.

We denote by
$P(X)$ the uniform closure on $X\subset\CN$ of the polynomials in the complex coordinate functions $z_1,\ldots, z_N$, and we denote by $R(X)$ the uniform closure of the rational functions  holomorphic on (a neighborhood of) $X$.
Both $P(X)$ and $R(X)$ are uniform algebras, and
it is well known that the maximal ideal space of $P(X)$ can be naturally identified with $\h X$, and the maximal ideal space of $R(X)$ can be naturally identified with $\hr X$.

We denote the open unit disc in the complex plane by $D$.  By an \emph{analytic disc} in $\CN$, we mean an injective holomorphic map $\sigma: D\rightarrow\CN$.
By the statement that a subset $S$ of $\CN$ contains no analytic discs, we mean that there is no analytic disc in $\CN$ whose image is contained in $S$.
An \emph{analytic disc} in the maximal ideal space $\ma$ of a uniform algebra $A$ is, by definition, an injective map $\sigma:D\rightarrow \ma$ such that the function $\hat f\circ \sigma$ is analytic on $D$ for every function $f$ in
$A$, where $\hat f$ denotes the Gelfand transform of $f$.

\section{Proof of Theorem~\ref{maintheorem3}}\label{Theorem3}

Except for the final assertion that the manifolds can be chosen so that the polynomial and rational hulls coincide, everything in the statement of Theorem~\ref{maintheorem3} is proven in \cite[Theorem~1.1]{IzzoS} in the case $m=2$, and in \cite[Corollary~1.3]{A-W} for all $m\geq 2$.  Thus we will confine ourselves to proving equality of the polynomial and rational hulls of the  manifolds constructed in \cite{IzzoS} and \cite{A-W} (and noting that the same argument applies also to the manifolds constructed in \cite{ISW}.)  That equality follows readily from the work of Stolzenberg in \cite{Stol1}.   We begin by recalling the relevant results.

The following notion was introduced by Stolzenberg \cite{Stol1}.

\bdefn
A compact set $X$ in $\C^N$ satisfies the {\em generalized argument principle\/} provided that, if $p$ is a polynomial that has a continuous logarithm on $X$, then $0\notin p(\h X)$.
\edefn

Following Stolzenberg will also use the following terminology.

\bdefn
A compact set $X$ is {\em simply coconnected\/} if the first \v Cech cohomology group $\check H^1(X,\Z)$ vanishes.
\edefn

It is well-known that simple coconnectivity of $X$ is equivalent to the
statement that every zero-free function on $X$ has a continuous logarithm.  (See for instance \cite[p.~90]{Gamelin}.)

The following elementary observation is due to Stolzenberg.

\bthm \cite[(2.2)]{Stol1} \label{inclusion}
If $X\subset Y$ are compact sets in $\C^N$ such that $X$ satisfies the generalized argument principle and $Y$ is simply coconnected, then
$\h X \subset \hr Y$.
\ethm

\bcor \cite[Corollary 2.3]{Stol1}
If $X$ is simply coconnected and satisfies the generalized argument principle, then $\h X=\hr X$.
\ecor

The generalized argument principle is of course motivated by the classical argument principle.  The following is a modification of \cite[(2.4)]{Stol1}; since it follows from the classical argument principle in the same manner as \cite[(2.4)]{Stol1}, we omit the proof.

\bprop \label{classicalarg}
If $V$ is an analytic subvariety of an open set of $\C^N$ with $\overline V$ compact, and $p$ is a polynomial with a continuous logarithm on $\partial V=\overline V\setminus V$, then $0\notin p(\overline V)$.
\eprop

Thus the boundary of a relatively compact variety $V$ with $\h {\partial V}=\overline V$ satisfies the generalized argument priniciple.

The following result of Stolzenberg shows that the generalized argument principle is preserved by certain limits.

\bthm \cite[(2.12)]{Stol1}  \label{limit}
Let $(X_n)$ be a sequence of compact sets in $\C^N$ each of which satisfies the generalized argument principle.  If in the Hausdorff metric $X_n\rightarrow X$ and $\h X_n\rightarrow \h X$, then $X$ satisfies the generalized argument principle.
\ethm

We can now proceed with the proof of Theorem~\ref{maintheorem3}

\bpf [Proof of Theorem~\ref{maintheorem3}]
Let $\Sigma$ be one of the surfaces in $\C^3$ constructed in \cite{IzzoS} to prove \cite[Theorem~1.1]{IzzoS} or one of the $m$-manifolds in $\C^{\lfloor \frac{3m}{2}\rfloor}$ constructed in \cite{A-W} to prove \cite[Corollary~1.3]{A-W} (or one of the manifolds constructed in \cite{ISW} to prove \cite[Theorem~1.8]{ISW}).  As noted at the beginning of this section, we need only prove that $\h \Sigma = \hr \Sigma$.
In the case of \cite[Theorem~1.1]{IzzoS}, the surface $\Sigma$ contains a disc $Y$ that contains a compact set $E$ of the form $E=X\times \{0\}$ where $X$ is a set in the distinguished boundary of the bidisc in $\C^2$ constructed by Herbert Alexander in \cite{Alex}.  (See the proof of \cite[Lemma~6.1]{IzzoS}.)
In the case of \cite[Corollary~1.3]{A-W} or \cite[Theorem~1.8]{ISW}, the construction can be done (and is most naturally done) in such a way that the same statement is true with the disc $Y$ replaced by an $m$-dimensional ball $Y$ and with $E=X\times \{0\}$ replaced by $E=X\times \{0\}^k$ for an appropriate $k$.
Furthermore $\h \Sigma = \h E \cup \Sigma$.  (In the case of \cite[Theorem~1.1]{IzzoS}, see the proof of \cite[Lemma~6.1]{IzzoS} again and \cite[Corollary~3.2]{IzzoS}.)   We will show that $X$ satisfies the generalized argument principle, and hence so does $E$.  Granting this for the moment, Theorem~\ref{inclusion} gives that $\h E$ is contained in $\hr Y\subset \hr \Sigma$.  Consequently, $\h \Sigma = \h E \cup \Sigma\subset \hr \Sigma$, and hence $\h\Sigma=\hr \Sigma$, as desired.

It remains to verify that the set $X$ satisfies the generalized argument principle.
Alexander \cite{Alex} constructs a sequence $(V_n)$ of varieties in the unit bidisc in $\C^2$.  He notes that $\h{\partial V_n}={\partial V_n} \cup V_n$.  Thus by the observation immediate following Proposition~\ref{classicalarg}, $\partial V_n$ satisfies the generalized argument principle.  One sees from Alexander's proof that in the Hausdorff metric, $\partial V_n\rightarrow X$ and $\h {\partial V_n}\rightarrow \h X$.  Hence, Theorem~\ref{limit} gives that $X$ satisfies the generalized argument principle.
\epf

\section{Results for abstract uniform algebras} \label{definitions}

In this section we prove analogues of Theorems~\ref{maintheorem1} and~\ref{maintheorem2} in the abstract uniform algebra context.  For that, we first define uniform algebra analogues of the notions of rational hull and rational approximation.  As usual, we denote the Gelfand transform of a function $f$ by~$\hat f$.

\bdefn
Given a uniform algebra $A$ and a compact subset $E$ of the maximal ideal space $\ma$ of $A$, we define the {\em abstract rational hull $\hr E$ of $E$} to be the set
$$\hr E=\{\phi \in \ma: \hat f(\phi)\in \hat f(E)\ {\rm for\ all\ } f\in A \}.$$
We say that $E$ is {\em rationally convex} if $\hr E=E$.
\edefn

An equivalent formulation of the definition of $\hr E$ is that $\hr E$ consists precisely of those points $\phi \in \ma$ such that if $f\in A$ satisfies $\hat f(\phi)=0$, then $\hat f$ has a zero on $E$.  When $E\subset X$ are compact sets in $\C^N$, and $A$ is taken to be $P(X)$, this definition yields the usual rational hull of $E$.

\bdefn
Given a uniform algebra $A$ on a compact space $K$, let $R(A)$ be the uniform closure in $C(K)$ of the set $$\{p/q: p,q\in A\ {\rm and\ } q\ \hbox{\rm is\
zero-free}\}.$$  Note that $R(A)$ is a uniform algebra on $K$.
\edefn

When $K$ is a compact set in $\C^N$ and $A=P(K)$, then $R(A)=R(K)$.

As one would expect, there is the following lemma.

\blem \label{mra}
The maximal ideal space of $R(A)$ is the abstract rational hull $\hr K$ of $K$.
\elem

\bpf
A more precise statement of the lemma is that the mapping $\Phi:\mra\rightarrow\ma$ sending each multiplicative linear functional on $R(A)$ to its restriction to $A$ is injective and has range $\hr K$.  For the injectivity of $\Phi$, note that given $\phi\in \mra$ and $g\in A$ zero-free on $K$, we have $\phi(g)\phi(1/g)=\phi(g(1/g))=\phi(1)=1$, so $\phi(1/g)=1/\phi(g)$.  Thus for $p$ and $q$ in $A$ with $g$ zero-free on $K$, we have $\phi(p/q)=\phi(p)/\phi(q)$, so $\phi$ is uniquely determined by its restriction to $A$.

To see that $\Phi(\mra)$ is contained in $\hr K$, suppose that $\phi$ is in $\Phi(\mra)$ and $f\in A$ satisfies $\hat f(\phi)=0$.  Then $f$ is not invertible in $R(A)$, and hence $f$ has a zero on $K$.  We conclude that $\phi$ is in $\hr K$.

For the reverse inclusion, given $\phi\in \hr K$, we extend $\phi$ to a multiplicative linear functional on the set of quotients of elements of $A$ by setting $\phi(p/q)$ equal to $\phi(p)/\phi(q)$ for $p$ and $q$ in $A$ with $q$ zero-free on $K$.  (We leave to the reader the straight forward verification that this definition does yield a well-defined multiplicative linear functional on quotients. Note that for $q\in A$ zero-free on $K$, we have $\phi(q)\not= 0$ because $\phi$ is in $\hr K$.)  To establish that this extension of $\phi$ extends further to a member of $\mra$, it suffices to verify that $|\phi(p)/\phi(q)|\leq \|p/q\|_K$ for all $p$ and $q$ in $A$ with $q$ zero-free on $K$.  For that, note that for $p$ and $q$ as indicated, $p-[\phi(p)/\phi(q)]q$ is a function in $A$ whose Gelfand transform vanishes at $\phi$ and hence must also vanish at some point $x$ of $K$.  Then $|\phi(p)/\phi(q)|=|p(x)/q(x)|\leq \|p/q\|_K$.
\epf

We are now ready to state and prove uniform algebra analogues of Theorems~\ref{maintheorem1} and~\ref{maintheorem2}.

\bthm\label{abstract1}
Let $K$ be a compact Hausdorff space that contains a Cantor set as a subspace.  Then there exists a uniform algebra $A$ on $K$ such that $\ma$ is strictly larger than $K$ but $K$ is rationally convex and $R(A)=C(K)$.  Furthermore, $A$ can be chosen so that $\ma$ contains no analytic discs.
\ethm

\bthm\label{abstract2}
Let $K$ be a compact Hausdorff space that contains a Cantor set as a subspace.  Then there exists a uniform algebra $A$ on $K$ such that $\ma$ is strictly larger than $K$ and $\hr K=\ma$.  Furthermore, $A$ can be chosen so that $\ma$ contains no analytic discs.
\ethm

It should be remarked that the assertion, contained in each of the above two theorems, that on each compact Hausdorff space $K$ that contains a Cantor set there exists a uniform algebra whose maximal ideal space is strictly larger than $K$ but contains no analytic discs was proved earlier by the author as \cite[Theorem~1.8]{Izzo}.

As discussed in the introduction, the proofs of Theorems~\ref{abstract1} and~\ref{abstract2} are based on the existence of certain Cantor sets in complex Euclidean spaces.  We turn, therefore, to constructing the Cantor set of Theorem~\ref{Cantor-rat-convex}.  For that we need some information about the rational hulls of sets given by a general construction in \cite{IzzoL}.  We recall now the general result of \cite{IzzoL}, establish the need additional information, and then prove Theorem~\ref{Cantor-rat-convex}.

\begin {theorem}\cite[Theorem~1.1]{IzzoL} \label{Wermergen}
Let $X \subset \C^N$ be a compact set whose polynomial hull is nontrivial.  Then there exists a compact set $Y \subset \C^{N+1}$ such that, letting $\pi$ denote the restriction to $\h Y$ of the projection $\C^{N+1} \to \C^N$ onto the first $N$ coordinates, the following conditions hold:
\item {\rm (i)} $\pi (Y) = X$
\item {\rm (ii)} $\pi (\hh Y) = \hh X$
\item {\rm (iii)} $\h Y$ contains no analytic discs
\item {\rm (iv)} each fiber $\pi^{-1} (z)$ for $z \in \h X$ is totally disconnected.
\end {theorem}

\bthm \label{rat-hull-for-Izzo-L}
Let $X$, $Y$, and $\pi$ be as in the preceding theorem.  Then $\pi(\hhr Y)\subset \hhr X$.  In particular, if $X$ is rationally convex, then so is $Y$.   Furthermore, if $R(X)=C(X)$, then $R(Y)=C(Y)$.
\ethm

\bpf
By condition (ii) of the preceding theorem, to show that $\pi(\hhr Y) \subset \hhr X$, it suffices to show that $\pi(\hr Y)\subset \hr X$.  To that end, suppose that $y\in \h Y$ satisfies $\pi(y)\notin \hr X$.  We will show that $y$ is not in $\hr Y$ thereby establishing the desired inclusion.  Because $\pi(y)\notin \hr X$, there is a polynomial $p$ on $\C^N$ such that $p\bigl(\pi(y)\bigr)=0$ but $p$ has no zeros on $X$.  Regard $p$ as a polynomial on $\C^{N+1}$ that is independent of the last variable.  Then $p(y)=0$ and $p$ has no zeros on $\pi^{-1}(X)=Y$.  Thus $y\notin \hr Y$, as desired.

Now suppose that $R(X)=C(X)$.  Then each set of antisymmetry for $R(Y)$ must lie in a single fiber of $\pi$.  Because $Y$ is rationally convex, the maximal ideal space of $R(Y)$ is $Y$, and consequently each maximal set of antisymmetry for $R(Y)$ is connected \cite[p.~119]{St-book}.  Since each fiber of $\pi$ is totally disconnected, we conclude that each maximal set of antisymmetry is a single point.  Consequently, $R(Y)=C(Y)$ by the Bishop antisymmetric decomposition \cite[Theorem~12.1]{St-book}.
\epf

\bpf [Proof of Theorem~\ref{Cantor-rat-convex}]
Take $X$ to be the Cantor set in $\C^2$ whose polynomial hull has interior constructed by Vitushkin in \cite{Vit}, and let $Y$ be the set in $\C^3$ given by then applying Theorem~\ref{Wermergen}.
Let $J$ be the largest perfect subset of $Y$.  (Recall that a subset of a space is called \emph{perfect} if it is closed and has no isolated points.  Every space contains a unique largest perfect subset (which can be empty), namely the closure of the union of all perfect subsets of the space.)
It follows from conditions (i) and (iv) of Theorem~\ref{Wermergen} that  $J$ is a Cantor set by the well-known characterization of Cantor sets as the compact, totally disconnected, metrizable spaces without isolated points.
By \cite[Lemma~4.2]{Izzo}, $\h J \bs J \supset \h Y \bs Y$, so condition (ii) of Theorem~\ref{Wermergen} gives that $\h J$ is nontrivial, and since $\h J \subset \h Y$, condition (iii) gives that $\h J$ contains no analytic discs.
Vitushkin \cite{Vit} noted that $R(X)=C(X)$.  Thus $R(Y)=C(Y)$ by Theorem~\ref{rat-hull-for-Izzo-L}, and consequently $R(J)=C(J)$.  The rational convexity of $J$ is an immediate consequence of the equality $R(J)=C(J)$.
\epf

We are now ready for the proofs of Theorems~\ref{abstract1} and~\ref{abstract2}.

\begin {proof}  [Proof of Theorem~\ref {abstract1}]
The proof is the same as that of \cite[Theorem~1.8]{Izzo} except that we use the above results to achieve the rational convexity of $K$ and the equality $R(A)=C(K)$.  For completeness, we include the details.

Let $J$ be a Cantor set contained in $K$.   By Theorem~\ref{Cantor-rat-convex}, there exists a uniform algebra $B$ on $J$ such that $\mm_B\bs J$
is nonempty but $\mm_B$ contains no analytic discs and $R(B)=C(J)$.  Let $A$ be the uniform algebra on $K$ defined by
$A= \{f\in C(K): f|J\in B\}$.

Each of $K$ and $\mm_B$ can be regarded as subsets of $\mm_A$ in standard ways.  Then $\mm_B$ is the $A$-convex hull of $J$ in $\mm_A$ \cite[Theorem~II.6.1]{Gamelin}, and it follows that $K \cap \mm_B=J$.

Let $\Sigma=K \cup \mm_B$.  We claim that $\Sigma=\mm_A$.  To see this, let $\widehat B$ denote the uniform algebra on $\mm_B$ obtained from $B$ via the Gelfand transform, and let $\widetilde A=\{f\in C(\Sigma):f|\mm_B\in \widehat B\}$.
Then by \cite[Theorem~4]{Bear}, $\Sigma=\mm_{\widetilde A}$.  Since the map $\widetilde A\to A$ given by restriction $(f \mapsto f|K)$ is an isometric isomorphism, this gives that $\Sigma= \mm_A$.

We conclude that if $\mm_A$ contains an analytic disc, then either $\mm_B$ or $\mm_A \bs \mm_B = K \bs J$ must contain an analytic disc.  But $\mm_B$ contains no analytic discs by our choice of $B$, and $K \bs J$ contains no analytic discs because the real-valued functions in $A$ separate points on $K \bs J$.

Now note that $\mm_A \bs K = \mm_B \bs J \ne \emptyset$.

The equality $R(A)=C(K)$ is immediate from the following lemma.  The rational convexity of $K$ is then immediate from Lemma~\ref{mra}.
\end{proof}

\blem
Let $J$ be a Cantor set contained in a compact space $K$, let $B$ be a uniform algebra on $J$, and let $A= \{f\in C(K): f|J\in B\}$.  Then $R(A)= \{f\in C(K): f|J\in R(B)\}$.  In particular, if $R(B)=C(J)$, then $R(A)=C(K)$.
\elem

\bpf
The inclusion $R(A)\subset \{f\in C(K): f|J\in R(B)\}$ is obvious.  For the reverse inclusion, consider an arbitrary function $f\in C(K)$ such that $f|J\in R(B)$, and let $\vep >0$ be arbitrary.  Then there exist functions $p$ and $q$ in $B$ with $q$ zero-free such that
$$\|(p/q)-(f|J)\|<\vep.$$
Set $h=(p/q)-(f|J)$.  By the Tietze extension theorem, $h$ can be extended to a continuous function $\th$ on $K$ such that $\|\th\|_K=\|h\|_J<\vep$.  Set $g=f+\th$.  Then $g$ is in $C(K)$ and $g|J=(f|J)+h=p/q$.  It is not difficult to verify that every zero-free function on a Cantor set has a continuous logarithm.  Let $\alpha$ be such a logarithm for $q$.  Extend $\alpha$ to a continuous function $\tilde\alpha$ on $K$ and set $\tq=e^{\tilde \alpha}$.  Then $\tq$ is an extension of $q$ to a zero-free continuous function on $K$.  Set $\tp=g\tq$.  Then $\tp$ is a continuous extension of $p$ to $K$.  Thus $\tp$ and $\tq$ are in $A$, and
$$\|f-(\tp/\tq)\|_K=\|f-g\|_K=\|\th\|_K<\vep.$$
Since $\vep>0$ was arbitrary,
we conclude that $f$ is in $R(A)$, as desired.
\epf

Note that the only property of the Cantor set used in the preceding proof was that every zero-free function on the Cantor set has a continuous logarithm, i.e., that the Cantor set is simply coconnected.

\bpf [Proof of Theorem~\ref{abstract2}]
The proof is similar to the proof of Theorem~\ref{abstract1}.  Let $J$ be a Cantor set contained in $K$.  By \cite[Theorem~1.4]{Izzo}, there exists a Cantor set in $\C^3$ with nontrivial polynomial hull such that $P(X)$ contains a dense set of invertible elements.  As noted by Garth Dales and Joel Feinstein \cite{DalesF}, density of the invertible elements in $P(X)$ implies that the polynomial and rational hulls of $X$ coincide and also implies that they contain no analytic discs.  Consequently, there exists a uniform algebra $B$ on $J$ such that $\mb\setminus J$ is nonempty, $\hr J=\mb$, and $\mb$ contains no analytic discs.
As in the proof of Theorem~\ref{abstract1}, define $A$ to be the uniform algebra on $K$ given by
$A= \{f\in C(K): f|J\in B\}$.

Regarding each of $K$ and $\mm_B$ as subsets of $\mm_A$ and arguing exactly as in the proof of Theorem~\ref{abstract1}, we again get that

$\ma\setminus K=\mb\setminus J\not=\emptyset$, the maximal ideal space $\ma$ of $A$ contains no analytic discs,  and $\h A|\mb=\h B$.

To see that $\hr K=\ma$, let $x\in \ma\setminus K = \mb\setminus J$ be arbitrary, and let $f\in \h A$ satisfy $f(x)=0$.  Then $f|\mb\in \h B$, so since $\hr J=\mb$ (with respect to $B$), $f|\mb$ must have a zero on $J$.  Thus $f$ has a zero on $K$, so $\hr K=\ma$, as desired.
\epf

\section {Proofs of Theorems~\ref{maintheorem1} and~\ref{maintheorem2}}\label{polyvsrat}

The proofs are similar to the proof of \cite[Theorem~1.1]{Izzo}.
We begin with proving the last part of Theorem~\ref{maintheorem1}.
As in the proof of Theorem~\ref {abstract1}, let $J$ be a Cantor set in $K$, let $B$ be a uniform algebra on $J$ such that $\mb \setminus J$ is nonempty but $\mb$ contains no analytic discs and $R(B)=C(J)$, and let $A=\{ f \in C(K) : f | J \in B \}$. Note that by Theorem~\ref{Cantor-rat-convex}, the uniform
algebra $ B$ can be chosen so as to be generated by three functions $f_1, f_2, f_3$.

Extend each of $f_1, f_2, f_3$ to continuous complex-valued functions $\tf_1, \tf_2, \tf_3$ on $K$.  Let $x_1 \cd x_n$ denote the real coordinate functions
on $\R^n$.  Choose a continuous real-valued function $\rho$ on $K$ whose zero set is precisely $J$.
Then the $n+4$ functions $\tf_1, \tf_2, \tf_3, \rho, \rho x_1 \cd \rho x_n$ generate the uniform algebra $A$ by \cite[Lemma~3.8]{ISW} .

Let $F:K\to \C^{n+4}$ be the mapping whose components are the functions
$\tf_1, \tf_2, \tf_3, \rho, \rho x_1 \cd \rho x_n$, and
let $X=F(K)$.  Then $P(X)$ is isomophic to $A$ as a uniform algebra and $\mm_{P(X)}$ can be identified with $\h X$.
Since the proof of Theorem~\ref{abstract1} shows that $\ma \setminus K$ is nonempty while $\ma$ contains no analytic discs, and $R(A)=C(K)$, the last part of Theorem~\ref{maintheorem1} follows.

An alternative approach which avoids the argument in the proof of Theorem~\ref{abstract1} is to apply \cite[Proposition 3.1(i)]{ISW}
to show directly that, with $G:J\to \C^3$ given by $G(x)=\bigl(f_1(x), f_2(x), f_3(x)\bigr)$, we get
\[ \h X \bs X = \Bigl(\widehat{G(J)} \bs G(J)\Bigr) \times \{0\}^{n+1} \]
Since $G(J)$ is the Cantor set of Corollary~\ref{Cantor-rat-convex}, this also yields the result.  Details are left to the reader.

To see that the example can be found in $\C^{n+3}$ when the requirement that $\h X$ contains no analytic discs is dropped, carry out the above construction starting with Vitushkin's Cantor set \cite{Vit} in $\C^2$  in place of the Cantor set of Theorem~\ref{Cantor-rat-convex}.

The proof of Theorem~\ref{maintheorem2} is essentially the same as the above argument, except that we start with the Cantor set of \cite[Theorem~1.4]{Izzo} in $\C^3$ whose nontrivial polynomial and rational hulls coincide and refer to Theorem~\ref{abstract2} in place of Theorem~\ref{abstract1}.

\section{Analytic structure and open questions}\label{conclusion}

One sees immediately from Proposition~\ref{classicalarg} that if $X$ is a compact set in $\C^N$ such that every point of $\h X$ lies on a relatively compact analytic variety whose boundary is contained in $X$, then $X$ satisfies the generalized argument principle.  Thus one could think
of the generalized argument principle as a weak form of analytic structure in $\h X$.  Notice, however, that this form of analytic structure\vadjust{\kern 2pt} is incommensurate with the existence of analytic discs in $\h X$.  We have already seen in Alexander's set \cite{Alex} (in the distinguished boundary of the bidisc) a set that satisfies the generalized argument principle but whose polynomial hull contains no analytic discs.  On the other hand Vitushkin's Cantor set fails to satisfy the generalized argument principle but there is an open set of $\C^2$ contained in its polynomial hull.  (Note that for $X$ a Cantor set, the generalized argument principle is equivalent to the statement that $\h X=\hr X$.)  The Cantor set given in Theorem~\ref{Cantor-rat-convex} is the first example of a compact set that simultaneously fails to have an analytic disc in its polynomial hull and fails to satisfy the generalized argument principle.  Each of the compact sets with polynomial hull without analytic discs in \cite{Stol0}, \cite{Wermer1982}, \cite{Alex}, and \cite{DalesF} satisfy the generalized argument principle by the argument given in the second paragraph of the proof of Theorem~\ref{maintheorem3}.  The examples in \cite{Wermerpark}, \cite{DuvalL}, \cite{Izzo0}, and \cite{Izzo} satisfy the generalized argument principle because their polynomial and rational hulls coincide.

The condition that $P(X)$ fails to have a dense set of invertible elements could also be thought of
as a weak form of analytic structure in $\h X$ since this condition holds whenever there is an analytic disc in $\h X$.  Because $X$ obviously satisfies the generalized argument principle whenever $\h X= \hr X$, the elementary observation that $\h X=\hr X$ whenever $P(X)$ has a dense set of invertible elements leads trivially to the following observation about the existence of weak forms of analytic structure.

\begin{observation}\label{trivial}
For every compact set $X\subset\C^N$, there is a weak form of analytic structure in the sense that either $X$ satisfies the generalized argument principle or else $P(X)$ fails to have a dense set of invertible elements.
\end{observation}

Saying that $P(X)$ fails to have a dense set of invertible elements is far from saying that $\h X$ contains analytic structure in the sense of containing an analytic disc.  This observation motivates introducing the following definition and raising the first of the questions below.

\bdefn
A compact set in $\C^N$ satisfies the {\em generalized open mapping principle} if there exists a subset $G$ of $\h X$ such that for every function $f\in P(\h X)$ that is nonconstant on $G$, the set $f(G)$ has interior in $\C$.
\edefn

We can think of the set $G$ in the above definition as a generalized analytic set.

\bquest
Does there exist a compact set $X\subset \C^N$ for which both the generalized argument principle and the generalized open mapping principle fail to hold?  A negative answer would give a more substantive statement about the existence of analytic structure in polynomial hulls than Observation~\ref{trivial}.
\equest

\bquest\label{C2Cantorset}
In the proof of Theorem~\ref{maintheorem2}, we used a Cantor set constructed in \cite{Izzo} lying in $\C^3$ whose polynomial and rational hulls are nontrivial and coincide. Does a Cantor set with these properties exist in $\C^2$?  If so,
then using that Cantor set in the proof of Theorem~\ref{maintheorem2} would show that the set $X$ of that theorem could be
constructed in $\C^{n+3}$ provided we do not require the hulls of $X$ to contain no analytic discs.
\equest

A possible candidate for the Cantor set in $\C^2$ requested in Question~\ref{C2Cantorset} is the Cantor set constructed by Walter Rudin in \cite{Rudin-Cantor} (and also presented in \cite[Theorem~III.2.5]{Gamelin} and \cite[pp.~53--54]{Stout}). This is obtained as follows.  Let $E$ be a compact set in the complex plane such that there exists a nonconstant function $f$ continuous on the Riemann sphere $S^2$ and holomorphic off $E$.  (Such a function exists, for instance, whenever $E$ has positive planar measure.)  Choose $f$ so that $f$ has a zero of order one at $\infty$.  Let $g:S^2\rightarrow \C^2$ be given by $g(z)=\bigl(f(z), zf(z)\bigr)$, and let $J=g(E)$.  In the case when $E$ is  a Cantor set, the resulting set $J$ is Rudin's Cantor set.  In all cases, the maximum principle gives immediately that the set $\Sigma=g(S^2)$ is contained in the polynomial hull of $J$.  It can be shown that $\Sigma$ lies also in the rational hull of $J$.  (In case $E$ is simply coconnected (e.g., a Cantor set) this is immediate from Proposition~\ref{classicalarg}.  For the general case see \cite[p.~54]{Stout}.)
Thus the polynomial and rational hulls of $J$ are nontrivial and contain the Riemann surface $\Sigma\setminus J$.
However, neither the rational nor the polynomial hull of this Cantor set has been exactly determined.  Stout (private communication) showed that the set $\Sigma$ has nonzero second \v Cech cohomology group $\check H^2(\Sigma, \C)$ and hence cannot be polynomially convex by a well-known theorem of Andrew Browder \cite{Browder} (or see \cite[p.~93]{Stout}).  Thus the polynomial hull of Rudin's Cantor set must be strictly larger than $\Sigma$, and in fact, by a theorem of Alexander \cite{Alex0} (or see \cite[p.~103]{Stout}) must have topological dimension at least 3 and hence be much larger than $\Sigma$.

Note that $\Sigma$ is topologically a pinched sphere obtained from the sphere $S^2$ by collapsing the set $f^{-1}(0)$ to a point.
The following simple proof that the cohomology group $\check H^2(\Sigma, \C)$ is nonzero was found by the author.
Assume without loss of generality that $f^{-1}(0)$ lies outside the open unit disc $D$.  Choose a continuous map $h:S^2\rightarrow S^2$ that is homotopic to the identity and satisfies $h(S^2\setminus D) =\infty$.  For instance, define $h$ by
$$h(z) =  \begin{cases} \left (\displaystyle{\frac{|z|}{1-|z|}}\right) z & {\rm if \ \ } |z|<1 \cr
\infty  &  {\rm if \ \ } |z|\geq1 {\rm\ or \ } z=\infty.
\end{cases} $$
Because $h$ is constant on $f^{-1}(0)$, necessarily $h$ factors through $\Sigma$, that is, there is a continuous map $\tilde h:\Sigma\rightarrow S^2$ such that $h=\tilde h\circ g$.  Then the induced maps on cohomology satisfy $h^*=g^*\circ \tilde h^*$.  Since $h$ is homotopic to the identity, $h^*$ is the identity on $\check H^2(S^2, \C)=\C$.  Therefore, $g^*$ and $\tilde h^*$ are nonzero, and hence, $\check H^2(\Sigma, \C)$ is nonzero.

\bquest
The existence of a  Cantor set in $\C^2$ whose rational hull has interior in $\C^2$ was proven by Henkin in \cite{Henkin}, and the same was shown to hold with $\C^2$ replace by $\C^N$, $N\geq 2$, by the present author in \cite{Izzo}.
 Is there a Cantor set $X$ in some $\C^N$
such that $\hr X$ has interior {\em and} $\h X=\hr X$?  Is there an example in $\C^2$?
\equest


TITLE: Tensile strength of a chain of electromagnets
QUESTION [1 upvotes]: I was having a discussion about the tensile strengths of various materials.
Could something like a chain of electromagnets be made to have a tensile strength proportional to the power applied to it?

REPLY [2 votes]: Yes.
Is this a useful method in practice to increase the strength to weight ratio of a cable? No, except possibly with the use of superconductors (copper would melt before contributing as much tensile strength as a cable of the same weight).


text:
\begin{document}

\begin{abstract}
A sequence of geometric random variables of length $n$ is a sequence of $n$ independent and identically distributed geometric random variables ($\Gamma_1, \Gamma_2,  \dots, \Gamma_n$) where $\P(\Gamma_j=i)=pq^{i-1}$ for $1~\leq~j~\leq~n$ with $p+q=1.$
We study the number of distinct adjacent two letter patterns in such sequences. Initially we directly count the number of distinct pairs in words of short length. Because of the rapid growth of the number of word patterns we change our approach to this problem by obtaining an expression for the expected number of distinct pairs in words of length $n$. We also obtain the asymptotics for the expected number as $n \to \infty$.
\end{abstract}
\maketitle

\section{Introduction}
A sequence of geometric random variables of length $n$ is a sequence of $n$ independent and identically distributed geometric random variables ($\Gamma_1, \Gamma_2,  \dots, \Gamma_n$) where
\[\P(\Gamma_j=i)=pq^{i-1}\quad\textrm{for}\quad 1~\leq~j~\leq~n\quad\textrm{with}\quad p+q=1.\]
The smaller the value of $q$, the greater the prevalence of smaller numbers in the sequence.
So $p$ is the probability of obtaining the letter 1, where $0\le p\le 1$ and $pq^{i-1}$ is the probability of obtaining the letter $i$ in any given position of the word. In this paper a {\em word} will mean a {\em geometrically distributed random word}.

There are many recent references on sequences of geometric random variables, see for example \cite{ABBKP, akp06, FP, KW, KP96, L, LPW, lopr06, LW,  Prod96, P, CP}.
 In this paper, given a word of length $n$, we study the number of distinct adjacent two letter patterns (or pairs). This is a generalisation of the problem of distinct values previously studied in \cite{akp06} by two of the current authors and subsequently in \cite{LPW}. A pair is made up of two consecutive letters $\Gamma_i \Gamma_{i+1}$ for $i=1$ to $n-1$. So for example the word $\Gamma_n = 12412413$ is a sequence of geometric random variables of length $n=8$. It is made up with four distinct letters 1 to 4 and it has four distinct pairs namely: 12, 24, 41, and 13.

In Section \ref{DirCount} we count the expected number of distinct pairs in short words. Thereafter, in Section \ref{ExpNum}, we tackle the problem of the expected number of distinct pairs in a randomly generated word of length $n$. Here is an outline of our approach: We utilize the methodology of the paper by Bassino, Cl\'{e}ment and Nicod\`{e}me, see \cite{BCN}. The full strength of this paper is not needed, because (in this case) we are only studying ``reduced" set of patterns, i.e., we are always analyzing patterns of length two. These methods are available in many other sources, but the Bassino (et al.) paper has some nice examples that make the material accessible to people who are new to this methodology.

\section{A direct count for the number of distinct pairs in small words}\label{DirCount}
We illustrate a more intuitive approach in the case of small words. In view of the rapid growth of the Bell numbers, this is not a practical approach for large $n$ but has the advantage of giving insight into the use of the Bell numbers (see \cite{Stan}) as a way of generating the solution to the problem.

\subsection{Words of length four}\label{length4}
There are precisely 15 patterns of length four, these are shown in the first column of Table 1.

\begin{table}[htp]\renewcommand{\arraystretch}{2.2}
\begin {tabular}{|c|c|c|c|}\hline
The patterns&Number of&Probability of&Type\\
&distinct pairs&this pattern&\\\hline
$aaaa$&1&$\frac{p^4}{q^4}\sum_{a} q^{4a}$&A\\\hline
$abab$&2&$\frac{p^4}{q^4}\sum_{a,b} q^{2a+2b}$&B\\\hline
$aaab$&2&$\frac{p^4}{q^4}\sum_{a,b} q^{3a+b}$&C\\\hline
$abbb$&2&$\frac{p^4}{q^4}\sum_{a,b} q^{a+3b}$&C\\\hline
$abaa, aaba$&3&$\frac{p^4}{q^4}\sum_{a,b} q^{3a+b}$&C\\\hline
$aabb, abba$&3&$\frac{p^4}{q^4}\sum_{a,b} q^{2a+2b}$&B\\\hline
$aabc, abac, abca$&3&$\frac{p^4}{q^4}\sum_{a, b, c} q^{2a+b+c}$&D\\\hline
$abbc, abcb$&3&$\frac{p^4}{q^4}\sum_{a, b, c} q^{a+2b+c}$&D\\\hline
$abcc$&3&$\frac{p^4}{q^4}\sum_{a, b, c} q^{a+b+2c}$&D\\\hline
$abcd$&3&$\frac{p^4}{q^4}\sum_{a, b, c, d} q^{a+b+c+d}$&E\\\hline
\end{tabular}\vspace{0.5cm}\caption{Probabilities for all the patterns in a four letter word}
\end{table}
They correspond to the number of restricted  growth functions of length four. This is equal to the number of set partitions of length four for the set $\{1, 2, 3, 4\}$, i.e., the Bell number $B(4)=15$, see \cite{Stan}. The sum of the probabilities of obtaining these patterns is 1 as expected. In the last column, we have split the 15 words into five types: A to E. The type depends on the number of distinct letters making up the word and their multiplicity. For example words of type C are made up of two distinct letters: three letters of one kind and one of the other kind. Words with the same type occur with equal probability.

{\bf Notation}: We write $\sum_{a,b,c,d,e}$ to mean the sum over all values of $a, b, c, d$ and $e$ where these values are all distinct from each other.

Now define $S_A(a)$, $S_B(a,b)$, $S_C(a,b)$, $S_D(a,b,c)$ and $S_E(a,b,c,d)$ to be the probability of occurrence of words of type A, B, C, D and E respectively. Thus
\begin{align*}S_E(a,b,c,d):&=\frac{p^4}{q^4}\sum_{a, b, c, d} q^{a+b+c+d}=4!\,\frac{p^4}{q^4}\,\sum_{a=1}^\infty \sum_{b>a} \sum_{c>b} \sum_{d>c} q^{a+b+c+d}\\
&=\frac{24q^{6}}{(1+q)^2(1+q^2)(1+q+q^2)}\end{align*}
For words of type $D$, we use the inclusion/exclusion principle to obtain the probability
\begin{align*}&S_D(a,b,c):=\frac{p^4}{q^4}\,\sum_{a, b, c} q^{2a+b+c}\\
&=\frac{p^4}{q^4}\left(\sum_{a=1}^\infty \sum_{b=1}^\infty \sum_{c=1}^\infty q^{2a+b+c}-\sum_{a=1}^\infty \sum_{b=1}^ \infty q^{2a+b+b}-\sum_{a=1}^\infty \sum_{b=1}^ \infty q^{2a+b+a}-\sum_{a=1}^\infty \sum_{c=1}^\infty q^{2a+a+c}+2 \sum_{a=1}^\infty q^{4a}\right)\\
&=\frac{2pq^3(1+2q+3q^2)}{(1+q)^2(1+q^2)(1+q+q^2)}.\end{align*}
Similarly
\begin{align}&S_B(a,b):=\frac{p^4}{q^4}\,\sum_{a, b} q^{2a+2b}=\frac{2q^2p^2}{(1+q)^2(1+q^2)}\label{SB}\\
&S_C(a,b):=\frac{p^4}{q^4}\,\sum_{a, b} q^{3a+b}=\frac{p^4q(1+q+2q^2)}{1-q^3-q^4+q^7}\label{SC}\end{align}
and
\begin{align*}&S_A(a):=\frac{p^4}{q^4}\,\sum_{a\geq 1} q^{4a}=\frac{p^4}{1-q^4}.\end{align*}
Let the probability of obtaining $\ell$ distinct pairs in a random word of length four be $P_4(\ell)$. By reading off from Table 1 we have
\[P_4(1)=S_A,\]
\[P_4(2)=S_B+2S_C,\]
\[P_4(3)=2S_B+2S_C+6S_D+S_E.\]

By multiplying the number of distinct pairs (the numbers in column two) and the corresponding probabilities (the expressions in column three) and summing  over all cases, we obtain the expected number of distinct pairs in four letter words. We will denote this by $F_4$. Thus
\begin{align}
F_4&=S_A+2(S_B+2S_C)+3(2S_B+2S_C+6S_D+S_E)\notag\\
&=\frac{1+9q+15q^2+20q^3+17q^4+11q^5-q^6}{(1+q)^2(1+q^2)(1+q+q^2)}\label{F4}.
\end{align}

\section{The expected number of distinct pairs}\label{ExpNum}
In this section, we use the methodology and notation from \cite{BCN}. An interested reader may wish to read this paper for clarity on the concepts used. We find an expression for the probability of obtaining a distinct pair. We split this problem into two cases:
i) the $ii$ case, and ii) the $ij$ case where $i \neq j$.

Let $P_{i,i}(n)$ and $P_{i,j}(n)$ be the probabilities of getting words of length $n$ which have a pair $ii$ and $ij$ (where $i \neq j$) respectively somewhere in position $1$ up to position $n-1$.

{\bf Notation}: To simplify the equations we will use the following: $a:=pq^{i-1}$, $b:=\sqrt{1+2a-3a^2}$, $c:=p^2q^{i+j-2}$, and $d:=\sqrt{1-4c}$.

We also use $A(z)$ to denote the generating function for the alphabet of a set of words, for geometric words the probabilities sum up to one, so $A(z)$ is just $z$.

We have the following results:
\subsection{Analysis of distinct (adjacent) two letter pattern $ij$ with $i \neq j$}
We fix $i \neq j$ and analyze the occurrences of the pattern $ij$; then the only ``cluster" (to use the terminology in \cite{BCN}) is $ij$ itself. So the generating function $\xi(z,t)$ of the clusters $C$ becomes (see (6) in \cite{BCN}):
\[\xi(z,t)=pq^{i-1}pq^{j-1}tz^2.\]
Hence the generating function of the {\em decorated texts} is
\[T(z,t)=\frac{1}{1-A(z)-\xi(z,t)}=\frac{1}{1-z-pq^{i-1}pq^{j-1}tz^2},\]
and therefore the probability generating function of occurrences of $ij$ (with $z$ marking the length of the words, and $x$ marking the number of occurrences is
\[F(z,x)=T(z,x-1)=\frac{1}{1-z-pq^{i-1}pq^{j-1}(x-1)z^2}.\]
It follows that the probability generating function of the words with {\em zero occurrences} of the pattern $ij$ is the $x^0$ term (which can be extracted by substituting $x=0$), and we obtain
\[[x^0]F(z,x)=F(z,0)=\frac{1}{1-z+pq^{i-1}pq^{j-1}z^2}.\]
So, finally the probability generating function of the words with {\em at least one occurrence} of $ij$ is
\be \frac{1}{1-z}-\frac{1}{1-z+pq^{i-1}pq^{j-1}z^2}.\label{at least 1 ij}\ee
Now suppose that, instead, we fix $i$ and we analyze the occurrences of the pattern $ii$. The clusters all have the form $ii\cdots i$, i.e., they are all words that consist of two or more consecutive occurrences of $i$. So $\xi(z,t)$ of the set of clusters $C$ becomes
\[\xi(z,t)=\frac{pq^{i-1}pq^{i-1}tz^2}{1-pq^{i-1}tz}\]
and then $T(z,t)=\frac{1}{1-A(z)-\xi(z,t)}$ and the analysis is exactly the same as above, leading us (finally) to see that the probability generating function of the words with {\em at least one occurrence} of $ii$ is \
\be \frac{1}{1-z}-\frac{1}{1-z+\frac{pq^{i-1}pq^{i-1}z^2}{1+pq^{i-1}z}}.\label{at least 1 ii}\ee

\subsection{The expected number of distinct (adjacent) two letter patterns}
Now we garner the benefits of this analysis.
\begin{theorem}\label{Th1}
The generating function of the expected number of distinct (adjacent) two letter pattern is then
\[ Q(z):=\sum_{i=1}^\infty \sum_{j \neq i} \left( \frac{1}{1-z}-\frac{1}{1-z+pq^{i-1}pq^{j-1}z^2}\right)+\sum_{i=1}^\infty \left( \frac{1}{1-z}-\frac{1}{1-z+\frac{pq^{i-1}pq^{i-1}z^2}{1+pq^{i-1}z}}\right).\]
\end{theorem}
For example, the result (\ref{F4}) is a natural corollary, extracting the coefficients of $z^4$:
\[ [z^4] Q(z)=\frac{1+9q+15q^2+20q^3+17q^4+11q^5-q^6}{(1+q)^2(1+q^2)(1+q+q^2)}.\]
We now prove the following general formulae:

\begin{proposition}\label{prop1}The probability of having two adjacent identical letters is
\begin{equation*}
P_{i,i}(n)=1+\frac{2^{-n-1} \left(\left(1-b+a\right) \left(1-b-a\right)^n-\left(1+b+a\right) \left(1+b-a\right)^n\right)}{b}.
\end{equation*}
\end{proposition}

\begin{proposition}\label{prop2}The probability of having two adjacent distinct letters is
\[P_{i,j}(n)=1+\frac{1-d}{2d}\left( \frac{2c}{1+d}\right)^n-\frac{1+d}{2d}\left( \frac{2c}{1-d}\right)^n.\]
\end{proposition}
\begin{proof}
We prove both Propositions \ref{prop1} and \ref{prop2}:

Denote the expected number of distinct pairs in a word of length $n$ by $E(n)$. It is obtained by summing $P_{i,i}(n)$ over all $i$ and $P_{i,j}(n)$ over all $i$ and $j$ for $i \neq j$. Thus
\[E(n)=\sum_{i=1}^\infty P_{i,i}(n) +\sum_{i,j\, \textrm{distinct}} P_{i,j}(n).\]

From (\ref{at least 1 ii}), we see that the probability generating function of the words with {\em at least one occurrence} of $ii$ is
\[\frac{1}{1-z}-\frac{1}{1-z+\frac{pq^{i-1}pq^{i-1}z^2}{1+pq^{i-1}z}},\]
or, using the notation $a:=pq^{i-1}$, and $b:=\sqrt{1+2a-3a^2}$,  and using partial fractions, this becomes
\[\frac{1}{1-z}+\frac{(1-b+a)/(2b)}{1-z\frac{1-b-a}{2}}-\frac{(1+b+a)/(2b)}{1-z\frac{1+b-a}{2}}.\]
Hence, by extracting the coefficient of $z^n$ in the above expression we obtain

\[ P_{i,i}(n)=1+\frac{1-b+a}{2b} \left( \frac{1-b-a}{2}\right)^n-\frac{1+b+a}{2b}\left( \frac{1+b-a}{2}\right)^n.\]

Recall, from (\ref{at least 1 ij}), the probability generating function of the words with {\em at least one occurrence} of $ij$ is
\[\frac{1}{1-z}-\frac{1}{1-z+pq^{i-1}pq^{j-1}z^2},\]
or, using the notation $c:=p^2q^{i+j-2}$, and $d:=\sqrt{1-4c}$,  and using partial fractions, this becomes
\[\frac{1}{1-z}-\frac{1}{1-z+cz^2}=\frac{1}{1-z}+\frac{(1-d)/(2d)}{1-2cz/(1+d)}+\frac{(-1-d)/(2d)}{1-2cz/(1-d)}.\]
So again, extracting the coefficient of $z^n$ yields
\[P_{i,j}(n)=1+\frac{1-d}{2d}\left( \frac{2c}{1+d}\right)^n-\frac{1+d}{2d}\left( \frac{2c}{1-d}\right)^n.\]

\end{proof}

\section{Counting pairs arising from adjacent equal parts}\label{CountEqual}
In this section we look more closely at the $ii$ case first seen in Section \ref{ExpNum}. Let $S_n=\sum_{n=1}^\infty P_{i,i}(n)$.
As before $a:=(1-q)q^{i-1}$ and $b:=\sqrt{1+2a-3a^2}$ and the complete sum is
\begin{equation}S_n:=\sum_{i=1}^\infty \left( 1+\frac{(1-a-b)^n(1+a-b)-(1-a+b)^n(1+a+b)}{b 2^{n+1}}\right).\label{Sn1}\end{equation}
Our aim is to express $S_n$, for general $n$, as a rational function of $q$, as done in (\ref{F4}) for the special case $n=4$.

For a fixed $i$, the expected number of two equal adjacent letters $ii$ is
\begin{align}
&[z^n]\left(\frac{1}{1-z}-\frac{1}{1-z+\frac{(pq^{i-1}z)^2}{1+pq^{i-1}z}}\right)\notag\\
&=[z^n]\left( \frac{1}{1-z} - \frac{1+pq^{i-1}z}{1-(1-pq^{i-1})z(1+pq^{i-1}z)}  \right)\notag\\
&=[z^n]\left(\frac{1}{1-z}-(1+pq^{i-1}z)\sum_{s=0}^\infty  (1-pq^{i-1})^sz^s(1+pq^{i-1}z)^s  \right)\label{coeff ii}
\end{align}
where
\[ [z^n]\sum_{s=0}^\infty  (1-pq^{i-1})^sz^s(1+pq^{i-1}z)^s=\sum_{s=0}^\infty (1-pq^{i-1})^s {s \choose n-s}(pq^{i-1})^{n-s}.\]
Thus (\ref{coeff ii}) becomes

\[ 1-\sum_{s=0}^n (1-pq^{i-1})^s {s \choose n-s}(pq^{i-1})^{n-s}-pq^{i-1}\sum_{s=0}^{n-1} (1-pq^{i-1})^s {s \choose n-1-s}(pq^{i-1})^{n-1-s}.\]

When $s=n$ in the first sum, the summand is
\[(1-pq^{i-1})^n=\sum_{s=0}^n {n \choose s} (pq^{i-1})^s(-1)^s=1+\sum_{s=1}^n {n \choose s} (pq^{i-1})^s(-1)^s.\]
So
\begin{align}
&[z^n]\left(\frac{1}{1-z}-\frac{1}{1-z+\frac{(pq^{i-1}z)^2}{1+pq^{i-1}z}}\right)\notag\\
&=-\sum_{s=1}^n {n \choose s} (pq^{i-1})^s(-1)^s-\sum_{s=0}^{n-1} (1-pq^{i-1})^s{s \choose n-s} (pq^{i-1})^{n-s}\notag\\
&\qquad\qquad-pq^{i-1}\sum_{s=0}^{n-1}(1-pq^{i-1})^s{s \choose n-1-s} (pq^{i-1})^{n-1-s}.\label{A}
\end{align}
Since ${s \choose n-s}+{s \choose n-1-s}={s+1 \choose n-s}$ and then using an index shift, equation (\ref{A}) becomes

\[\sum_{s=1}^n {n \choose s} (pq^{i-1})^s(-1)^{s+1}-\sum_{s=1}^{n} (1-pq^{i-1})^{s-1} (pq^{i-1})^{n-s+1}{s \choose n-s+1}.\]
These calculations were done for a fixed $i$, thus we need to sum over all $i$'s, resulting in
\[\sum_{s=1}^n \sum_{i=1}^\infty {n \choose s} (pq^{i-1})^s(-1)^{s+1}-\sum_{s=1}^n \sum_{i=1}^\infty (1-pq^{i-1})^{s-1} (pq^{i-1})^{n-s+1}{s \choose n-s+1}.\]
By evaluating the geometric sums we obtain
\begin{proposition}
The expected number of distinct pairs consisting of two equal letters is
\[\sum_{s=1}^n {n \choose s} (-1)^{s+1} \frac{p^s}{1-q^s}-\sum_{s=1}^n {s \choose n-s+1} \left( \frac pq \right)^{n-s+1}\,\, \sum_{k=0}^{s-1} {s-1 \choose k} \left( \frac{-p}{q}\right)^k \frac{q^{k+n+1-s}}{1-q^{k+n+1-s}}.\]
\end{proposition}

\section{Asymptotics for the number of distinct pairs with equal adjacent parts}\label{AsympequalParts}
In this section we calculate an asymptotic expression for the number of distinct pairs with equal adjacent parts for words of length $n$ as $n \to \infty$. We have the following result:
\begin{theorem}\label{Th2}
The number of distinct pairs that consist of adjacent equal parts is asymptotic, as $n\to \infty$ to
\[\frac 12\log_{1/q}n+\frac 12-\frac{\gamma+2 \log(1-q)}{2 \log q}+\frac{1}{2 \log q}\sum_{k \neq 0} \Gamma(\chi_k)e^{2 k \pi i x}.\]
\end{theorem}
We use the same expressions for $a$ and $b$ as in the previous section, i.e., $a:=(1-q)q^{i-1}$ and $b:=\sqrt{1+2a-3a^2}$.
After some rearrangement of (\ref{Sn1}) we obtain
\begin{equation*}S_n=\sum_{i=1}^\infty \left( 1+\frac{(1+a)\left((1-a-b)^n-(1-a+b)^n\right)-b\left((1-a-b)^n+(1-a+b)^n\right)}{b 2^{n+1}}\right).\end{equation*}
The contribution from the terms $(1-a-b)^n=O(a^n)$ are asymptotically negligible as $n \to \infty$, so we get
\[S_n\sim\sum_{i=1}^\infty \left(1-\frac{1+a+b}{b\,2^{n+1}}(1-a+b)^n\right).\]
Proceed by making a substitution, $c_1:=b-1$, thus we have
\[S_n\sim\sum_{i=1}^\infty \left(1-\frac{1+a+b}{2b}\left(1-\frac a2+\frac{c_1}{2}\right)^n\right).\]
Using the exponential approximation $(1-x)^n \sim e^{-nx}$ as $x \to 0$, see for example \cite{FlajSedge09,S01}, \footnote{In all the calculations that follow, the errors introduced by using asymptotic equivalences in approximations, are $o(1)$ as $n \to \infty$.} we have
\begin{equation}S_n\sim\sum_{i=1}^\infty \left(1-\frac{\frac{1+a}{b}+1}{2}e^{-n\left(\frac a2-\frac{c_1}{2}\right)}\right).\label{SSn}\end{equation}
By expanding $\sqrt{1+2a-3a^2}$ around $a=0$, we obtain an approximation for $b$ which we shall call $b_2$, thus we let
\[b\sim b_2:=1+a-2a^2=1+(1-q)q^{i-1}-2(1-q)^2q^{2i-2}\]
and
\[c_1\sim c_2:=b_2-1=(1-q)q^{i-1}-2(1-q)^2q^{2i-2}\]
so that
\begin{equation}\frac a2 - \frac{c_1}{2}\sim\frac a2 - \frac{c_2}{2}=(1-q)^2q^{-2+2i}.\label{a2c2}\end{equation}
Next, we use the approximation $\frac{1+a}{b}\sim \frac{1+a}{b_2}=1+O(q^i)$, in (\ref{SSn}) to get
\[S_n \sim \sum_{i=1}^\infty \left(1-e^{-n(\frac a2 -\frac{c_2}{2})}\right).\]
Finally, we use (\ref{a2c2}) to obtain
\[S_n \sim \sum_{i=1}^\infty \left(1-e^{-n((1-q)^2q^{-2+2i})}\right).\]
The resulting harmonic sum is well known. Asymptotic estimates for this sum are given, for instance in Louchard and Prodinger \cite{LP}, Sec. 4.1, 5.1. This gives the formula in Theorem~\ref{Th2}.

\section{Counting pairs arising from adjacent non-equal parts}\label{CountNonEqual}
Here we find the number of pairs arising from adjacent non-equal parts in words of length $n$. We have
\begin{proposition}\label{prop4}The number of distinct pairs with adjacent non-equal parts is
\[T_n=2\sum_{k=1}^{\lfloor n/2 \rfloor} \frac{(-1)^{k-1}p^{2k}q^k{n-k \choose k}}{(1-q^k)^2(1+q^k)}.\]
\end{proposition}
\begin{proof} From Theorem~\ref{Th1}, the expected number of adjacent unequal parts is given by
\begin{align*}
&[z^n]\sum_{i=1}^\infty \sum_{j \neq i} \left(\frac{1}{1-z} - \frac{1}{1-z+pq^{i-1}pq^{j-1}z^2}\right).
\end{align*}
where
\begin{align*}
&[z^n]\frac{1}{1-z+pq^{i-1}pq^{j-1}z^2}=[z^n]\sum_{s=0}^\infty z^s(1-pq^{i-1}pq^{j-1}z)^s\\
&=[z^{n-s}]\sum_{s=0}^\infty \sum_{k=0}^s {s \choose k}(-p^2q^{i+j-2}z)^k=\sum_{s=0}^n {s \choose n-s} (-p^2q^{i+j-2})^{n-s}.
\end{align*}
Thus summing on $i$
\begin{align*}
&[z^n]\sum_{i=1}^\infty \sum_{j \neq i} \left(\frac{1}{1-z} - \frac{1}{1-z+pq^{i-1}pq^{j-1}z^2}\right)\\
&=\sum_{i=1}^\infty \sum_{j \neq i}\left[1-\sum_{s=0}^n {s \choose n-s} (-p^2q^{i+j-2})^{n-s}\right]\\
&=\sum_{i=1}^\infty \sum_{j \neq i}\sum_{s=0}^{n-1} {s \choose n-s}(-1)^{n-s+1} (p^2q^{i+j-2})^{n-s}\\
&=\sum_{s=0}^{n-1} \left(\frac{p^2}{q^2}\right)^{n-s}{s \choose n-s} (-1)^{n-s+1} \sum_{i=1}^\infty \left[\sum_{j=1}^{i-1} (q^{i+j})^{n-s}+\sum_{j=i+1}^\infty (q^{i+j})^{n-s}\right]\\
&=2\sum_{s=0}^{n-1} \left(\frac{p^2}{q^2}\right)^{n-s}{s \choose n-s} (-1)^{n-s+1} \sum_{i=1}^\infty \sum_{j=i+1}^\infty (q^{i+j})^{n-s}.
\end{align*}
So finally
\begin{align*}
&[z^n]\sum_{i=1}^\infty \sum_{j \neq i} \left(\frac{1}{1-z} - \frac{1}{1-z+pq^{i-1}pq^{j-1}z^2}\right)\\
&=2\sum_{s=0}^{n-1} {s \choose n-s} (-1)^{n-s+1} \left(\frac{p^2}{q^2}\right)^{n-s}\frac{1}{1-q^{n-s}}\sum_{i=1}^\infty (q^{n-s})^{2i+1}\\
&=2\sum_{s=0}^{n-1} {s \choose n-s} (-1)^{n-s+1} \left(\frac{p^2}{q^2}\right)^{n-s}\frac{q^{3(n-s)}}{(1-q^{n-s})(1-q^{2(n-s)})}.
\end{align*}
Now, by replacing $s$ by $n-k$ we have the required result
\[T_n=2\sum_{k=1}^{\lfloor n/2 \rfloor} \frac{(-1)^{k-1}p^{2k}q^k{n-k \choose k}}{(1-q^k)^2(1+q^k)}.\]
\end{proof}
\section{Asymptotics for the number of distinct pairs with non-equal adjacent parts}
We prove the following result:
\begin{theorem}The number of distinct pairs with non-equal adjacent parts is asymptotic to
\begin{align*}
&\frac 12 (\log_q n)^2+\frac{(2 \gamma +4 \log p- \log q)\log_qn}{2 \log q}\\
&+\frac{6 \gamma^2+\pi^2+24 \log p^2+12 \log p(2 \gamma - \log q)-6 \gamma \log q-(\log q)^2}{12(\log q)^2}\\
&+\sum_{k \neq 0}\frac{3(1-q)^{-2\chi_k}x^{-\chi_k}\Gamma(\chi_k)}{2 \log q}+\sum_{k \neq 0} \frac{(1-q)^{-2\chi_k}x^{-\chi_k}\Gamma(\chi_k)}{2 \log q} ,\end{align*}
as $n \to \infty$.
\end{theorem}
\begin{proof}
We start with the expression for $P_{i,j}(n)$ obtained from Proposition \ref{prop2} in Section \ref{ExpNum}.
Now using $4c=1-d^2$, we can rewrite this as
\begin{align*}
P_{i,j}(n)=-\frac{2^{-1-n}}{d^2}\left( -2^{1+n}+(1-d)^{n+1}+(1+d)^{n+1}+[2^{3+n}-4(1-d)^n-4(1+d)^n]c\right).
\end{align*}

In order to approximate this as $n \to \infty$ we use the fact that $d$ is close to 1, so that $1-d$ is negligible.
Thus
\begin{align*}
P_{i,j}(n)\sim-\frac{2^{-1-n}}{d^2}\left( -2^{1+n}+(1+d)^{n+1}+(2^{3+n}-4(1+d)^n)c\right).
\end{align*}
This simplifies to
\[P_{i,j}(n)\sim1-2^{-1-n}(1+d)^n\left(1+\frac{1}{d}\right)\]
or using the fact that $1+\frac{1}{d}$ is close to 2
\[t_n\sim(1-2^{-n}(1+d)^n).\]
We then sum $P_{i,j}(n)$ over $i$ and $j$ to obtain
\[P(n)=2 \sum_{i=1}^\infty \sum_{j=i+1}^\infty \left(1-2^{-n}(1+d)^n\right)=2 \sum_{i=1}^\infty \sum_{j=i+1}^\infty \left(1-\left(1+\frac{d-1}{2}\right)^n\right).\]
Again we use the exponential approximation $(1-x)^n \sim e^{-nx}$ as $x \to 0$, see \cite{FlajSedge09} to obtain
\[P(n)\sim 2\sum_{i=1}^\infty \sum_{j=i+1}^\infty \left( 1-e^{n \frac{d-1}{2}}\right)\sim 2\sum_{i=1}^\infty \sum_{j=i+1}^\infty \left( 1-e^{-nc}\right)\]
since $d=\sqrt{1-4c}\sim 1-2c$.

To obtain an asymptotic approximation we apply, as before, the Mellin transform, where the formulae can be found in the previous section.
We start with \[P(n)\sim 2\sum_{i=1}^\infty \sum_{j=i+1}^\infty \left( 1-e^{-np^2q^{i+j-2}}\right).\]

So that by the scaling rule
\[\mathcal{M}(1-e^{-xp^2q^{i+j-2}})=-(p^2q^{i+j-2})^{-s}\Gamma(s)\]and

\begin{align*}
\mathcal{M}\left(2 \sum_{i=1}^\infty \sum_{j=i+1}^\infty\left(1-e^{-xp^2q^{i+j-2}}\right)\right)&=-2 \sum_{i=1}^\infty \sum_{j=i+1}^\infty (p^2q^{i+j-2})^{-s}\Gamma(s) \quad \textrm{by linearity}\\
&=-2 \left(\frac{p^2}{q^2}\right)^{-s} \Gamma(s) \sum_{i=1}^\infty (q^i)^{-s}\sum_{j=i+1}^\infty (q^j)^{-s}\\
&=-2 \left(\frac{q}{p}\right)^{2s} \Gamma(s) \sum_{i=1}^\infty (q^{-s})^{i}\frac{q^{-s(i+1)}}{1-q^{-s}}\\
&=-2 \left(\frac{q}{p}\right)^{2s} \Gamma(s) \frac{q^{-s}}{1-q^{-s}}\sum_{i=1}^\infty (q^{-2s})^{i}\\
&=-\frac{2 \Gamma(s)}{p^{2s}q^s(1-q^{-s})(1-q^{-2s})}.
\end{align*}
To use the inversion formula we need the negative residues of $-\frac{2 \Gamma(s)}{p^{2s}q^s(1-q^{-s})(1-q^{-2s})}$.
We have a triple pole at $s=0$ and a double pole at $s=\chi_k$ for $k \neq 0$.
The contribution for the triple pole is
\begin{align*}
&\frac 12 (\log_q n)^2+\frac{(2 \gamma +4 \log p- \log q)\log_qn}{2 \log q}\\
&+\frac{6 \gamma^2+\pi^2+24 \log p^2+12 \log p(2 \gamma - \log q)-6 \gamma \log q-(\log q)^2}{12(\log q)^2}.\end{align*}
The main term $\frac 12 (\log_Q n)^2$ is as expected, since the number of distinct values in a random geometric sequence is $\sim \log _Q n$, see \cite{akp06} and hence the number of possible distinct pairs is approximately ${\log_Q n \choose 2}$.

The contribution from the double poles for all $k \neq 0$ is
\begin{align*}
&\frac{1}{(1-q^{-s})(1-q^{-2s})}=\frac{1}{(1-e^{-s \log q})(1-e^{-2s \log q})}\\
&\sim \frac{1}{(1-(1-s \log q+\frac{s^2 \log^2q}{2}))(1-(1-2s \log q+2s^2\log^2q))}.
\end{align*}
The contribution from the double poles at $\chi_k$ are
\[\sum_{k\neq 0} \frac{3 \Gamma(\chi_k)}{2 p^{2\chi_k}\log q}e^{2 k \pi i\log_Q n}.\]
But there are also simple poles at another $\chi_k$ where $q^{2s}=1$; i.e., $s=\frac{\pi i k}{\log q}$, where the even cases have already been considered, so we only consider the odd values or $s=\frac{\pi i}{\log q}(2m-1) $ for $k=2m-1$.  The residues contribute to
\[\sum_{m \in \mathbb{Z}} \frac{\Gamma(\hat{\chi}_m)}{2p^{2\hat{\chi}_m}\log q }e^{(2m-1)\pi i \log_Q n}\]
where
$\hat{\chi}_m=\frac{(2m-1)\pi i}{\log q}.$

We therefore obtain the fluctuations for the even cases $\chi_k=\frac{2 \pi i k}{\log q}$
\[\sum_{k \neq 0}\frac{3(1-q)^{-2\chi_k}x^{-\chi_k}\Gamma(\chi_k)}{2 \log q}\]
and for the odd cases $\chi_k=\frac{\pi i (2k-1)}{\log q}$
\[\sum_{k \neq 0}\frac{(1-q)^{-2\chi_k}x^{-\chi_k}\Gamma(\chi_k)}{2 \log q}.\]
This finally yields the required result.
\end{proof}

config: arxiv