Monday, 24 February 2014

The making of Barry Cipra

On the second of October 2013 I got the chance to meet up with mathematical journalist Barry Cipra. He is a regular contributor to SIAM news as well as a correspondent for Science magazine. He writes the “What’s Happening in the Mathematical Sciences” series, and is the author of “Misteaks... and How to Find Them Before the Teacher Does: A Calculus Supplement”.

He was in Oxford to cover the opening of the new Mathematical Institute and the accompanying Clay conference which presented talks on the cutting edge of pure mathematics. However, my interest was piqued when he gave a talk called
“The benefits of not paying attention”.
Being a huge maths puzzle fan I turned the tables on Barry and so the reporter became the reported.

Over the next few weeks I will present Barry’s interview, in which we touch on: his history, his suggestions for people trying to break in to science journalism and, finally, some puzzles that he created when his attention should have been elsewhere.
________________________________________________________________
________________________________________
Since your job is to take mathematical ideas and make them understandable to a general audience, could you describe your Ph.D work on modular forms?
Figure 1. Barry Cipra.
There is a famous sequence in a documentary of Fermat’s last theorem, in which a number of eminent mathematicians such as Peter Sarnak and John Conway were asked to describe modular forms… they all just laughed. However, I will try my best.

Modular forms are analytic functions that embody all sorts of number theoretic information. The specific thing I worked on was something called the Shimura lift [1], which allowed us to map modular forms of half integral “weight” to integral weight. Shimura’s original work was incredibly general, but only kicked in when the weight was 5/2, or larger. My work at Maryland was to reduce this to weights of 3/2.

As you can see, my work was very technical. Personally I am impressed at how much I can remember from over 30 years ago!

Where did your career take you after Ph.D?
During my first post-doc at MIT I began talking to a visitor of the chemistry department, who was really a mathematician at heart. We spoke about a problem he was having in ferromagnetism and its links to the Ising model, which is a problem in statistical physics. From our work together I wrote a beginners guide to the Ising model and its underlying mathematics. This led to me receiving a highly complementary letter through the mail, written in shaky handwriting, from a 90 year old Ernst Ising. I really should get the letter out some time to ensure that he really was saying nice things about me. At least I don’t remember him pointing out mistakes.

I then had a string of further post-docs and when I came to the end of my last one I looked around at academic positions and the alternatives of getting a “real job”. Luckily I had a number of contacts who pushed me in a different direction.

When was the decision to move towards journalism? Was it a conscious decision? Or was it a more gradual process?
It was pretty conscious as I’ve always had an interest in writing; ever since grade school. My only formal training was a journalism class I took at my high school and then worked on the school newspaper the following year.

Do you miss doing, rather than reporting, maths?
I still dabble in low level, recreational style problems. I try to come up with problems that may have some deeper connections. Quite a few of the problems I’ve generated are simple to state but defy simple explanations. However, if there is any true significance in my questions, I leave that up to the researcher trying to find the answer.

I did collaborate with some people from St Olaf’s college on a “billiards in polygons” problem, particularly in right angled triangles. We proved that if you started on one of the sides that wasn’t the hypotenuse and shot the billiard ball at a right angle from your chosen starting point then for almost all starting points, the trajectory is periodic.

My main role in all of this was to say,
“I don’t really understand what you just said, could you explain it a bit more?” and then, hopefully, “ah yes, I see we can now make that mathematically rigorous”.
________________________________________________________________
________________________________________
Next time Barry will be giving us a few tips on how best to go about getting into science journalism. See you then.

[1] A a pertinent paper can be found here. Although it is not for the faint hearted, or those without a degree in modular forms, you can clearly see from the first few lines that they use Cipra’s theorem. Sadly, being an applied mathematician I will never have theory named after me.

Friday, 14 February 2014

Be my mathematical Valentine.


Looking for an unusual gift to give your love this Valentine's day? Is the significant figure in your life a mathematician? Realise that you haven't bought anything and quickly need to knock something up? Then look no further as what could be more romantic than mathematics?

