Posts tagged math

Another talk about the Futurama Theorem

On December 7, 2011, I gave my second talk about the Futurama Theorem during the Plymouth State University Mathematics Seminar.  The Futurama Theorem is a theorem about the symmetric group that was developed for and proved in the episode “The Prisoner of Benda” for the TV show Futurama. The theorem was proved by show writer Ken Keeler, who has a PhD in applied mathematics from Harvard.  

Image taken from http://theinfosphere.org/

The first time I gave a talk about this theorem was during the Mathematics Forum at Gordon College just few weeks earlier.  You can find my blog post about my first talk by going here.

During the episode, Professor Farnsworth and Amy invent a mind swapping machine and after they swap minds, they realize that the machine cannot be used on the same pair of bodies again. After several characters swap minds, they are confronted with the problem of putting everyone’s mind back where it belongs. The Futurama Theorem proves that regardless of how many mind swaps have been made, all minds can be restored to their original bodies using only two extra people. If you want to know more, check out the slides.

The slides for the second talk are very similar to the first set, but there are a few differences:

  • The second talk is shorter.  I trimmed a few things from the first talk that were not completely necessary.
  • I’ve improved the wording in a few spots.
  • In the second talk, multiplication of permutations is right to left.

As with the first talk, I used deck.js to create the slides.  This allows you to view the slides directly in your web browser. To advance the slides, just use your arrow keys. Also, note that I used MathJax to typeset all of mathematical notation.

Combinatorics and graph theory are cool

This semester I am teaching a course for freshman mathematics majors.  The course is called Introduction to Formal Mathematics.  One purpose of the course is to develop a tight-knit cohort of mathematics majors and another purpose is show them that mathematics is about more than “solve for $x$.” We do some problem solving, a little proof writing, and introduce them to a few topics they may or may not see in future courses.  The course is a lot of fun. Feel free to check out the course webpage.  

The last couple weeks we have been doing a little combinatorics and some graph theory. Today one of the students remarked something to the effect, “I liked math before, but this stuff is just so cool.”  I agree.  There is no reason why we couldn’t teach these topics to high school students or even middle school students.  Unfortunately, we’re too obsessed with trying to make sure students pass standardized tests and can take calculus in high school.

Talk about the Futurama Theorem

On November 3, 2011, I gave a talk in the Mathematics Forum at Gordon College about the Futurama Theorem. The Futurama Theorem is a theorem about the symmetric group that was developed for and proved in the episode “The Prisoner of Benda” for the TV show Futurama. The theorem was proved by show writer Ken Keeler, who has a PhD in applied mathematics from Harvard.

During the episode, Professor Farnsworth and Amy invent a mind swapping machine and after they swap minds, they realize that the machine cannot be used on the same pair of bodies again. After several characters swap minds, they are confronted with the problem of putting everyone’s mind back where it belongs. The Futurama Theorem proves that regardless of how many mind swaps have been made, all minds can be restored to their original bodies using only two extra people. If you want to know more, check out the slides.

As a side note, this is the first talk that I have given using deck.js, which allows you to view the slides directly in your web browser. To advance the slides, just use your arrow keys. Also, note that I used MathJax to typeset all of mathematical notation and I was able to embed a single cell instance of Sage to do some live computations.

Mathematics, rightly viewed, possesses not only truth, but supreme beauty — a beauty cold and austere, like that of sculpture, without appeal to any part of our weaker nature, without the gorgeous trappings of painting or music, yet sublimely pure, and capable of a stern perfection such as only the greatest art can show. The true spirit of delight, the exaltation, the sense of being more than Man, which is the touchstone of the highest excellence, is to be found in mathematics as surely as poetry.
Bertrand Russell, Mysticism and logic

Quick LaTeX Guide

This page is a slimmed down version of a guide that I wrote for my students. The original page is located here However, I’m hoping that this post will be of general interest to those just getting started with $\LaTeX$.

For information on using $\LaTeX$ via ScribTeX or installing $\LaTeX$ on your own computer, go to the bottom of this page.

What is LaTeX?

LaTeX (pronounced “lay-tech”, or sometimes “la-tech”) is a markup language that is the standard for typesetting mathematics.

The Basics

You can insert mathematical expressions within your text (i.e., “inline”) by using code of the form:

$your-mathematical-expression-here$

The pair of dollar signs that frame your mathematical expression are called delimiters and indicate where the expression begins and ends. You must have an opening and closing delimiter.

For instance, this sentence — which includes the equation $x^{2}+y^{2} = r^{2}$ — is typeset as

