Showing posts with label Turing. Show all posts
Showing posts with label Turing. Show all posts

Monday, 14 July 2014

Mathematics through the eyes of the players

2014 marks the 50th anniversary of the Institute of Mathematics and its Applications.
To commemorate this momentous occasion not only did they have the usual conferences and celebratory talks but they also published a book.

 50 visions of mathematics is available from the OUP website for a price of £24.99. Think about it… that’s two visions of maths per pound! Who can argue with such a bargain?

Contained within this fully illustrated book you will find 50 chapters of interesting, often cutting edge and, certainly diverse mathematics. All of the articles are written from the personal view points of the authors. The individual and personal tones of the chapters gives them an authentic voice that conveys the excitement and love of the authors and will undoubtedly convince any cynical reader as to the wide ranging power of mathematics.

The authors (whose roster boasts such names as David Acheson, Simon Singh and Ian Stewart) come from many different backgrounds such as: research; teaching and science communication. So, you can be sure that the chapters are written to entertain as well as inform.

I, too, have written a chapter for the book on my favourite subject of Turing patterns. Not only am I excited at the chance to demonstrate their mathematical and visual beauty (blog posts on Turing patterns can be found here and here) to a wide audience, but I have also been immortalised in the pages of the book. When talking about the application of Turing patterns to animal skins (discussed here) I make reference to the ring tailed lemur contradicting the theory. Luckily, I had recently fed some ring tailed lemurs in Newquay zoo and so my picture (a different one below) can now be found in every copy of the book.
Myself and Lorraine feeding some very lovely lemurs at Newquay zoo.
Apart from my own ego stroking there are articles concerning the mathematics seen in the recent movie “Sherlock Holmes: A Game of Shadows” written by Derek Moulton and Alain Goriely, who were actually employed by the filmmakers to come up with Moriarty’s codes. There are interesting chapters about the medical applications of mathematics from Richard Elwes and Carson C. Chow. There is even a chapter on the mathematics of murder scenes, which discusses how to calculate the original location of a set of blood splashes.

There are a few chapters that feel a little “in jokey” and not to my taste, including how different sources might quote Pythagoras’ theorem. For example you might see tweets saying
“OMG, for right angled triangle squares on sides add up :) #pythagoras”.
However, these are small details and I can think of no recent brief anthology that can give you a better range of mathematics across history and application. Perhaps, more importantly, the book gives you insights into the people behind the mathematics. It demonstrates that mathematicians are human too. We are interested in using mathematics to make the world a better place and we want to communicate these ideas to people like you.

In summary, you will know if this is book is for you. If you are a recreational scientist interested in the forefront of  mathematics then I happily recommend it.

Monday, 19 May 2014

What makes a good mathematical biologist?

Last time I presented the life and times of Prof. Jim Murray FRS. Jim is actually my academic grandfather as he supervised Philip Maini (the current director of the Wolfson Centre for Mathematical Biology) and Philip supervised me.
Figure 1. Three generations of mathematical biologists. From left to right: Me, Philip Maini and Jim Murray. When I showed the picture to my wife she said that she loved the gradient in beard colour :).
The extended mathematical family tree can be seen in one of my previous posts.

This week we discuss Jim's work.
________________________________________________________________
________________________________________

What field of maths did you start in?
I was working on various types of fluid mechanics, such as magnetohydrodynamics and a theory of fluidisation but, except for the latter, nothing really caught my imagination. The last paper I wrote on fluids was on Burgers equation [an equation related to turbulence modelling]. I once met Burgers. I was giving a talk and he was sitting there seemingly asleep in the front row all during the lecture. At the end everyone applauded, he woke up and proceeded to ask a highly relevant question.

How did you get into mathematical biology?
A professor of botany approached the department and asked if they could recommend anyone who could help him quantify how oxygen got into pea nodules. When the guy phoned me up he thought I was a graduate student and said he could offer me $5 an hour! So, that was my introduction into mathematical biology: oxygen diffusion in pea nodules. After writing a few papers on it I found it quite interesting even though there was nothing too difficult about the mathematics as it was just singular perturbation analysis of the diffusion equation

