%
% 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{color}
\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:

% This macro for summation was created but not used since it did not really simplify much
%\newcommand{\Sum}[3]{\sum\limits_{#1}^{#2}{#3}}

\begin{document}
%FILL IN THE RIGHT INFO.
%\lecture{**LECTURE-NUMBER**}{**DATE**}{**LECTURER**}{**SCRIBE**}
\lecture{9}{September 6}{Neil Calkin}{Dominique Morgan and Charles Pilman}

\begin{flushleft}
\section{Formal Power Series}

What operations can we perform, and when, on formal power series?

\vspace{1mm}

\underline{Aside}: A nonzero Laurent series is a power series of the form $\sum\limits_{k=m}^{\infty}{a_k x^k}$

where $a_m \neq 0$ and $m$ is allowed to be negative.\\

\vspace{3mm}

All the questions we ask below about power series can be asked about Laurent series.

\vspace{3mm}

{\bf {\color{red}Exercise :  Do so, and answer.}} 

\vspace{3mm}

Let $f(x)$, $g(x)$ be formal power series: $f(x) = \sum\limits_{n \geq 0}{f_n x^n} \text{     and     } \sum\limits_{n \geq 0}{g_n x^n}$:

\begin{enumerate}
\item We can add $ f(x) + g(x) $, and obtain a formal power series

\begin{eqnarray*} 
[x^n ] ( f(x) + g(x) ) = ( [ x^n ] f (x) ) +  ( [ x^n ] g (x) )
\end{eqnarray*}

\item We can multiply $[x^n] f(x) g(x) = \sum\limits_{k=0}^{n}{f_k g_{n-k}}$ .

\item We can divide $f(x)$ by $g(x)$ when $f(x) = \sum\limits_{n \geq k}{f_n x^n} $ , $ g(x) = \sum\limits_{m \geq \ell}{g_m x^m}$ and $\frac{1}{g_{\ell}}$ exists in the ring of coefficients and $k \geq \ell$. 

\item Compute $\frac{1}{g(x)}$: if and only if $g_0 = g(0)$ is invertible in our ring of coefficients.

\item Compute $log(f(x))$?

Does $log(y)$ have a formal power series representation?  No\\
\vspace{2mm}
However, $log(1+y)$ does. Note $log(1) = 0$ and $ \frac{d}{dy} log(1+y) = \frac{1}{1+y} = \sum\limits_{n \geq 0}{(-1)^n y^n}$ together imply that $log(1+y) = \sum\limits_{n \geq 0}{ \frac{(-1)^n y^{n+1}}{n+1} } = y-\frac{y^2}{2}+\frac{y^3}{3}-\frac{y^4}{4} +  \ldots $\\

\newpage

Hence, if we hope for consistency, we'll want $ log(f(x)) = log(1 + (f(x)-1) ) = \sum\limits_{n \geq 0}{\frac{(-1)^n (f(x)-1)^{n+1}}{n+1}} $,

\begin{eqnarray*}
\text{which converges as a power series} &\Leftrightarrow& |(f(x)-1)^{n-1}|_u \rightarrow 0 \\
&\Leftrightarrow& |(f(x)-1)|_u \leq 1 \\
&\Leftrightarrow& f(x) = 1+g(x) \text{   with } |g(x)|_u \leq 1 \\
&\Leftrightarrow& f(0) = 1
\end{eqnarray*}

\item Compute $exp(f(x))$?

$e^y = \sum\limits_{n \geq 0}{ \frac{1}{n!} y^n}$, so $e^{f(x)} = \sum\limits_{n \geq 0}{\frac{f(x)^n}{n!}}$, provided it coverges $\Leftrightarrow |f(x)|_u < 1$, that is $f(0)=0$.

\item Compute $f(g(x))$?

$f(g(x)) = \sum\limits_{n\geq 0}{f_n (g(x))^n}$ which converges $\Leftrightarrow |f_n (g(x))^n |_u \rightarrow 0$\\
$\Leftrightarrow |g(x)|_u < 1$ or $f_n = 0$ for all but finitely many $n$\\
$\Leftrightarrow g(0)=0$ or $f(x)$ is polynomial.

\item Compute $f^{\prime}(x)$?  Always $f^{\prime}(x)=\sum\limits_{n \geq 1}{n f_n x^{n-1}}$

\end{enumerate}

{\bf {\color{red}Exercise :
\begin{enumerate}
\item 
Let $f(x), g(x)$ be power series:  Show $\frac{d}{dx} f(x)g(x)=f'(x)g(x)+f(x)g'(x).$
\item 
Suppose $f(u)$ is a power series in $u$, $g(x)$ is a power series in $x$, $f(g(x))$ is a power series, show $f'(g(x))$ exists and $\frac{d}{dx} f(g(x))=f'(g(x))g'(x).$ 
\end{enumerate}
}} 

Supppose $f(x)$ is a power series, and the appropriate series to follow exist.  What is the best way to compute the following?

%It seems that LATEX has a problem with \\ followed by [ so I have inserted {} at the start of each offending line
$\begin{array}{l}
[x^n] f(x)^m\\
{}[x^n] f(x)^a, a\notin \N\\
{}[x^n] e^{f(x)}\\
{}[x^n] log(1+f(x)).
\end{array}$

Does the answer change if we want a sincgle coefficient, or all coefficients upto $\N$?

\vspace{10mm}

Iterated Squaring: suppose we can multiply: then compute $a^n$, express $n$ in binary as $b_0+2b_1+4b_2+\ldots+2^kb_k$.
\vspace{3mm}

Simple method:

Compute

$\begin{array}{rcl}
a^2&=&a\cdot a\\
a^4&=&a^2\cdot a^2\\
a^8&=&a^4\cdot a^4\\
&\vdots &\\
a^{2^k}&=&a^{2^{k-1}}\cdot a^{2^{k-1}}\\
\end{array}$
\vspace{2mm}

Then compute
$a^n=\prod\limits_{j| b_j=1}a^{2^j}$.
\vspace{3mm}

Other method:

$a^{19}=a^{16+2+1}$

$a\rightarrow a^2\rightarrow a^4\rightarrow a^8\rightarrow a^9=a^8\cdot a\rightarrow a^18\rightarrow a^19=a^18\cdot a$

The procedure is this: 

Start with $a$.  For each binary digit, square, and if the digit is 1, multiply by $a$.

\end{flushleft}

\end{document}