For instance, this sentence -- which includes the equation $x^{2}+y^{2} = r^{2}$ -- is typeset as

Notice that I didn’t enclose every individual symbol with dollar signs, but rather the entire string of symbols.

You can also have your mathematical expressions separated from the text and placed on their own line for emphasis. For instance, if you wanted to type:

Here’s some fancy mathematics that I don’t really understand \[ \log \zeta(s) = s\int_{2}^{\infty} \frac{\pi(x)}{x(x^{s}-1)}~dx = \log \prod_{p} (1-p^{-s})^{-1}. \] Man, that’s complicated!

then you’d use the code

Here's some fancy mathematics that I don't really understand
\[
\log \zeta(s) = s\int_{2}^{\infty} \frac{\pi(x)}{x(x^{s}-1)}~dx = \log \prod_{p} (1-p^{-s})^{-1}.
\]
Man, that's complicated!

In this case, we are using the pair of delimiters \[ and \] as opposed to dollar signs. This works in ordinary $\LaTeX$.

Here are a few things to keep in mind:

  • All inline mathematical notation must be framed by dollar signs.

  • All displayed mathematical notation (i.e., on its own line and centered) is of the form \[ math-stuff \].

  • All special symbols in $\LaTeX$ are of the form \some-command. Once you’ve used $\LaTeX$ enough, you can almost guess what the command is for a certain symbol.

Some Examples

Here are a few more examples that illustrate some of the mathematical notation we may want to use:

Expression you want Code you type
$\int_a^b f(x)\; dx=F(b)-F(a)$ $\int_a^b f(x)\; dx=F(b)-F(a)$
$n \in \mathbb{N} \subseteq \mathbb{Z}$ $n \in \mathbb{N} \subseteq \mathbb{Z}$
$\sum_{i=1}^n i^2=1^2+2^2+ \cdots +n^2$ $\sum_{i=1}^n i^2=1^2+2^2+ \cdots +n^2$
$\sqrt{2} \notin \mathbb{Q}$ $ \sqrt{2} \notin \mathbb{Q}$
$2\in \{2,3,4\} \cap \{1,2,3\}$ $2\in \{2,3,4\} \cap \{1,2,3\}$
$f:A\to B$ $f:A\to B$
$f(x_1)\neq f(x_2)$ $f(x_1)\neq f(x_2)$
$\{a_n\}_{n=1}^{\infty}$ $\{a_n\}_{n=1}^{\infty}$
$(f\circ g)(x)=f(g(x))$ $(f\circ g)(x)=f(g(x))$
$\frac{a}{b}+\frac{c}{d}\neq \frac{a+b}{c+d}$ $\frac{a}{b}+\frac{c}{d}\neq \frac{a+b}{c+d}$

Greek Letters

Greek letters are typeset using \name: for example, \theta produces \(\theta\) (as long as you also include the appropriate delimiters).

Braces

In order to produce a left or right brace, the brace needs to be preceded by a backslash. For example, $\mathbb{N}=\{1,2,3,\ldots\}$ is typeset with $\mathbb{N}=\{1,2,3,\ldots\}$ and notice the use of \{ and \}, which are needed to obtain the braces for the set.

Display Style

Using $\LaTeX$ allows you to do fancy things like the following:

\begin{align*} \sum_{i=1}^{k+1}i & = \left(\sum_{i=1}^{k}i\right) +(k+1) \newline & = \frac{k(k+1)}{2}+k+1 & (\text{by inductive hypothesis})\newline & = \frac{k(k+1)+2(k+1)}{2}\newline & = \frac{(k+1)(k+2)}{2}\newline & = \frac{(k+1)((k+1)+1)}{2}. \end{align*}

which is typeset using

\begin{align*}
\sum_{i=1}^{k+1}i & = \left(\sum_{i=1}^{k}i\right) +(k+1)\newline
& = \frac{k(k+1)}{2}+k+1 & (\text{by inductive hypothesis})\newline
& = \frac{k(k+1)+2(k+1)}{2}\newline
& = \frac{(k+1)(k+2)}{2}\newline
& = \frac{(k+1)((k+1)+1)}{2}.
\end{align*}

Quotation Marks

To correctly typeset double quotation marks in a full-fledged $\LaTeX$ document, you should use the following syntax; otherwise, the left pair of quotes will be backwards.

``stuff you are quoting"

To obtain the symbols on the left, look for the key on your keyboard in the upper left corner that also has the the tilde (~) on it. You’ll need to hit this key twice. Using incorrect quotation marks is one of the most common mistakes that I see in documents written using $\LaTeX$.