I don’t know how, but someone from anatomy heard about me and got in touch. His problem was on pilot ejection seat injuries.

Please do expand on this problem. I’ve heard it involved dropping corpses down lift shafts.
I got interested and the model consisted of a one-dimensional compressible material on one end of which we applied a force to simulate the chair lifting rapidly. This lead to a wave travelling up the rod, but the wave equation was nonlinear and so a shock developed [shocks form when the solution tries to become multivalued. It’s like a wave breaking on the shore. See here for a simulation of the shock forming]. We then hypothesised that the shock might actually split the vertebrae.

We took this to the anatomist who wanted to test the theory. I asked him how he’d do this and he said that they strap a cadaver to a lift and dropped them. On stopping the lift suddenly they mimic the effect of an ejector seat and we can see what happens to the spine. He suggested that I come along to see how they do it, but I passed on that offer.

What has been your favourite experiment and what has been your favourite piece of mathematics?
Oh I don’t know. There have been so many and so diverse. I think animal coat patterns have been the most enjoyable. However, I’ve never thought that the model had anything to do with biology. It was phenomenological. I feel that the mechanochemical theory of morphogenesis (developed with George Oster from Berkeley) is much more relevant to biology since it made real biological predictions which were confirmed experimentally. Reaction-diffusion theory was taken over by mathematicians for the past 50 years: a morphogen was only found last year [click here to see my posts on Alan Turing’s chemical theory of morphogenesis].

In fact the person who should really be given credit for much of reaction-diffusion patterning is Daniel Thomas (university of Compiegne). He did experiments that produced reaction-diffusion spatial patterns, long before others in the early 1970s. It was his experimental reactions that I used for my animal coat patterning work. Yet no one has heard of him in the field, which is a real shame.

You are best known for being able to create models that are incredibly simple, yet are able to be strong enough to capture the relevant biology. How do you do it?
Well I would always start by talking to the biologist. Unless I get an intuitive argument to test from them I wouldn’t know what to do with the idea. I always want the mathematics to be as simple as possible. Then you can start adding in extra bits, if you need it to get closer to the biology.
In Oxford most of these interdisciplinary conversations have started as discussions over high table dinner in various Oxford colleges. So my advice on becoming a good mathematical biologist is to have haute cuisine dinners with as many interesting people as possible.
________________________________________________________________
________________________________________

Whilst Jim was in Oxford. Philip Maini got the chance to do a fuller interview that was recorded and is hosted by the Mathematical Institute of University of Oxford. It is called "Jim Murray - Reflections on a Life in Academia" and can be watched below.


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, 24 December 2012

Santa’s job is harder than you think!

Who wouldn’t want to be Santa? You work one day a year, people give you mince pies and you spend the rest of your time deciding who’s naughty and who’s nice. However, Santa’s job is more difficult than you might think and he is certainly a mathematical genius who could win $1,000,000!

Efficient packing is an Elf's forte.
Let’s focus on just two of his important tasks. Firstly, he has to pack his sleigh full of toys. Annoyingly, toys are not all the same shape so how does he efficiently pack his sleigh? Either he is excellent at Tetris, or he has managed to solve an extremely difficult maths problem known as “bin packing”. The problem is, simply stated, ‘given a fixed amount of space and packages of different sizes, is there a complete list of instructions that will allow you to make the most of the space?’


Santa's problems are bigger than his belly.
The second problem he faces is finding the quickest route around Earth that visits every house. This is known as the “travelling salesperson problem”. Is it possible to find a recipe that will always give you the fastest route?

In both cases no one knows the answer. What is worse is that we don’t even know if there is an answer! Mathematicians describe these problems as “NP” (Not Polynomial). This means that the difficulty of finding the best solution increases dramatically whenever you add another package or house.

Although these problems may be placed in fantasy, real life logistic companies face these obstacles every day and solving them would save a fortune. In fact, the solutions are so important that the Clay Mathematics Institute offers one million dollars to anyone who can either produce a method that works flawlessly, or show that one doesn’t exist.