The simplest thing you could do is text the one you love with a simple `I <3 U'. However, if your partner really is a mathematician, then I would suggest sending `I/3 < U' instead and let them work out the message.

For those who are willing to go that extra mile (and have Matlab) here are a few suggestions of how to produce a Valentine token with a uniquely numerical twist.

1) The easiest method way to produce a heart is to use parametrized functions as seen in Figure 1. In fact the code to produce the heart in Figure 1 is so simple that I decided to use Matlab's annotation facilities to add an arrow to the picture. The whole code to produce this image can be found below.
Figure 1. Produce a number of values of t spanning $-\pi$ to $\pi$. Calculate the appropriate values of x and y and, finally, plot them. 

2) A slightly different heart shape can be produced using an implicitly defined set of points given by the equation shown in Figure 2. This equation is slightly harder to plot because given a value of x you have to solve a cubic equation to work out the corresponding value of y. Thankfully, we're able to let Matlab bare the brute force work and simply plot the delightful result.
Figure 2. Unlike the previous equation were we were able to calculate x and y explicitly, this equation has no such nice closed form solution, or parametrization.
3) For those of you with a love that cannot be contained within two dimensions there is also a three-dimensional heart shape shown in Figure 3. Once again, this is slightly more difficult than the previous example. Not only do we have to contend with an implicit equation, but it is in three variables, instead of two! In fact I was unable to plot the equation easily using the basic functionality of Matlab, so I resorted to using one of the files from the file exchange, Ezimplot3.
Figure 3. A fully rendered three-dimensional heart produced using Ezimplot3.
4) Finally, the last one has a special place in my heart for a number of reasons. Each year I get my wife n roses for the n years that we have been together. Often I try to vary the type I get. For example, one year I got roses made of wood, another year I got roses made of feathers. Last year I decided to make her a rose using my coding abilities. This is shown in Figure 4.
Figure 4. A rose by any other name would smell like a Turing pattern.
Regular readers will no doubt know that Alan Turing's theory of Morphogenesis is my favourite piece of mathematics. So, I used an image of a rose to form the initial condition of a Turing pattern and you can see the whole evolution of the pattern in Figure 4.

As I say, this animation is very special to me, so unlike the other images, I won't be giving the code out for it. However, for the interested party, the coding behind it is not too difficult. All you need to do it to load a grey scale image into Matlab and use the image values as a two-dimensional network on which you run the reaction-diffusion equations.
________________________________________________________________
________________________________________
CODES
CODE 1
%% Clear variables
clear
close
clc

%% Set up figure size
screen_size = get(0,'screensize');
figure_position =[0 0 500 screen_size(4)/1.2];
h=figure('outerposition',figure_position);

%% Variables
fs=50; %Fontsize
t=linspace(-pi,pi,1000);
x=16*sin(t).^3;
y=13*cos(t)-5*cos(2*t)-2*cos(3*t)-cos(4*t);

%% Plot
area(x,y,'facecolor','r','edgecolor','none')

%% Add in the text
text(0,15,'I','fontsize',fs,'HorizontalAlignment','center','color','b')
text(0,0,{'x=16sin(t)^3';'y=13cos(t)-5cos(2t)-2cos(3t)-cos(4t)'},'fontsize',12,'HorizontalAlignment','center','color',[1,1,1])
text(0,-20,'You','fontsize',fs,'HorizontalAlignment','center','color','b')
text(20,-24,'By Thomas E. Woolley','fontsize',fs/7,'HorizontalAlignment','right','color','k')

%% Add in the arrow
annotation('arrow',[.7.85],[.65 .75],'linewidth',5,'color','k','headstyle','vback3','headlength',30,'HeadWidth',30)
annotation('line',[.3 .4],[.4 .4-0.6667*(.3-.4)],'linewidth',5,'color','k')

