%
% 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{3}{August 23}{Neil Calkin}{Jeannie Friedel and Dominique Morgan}

\begin{flushleft}


\section{Combinatorial Classes:}

We can extend the cross product of two combinatorial classes to finitely many $A \times B \times \ldots \times C \times D$ .  

\indent

If $A$, $B$, \ldots, $C$, $D$ respectively have generating functions $f_a$, $f_b$, \ldots, $f_c$, $f_d$, then $A \times B \times \ldots \times C \times D$ has generating function $f_a (x)$ $f_b (x)$ \ldots $f_c (x)$ $f_d (x)$ , where the weight is

\\* $w(a,b,...,c,d) = w_a (a) + w_b (b) + \ldots + w_c (c)+ w_d (d) $.

\subsection{Example}

Let $A = \lbrace 0,1 \rbrace $ with $ w(0) = 0$ and $w(1) = 1$ so $A$ has generating function $1 + x$. 

\indent

Let $A^{n}$ denote \underbrace{A \times A \times \ldots \times A}_{n-times} $ which has generating function (1+x)^{n}$.

\indent

A typical element of $A^{n}$ is an n-tuple of $0$'s and $1$'s (a binary sequence). Equivalently, a sequence of $0$'s and $1$'s of length $n$. A sequence has weight $k$ if it has exactly $k$ $1$'s.

\indent

Bijection \phi_{n}: \lbrace $Set of binary strings of length n$ \rbrace \longrightarrow \lbrace $Set of subsets of $ \lbrace $1$, $2$, \ldots , $n$ \rbrace \rbrace.

\indent

\left|\phi_{n} (\sigma) \right| = w ( \sigma ) $ and $ \phi_{n} = \lbrace $ j $ | $ $ \sigma (j) $ = 1 $\rbrace = $ set of positions in which $ \sigma $ has a 1 $.

\indent

e.g. 0110110111 \rightarrow \lbrace 2, 3, 5, 6, 8, 9, 10 \rbrace

\indent

\begin{corollary}
\indent
\\* Number of subsets of \lbrace 1, 2, \ldots , n \rbrace $ of cardinality k $ 
\\* = Number of binary strings of length n with k 1's 
\\* = Number of binary strings of length n with weight k
\\* = \left[x^{k}\right] \left( 1+x \right)^{n}
\begin{itemize}
\item Define n \geq k \geq $ 0, n, k integer, $ {n \choose k} = \left[x^{k}\right] \left( 1+x \right)^{n} . 
\end{itemize}

\end{corollary}

\indent

\newpage

\begin{corollary} 
${n \choose k} = {n-1 \choose k} + {n-1 \choose k-1}$ Pascal's identity
\end{corollary}

\begin{proof}
%\indent
%\left[x^{k}\right] \left( 1+x \right)^{n} = \left[x^{k}\right] \left( 1+x \right)^{n-1} + x \left( 1+x \right)^{n-1} 
% = \left(\left[x^{k}\right] \left( 1+x \right)^{n-1}\right) + \left( \left[ x^k\right]x \left( 1+x \right)^{n-1} \right)
%\\* = {n-1 \choose k} + \left[x^{k-1}\right] \left( 1+x \right)^{n-1} = {n-1 \choose k} + {n-1 \choose k-1}

\begin{align}
%\begin{flushleft}
 \left[x^{k}\right] \left( 1+x \right)^{n} = \left[x^{k}\right] \left( 1+x \right)^{n-1} + x \left( 1+x \right)^{n-1} 
 = \left(\left[x^{k}\right] \left( 1+x \right)^{n-1}\right) + \left( \left[ x^k\right]x \left( 1+x \right)^{n-1} \right) \nonumber
\\* = {n-1 \choose k} + \left[x^{k-1}\right] \left( 1+x \right)^{n-1} = {n-1 \choose k} + {n-1 \choose k-1} \nonumber
%\begin{flushleft}
\end{align}
\end{proof}

