\documentclass[12pt]{article}
 \usepackage[top=2cm, bottom=2cm, left=2cm, right=2cm]{geometry} 
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{lgarron}
\usepackage{color}
\usepackage{ stmaryrd }
\usepackage{hyperref}

\DeclareSymbolFont{extraup}{U}{zavm}{m}{n}
\DeclareMathSymbol{\heart}{\mathalpha}{extraup}{86}
\DeclareMathSymbol{\diamond}{\mathalpha}{extraup}{87}
\DeclareMathSymbol{\spade}{\mathalpha}{extraup}{81}
\DeclareMathSymbol{\club}{\mathalpha}{extraup}{84}


\usepackage{fancyhdr}
\pagestyle{fancy}

\def\und#1#2{{\underset{#1}{\underbrace{#2}}}}


\hypersetup{pdfborderstyle={/S/U/W 1},pdfborder=0 0 1} 

\def\homeworkname{{Lucas Garron \& Tiago Szvarca}}
\def\homeworkcoursenum{{Math 102}}
\def\homeworkcoursename{{$\club\diamond\heart\spade$ Mathematics \& Magic}}
\def\homeworknum{{April 03, 2012}}

\title{{\homeworkcoursenum} ({\homeworkcoursename}) Course Notes\\{\homeworknum}}
\author{\homeworkname}
\fancyhead[CO]{{\homeworkname} -- {\homeworkcoursenum} ({\homeworkcoursename}) -- {\homeworknum}\\}