%% Tidy up the plot
axis equal
axis([-20 20 -25 20])
set(gcf,'PaperPositionMode','auto')

%% Save
print(gcf, '-r300',['./1D.png'], '-dpng');
________________________________________________________________
CODE 2
%% Clear variables
clear
close
clc

%% Set up figure size
screen_size = get(0,'screensize');
figure_position =[0 0 500 screen_size(4)/1.2];
h=figure('outerposition',figure_position);

%% Variables
fs=30; %Fontsize
[x,y] = meshgrid(-3:.01:3);
f = (x.^2+y.^2-1).^3-x.^2.*y.^3;

%% Plot
contourf(x,y,f,[0 0],'r','linewidth',3)

%% Add in the text
text(0,0.25,{'I am';'implicitly';'yours'},'fontsize',fs,'HorizontalAlignment','center','color','b')
text(0,1.5,'(x^2+y^2-1)^3-x^2y^3=0','fontsize',fs/2,'HorizontalAlignment','center','color','b')
text(1,-1,'By Thomas E. Woolley','fontsize',fs/5,'HorizontalAlignment','right','color','k')

%% Tidy up the plot
axis equal
axis([-2 2 -2 2])
set(gcf,'PaperPositionMode','auto')

%% Save
print(gcf, '-r300',['./Implicit_heart.png'], '-dpng');
________________________________________________________________
CODE 3
%% Clear variables
clear
close
clc

%% Set up figure size
screen_size = get(0,'screensize');
figure_position =[0 0 500 screen_size(4)/1.2];
h=figure('outerposition',figure_position);

%% Variables
fs=20; %Fontsize

%% Variables
f = '(2*x^2+y^2+z^2-1)^3-x^2*z^3/10-y^2*z^3';

%% Plot
ezimplot3(f,[-3 3],200)

%% Add in the text
text(1,-.5,.6,{'You fill all the';' dimensions';'of my life'},'fontsize',fs,'HorizontalAlignment','center','color','y')
text(.7,0,-.8,{'(2x^2+y^2+z^2-1)^3-x^2z^3/10-y^2z^3=0'},'fontsize',fs/2,'HorizontalAlignment','center','color','k', 'rotation', 2)
text(0.5,-.9,-.9,'By Thomas E. Woolley','fontsize',fs/3,'HorizontalAlignment','right','color','k', 'rotation', -75)

%% Tidy up the plot
grid off
axis equal
view([85 20])
set(gcf,'PaperPositionMode','auto')

%% Save
print(gcf, '-r300',['./3D.png'], '-dpng');
________________________________________________________________
________________________________________
This post is dedicated to my wife and best friend. Happy Valentine's day.


Monday, 26 August 2013

Art Benjmain on continued fractions.


This week brings my Art Benjamin related posts to an end. Not only did we discuss Fibonacci sequences, but he also provided me with a lovely interpretation of how continued fractions work and what they represent numerically. His exposition is recounted below.
________________________________________________________________
________________________________________
Here is a typical continued fraction and its simplified form
$$3+\frac{1}{7+\frac{1}{15}}=\frac{333}{106}.$$
Believe it, or not, the numerator and denominator have a combinatorial interpretation. Imagine a strip of squares with one of the numbers in each square (Figure 1).
Figure 1. A strip of three squares containing numbers from the continued fraction. The glass square and the opaque domino.
As with the Fibonacci numbers we want to consider tilings of this strip. This time the square will be made of glass, meaning we can see through it, whereas the domino will be opaque (Figure 1).

As we saw previously there are three ways to tile the board [in Figure 1]. You can tile it with all squares, a domino and a square, or a square and a domino (Figure 2). We’ll say that the weight of the tiling is the product of the numbers that you can see through the glass squares.

Figure 2. All possible weighted tilings of the strip of three numbers using the glass tile and opaque domino.
When you add up all of these tilings you get
$$315+3+15=333,$$
which is the numerator of the fraction.