\begin{proof} [Combinatorial]
	
	Let ${n}\choose {k} $ be the number of $k$-subsets of $\{1,2,\ldots, n\} = |S_{n,k}|$ where
	$S_{n,k}$ is the set of $k$-subsets of $\{1,2,\ldots, n\}$.
	Let $T_{n,k}$ be the set of $k$-subsets of $\{1,2,\ldots, n\}$ which contain the element $n$.
	
	$S_{n,k} = S_{m-1,k} \dot{\cup} T_{n,k}$
	where $\dot{\cup}$ is the disjoint union, that is $S_{n-1,k} \cap T_{n,k} = \emptyset$.
	
	Now, $|T_{n,k}| = |S_{n-1,k-1}|$, indeed there is a natural bijection (delete the element $n$).
	Hence $|S_{n,k}| = |S_{n-1,k}| + |S_{n-1,k-1}|$, and so
	\[{{n}\choose{k}} = {{n-1}\choose{k}} + {{n-1}\choose{k-1}}\]
	as required.
\end{proof}
\subsection{Sets of Binary Strings via regular languages:}

Take a nice language $S$; denote by $S^*$ the set of all words formed by concatenating a finite number of elements of $S$. ``nice'' means that each word is obtained uniquely .

\underline{Example:} $S = \{0,1\}$. $S^* = \{\epsilon, 0,1,00,01,10,11,000,001,010,011,100,110,111,\ldots\}$,
where $\epsilon$ is the empty string.

\underline{Bad Example:} The set $\{0,1,01\}$ is not \underline{nice} since the string $01$ is obtained as $01$ and also $(0)(1)$, so not obtained uniquely.

Is the set $\{0,01\}$ nice? yes. We can represent it the following ways:

	\[0^{a_1} \dot{\cup} 0^{a_1}10^{a_2}\dot{\cup} 0^{a_1}10^{a_2}10^{a_3} \dot{\cup} \cdots\]
	
	\[0^{b_1} \dot{\cup} 0^{b_1}(01)0^{b_2} \dot{\cup} 0^{b_1}(01)0^{b_2}(01)0^{b_3} \dot{\cup} \cdots\]
	
Back to considering binary sequences. $S = \{0,1\}$, and 
	\begin{eqnarray*} S^* &=& \text{ all binary sequences}\\
												&=& \{0\}^* \{1\{1\}^*0\{0\}^*\}^*\{1\}^*\\
												&& \text{ which we'll write}\\
												&=& 0^*(11^*00^*)^*1^*
	\end{eqnarray*}
	
	What about the set of binary strings without consecutive $1$'s?
	
	\[\{\epsilon, 0, 1, 00, 01, 10, 000, 001, 010, 100, 101, \ldots\} = 0^*(100^*)^*(\epsilon \cup 1)\]
	
	Let's see if we can compute the generating funciton for such strings with $x$ marking length.
	\[1 + 2x + 3x^3 + 5x^2 + \cdots\]
	
	$0^*$ has generating function $1 + x + x^2 + x^3 + \cdots = \frac{1}{1-x}$. $100^*$ has generating function $\frac{x^2}{1-x}$. So, $(100^*)^*$ has generating function
		\[
			1 + \left(\frac{x^2}{1-x}\right) + \left(\frac{x^2}{1-x}\right)^2 + \left(\frac{x^2}{1-x}\right)^3 + \cdots = \frac{1}{1-\frac{x^2}{1-x}}
		\]
		
		$\epsilon \cup 1$ has generating function $1+x$.
		So, $0^*(100^*)^*(\epsilon \cup 1)$ has generating function
			\[
				\frac{1}{1-x} \cdot \frac{1}{1-\frac{x^2}{1-x}} \cdot 1+x = \frac{1+x}{1-x-x^2}.
			\]
		
		How can we get the Fibonacci numbers from this???

\end{flushleft}

\end{document}
