## An answer to a puzzle

The puzzle I posted a few days ago is derived from a puzzle that’s worked its way around the Internet every so often in the past few years. See this forum in Russian (why don’t I know Russian?), or Misha Lemeshko’s blog, or Daniel Lemire for the version that mine is derived from. The incarnation I saw on Wednesday, on Facebook, which inspired this post, says that “This problem can be solved by pre-school children in 5-10 minutes, by programmers – in 1 hour, by people with higher education… well, check it yourself! 🙂

It’s then followed by the following list of numbers:

8809 = 6
7111 = 0
2172 = 0
6666 = 4
1111 = 0
3213 = 0
7662 = 2
9312 = 1
0000 = 4
2222 = 0
3333 = 0
5555 = 0
8193 = 3
8096 = 5
7777 = 0
9999 = 4
7756 = 1
6855 = 3
9881 = 5
5531 = 0

2581 = ?

Sort of implicit in the hint is that maybe it has something to do with the digits; Real Mathematicians think that puzzles involving digits are somehow inferior. (In A Mathematician’s Apology Hardy observes of facts such as 8712 = 4 × 2178 and 153 = 13 + 5 3 + 33 that “[t]hese are odd facts, very suitable for puzzle columns and likely to amuse amateurs, but there is nothing in them which appeals much to a mathematician.”

Perhaps the natural thing to do, if this is a claim about digits, is to then assume that the claim 8809 = 6 encodes the statement $f(8) + f(8) + f(0) + f(9) = 6$, and proceed on that basis. On that basis we have $4f(1) = 0, 4f(0) = 4, 4f(2) = 0, 4f(3) = 0, 4f(5) = 0, 4f(6) = 0, 4f(7) = 0, 4f(9) = 4$ and so $f(0)=f(9) = 1, f(1)=f(2)=f(3)=f(5)=f(6)=f(7)= 0$. We still need $f(4), f(8)$. From the first “equality” we have $2f(8) + f(0) + f(9) = 6$ and so $f(8) = 2$. The answer is $f(2) + f(5) + f(8) + f(1) = 0+0+2+0 = 2$.

As for the version I gave — there are eight equations in nine unknowns. These were derived by removing from the “bloated” version of the puzzle all the equations with four of the same digits on the left side, and all those with a zero on the right side. The system again has equations $f(8) + f(8) + f(0) + f(9) = 6$ and so on. By subtracting equations from each other we get $f(0) = 1 + f(1), f(3) = f(2), f(6) = 1+f(2), f(8) = 2+f(2)$. From “6855 = 3” we have $f(6) + f(8) + 2f(5) = 3$, or $2f(2) + 2f(5) = 0$; if we agree that all values are nonnegative then $f(2) = f(5) = 0$. Then from “7756 = 1” we can get $f(7) = 0$. Also from relations we alrady derived, $f(3) = 0, f(6) = 1, f(8) = 2$.

But what are the values of 0, 1, and 9? It turns out that either $(f(0), f(1), f(9)) = (1,0,1)$ or $(2,1,0)$ works, from an addition standpoint.

So why does 4 never appears on the left hand side, therefore meaning we can never work out $f(4)$. This is a feature, not a bug. $f(n)$ is the number of holes in the numeral n. Some people draw 4 with one hole; some draw it with zero. So we choose $(f(0),f(1),f(9)) = (1,0,1)$ and so the answer is $f(2) + f(5) + f(8) + f(1) = 0 + 0 + 2 + 0 = 2$.

## Paul Graham, generalizer

Paul Graham has an interesting essay entitled How to do what you love. It was posted on his web site in 2006, and this paragraph has stuck with me for years:

This test [would people do it for free?] is especially helpful in deciding between different kinds of academic work, because fields vary greatly in this respect. Most good mathematicians would work on math even if there were no jobs as math professors, whereas in the departments at the other end of the spectrum, the availability of teaching jobs is the driver: people would rather be English professors than work in ad agencies, and publishing papers is the way you compete for such jobs. Math would happen without math departments, but it is the existence of English majors, and therefore jobs teaching them, that calls into being all those thousands of dreary papers about gender and identity in the novels of Conrad. No one does that kind of thing for fun.

Of course Graham is committing the fallacy of generalizing from his own experiences. Graham is a programmer; I suspect that (1) he knows more math professors than English professors, and (2) he has an easier time seeing himself as a mathematician than as a literary critic. It’s interesting to juxtapose this with Graham’s comments in The Age of the Essay, in which he gives his spin on why people write essays and how real essays differ from those that one writes in school. Graham states that literary criticism was born when, in the late nineteenth century, American colleges started to transform themselves into research universities, and as a result the teachers of composition and rhetoric and so on needed something to research. He cites an article entitled “Where Do College English Departments Come From?” (William Riley Parker, College English, 28 (Feb. 1967), 339-351; JSTOR) for this. Graham’s point here is that students in English classes in high school and early in college are forced to write essays about literature when they could write more interesting essays about other things closer to their own experience.  I agree with this, although I don’t know enough about current teaching of English to know if he’s attacking a straw man or not. But he seems to have an axe to grind against academic studies of English.

In What you’ll wish you’d known Graham suggests to high school students the tactic of “staying upwind” — major in math, say, instead of economics, because you can go from math to economics but not vice versa. In undergraduation he suggests constructing the “dropout graph” — field X is harder than field Y if more people switch from X to Y than the reverse. I’d like to see this dropout graph — perhaps the registrar’s office has the data? I can’t tell where English is in that graph — he doesn’t explicitly mention it in either a list of “worthwhile” departments or of “subjects with least intellectual content” — and I’d be curious to know where he’d put it.

Finally, I’ve known grad students in English, some of whom are now professors of English. They seem to be pretty into what they do, and not just because they want academic jobs.

Here’s a puzzle.

8809 = 6
7662 = 2
9312 = 1
8193 = 3
8096 = 5
7756 = 1
6855 = 3
9881 = 5

2581 = ?

## Niue standard time

Seen on the web page of Fun with Algorithms: “A full paper should be submitted by January 23, 2012 , 11:59 pm, Alofi, Niue, standard time.”

The conference is in Venice, Italy, and it’s organized by Italians, so why Niue?

Alofi is the capital of Niue, an island country in the South Pacific, where the time is 11 hours behind UTC. (Although Niue is in free association with New Zealand and uses New Zealand currency, it is not the same day in Niue as in New Zealand; New Zealand is 12 hours ahead of GMT, or 23 hours ahead of Niue.) This is the time zone furthest behind UTC that actually contains any population; there’s a UTC-12, but it only contains some uninhabited islands. So presumably the choice was made so that if people acted as if the deadline was January 23, 2012, 11:59 pm, their local time, they would still get their papers in on time.

American Samoa is in the same time zone; the independent county of Samoa is UTC+13, one day later. (They were UTC-11 until they skipped December 30, 2011; this moved them from being three hours behind the US west coast to being three hours ahead of the Australian east coast.) I can’t find any uses of “Samoa time” being used the same way.

There is at least one other use of “Niue standard time” in a non-Niuean context.

Via David Eppstein. I have nothing to do with this conference, other than that I support fun.

## All the president’s men

All the presidents of the United States, except Martin van Buren, are descended from King John of England — as shown by BridgeAnne d’Avignon, a seventh-grade student in Watsonville, California. You can buy a poster at we are all related. Via quora and metafilter.

This is less impressive than it seems as first glance. (But still impressive; it’s easy for me to sit here and criticize.) All but van Buren and Eisenhower are at least partially of British descent. That’s actually a larger number than I expected, and implies some combination of:

• people of British descent are more likely to be president, or
• a very large proportion of Americans are at least partially of British descent.

On the other hand, as I mentioned a couple weeks ago, if we go far enough back everyone has a common ancestor. I wouldn’t be surprised if someone starts digging back through van Buren’s family tree and digs this up.

## Mathematicians go drinking – a puzzle

Here’s a puzzle: $r$ people are in a bar, sitting around a round table. A certain person pays for the first round of drinks. The person to their right pays for the second round. The person two people to the right of that person pays for the third round. In general, whoever paid for the nth round, the person n people to their right pays for the (n+1)st round.

Question the first: For a given value of $r$, is there somebody who never pays for any drinks?

Question the second: How many somebodies are there?

(As of this writing I know the answer to the first of these questions but not the second. Metasolvers should feel free to use this information.)

For concreteness, say there are five people, named Alice, Bob, Carol, Dave, and Eve. <b>Alice</b> pays for the first round. The person to her right, <b>Bob</b>, pays for the second round. Carol is skipped and <b>Dave</b> pays for the third round. Eve and Alice are skipped and <b>Bob</b> pays for the fourth round. Carol, Dave, and Eve are skipped and <b>Alice</b> pays for the fifth round. And so on. So Alice pays for two rounds out of every five; so does Bob. Dave pays for one round out of every five. Carol and Eve never pay.

Unfortunately my friends know I’m a mathematician, and this sounds enough like a math problem that they’d be suspicious if I suggested this as a paying-for-drinks scheme. That’s probably for the best.

Phil Keenan, at Meandering through Mathematics, explores how the logarithm is calculated numerically. Interestingly, calculating it as the inverse of the exponential seems to be more efficient than using the Taylor series.

Hopefully this one doesn’t remind anybody of a traumatic experience they had five days ago: XKCD on the Valentine dilemma. On a related note, you might be interested in William Spaniel’s Game Theory 101 videos or the free online Stanford game theory course by Matthew Jackson and Yoav Shoham (economics and CS, respectively) that’s starting soon.

The collapse of the Soviet Union and the productivity of American mathematicians, an NBER working paper by George J. Borjas and Kirk B. Doran. The basic claim is that when Soviet mathematicians were able to emigrate to the US in the 1990s, this pushed aside mathematicians already in the US rather than “growing the mathematical pie”.

Cary and Michael Huang have an interactive thing-to-play-with on the scale of the universe. This is even more impressive when I find out they’re half my age.

Birth timing and Valentine’s Day. (Also Halloween.)

At MathOverflow: how to motivate and present ε-δ proofs to undergraduates.

From the New York Times magazine: How companies learn your secrets.

John Baez has a series of posts on the roots of polynomials having integer coefficients, titled “The Beauty of Roots”: part one, part two, part three, easy version of slides from a talk, similar slides with some proofs. (Joint work between Baez, Dan Christensen, and Sam Derbyshire.)