Now, what about the denominator? Well, clearly the denominator is not influenced by the first number as that is “on top” of the fraction. So, if we ignore the first space and then count the weighted tilings again, we can either have a square and a square, or a single domino (Figure 3). Note that the empty product is counted as one. Adding these together we get 105+1=106, which is the denominator of the fraction.

Figure 3. Weighted tilings after the first number has been eliminated.
So that is a combinatorial way of representing the continued fraction. The top and the bottom are simply counting the weighted tilings. This technique is full generalisable to any length of continued fraction and any numbers you like.
Now suppose I wrote the numbers in reverse so the strip was 15, 7, 3. Notice I haven’t changed the original tilings on this grid so the weighted product will, once again, be 333. This tells you that this continued fraction:
$$3+\frac{1}{7+\frac{1}{15}}$$
will have same numerator as
$$15+\frac{1}{7+\frac{1}{3}},$$
which isn’t obvious from the numbers, but from this visualisation we can immediately spot this.

As above we can finish this calculation by removing the 15 and considering the tiling of a 7, 3 board. The sum of which will be 21+1=22. Thus,
$$15+\frac{1}{7+\frac{1}{3}}=\frac{333}{22},$$
Now isn’t that a fun little way of seeing the fraction?
________________________________________________________________
________________________________________
Over the past few weeks I hope I’ve shown you that Art Benjamin is much more than just a human calculator. His mental arithmetic skills are impressive, but his enthusiasm for mathematics is boundless. I seriously urge you to go see his shows if you get the chance. You will not be disappointed.

Monday, 12 August 2013

Art Benjamin on Fibonacci patterns part 2.


Last time we had a closer look at the Fibonacci numbers. Although Fibonacci justified them through rabbit breeding we saw that they could also arise from a tiling problem. This week Art expands on the original problem he stated:
how do we show
\begin{equation}
f_{n-1}^2+ f_n^2= f_{2n}?\label{Square_addition}
\end{equation}
________________________________________________________________
________________________________________
Let’s look at the square addition identity (1). What does this say? Suppose we have a strip of length $2n$. How many tilings are there? Firstly, by definition, $f_{2n}$. Secondly, a tiling of length $2n$ can be created by breaking the original strip into two halves. How many ways can I tile this broken strip? Well there are $f_n$ ways to tile each half and, so, the number of ways would be $f_n^2$ (Figure 1(a)).

Now, this is not all the tilings of the $2n$ strip though, because it could happen that we can’t split the strip like this because a domino is placed in the middle. Subtracting this domino means that we now have two strips of $n-1$ squares to tile, giving $f_{n-1}^2$ tilings (Figure 1(b)).


Figure 1. Dissecting a strip of length $2n$ into (a) two length $n$ strips, or (b) two length $n-1$ strips and a central domino.
So, of all the tilings of a $2n$ strip $f_n^2$ do not have a domino crossing the middle section and $f_{n-1}^2$ do have a domino crossing the middle section therefore the total is
\begin{equation}f_{n-1}^2+ f_n^2= f_{2n}.\end{equation}
We’ve taken a question and we’ve answered it in two different ways therefore those answers must be the same.

Inductively, the sum of consecutive Fibonacci squares is difficult to prove without proving a much stronger result by induction, from which the formula (1) will be a specific case. To see the more general result consider the following: originally, I broke the strip in half, but there is nothing special about the centre. Suppose I broke a given strip into two pieces. One of length $n$ and one of length $m$, so the length of the whole strip is $n+m$. By definition, the number of ways of tiling this strip is $f_{n+m}$.