So until Santa decides to retire and give up his secrets, that million is waiting for the right mind. Who knows? It could even be yours.

Merry Christmas from the Laughing Mathematician and see in 2013 for a new set of posts on the gömböc.
A very seasonal Turing pattern.

Addendum
Although we may not able to solve the problem yet we can still take a peak at Santa's solution. The United States and Canada aerospace defence organisation, known as NORAD, take it upon themselves to track Santa every year as he travels around the globe. You can follow Santa's journey through their website, http://www.noradsanta.org/.
A previous NORAD tracked route of Santa's.
________________________________________________________________
________________________________________

An abridged version of the above post first appeared in the Oxford Mail 20/10/12.

Monday, 23 July 2012

Interview with Andrew Hodges. Part 3

This week concludes the serialisation of my interview with Andrew Hodges. The final questions I asked looked at the much bigger picture of Alan's legacy.

Once again, if you are interested in reading more about Andrew Hodges you can find his website here and his book can be bought from here.
________________________________________________________________
________________________________________


What is your opinion of the successful 2009 poll to have the government apologise for Alan’s treatment?
Well I disagreed with the wording of the petition because it was too specific to Turing; it didn’t take into account the hundreds of thousands of other people who were in similar positions. But on the other hand I warmed to it a lot as Gordon Brown’s apology was very, very, good and brought out all of these wider points and linked them in a similar way to that which I had done in my book.
Gordon Brown's apology to Alan Turing. Signed and donated to Bletchley Park by Gordon Brown.
My point of view, coming from the gay rights perspective, is that Turing’s case was simply an extreme example of what society was like, what the effect of legislation was like here and what it will be like in other countries now. The evil is not what happened to the individual it is what it happens generally and Alan illustrates this very clearly with his story. That is how it struck me in ’73 and I haven’t changed from that point of view. The story is very vivid but the message is much more general. So I think this apology is too much mixed up in people thinking that we have to rescue this great scientist, rather than seeing a human rights question in general.

It is hard to know what Alan would have thought but I believe he would have thought the whole system was wrong rather than simply wanting an excuse for himself.

Does your interest in Turing’s story still continue? For example have you taken an interest in Bletchley Park recently getting Alan’s papers back?

Ah well let me put you right there. They didn’t get his papers back. They simply got Max Newman’s copies of Turing’s published papers. More positively, its great that Turing’s actual papers are preserved at King’s College, Cambridge.

Back to your original question, I revived my interest in the mid 90s as the internet was beginning to grow and I’ve written another shorter book on Turing as a philosopher as well as a number of smaller academic papers. On the whole I am very happy to leave everything to other people who have become great experts in some particular area of his life, whereas my strength was to see all of these links as a whole.

Monday, 16 July 2012

Interview with Andrew Hodges. Part 2.

This week we continue the serialisation of my interview with Andrew Hodges. Below, I probe deeper into what Andrew got out of writing the book.

Once again, if you are interested in reading more about Andrew Hodges you can find his website here and his book can be bought from here.
________________________________________________________________
________________________________________
When/ how/ why did you start thinking about writing a biography about Turing?
Well, when I learned I had these three connections with the man and he had such a story I knew I had to tell it. However, it would’ve been very difficult simply to write an article. All of the connections as I’ve just described were hidden at this time. No one even knew the story of the computer because of Bletchley Park being so secret!

I also sensed that there was a big fascinating story to tell about how all of these links came together in just one person. I had a feeling that it would be possible to present something modern in its social and political point of view but about something unexpected, namely the history of technology, science and the Second World War. Although at the beginning I didn’t realise just how big the story would become and how difficult it would be to get all of the information.

Because it was so difficult did you ever get frustrated?
It was difficult to do, but the discipline of writing a biography means that you have the unifying feature of a single person’s vision and you don’t have to cover everything that was going on in the world at that time, which is what historians have to do. I liked the idea of working through someone else’s life and remembering that they never knew what was going to happen next. That is one of the things that kept me going during the difficult times. It was hard work interviewing people about subjects that, at the time, where either secret or difficult to talk about. I also acquired a lot of scientific material, which in the beginning I knew nothing about.

