Archive for April 2014

The Virtue of Laziness

My son, Alexey Radul, is a programmer. He taught me the importance of laziness in programming.

One of his rules:

Not to write the same line of code in the same program twice.

If you need the same line of code in the same program, that means you should either use a loop or outsource the line to a function. This style of coding saves time; it makes programs shorter and more elegant. Such programs are easier to debug and understand.

I remember how I copied and pasted lines of code before he taught me this rule. Then I needed to change parameters and missed some of the lines during changing. Debugging was such a headache.

Mathematicians are way lazier than programmers. Consider the system of two equations: x+2y=3 and 4x+5y=6. There are no repeating lines here. Only letters x and y appear twice. Mathematicians invented the whole subject of linear algebra and matrices so that they would not need to rewrite variables.

Mathematicians are driven by laziness. Once ancient mathematicians first solved a quadratic equation, they didn’t want to do it again. So they invented a formula that solves all quadratic equations once and for all.

I try to keep up with tradition. I try to make my theorems as general as possible. When I write my papers, I try to make them short and simple. When I think about mathematics I try to get to the stage where the situation is so clear I can think about it without paper and pencil. I often discover new theorems while I am in bed, about to fall asleep. Sometimes I wake up with a good idea. So I do my job while I sleep.

I love my profession. I get paid for being lazy.

Share:Facebooktwitterredditpinterestlinkedinmail

Beer Jokes and Hat Puzzles

This is one of my favorite jokes:

Three logicians walk into a bar. The waitress asks, “Do you all want beer?”
The first logician answers, “I do not know.”
The second logician answers, “I do not know.”
The third logician answers, “Yes.”

This joke reminds me of hat puzzles. In the joke each logician knows whether or not s/he wants a beer, but doesn’t know what the others want to drink. In hat puzzles logicians know the colors of the hats on others’ heads, but not the color of their own hats.

This is a hat puzzle which has the same answers as in the beer joke. Three logicians walk into a bar. They know that the hats were placed on their heads from the set of hats below. The total number of available red hats was three, and the total number of available blue hats was two.

Red Hat Red Hat Red Hat Red Hat Red Hat

Three logicians walk into a bar. The waitress asks, “Do you know the color of your own hat?'”
The first logician answers, “I do not know.”
The second logician answers, “I do not know.”
The third logician answers, “Yes.”

The puzzle is, what is the color of the third logician’s hat?

This process of converting jokes to puzzles reminds me of the Langland’s Program, which tries to unite different parts of mathematics. I would like to unite jokes and puzzles. So here I announce my own program:

Tanya’s Program: Find a way to convert jokes into puzzles and puzzles into jokes.

Share:Facebooktwitterredditpinterestlinkedinmail

How Well Do You Know Your Dice?

Each time I see John Conway he teaches me something new. At the Gathering for Gardner he decided to quiz me on how well I know a regular six-sided die. I said with some pride that the opposite sides sum up to 7. He said, “This is the first level of knowledge.” So much for my pride. I immediately realized that the next level would be to know how all the numbers are located relative to each other. I vaguely remembered that in the corner where 1, 2, and 3 meet, the numbers 1, 2, and 3 are arranged in counter-clockwise order.

Here’s how John taught me to remember every corner. There are two types of corners. In the first type numbers form an arithmetic progression. John calls such numbers counters. He chose that name so that it would be easy to remember that counters are arranged in counter-clockwise order. The other numbers he calls chaos: their increasing sequence goes clockwise.

Once I grasped that, I relaxed thinking that now I know dice. “What about the third level?” he asked. “What third level?” “Now that you know which number goes on which side, you need to know how the dots are arranged.” Luckily, there are only three sides on which the dots are not placed with rotational symmetry: 2, 3, and 6. And they all meet in a corner, which John calls the home corner. The rule is that the diagonals formed by the dots on the sides with 2, 3, and 6, meet in the home corner. You might argue that 6 doesn’t have a diagonal. But if you look at 6, you can always connect the dots to form the letters N or Z, depending on the orientation of the die. When you lay the letter N on its side, it becomes the letter Z. Thus they define the same diagonal. This diagonal has to meet the diagonals from 2 and 3 in the corner.

When I came home from the conference I picked up a die and checked that the rules work. There are 8 corners. It is enough to remember one corner of numbers to recover the other numbers by using the opposite sum rule. But it is nice to have a simple rule that allows us to bypass the calculation. Four of the corners have numbers in arithmetic progression: 1:2:3, 1:3:5, 2:4:6, and 4:5:6. They are counters and they are arranged counter-clockwise. The other four corners are: 1:2:4, 1:4:5, 2:3:6, and 3:5:6, and they are arranged clockwise.

I wanted to provide a picture of a die for this post and went online to see if I could grab one. Many of the graphic images of dice, as opposed to photographs, were arranged incorrectly. Clearly these visual artists did not study dice with John Conway.

Then I decided to check my own collection of dice. Most of them are correct. The ones that are incorrect look less professional. Here is the picture. The ones on the right are correct.

Dice

Share:Facebooktwitterredditpinterestlinkedinmail