Figure 2. Dissecting a strip of length $n+m$ into (a) a strip of length $n$ and a strip of length $m$, or (b) a length $n-1$ strip and length $m-1$, plus a connecting domino.
How many ways can I tile each of these sections? As before there are $f_n\times f_m$ ways (Figure 2(a)). However, this does not consider the possibility that there is a domino crossing the $n$ and $m$ length sections. As before we can remove this domino leaving strips of length $n-1$ and $m-1$ meaning that there are $f_{n-1}\times f_{m-1}$ ways of tiling these two parts (Figure 2(b)). Putting these both together we generate the stronger result,
\begin{equation}f_{n-1}f_{m-1}+ f_n f_m= f_{m+n},\end{equation}
which is the easier result to prove by induction. If $n$ is 1 the result is trivial and then if you induct on $n$ it will be ok, but who needs induction? These pictures tell you what is happening in general.
________________________________________________________________
________________________________________
Next time Art changes topic and gives us an explanation of what continued fractions actually mean. Interestingly, it is still based on this idea of tiling a strip.

Monday, 29 July 2013

Art Benjamin on Fibonacci patterns.


Whilst interviewing Art Benjamin, I found that he could not help highlighting simple and intuitive results from the Fibonacci sequence. I extracted them from the original interview to ensure that they got a treatment that they deserve. If you like these he has written a book called “Proofs That Really Count”, co-authored with Jennifer Quinn. The book contains dozens of mathematical identities, which are proven combinatorially.

This week Art gives us the basics of the Fibonacci numbers.
________________________________________________________________
________________________________________
 Let’s take the Fibonacci numbers:

$f_0$
$f_1$
$f_2$
$f_3$
$f_4$
$f_5$
$f_6$
$f_7$
$f_8$
$f_9$
$f_{10}$
1
1
2
3
5
8
13
21
34
55
89
Now, there are all kinds of fun little patterns within these numbers, for example: if you square and add consecutive Fibonacci numbers you get the even Fibonacci numbers,

$f_0^2+ f_1^2= f_2$
$1^2+1^2=2$
$f_1^2+ f_2^2= f_4$
$1^2+2^2=5$
$f_2^2+ f_3^2= f_6$
$2^2+3^2=13$
$f_3^2+ f_4^2= f_8$
$3^2+5^2=34$
Well, why is that? If you had a formula for the $n^{th}$ Fibonacci number, maybe using square root of five and the golden ratio, you could use algebra to prove that
$$f_{n-1}^2+ f_n^2= f_{2n}.$$
But if we know what these numbers are counting then you will be able to see this identity in a more direct way.

Before we do prove the above formula we need to know a little more about the Fibonacci numbers. What do they count? Consider a strip of $n$ squares. How many ways are there to tile this strip using single squares and dominoes, which are two squares wide (Figure 1).
Figure 1. A strip of $n$ squares are to be tiled using only a single square tile, or a double tile, known as a domino.
I claim that the number of tilings is the $n^{th}$ Fibonacci number. It is easy to check the first few cases. A strip of no squares uses no tiles and this is the only unique tiling. Similarly, a strip of one square can only be covered by a square tile and a two square strip can either be covered with two squares, or one domino, so it has two different tilings. With a strip of three squares it is either: three squares, square-domino, or domino-square, giving three tilings (Figure 2).
Figure 2. (a) Two possible ways of tiling a strip of two squares. (b) Three possible ways of tiling a strip of three squares.

Now consider all the tiling of strip of $n$ squares. Either the strip ends with a square tile, or a domino tile. How many tilings end in a square tile? Well, this is just the tilings of the $n-1$ strip, plus the final square. Similarly, how many end in a domino? This is just the tilings of the $n-2$ strip, plus the final domino. So the total number of tilings of a strip of length $n$ is the number of tilings of the $n-1$ strip, plus the number of tilings of the $n-2$ strip. If we call the number of tiling of the $n$ strip $t_n$ then
$$t_n=t_{n-1}+t_{n-1},$$
so it satisfies the same recursion formula as the Fibonacci sequence. I now claim that any pattern that you can find within the Fibonacci sequence has a similar, simple, maybe clever, combinatorial proof.
________________________________________________________________
________________________________________

