%=======================================================================
%  COMPUTER COMMUNICATION NETWORKS, LECTURE NOTES
%=======================================================================
\def\lectureNr{{0}}   %enter number!
\def\lecture{How to write the notes} %select and enter title
\def\scribe{Student Name}           %enter your name

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% --------------------------------------------------------------
% DON'T CHANGE ANYTHING UNTIL THE NEXT LINE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\def\solitude{1} %KEEP THIS WAY!!!


%
%\newcommand{\LectureDetails}[3]{
%\chapter{{#2}}
%% \chapter{Lecture {#1}: {#2}}
%\begin{flushright}
%{\large Notes taken by {#3}}
%\end{flushright}}
%
%\newcommand{\LectureDetailS}[6]{
%\chapter{{#2}}
%% \chapter{Lecture {#1}: {#2}}
%\begin{flushright}
%{{\large Notes taken by {#3} ({#4})} \\ {\large and {#5} ({#6})}}
%\end{flushright}}
%


\ifnum\solitude=1
  \documentclass[times, 10pt,letter]{article}
  \usepackage{times}
  \usepackage{fullpage,amsfonts,latexsym,graphics,amssymb}
  \usepackage{amsmath,amsthm,amstext,url}

  \title{Quantum Computation\thanks{\
         Lecture Notes for a course given by Stephen F. Bush
         at SUNY.} \\
         Lecture \lectureNr: \lecture}
  \author{Notes taken by \scribe}
  \date{August 2007}
%  \input{preamble}
\else
  %\LectureDetails{\lectureNr}{\lecture}{\scribe}
   \chapter{Lecture \lectureNr: \lecture}
   \begin{flushright}
   {\large Notes taken by \scribe}
   \end{flushright}
\fi



\ifnum\solitude=1

%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Theorems & Definitions


\newtheorem{theorem}{Theorem}


\newtheorem{claim}[theorem]{Claim}
\newtheorem{subclaim}{Claim}[theorem]
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{conjecture}[theorem]{Conjecture}
\newtheorem{observation}[theorem]{Observation}


\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{construction}[theorem]{Construction}
\newtheorem{example}[theorem]{Example}
\newtheorem{algorithm1}[theorem]{Algorithm}

\newenvironment{algorithm}{\begin{algorithm1}\ \\
    \vspace{-0.2cm}}{\end{algorithm1}}

%\newcommand{\qed}{\begin{flushright}
%\rule{.1in}{.1in} \end{flushright}  }


%\newenvironment{proofsk}{\nopagebreak
%\noindent{\bf Proof Sketch:}}{ \qed \par \medskip}

\newenvironment{proofsk}{\begin{proof}[Proof Sketch:]}
{\end{proof}}


\newenvironment{smallproof}{\nopagebreak \begin{quote} %
\begin{small} \noindent{\bf Proof:}}{ \qed \par %
\end{small} \end{quote} \medskip}

\newenvironment{note}{\nopagebreak \begin{quote} %
\noindent{\bf Note:}}{%
\end{quote} \medskip}

\newenvironment{notes}{\nopagebreak \begin{quote} %
\noindent{\bf Notes:} \par%
\begin{itemize}}{%
\end{itemize}\end{quote} \medskip}

\newenvironment{summary}{\begin{quote} {\bf Summary:}}{\end{quote}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% General Macros

\newcommand{\eqdef}{\stackrel{def}{=}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\bits}{\{0,1\}}
\newcommand{\inr}{\in_{\mbox{\tiny R}}}
\newcommand{\getsr}{\gets_{\mbox{\tiny R}}}
\newcommand{\st}{\mbox{ s.t. }}
\newcommand{\etal}{{\it et al }}
\newcommand{\into}{\rightarrow}

\newcommand{\Ex}{\mathbb{E}}
\newcommand{\To}{\rightarrow}
%\newcommand{\vec}[1]{\overline{\mathbf{#1}}}
\newcommand{\e}{\epsilon}
\newcommand{\ee}{\varepsilon}
\newcommand{\ceil}[1]{{\lceil{#1}\rceil}}
\newcommand{\floor}[1]{{\lfloor{#1}\rfloor}}
\newcommand{\angles}[1]{\langle #1 \rangle}

\fi


%-------------------------------------------------------------
% YOU MAY ADD ADDITIONAL (PRIVATE) MACROS HERE,
% BUT DO START EACH WITH YOUR INITIALS.
% FOR EXAMPLE, IF YOUR NAMES ARE ARIK SHARON AND SHIMON
% PERES THEN START EACH MACRO WITH ASSP.
% EXAMPLE: \newcommand{\ASSPz2}{\Z_2}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\ifnum\solitude=1
\begin{document}
\maketitle
\fi



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% BEGINNING OF DOCUMENT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{summary}
This document describes how to write lecture notes for the course.
\end{summary}

\section{Instructions}


\begin{note} This document only explains the technical side
to writing the notes using \LaTeX. For writing style issues you
would have to look elsewhere. If you want to learn by examples you
can take a look at the lecture notes for Oded Goldreich's
complexity course on\\
\url{http://www.wisdom.weizmann.ac.il/~oded/cc.html}.
\end{note}

You should write the notes using \LaTeX. If you work on a PC you
can get \LaTeX\ from {\tt www.miktex.org } and a \LaTeX\ editor
from {\tt www.winedt.com}.

\vspace{0.5cm}

To write the notes you should modify the file {\tt lecture.tex}.
You should do the following:

\begin{enumerate}
\item Change the first three macros in the file (lines 4-6) to
the current lecture number, the lecture's title and your name(s).
For example in the current document these macros are defined as
follows:

\begin{verbatim}
\def\lectureNr{{0}}   %enter number!
\def\lecture{How to write the notes} %select and enter title
\def\scribe{Boaz Barak}           %enter your name
\end{verbatim}

\item write the notes between the comments\footnote{\LaTeX\ comments
start with a \% at the beginning of the line.}

\begin{verbatim}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% BEGINNING OF DOCUMENT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{verbatim}

and

\begin{verbatim}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% END OF DOCUMENT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{verbatim}

When you download this file, it will contain the current document.
You can delete everything between these two comments. Just start
your text with a summary (written between {\verb \begin{summary} }
and {\verb \end{summary} }).

\end{enumerate}



\section{Examples}

This section contains some examples of how to use the supplied
macros.

The \textbf{Theorem} environment allows to write theorems. Use the
commands {\verb \begin{theorem} } and {\verb \end{theorem} }. For
example:

\begin{theorem} A bipartite graph $G = (V_1,V_2,E)$ has
a perfect matching if and only if for any set $S \subseteq V_1$ it
is the case that $|\Gamma(S)| \geq |S|$.
\end{theorem}

was written using the following commands:

\begin{verbatim}
\begin{theorem} A bipartite graph $G = (V_1,V_2,E)$ where $|V_1|=|V_2|=n$, has
a perfect matching if and only if for any set $S \subseteq V_1$ it
is the case that $|\Gamma(S)| \geq |S|$.
\end{theorem}
\end{verbatim}

There are similar environments for lemmas, claims, definitions,
corollaries, conjectures, constructions, examples, and algorithms.


There's also a \textbf{proof} environment for the proofs of
theorems and lemmas. It is used in the following
way:\footnote{This is not intended as an example for how to write
the proofs themselves!}

\begin{proof} For $x \in V_1,y\in V_2$, define $x \prec y$
if $(x,y) \in E$. This is a partial order, where any chain in this
order is an edge. By Dilworth's Lemma there is a covering of $V_1
\cup V_2$ by $n$ chains (i.e., a perfect matching) if there
is no anti-chain of length $n+1$. Note that if $A = A_1 \cup A_2$
is an anti-chain (where $A_i = A \cap V_i$) then $\Gamma(A_1)
\cap A_2 = \emptyset$. Yet this is impossible for $A$
such that $|A|=n+1$ since
\[
|\Gamma(A_1)| + |A_2| \geq |A_1| + |A_2| > n = |V_2|
\]
\end{proof}

which was produced using

\begin{verbatim}
\begin{proof} For $x \in V_1,y\in V_2$, define $x \prec y$
if $(x,y) \in E$. This is a partial order, where any chain in this
order is an edge. By Dilworth's Lemma there is a covering of $V_1
\cup V_2$ by $n$ chains (i.e., a perfect matching) if there
is no anti-chain of length $n+1$. Note that if $A = A_1 \cup A_2$
is an anti-chain (where $A_i = A \cap V_i$) then $\Gamma(A_1)
\cap A_2 = \emptyset$. Yet this is impossible for $A$
such that $|A|=n+1$ since
\[
|\Gamma(A_1)| + |A_2| \geq |A_1| + |A_2| > n = |V_2|
\]
\end{proof}
\end{verbatim}

There's also a \textbf{proof sketch} environment.

\begin{proofsk} Use the Min-Cut Max-Flow Theorem.
\end{proofsk}

which was produced using
\begin{verbatim}
\begin{proofsk} Use the Min-Cut Max-Flow Theorem.
\end{proofsk}
\end{verbatim}

You can see more macros by examining this file. If you want to
define your own macros then use your initials as a prefix. For
example, I would define the macro
\begin{verbatim} \newcommand{\BBLa}{\Lambda} \end{verbatim}
instead of
\begin{verbatim} \newcommand{\La}{\Lambda} \end{verbatim}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% END OF DOCUMENT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\ifnum\solitude=1
\end{document}

\fi

