% This is the LaTeX template file for preparing lecture notes for 
% courses taught by Neil Calkin.  When preparing 
% LaTeX notes for this class, please use this template.
%
% The body contains examples: study them, run 
%
%	pdflatex <yourfilename.tex>
%
% and see how they work.   View the output file with acrobat,
% or print it out to compare input and result.
%
%
%
%
%


\documentclass{article}
\usepackage{epsfig,amsmath,amssymb}
\usepackage{graphicx}
\usepackage[myheadings]{fullpage}
%
% The following commands set up the lecnum (lecture number)
% counter and make various numbering schemes work relative
% to the lecture number.
%
\newcounter{lecnum}
\renewcommand{\thepage}{\thelecnum-\arabic{page}}
\renewcommand{\thesection}{\thelecnum.\arabic{section}}
\renewcommand{\theequation}{\thelecnum.\arabic{equation}}
\renewcommand{\thefigure}{\thelecnum.\arabic{figure}}
\renewcommand{\thetable}{\thelecnum.\arabic{table}}

%
% The following macro is used to generate the header.
%
\newcommand{\lecture}[4]{
   \pagestyle{myheadings}
   \thispagestyle{plain}
   \newpage
   \setcounter{lecnum}{#1}
   \setcounter{page}{1}
   \noindent
   \begin{center}
   \framebox{
      \vbox{\vspace{2mm}
    \hbox to 6.28in { {\bf Combinatorial Analyis
                        \hfill Fall 2010} }
       \vspace{4mm}
       \hbox to 6.28in { {\Large \hfill Lecture #1: #2  \hfill} }
       \vspace{2mm}
       \hbox to 6.28in { {\it Lecturer: #3 \hfill Scribe: #4} }
      \vspace{2mm}}
   }
   \end{center}
   \markboth{Lecture #1: #2}{Lecture #1: #2}
   {\bf Disclaimer}: {\it These notes are intended for students in the class
listed above: they are not guaranteed to be complete or even necessarily
correct.  They may only be redistributed with permission, which you may
expect will be liberally granted.  Ask first, please.} \vspace*{4mm}
}

%
% Convention for citations is authors' initials followed by the year.
% For example, to cite a paper by Leighton and Maggs you would type
% \cite{LM89}, and to cite a paper by Strassen you would type \cite{S69}.
% (To avoid bibliography problems, for now we redefine the \cite command.)
% Also commands that create a suitable format for the reference list.
\renewcommand{\cite}[1]{[#1]}
\def\beginrefs{\begin{list}%
        {[\arabic{equation}]}{\usecounter{equation}
         \setlength{\leftmargin}{2.0truecm}\setlength{\labelsep}{0.4truecm}%
         \setlength{\labelwidth}{1.6truecm}}}
\def\endrefs{\end{list}}
\def\bibentry#1{\item[\hbox{[#1]}]}

%Use this command for a figure; it puts a figure in wherever you want it.
%usage: \fig{NUMBER}{SPACE-IN-INCHES}{CAPTION}
\newcommand{\fig}[3]{
			\vspace{#2}
			\begin{center}
			Figure \thelecnum.#1:~#3
			\end{center}
	}
% Use these for theorems, lemmas, proofs, etc.
\newtheorem{theorem}{Theorem}[lecnum]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{claim}[theorem]{Claim}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{definition}[theorem]{Definition}
\newenvironment{proof}{{\bf Proof:}}{\hfill\rule{2mm}{2mm}}


\def\Z{\hbox{$\mathbb Z$}}
\def\Q{\hbox{$\mathbb Q$}}
\def\R{\hbox{$\mathbb R$}}
\def\N{\hbox{$\mathbb N$}}
\def\C{\hbox{$\mathbb C$}}



% **** IF YOU WANT TO DEFINE ADDITIONAL MACROS FOR YOURSELF, PUT THEM HERE:

\begin{document}
%FILL IN THE RIGHT INFO.
%\lecture{**LECTURE-NUMBER**}{**DATE**}{**LECTURER**}{**SCRIBE**}
\lecture{14}{September 20}{Neil Calkin}{Honghai Xu and Reid Sanders}

\begin{flushleft}

\section{Finding upper bound for $P_n$}

\begin{align*}
	\sum_{n \geq 0} P_n x^n &= \prod_{j=1}^{\infty}(1-x^j)^{-1}&\\
	P_n &\leq \frac{\prod_{j=1}^{\infty}(1-x^j)^{-1}}{x^n}  &\forall x \in (0,1)
\end{align*}
Let $x_n^*$ be the minimizing value for $P(x)/x^n$
We'll rewrite $P(x)$ as 
\begin{align*}
P(x) &= \exp{\left\{-\sum_{j=1}^{\infty} \log(1-x^j)\right\}}\\
&= \exp{\left\{\sum_{j=1}^{\infty}\sum_{k=1}^{\infty} \frac{x^{jk}}{k}\right\}}\\
&= \exp{\left\{\sum_{k=1}^{\infty} \frac{1}{k} \sum_{j=1}^{\infty} x^{jk}\right\}}\\
&= \exp{\left\{\sum_{k=1}^{\infty} \frac{1}{k} \frac{x^{k}}{1-x^k} \right\}}\\
&= \exp{\left\{\sum_{k=1}^{\infty} \frac{1}{1-x} \frac{(1-x)x^k}{k(1-x^k)} \right\}}\\
\end{align*}
\emph{Aside: }
\begin{align*}
\frac{1-x}{1-x^k}x^k &< \frac{1}{k} &\forall x < 1\\
\text{and } \lim_{x \to 1} \frac{(1-x)x^k}{1-x^k} &= \frac{1}{k}
\end{align*}

{\bf Exercise :  Prove this Aside}

Thus 
\begin{align*}
P(x) &< \exp{\left\{\sum_{k=1}^{\infty} \frac{1}{1-x} \frac{(1-x)x^k}{k(1-x^k)} \right\}}\\
&= \exp{\left\{ \frac{\pi^2}{6(1-x)} \right\}}\\
&\exp{\left\{ \frac{\pi^2}{6 \epsilon} log(1-\epsilon) \right\}} \\
& \text{So  } P_n  <  \exp{\left\{ \frac{\pi^2}{6(1-x)} \right\}}\\
\end{align*}
Minimize the exponent:
\begin{align*}
{-\pi^2}{6 \epsilon^2} + \frac{n}{1 - \epsilon} &= 0\\
\text{Or: } 6 \epsilon^2 n + \epsilon \pi^2 - \pi^2 &= 0\\
\epsilon &= \frac{-\pi^2 +- \sqrt{\pi^4 + 4(6)(\pi^2)(n)}}{12 n}\\
&= \frac{-\pi^2}{12 n} + \sqrt{\frac{\pi^2}{6n} + \frac{\pi^4}{144n}} \\
&\simeq \sqrt{\frac{\pi^2}{6n}} \text{  (for now) }\\
\text{Hence: } P_n &< \frac{\exp{\left\{ \frac{\pi^2}{6} \frac{1}{\sqrt{\frac{\pi^2}{6n}}} \right\}}}{{(1-\frac{1}{\sqrt{\frac{\pi^2}{6n}}}})^n}\\
(1-\sqrt{\frac{\pi^2}{6n}})^n & \simeq \exp{\left\{\pi \sqrt{\frac{2n}{3}}\right\}(1+O{(\frac{1}{n}}))}\\
P_n &<  \exp{\left\{2 \sqrt{\frac{\pi^2 n}{6}}\right\}}\\
&=  \exp{\left\{\pi \sqrt{\frac{2n}{3}}\right\}(1+O{(\frac{1}{n}}))}
\end{align*}

This is actually a very good upper bound for $P_n$. In particular, the number of digits of $P_n$ is $O(\sqrt{n})$.

\begin{align*}
	\epsilon &= \frac{ \sqrt{\pi^4 + 24(\pi^2)(n)}}{12 n}\\
	&= \sqrt{\frac{\pi^2n}{6}} \left(\frac{\pi^2}{24 n}\right)^{\frac{1}{2}}\\
	&= \sqrt{\frac{\pi^2n}{6}} \left(1 + \frac{1}{2}\left(\frac{\pi^2}{24 n}\right) - \frac{1}{2}\frac{1}{2}\frac{1}{2}\left(\frac{\pi^2}{24 n}\right)^{2}\ldots \right)
\end{align*}
So the minimizing point is actually
\begin{eqnarray*}
\sqrt{\frac{\pi^2}{6n}}-\frac{\pi^2}{12n}+O(\frac{1}{n^{\frac{3}{2}}})
=\sqrt{\frac{\pi^2}{6n}}(1-\frac{1}{2}\sqrt{\frac{\pi^2}{6n}}+O(\frac{1}{n})),
\end{eqnarray*}
which can be written as
\begin{eqnarray*}
\epsilon(1-\frac{\epsilon}{2}+O(\frac{1}{n})).
\end{eqnarray*}


Since
\begin{eqnarray*}
\frac{\pi^2}{6\epsilon(1-\frac{\epsilon}{2}+O(\frac{1}{n}))}&=&\frac{\pi^2}{6\epsilon}(1+\frac{\epsilon}{2}-O(\frac{1}{n}))\\
&=&\frac{\pi^2}{6\epsilon}+\frac{\pi^2}{12}+O(\frac{1}{n}),
\end{eqnarray*}

the numerator becomes
\begin{eqnarray*}
\exp{\{\frac{\pi^2}{6\epsilon}\}} \exp{\{\frac{\pi^2}{12}\}}, 
\end{eqnarray*}
and the denominator becomes
\begin{eqnarray*}
\frac{1}{{{(1-\epsilon(1-\frac{\epsilon}{2}+O(\frac{1}{n}))}}^n}&=&\frac{1}{{(1-\epsilon+\frac{\epsilon^2}{2}+O(\frac{\epsilon}{n}))}^n}\\
&=&  \frac{1}{{((1-\epsilon)(1+\frac{\epsilon^2}{2})(1+O(\frac{1}{n^{\frac{3}{2}}})))}^n}\\
&=&  \frac{1}{{(1-\epsilon)}^n{(1+\frac{\pi^2}{6n})}^n(1+O(1))}\\
&\approx& e^{\frac{\pi^2}{6}}.
\end{eqnarray*}
So our upper bound takes the form of $\Large{e^{\pi\sqrt{\frac{2n}{3}}}e^{-\frac{\pi^2}{12}}}$.\\

So our bound just changes slightly.\\
Truth: $P_n\approx\frac{c}{n}e^{\pi\sqrt{\frac{2n}{3}}}$.\\
\underline{Remark:}
We could try to be more precise, and estimate how big
$\frac{1}{k}-\frac{x^k}{1-x^k}(1-x)$ is, and get a better upper bound, but it isn't worth the effort.\\
Reason is: If $\epsilon^k$ is big, then ${(1-x)}^k\approx e^{-\epsilon k}$ is small. $k>>\sqrt{n}$, so the part of $\sum\limits_{k=1}^{\infty}\frac{1}{k^2}$ which we lose is less than

\begin{eqnarray*}
\sum\limits_{k\geq\sqrt{n}}\frac{1}{k^2}\approx \int_{\sqrt{n}}^{\infty} \frac{1}{x^2}\,dx=\frac{1}{\sqrt{n}}.
\end{eqnarray*}

So $P(x)$ looks like
\begin{eqnarray*}
\exp{\{\frac{1}{\epsilon}(\frac{\pi^2}{6}-\frac{c}{\sqrt{n}})\}}
=\exp{\{\frac{\pi^2}{6\epsilon}-\frac{c'}{n}\}}=\exp{\{\frac{\pi^2}{6\epsilon}\}}(1+O(1)).
\end{eqnarray*}
\end{flushleft}

\end{document}