Next time Art will use similar techniques to show us how to prove the original identity (1).

Monday, 15 July 2013

Arthur Benjamin, the man, the maths, the magician. Part 2.

Last week I presented the first half of my interview with Arthur Benjamin, where we discussed his mathematical interests. This week we delve a little more deeply into his entertaining persona.
________________________________________________________________
________________________________________

Is the term mathemagic not a contradiction? Magic implies that there is some trick, whereas maths should be a rigorous science. Moreover, maths should be about sharing ideas, whereas magic is about protecting the secret.
I want my audience to say “How did you do that?” and because it is not strictly magic I feel ok with divulging the mathematical secrets. If I’m presenting at a school you’ll get more excitement from hearing the magician part than the mathematics part. I hope it lives up to its promise that I’m doing maths that feels like magic.

Have you ever had to compromise your academia?
Had I gone to a different university that cared exclusively about research and not about teaching and outreach I think I could have published more. I’ve written about 70 papers, but most of them aren’t frontier breaking or paradigm shifting. I’ve just been lucky to be able to work on problems that I’ve found interesting.

If you had to give one up?
Fortunately, I’ve never had to, which is one of the great perks of being in academia, but [heavy sigh] I suppose I would stay with the academia. The entertainment shows I do are very similar each time. My act hasn't changed much in the last 30 years! I could develop new material, but it might feel repetitious. By doing it occasionally I can maintain my enthusiasm.

What does your family think about it?
They’re used to it [big grin].

What mathematical performers do you rate?
There are more people performing entertaining mathematics in the UK than in the US. I see people here like: Matt Parker, Colin Wright, James Grime, Rob Eastaway, Andrew Jeffrey, Sara Santos and Marcus du Sautoy, who are really out there on the streets. I don’t think the US has anything similar. There are many brilliant teachers in the US, but not so many go on the road with it.

There are people who have linked other ways of entertaining through maths such as: Tim Chartier; who does “Maths and Mime”, Colin Adams; who writes mathematical plays, Larry Lesser; who produces funny maths songs, Ed Burger, who gives funny and profound mathematical talks.

What is your favourite trick?
My favourite part of my show is when I square or multiply large numbers because that is such a personal process. It’s a trick that very few people in the world can perform.

Questions from twitter:
1) What math concept did he find most difficult to grasp?
I’ve always been more comfortable with maths that used numbers, rather than say geometry. I’m very much a discrete mathematician. I don’t think I knew that until I started graduate school. Mathematics has become much more categorised than it was 30-35 years ago and so it is easier to find what you’re interested in.

2) What math concept is typically the hardest to teach?
Any subject that I don’t know is harder to teach, but that is because I haven’t spent enough time thinking about how to teach them. I don’t know what examples will engage an audience.

What makes more sense: pi or tau? Decimal or duodeciamal system?
I’m a big tau lover. I agree with the statement that if we could go back in time and change the factor to tau we would have simplified our theorems and formulas. Obviously, it will be very hard to change people’s perceptions in order to use tau, but maybe in mathematics there is enough of a will to do such a thing. I’ve seen books now that proudly claim “tau certified”.
As for which system, we’re stuck with these ten fingers and although you can use them to count higher using to use base 60, I don’t think we could have used our minds to remember a 60x60 multiplication table.

Are you excited with the recent progress on twin primes (or any other progress in maths)?
Very excited. It is one of the most accessible and open problems still out there. It is right up there with Fermat’s last theorem. That’s not true with the Riemann hypothesis. It’s exactly like Goldbach’s conjecture, or the four colour theorem, everyone can understand the question and you can even play with the simple cases. I’m also delighted that the recent progress came from a relatively unknown mathematician. Yay for the underdog!
________________________________________________________________
________________________________________
Although the interview is over the mathematics is still not done! Over the next three posts I will be presenting three combinatorial proofs from Art Benjamin on patterns in the Fibonacci sequence as well as how to understand continued fractions.