\newenvironment{mylist}[1]%
  {\begin{list}{}{\settowidth{\labelwidth}{\textbf{#1}}
   \setlength{\leftmargin}{\labelwidth}
   \addtolength{\leftmargin}{\labelsep}
   \renewcommand{\makelabel}[1]{\textbf{\hfill##1}}}}%
  {\end{list}}
  
  
\begin{document} 

\maketitle

These notes are available at \href{http://stanford.garron.us/class/math102/}{http://stanford.garron.us/class/math102/}

\section{Structure of \emph{Math 102}}

\subsection{Course Information}

\begin{mylist}{new Document}

\item[Instructor:] Persi Diaconis
\item[Class:] Tue, Thu 12:50 PM - 2:05 PM
\item[Office Hours:] Tue, Thu 2:15 PM - 3:15 PM in 383-D (``D for Diaconis'')
\item[Email:] none (leave a note or a phone number in Persi's mailbox)
\end{mylist}

\subsection{Syllabus}

\begin{enumerate}
\item Hummer's Tricks, Introduction to Groups, Parity

\begin{itemize}
\item {\bf First Assignment} due (see section \ref{sec:first} below).
\end{itemize}

\item Shuffling Cards
\item Topology (e.g. tying a knot in a rope without letting go)

\item Magic (history, lore, etc.)

\item Performance

\begin{itemize}
\item {\bf First Paper} due (see section \ref{sec:perform} below).
\end{itemize}

\item De Bruijn sequences
\item Algebra and Card Tricks
\item Finite Fields
\item Juggling
\item Martin Gardner

\begin{itemize}
\item {\bf Final Project} due (see section \ref{sec:martin} below).

\end{itemize}


\end{enumerate}

\subsection{Textbook}

\href{http://www.amazon.com/Magical-Mathematics-Mathematical-Animate-Tricks/dp/0691151644/ref=sr_1_1?ie=UTF8&qid=1333483688&sr=8-1}{Magical Mathematics}, by Persi Diaconis and Ron Graham

\subsection{Grading}

\begin{itemize}
\item $15\%$ - One day of notes.
\item $25\%$ - First Paper (Perform a Magic Trick)
\item $50\%$ - Final Paper (Extend a Column by Martin Gardner)
\item $10\% \to \infty \%$ - Participation
\end{itemize}

\subsection{First Assignment}
\label{sec:first}

Write a page about

\begin{itemize}
\item How much math you know.
\item How much magic you know.
\item What you hope to get from the course.
\end{itemize}

Turn into Persi's mailbox in the math building.

\subsection{First Paper (Perform a Magic Trick)}
\label{sec:perform}

\begin{itemize}
\item Find a good mathematical magic trick, either from one of Martin Gardner's books or \emph{Card Column} on the web. [\href{http://www.maa.org/columns/colm/}{Card Colm}?]
\item a) Explain clearly how it works. ($\leq 5$ page paper)
\item b) Make some development of your own.
\item c) Perform it in class ($\leq 5$ minutes)
\end{itemize}


\subsection{Final Paper (Extend a Column by Martin Gardner)}
\label{sec:martin}

\begin{itemize}
\item Select a \emph{Mathematical Games} column by Martin Gardner about magic tricks.
\item Find the folders in the \href{http://searchworks.stanford.edu/view/4822392}{Martin Gardner archives} in \href{http://library.stanford.edu/depts/spc/spc.html}{Special Collections} at Green Library.
\item Find something ``new'' (that didn't make it into the column).
\item Bring it to life.
\end{itemize}

\section{Let's do a Card Trick! (Hummer's Trick)}

\subsection{Directions}


\begin{enumerate}
\item Take four cards, and select one.
\item Stack the cards face-down, and place the selected one on the bottom.
\item Take the top card, put it on the bottom.
\item Take the top card, turn it over.
\item Give the cards a cut anywhere, flip the top two cards together.
\item Repeat the last step as often as desired.
\item Take the top card, put it on bottom.
\item Take the top card, turn it over, put it on the bottom.
\item Take the top card, put it on bottom.
\item Take the top card, turn it over.
\item Fan the cards. One should be facing in a different direction from the others: the original card.
\end{enumerate}


\subsection{Notation}
Say we have $n$ cards labeled $1, 2, 3, ..., n$, each facing up or down.

We can write a sample arrangement as follows:

\[\ov{2}~\ov{1}~4~3\]

Each card is facing up when there is a bar over it.

\subsection{How many distinct arrangements are possible?}

There are:
\[n! \* 2^n\]

\begin{itemize}
\item $n!$ is the number of ways of arranging (permuting) the values
\item $2^n$ is the number of ways we could arrange a given 
\end{itemize}

It turns out that the arrangements correspond to the group of symmetries of an $n$-dimensional hypercube.

{\theorem
From all cards face down, starting in any order, ``turn over 2 and cut'' can't give you all of these.

More precisely: Only arrangements with an even number of cards face up can occur.
}

{\proof
The claim is true at the start (all cards face down), and cuts don't change the number of cards facing up.

What about ``turn over 2 and cut''?
There are four possibilities for the directions of the top two cards
}\\

So: At most $n! \* 2^{n-1}$ arrangements are possible.

\subsection{History and Anecdotes}

This trick was invented by Bob Hummer. Some anecdotes about Bob from Persi:

\begin{itemize}
\item He had a trick where he threw the cards against a window, so that the deck shattered, and the chosen card was stuck to the window... on the outside.
\item He also had a way to throw a card in the air so it would turn 360 degrees in the air.
\item When he stayed some place, he used the bed to lay out cards. When Martin(?) asked him where he slept, Bob replied: ``On the floor.''
\end{itemize}


\section{Variations on a Trick by Bob Hummer}

\subsection{Variation 1}

\begin{enumerate}
\item Take 8 cards
\item Turn the top two cards over, cut, repeat.
\item Take out every other card (i.e. cards $\#2, \#4, \#6, \#8$ from top) together in a pile, turn them over, and put them on top.
\item Four cards are facing up, four are facing down
\end{enumerate}

%[Side note: Take some coins, split them into ]

\subsection{Variation 2}

Now try it this way:

\begin{enumerate}
\item Alternate all the cards face-up, face-down.
\item Turn the top two cards over, cut, repeat.
\item The card orientations stay alternating.
\end{enumerate}

\subsection{Variation 3}

\begin{enumerate}
\item Take all the cards of two values and alternate them, e.g. 8-queen-8-queen-8-queen-8-queen.
\item Turn the top two cards over, cut, repeat.
\item Take out every other card (i.e. cards $\#2, \#4, \#6, \#8$ from top) together in a pile, turn them over, and put them on top.
\item All the cards of one value are facing up, the others are facing down
\end{enumerate}

\subsection{Questions}
\subsubsection{Math Problem}
Which arrangements can we obtain using there Hummer shuffles?
\subsubsection{Magic Problem}
Can a good trick be made out of this?

(See a chapter in the book.)

\section{Martin Gardner's Favorite Trick}

\subsection{Directions}

\begin{enumerate}
\item Take four cards
\item Rip them in half vertically, and place them in a face-up pile and a face-down pile.
%\item Take the words GARDNER, PERSI, MAGIC
\item Spell out the word GARDNER.

\begin{itemize}
\item For each letter you spell, pick a pile and move the top card of that pile to the bottom
\end{itemize}

\item Take the top card from each pile, and put them onto the table together face-down.

\item Repeat the last two steps with the word PERSI.
\item Repeat again with the word MAGIC.
\item The two remaining pieces are from the same card.
\item In fact, each pair on the table is also from the same card.

\end{enumerate}

\subsection{It's a Swindle!}
Takeaway: This is not a trick, it's a actually ``swindle''. Exercise: Figure out how it works.




\end{document}

