Wednesday, 18 November 2015

Maths in Science - an interview with Don Knuth


In March this year I published interviews with some very prominent scientists, asking them about their experience of maths education and how they used mathematics in their field of science.

At that time I received a reply from the legendary computer scientist and mathematician Professor Don Knuth, a reply which I overlooked and failed to open. 

Today I received a polite e-mail from him wondering what had happened to his responses and why I had not acknowledged his participation in the "Maths in Science" project. When I checked my in-box, it was still sitting there from March and I had not opened it or read it.

I am deeply embarrassed and publicly offer my apology to Professor Knuth for my oversight. I have also replied to his e-mail and offered sincere apologies to him directly.

So please, read below the responses to my 10 questions provided so generously by Professor Knuth, Professor Emeritus at Stanford University, "the father of the analysis of algorithms", creator of several computer programming systems, creator of METAFONT and the author of "The Art of Computer Programming" - the bible for computer programmers everywhere.


Here is the note to the e-mail that Professor Knuth sent me in March this year. His kind comments make me feel even worse that I failed to open his e-mail:

Hi Bruce,

Ten answers are below!

One of the most important things for students to learn is how to ask good questions. You evidently have learned that well.

Best wishes, Don Knuth


1. Describe what maths lessons were like for you at school.

People of my generation (in Wisconsin, USA) learned multiplication tables in grade 2, fractions in grade 5, algebra in grade 9, two-dimensional geometry in grade 10, complex arithmetic in grade 11, three-dimensional geometry in grade 12. I came up with lots of questions that my teachers couldn't answer; so I spent most of my time thinking about other subjects (English, Latin, physics, chemistry, biology, music). But at home my father had a mechanical adding/multiplying machine, and I enjoyed playing with that. I spent hundreds of hours plotting the graphs of functions like 

$\sqrt{x+a} - \sqrt{x+b}$ for different values of $a$ and $b$, using colored pencils so that I could put several graphs on the same page.

2. Was the maths that you learned at school useful to you later in life?

Absolutely; I can't think anything from those classes that I have NOT used repeatedly! For example, the geometry classes not only taught me how to prove things rigorously, they also gave me the ideas needed to create the METAFONT language, with which many fonts of type have been designed; those fonts are now used by millions of people all over the world.

3. How good do you need to be at mental arithmetic to do calculations in your head?

I'm glad that I memorized multiplication tables up to 12x12. But I think going any further (like up to 99x99) would have been a waste of time. Calculations in my head are important only on problems that are fairly simple, or on problems that involve symbols instead of numbers. When I'm working on a research problem I generally begin by filling dozens of sheets of scratch paper with partial calculations. When I eventually get to a point where I can think about the problem while swimming, then I'm often ready to solve it.

4. Mathematics teaches us that you can put two things together to make a new thing. Is this important in what you do?

Complicated structures are made up of simple structures that are combined in simple ways. I think computer scientists understand this even better than mathematicians do, because we've learned how to represent many kinds of data inside a machine.

5. Mathematics is about finding patterns. Do you need to look for patterns, or exceptions to patterns, in your research?

Yes, I like to think that mathematics is in fact the science of patterns. The patterns that I work with daily are usually some regularities in relationships between objects, not between numbers. But numerical patterns are important too: Like the facts that:

$1=1^2$, $1+3=2^2$, $1+3+5=3^2$, $1+3+5+7=4^2$, etc., 
and that
$1^3=1^2$, $1^3+2^3=(1+2)^2$, $1^3+2^3+3^3=(1+2+3)^2$, etc.

6. Mathematics also teaches us about balance and equality. Is this idea useful in your research?

In the METAFONT language referred to earlier, we express the shape of the letter A by giving equations that should be satisfied by key points in the lines being drawn. "The left stem runs from the baseline, half a unit from the left edge of the enclosing box, up to the cap-height. Its slope equals the negative of the slope of the right stem." 

[Reference: Computer Modern Typefaces, page 369.]

7. Mathematics helps us to represent quantities and measurements numerically. Do you do this in your work?

In fact my program that draws the Greek letter $\pi$ actually uses the number 3.14159 in two places. [Computer Modern Typefaces, page 159.]

8. Is estimation good enough or do you need to measure things accurately?

A computer scientist must be especially careful, because tiny errors can easily be magnified --- with catastrophic consequences.

9. How do you use statistics to analyze your results?

Much of my work involves comparing different computer methods, to see which one is fastest. Basic statistics such as the maximum, mean, and median running time, together with the variance, are crucial in this analysis. More broadly, concepts of random numbers and probability are absolutely essential ingredients in most of the best computer methods known today.

10. Do you have any other insights to offer into how you use maths in your work?

For instance, when I brush my teeth I've got eight areas to cover, namely Left and right, upper and lower, inside and outside. It's most efficient to follow a "Hamiltonian path" or "Gray code":
  left upper outside
  right upper outside
  right upper inside
  left upper inside
  left lower inside
  right lower inside
  right lower outside
  left lower outside


 Thank you so much Professor Knuth for answering these questions for me and for being a part of the "Maths in Science" project. You have given me, and hopefully many others, lots to reflect on, including great advice on dental hygiene.

And once again, I apologise for my error in not including your thoughts in the initial project back in March.

Sunday, 8 November 2015

I Quit

Last week, I quit.

Not something I do often and I'm still feeling a bit funny about it.

It had been my New Year's Resolution in 2014 to learn to play the bagpipes. I have been learning for 2 years now. 

Well, I had been until last week.

It was the hardest thing I have ever done in my life. I play a few musical instruments but this was the hardest I have ever attempted. 

I spent 12 months on the practice chanter before I got unleashed on the pipes. 

I gave it a go but last week I realised I had to give it up.


Or indefinitely suspend input of time and energy in this endeavour.

Maybe I'll come back to the pipes one day.

We'll see…

What have I learned?

Reflecting on this experience I have learnt a few things:

1. I can't do everything. Thought I could. Must have been mistaken. My resources of time, commitment, patience, enthusiasm etc are finite.

2. It doesn't feel totally satisfying to quit something. In fact, I was a bit disoriented. I can no longer think of myself as a "student of the bagpipes" - I am now "a former dabbler in the noble pipes".

3. My family is probably celebrating the peace and quiet.

4. It's not that big a deal - it was only the bagpipes.

5. It's okay to quit sometimes. It doesn't make me a loser. In fact, maybe there's a bit of "growth mindset" here for me.

6. There are some positives in giving up - it reduces my stress levels, gives me back some precious time and opens up a few possibilities for the future. I wonder how the family would feel about trumpet lessons?