More Information

A really cool tool for looking up \(\LaTeX\) symbols is Detexify, which allows you to draw a picture of the symbol for which you are looking. Also, Dave Richeson of Dickinson College has put together a really great “cheat sheet”, which you can find here.

For a list of some of the more common \(\LaTeX\) symbols, see here. If you want to see a really, really, really long list of symbols, go here.

Lastly, you may find the following resources useful:

Using a LaTeX Editor

Writing a $\LaTeX$ document is much more complicated than just starting to write. There are a whole host of things that you need to put at the top of your document and this can be rather intimidating at first. The big picture is that the content of your document comes after the line \begin{document}. All of the stuff before this line is called the preamble and when you first start learning $\LaTeX$, you should just ignore this stuff. Below, I’ve included some templates to get you started. In the beginning, don’t worry too much about all of the complicated stuff in the preamble.

The .tex file is where you type the content of your file. You won’t see the output until you compile it. If you’ve done everything correctly, the output after compiling will be a PDF. I highly recommend compiling often to see what you’ve got so far and to make it easier to find your syntax errors if you have any.

When you are typing the content of your document, you will partition your content into various environments. Examples of environments include: theorem, proof, align*, itemize, enumerate, but there are lots more. Every environment begins with \begin{environment-name} and ends with \end{environment-name}. For example, see the example above that uses the align* environment. As another example, if you wanted to write the statement of the theorem that divides is transitive, you would write:

\begin{theorem}
Let $a,b,c\in \mathbb{Z}$. If $a|b$ and $b|c$, then $a|c$.
\end{theorem}

Note: $\LaTeX$ ignores whitespace. What this means is that extra spaces and carriage returns (i.e., hitting the space bar or return/enter key repeatedly) have no impact on the output of the .tex document. You can adjust vertical spacing using commands like: \newline, \bigskip, \medskip, \smallskip, \vspace{1cm}, \vfill. If you experiment with these commands, you’ll be able to see what impact they have.

Installing LaTeX on Your Own Computer

Installing on a Mac

If you have a Mac, installing and using $\LaTeX$ is easy. All you need to do is go here and download the latest version of the MacTeX distribution (filename should be MacTeX.mpkg.zip). Once you have downloaded the package, double-click the installer (if it doesn’t run automatically). If you follow the instructions during the installation, you will be provided with the $\LaTeX$ “backend” (which you can safely ignore) and the “frontend” editor TeXShop (which will be located in a folder called TeX in your Applications folder). TeXShop will be the default application for editing any file with a .tex extension. To get started, I suggest opening up and playing with the homework template from my public ScribTeX folder. After editing the file, click “Typeset” and if you don’t have any errors, TeXShop will render the corresponding PDF. I recommend clicking “Trash Aux Files” in the Console window after you are done editing. If you have questions about using TeXShop on a Mac, please ask!

Installing on a PC

To get up and running with $\LaTeX$ on a computer running Windows, you need to install two things. First, install the MiKTeX “backend”, located here.

Click the “download” link at the top of the list under MiKTeX Releases and following the instructions. Next, download TeXnicCenter by going here.

Download the latest version and proceed according to the instructions. TeXnicCenter will now be your default application for editing any file with a .tex extension. You can safely ignore the MiKTeX “backend”.

Installing on a computer running Linux

Most Linux distributions (e.g., Ubuntu, Debian, Fedora, etc.) use a package manager to install and update software. (Don’t use a web browser to look for LaTeX online. Your computer already knows where to go online to find LaTeX and how to install it.) These instructions assume you are using Ubuntu, but similar actions will work on any Linux distro with a modern package management system. Using your package manager (“Ubuntu Software Center” or similar in your applications menu) and assuming you have an internet connection, you need to search for and install two things:

  • A LaTeX backend: For the most basic install, search for and install “texlive-base”. For a more comprehensive install, search for an install “texlive-full”.

  • A LaTeX editor: Search for and install “Kile”. Kile is the editor of choice for many Linux users writing LaTeX.

After Ubuntu installs these, you should find Kile in your applications menu and it should be capable of calling the various LaTeX programs automatically.

Credits

This page is an adaptation of Andy Schultz’s Quick LaTeX Guide and Elisha Peterson’s LaTeX Help. Thanks to Jason B. Hill for providing instructions for installing $\LaTeX$ on a computer running Linux. The mathematical symbols on this page were typeset using MathJax.