What kind of character was Turing?
 He was certainly odd. But in mathematics we have a slightly different picture of what you expect people to be like. Many of the things that strike people as odd came across to me as traits that anyone involved in deep concentration, not just mathematicians, would have.

One way of putting it is that he lived a lot like people did 20 years later.


That is quite an interesting point as, having read your book, Alan seems to come across as a relatively normal person.
Yes, but normal for a number of decades later. I would say that rather as his ideas (computation and morphogenesis) were ahead of his time, so was his lifestyle. We just wouldn’t have made such a fuss about his oddness during the sixties and seventies.

Monday, 9 July 2012

Interview with Andrew Hodges. Part 1.

Earlier this year I was lucky enough to have the chance of interviewing Andrew Hodges about his experience of writing a biography of Alan Turing, "Alan Turing: The Enigma". Since we spoke for quite a while I've decided to serialise the interview over the next few weeks. This week I introduce Andrew and ask what set him on his path of writing the book.


If you are interested in reading more about Andrew Hodges you can find his website here and his book can be bought from here.
________________________________________________________________
________________________________________
Firstly, for those who do not know of your career, could you just give an outline of how you came to where you are?
I am in an unusual situation, because the Turing material is something that took me off from my normal trajectory. It was not a direct part of my normal progress as I was already a post doctoral researcher in quite a different field, mathematical physics; working with Roger Penrose. Although I took time off to do it I managed to mix it in with my research over the six years, from 1977 to 1983
In 1985 I received an advanced Science and Engineering Research Council fellowship, which really established me in Oxford, where I have been ever since.


You did your Phd in 1975 in twistor theory and continue to work in this area to this day. Can you explain a little about what this is? It is linked to string theory isn’t it?
It is really very different from string theory, although there is more overlap now.
String theory is about adding in extra dimensions to space and time and structures within those. Twister theory is simply a different way of describing the four dimensions that we know about. So in that way it is less radical!


What do you get out this description that the normal view of space and time doesn’t give you?
Instead of thinking about the four dimensions as physical description of three space dimensions and one dimension of time we instead think about of two dimensions plus two dimensions. It is based on a set of light rays which are the fundamental objects.


This description fits very nicely with the way the whole of fundamental physics has gone which puts emphasis on objects that have zero mass. The ideas behind the Higgs field and gluons also fit beautifully into this point of view.


Since you work in such a different field to Turing how did you first hear about him
In 1969 I was a Cambridge undergraduate and at that time his name wasn’t well known to most undergraduates. I read a lot of maths that was not on the syllabus and I discovered his work on Turing machines. So his name at least meant something to me at that time and I was very surprised during 1972-73 when his name came up in quite a different way. I met many people in the Gay Liberation movement who had actually known him.


So Alan was more famous in the gay community than the mathematical one?
Oh no. He was by no means a household name. It was simply coincidence of meeting the older generations and having seen his name before. Very few people knew of this connection to Turing. Of course, it is well known now, but at the time it was something no one wanted to talk about.


The third connection was that in the mid 70s, books started leaking the details of the work done in Bletchley Park. Also the BBC had a very good programme on how the Enigma was broken but it didn’t really highlight Turing’s role. It mentioned that he was there but didn’t discuss his work, whereas through my connections I gathered that he wasn’t just “there” but actually he was the most important figure in the whole project.


And is that true? Turing is often praised as being the genius behind the breaking of Enigma but there were plenty of others there working with him who should also not be forgotten.
I don’t think any of the other big people (Donald Michie, Max Newman, Jack Good and Shaun Wylie to name but a few) would have questioned his importance… on the scientific side of course. There were many important people running the infrastructure, engineering of the machines and linguists, but on the scientific side there is no question of his influence. He was both the first serious scientific person into the field of decryption and the most innovative.


He had a very unobvious idea of how the Enigma machine worked and also developed all of the statistical theory which they used.