A brief return to the theme of mathematics in literature: I can’t resist sharing what is, by a long way, the silliest piece of fictional mathematics I have ever come across. It comes in “The Girl Who Played With Fire,” by the late Stieg Larsson, translated (not very well) by someone called Reg Keeling. Here is a little piece of advice for any author who wants to incorporate mathematics into a novel. If you don’t want what you write to be risibly unrealistic, it is not enough to read popular science books: you must also run what you write past a mathematician.

And here is the passage in question.

Salander began her advance towards the house, moving in a circle through the woods. She had gone about a hundred and fifty metres when suddenly she stopped in mid-stride.

In the margin of his copy of

Arithmetica, Pierre de Fermat had jotted the wordsI have a truly marvellous demonstration of this proposition which this margin is too narrow to contain.The square had been converted to a cube, and mathematicians had spent centuries looking for the answer to Fermat’s riddle. By the time Andrew Wiles solved the puzzle in the 1990s, he had been at it for ten years using the world’s most advanced computer programme.

And all of a sudden she understood. The answer was so disarmingly simple. A game with numbers that lined up and then fell into place in a simple formula that was most similar to a rebus.

Fermat had no computer, of course, and Wiles’s solution was based on mathematics that had not been invented when Fermat formulated his theorem. Fermat would never have been able to produce the proof that Wiles had presented. Fermat’s solution was quite different.

She was so stunned that she had to sit down on a tree stump. She gazed straight ahead as she checked the equation.

So that’s what he meant. No wonder mathematicians were tearing out their hair.Then she giggled.

A philosopher would have had a better chance of solving this riddle.She wished she could have known Fermat.

He was a cocky devil.

After a while she stood up and continued her approach through the trees. She kept the barn between her and the house.

Needless to say Salander is entirely self-taught at mathematics. More surprisingly and cringeworthily, she has been seriously interested in it for only about a year. I was initially puzzled by what would have made the author think that Wiles used “the world’s most advanced computer programme” but I now have a theory that could perhaps explain this: he might have read a popular account of the proof that said that it used extremely advanced mathematical machinery, and, literary genius that he was, failed to spot that the word “machinery” was a metaphor. I can’t decide whether that is my favourite detail, or whether it is the superfluous brackets round the equation (not to mention the fact that that case has been known since Euler).

It is hard to believe that anyone can match this passage. However, it does seem to be quite common for novelists to make fools of themselves in this way, and past experience on this blog suggests that I am usually wrong when I make a universal claim about literary depictions of mathematics (which in this case is the claim that nothing is as silly as the passage that I have just quoted). I have to admit that my amusement is mixed with just a hint of annoyance — by writing a post about it I am getting it off my chest.

December 20, 2009 at 3:49 am |

I was reminded of a passage by Borges which I read 30 some years ago when I was a math grad that seemed very nonsensical to me then. I had some trouble locating it, but it was probably the following passage from his story “The Aleph” in which he offers various descriptions of the Aleph:

“… for Cantor’s Mengenlehre, it is the symbol of transfinite numbers, of which any part is as great as the whole.”

Perhaps not quite as nonsensical as the passage you offered, but not exactly mathematically correct either. It’s the “any part” bit that makes me wince: all those transfinite Zahlen have null and finite parts too.

December 20, 2009 at 6:35 am |

This is an entirely literary judgment, but I can’t resist: correcting the math in passages like this is no inoculation against appearing foolish. Authors of novels, if you are tempted to do this, save some ink. Just put in brackets: “[Way of indicating that my character is really good at something many people find difficult.]” Then we’ll know.

I have a love-hate relationship with the use of mathematics as belletristic shorthand for the inaccessible, the inscrutable, or the ultimate indicator of intelligence (or pedantry, or bookishness). As stereotypes go, these are as good as they come, but I shudder to think of how much the perception of math is shaped by people who have nothing to do with it. Mathematics is not alone in suffering this; the Latin language has the same problem. Another example that comes to mind is the game of chess. Chess blogs do abound with laughable deployments of chess metaphors and feats of chess expertise in the service of portraying a character in a novel as some kind of genius.

I can think of one real-life example of this sort of thing— Pascal’s sister was alleged to have said of her brother’s childhood precocity, that not only did he rediscover all of Euclid’s geometry on his own, but that he did so with a series of propositions in the exact same order as Euclid’s.

December 20, 2009 at 8:00 am |

seems to me to be a symptom of a wider problem. The failure of the mathematics community to a) teach its content and b) engage with the public. No one cared about the error made and worse, no one noticed or cared to double check! Not just the maths but the history as well. The story seems to imply Fermat had solved it – although I blame the grandiose naming.

How sad (and ironic) that maths would be looked upon as something apart from the real world, unimportant and to be left to the obsessive nerds.

Certainly this post does not help the image of mathematicians as a secluded lot laughing at mere mortals from their high towers.

December 20, 2009 at 9:43 am |

Well, when I actually read this for the first time I got the same impression that when I read it now (in two different languages). Larsson is suggesting that Fermat’s note is just some sort of trick, and not anything similar to a proof.

Something like these tricks that are very common nowadays, in which you pose a problem that seems to be a maths problem (e.g. finding the next element on a given sequence of numbers) and the solution turns out to be something quite unrelated to maths (e.g. more related to language).

I also recall that he says somewhere before in the book that Fermat used to make mathematical jokes of this kind.

Still, I also found very strange this thing about a “computer” (and other things he writes).

December 20, 2009 at 10:06 am

I see what you mean. One reading of the passage is that Fermat wasn’t in fact interested in the Diophantine equation and had hidden some coded message in what he wrote. That’s still pretty silly — there don’t seem to be enough degrees of freedom to encode anything — but not as silly as Salander being able to prove the theorem.

January 13, 2010 at 12:22 pm

I was also not impressed at the math writing in this book in general when I read it, but I think your reading of the passage above misses the point entirely. Though the last statement may sound harsh, it is perhaps better taken as praise of your good taste rather than criticism: the point is groanworthy and not particularly well made.

Cairo above was trying to explain the correct reading, which you again misunderstood: Salander hasn’t realized a proof, or think that Fermat is encoding some scret message; she thinks Fermat is making a silly joke Saying the margin does not have enough space is not saying that his proof is too long – the “square is converted to a cube” line is not suggesting the case n=3 is hard, but suggesting that n is acting as a dimension. The “joke”, then, is that Fermat is saying that the margin of the paper is two dimensional, and thus cannot contain a cube.

Reread the passage above with this in mind and I think a lot of supporting evidence jumps out.

September 12, 2010 at 4:47 pm

That’s a good one there Paul. Was actually scouring the net over solutions for Fermat’s Last Theorem to figure out what Lisbeth had in mind. Interesting perspective to look at.

December 20, 2009 at 10:46 am |

Knowing how careful Borges was with language (and how smart he was), I was a bit puzzled to read Barry Cunningham’s quotation. So I went to the original in Spanish, and I can report that it is indeed a case of an error in translation. In the original, Borges says that in transfinite numbers, the whole is not bigger than some of the parts. I am not surprised that the translation is egregious.

December 20, 2009 at 5:37 pm

Thank you Pedro!

That clears up one thing that had annoyed me slightly for a number of years.

December 20, 2009 at 2:00 pm |

I agree reading the maths parts in the book is painful and there would have been so many better choices of problems Lisbeth could have thought about. But I find it especially bad since I have do admit in gerneral I enjoyed reading those books a lot.

As a positive side, I would like to mention that in the film (of the first book) at least they get the computer displays pretty much right (showing listings of OSX system files) rather than the stupid displays we are often presented in films and TV.

At least, I was relieved to find that the maths passages are completerly irrelevant to the plot. I had expected that in the end, some riddle would be solved in some stupid analogy to the maths she had been thinking about.

December 20, 2009 at 11:27 pm |

I think the issue is with the English translation, at least the passage does not contain Wiles’ “most advanced computer programme” in the German translation (which I read).

December 21, 2009 at 1:11 am |

[…] Wiles meets his match A brief return to the theme of mathematics in literature: I can’t resist sharing what is, by a long way, the […] […]

December 21, 2009 at 2:02 am |

This is what happens when the writer is not an expert on the subject, but “researches” his stories!

December 21, 2009 at 2:12 pm |

I think you should all lighten up. This is fiction, but if you want to be literal-minded, the easiest assumption is that she’s come up with a typical amateur “proof” of FLT whose errors would be evident to any referee if she ever sent it to a journal.

So what? Given that she’s the heroine, shouldn’t we just be pleased at her enthusiasm for mathematics in her spare time?

To take that further, if you were running a programme to interest young people in mathematics, would you not be delighted at such “product placement”?

It would hardly work if the author had to include realistic details of algebraic geometry or the Birch/Swinnerton-Dyer conjectures…

December 21, 2009 at 4:18 pm

I have to admit that I like that interpretation of the passage and it hadn’t occurred to me. I don’t think it was the author’s intention either, but we don’t have to commit the intentional fallacy. But one can’t excuse everything that appears in the novel by saying “This is fiction,” because many novelists include factual material in their novels that is supposed to interest and inform the reader. So the reason I am literal-minded when reading what Larsson has to say about mathematics is that that is what the author wants me to be at that particular point: he was talking about Fermat rather than about a fictional mathematician who happened to have the same name and a similar interest in Diophantine equations.

December 21, 2009 at 2:21 pm |

Can’t bring myself to look up the exact details, but Dan Brown’s Digital Fortress basically says that a 1024 bit password is twice as difficult to brute force as a 512 bit one.

Which would not be so bad if the narrator isn’t supposed to be an expert in cryptography.

December 21, 2009 at 4:54 pm |

Yes its very hurting when you see such kind of passages in books. Nowadays it is very common in newspapers also atleast here in India.

December 22, 2009 at 12:45 am |

the whole fermat thing was very annoying, but i thought the book was pretty good. so i’m curious about the assertion that the translation is not very good. in what way does the english version fail in comparison to the original?

December 22, 2009 at 10:05 pm |

Eva Gabrielsson said in an interview to a spanish magazine that the english translation is full of alterations.

December 23, 2009 at 8:01 pm |

One possible source for the author’s confusion may be the book ” Numbers: The Universal Language,” by Denis Guedj, History of Science Professor at the University of Paris. On page 77 he states: ” It took another eight years for the mathematician Andrew Wiles, using powerful computers and complex computation, to demonstrate that the proposition holds for all instances.”

December 23, 2009 at 9:14 pm |

To Marc. It seems that this quote is also the result of an error in translation. The original french text in “L’empire des nombres”, written by Denis Guedj, published by Gallimard, does not mention computers. It simply states “Il a fallu huit annees supplementaires pour que le mathematicien Andrew Wiles passe du “presque toutes” a “toutes””. It looks like the translator added the allusion to ”powerful computers and complex computation”. The rest is pretty accurate.

December 26, 2009 at 7:18 am |

Dave > ” Dan Brown’s Digital Fortress basically says that a 1024 bit password is twice as difficult to brute force as a 512 bit one. ”

Uh, if this was the only “mistake”. But the entire book is full of nonsense, ignorant and plainly thoughtless pieces, even to a casual reader. And the main premise of this book shows not only that the author (Dan Brown) had no clue about encryption, but couldn’t even think.

The book is about some supposedly unbreakable encryption algorithm. The algorithm itself is publicly published, but in an encrypted form, using it’s own encryption. The author of the algorithm threatens that he will now publish the decryption “key”. Brown somehow failed to see that the key will have to be used by the algorithm itself, which is encrypted. Sort of like having a key inside a locked safe is not much of a help.

There are other “magic” things in the book, like a guy sending emails using a phone pager and a pager network.

December 26, 2009 at 10:08 pm |

Apropos this post, I recently read a wonderful science fiction story by Frederick Pohl. It’s called “The Mapmakers” and concerns the exploration of interstellar (and even intergalactic) space after faster-than-light travel has been invented. The one flaw in the story is that said faster-than-light travel relies on the particular geometry of “hyperspace”, which is described as “n-dimensional Riemannian space”. There is no value of n specified! I assume Pohl looked up, or was told, the definition of an n-dimensional Riemannian manifold, but did not really think about the fact that n was a parameter, not part of the name of the concept. Although the story is still great, the sentences where this issue pops up seem a little silly.

December 29, 2009 at 1:08 am |

This can’t really compete with your example, but there was once an episode of “Star Trek: The Next Generation” in which a game called “Strategema” was introduced. The first thing that confused me was whether Strategema was supposed to be a pure strategy game like go or chess. The depictions of people playing the game make it look like a video game, in which rapid reflexes are required, but all the verbal discussion of the game suggests that we should think of it as a pure strategy game. Anyway, in the plot, there is an arrogant character called Kolrami who is very good at Strategema. The crew, annoyed by Kolrami’s arrogance, urges Data to teach Kolrami a lesson by defeating Kolrami at Strategema. Data hesitates because he thinks it’s an unfair contest since he, Data, can play perfectly. Eventually he consents, but to his amazement, he loses quickly to Kolrami. Data is confused and concludes that his software must have a bug, so he drops everything and works on debugging himself. The problem is solved not when Data finds a bug but when Counselor Troi offers some wise-sounding words. Data then challenges Kolrami to a rematch, and this time finds a way to keep the game going indefinitely, until Kolrami finally abandons the game in disgust at being unable to make progress. Data explains his success by saying that instead of trying to win, he adopted the strategy of trying not to lose.

The average viewer probably saw nothing at all amiss, but like Data, my brain dropped everything in an attempt to “debug” the plot until I finally snapped out of it by telling myself, “Look, it’s just a story! Logical coherence is beside the point!”

Other examples that come to mind off the top of my head include the botched explanation of Nash equilibria in the movie “A Beautiful Mind,” and Chinghiz Aitmatov’s conflation of the solar system with the Milky Way galaxy in “A Day Lasts More than a Hundred Years.” (The latter is not math, I guess, but it has the same feel.)

January 13, 2010 at 4:22 pm

A real-life game comes to mind here. From what my friends tell me of the game Abalone, it is relatively easy to play not to lose and to keep the game going indefinitely; but if you try to win, you open yourself up to losing.

Joel

January 13, 2010 at 4:37 pm

Abalone is a good example of what the scriptwriters may have been thinking of (at least if you use the traditional starting position rather than the Belgian daisy, which was introduced about ten years ago precisely to mitigate the problem Joel alludes to). It all sounds plausible to us imperfect human players. If Data were human then it is easy to imagine Data thinking he could win, but being mistaken, and getting crushed, until he realized he was being too aggressive. But it doesn’t make any sense for perfect players. A perfect Abalone player would not lose.

The plot is fine as long as we don’t take Data too literally, but just realize that he’s a character (like Spock) that allows the writers to explore what happens when a human being acts “overly logically.” Perhaps the Star Trek writers should write a self-referential episode where Data watches the Strategema Star Trek episode and gets confused the way I’ve gotten confused!

January 2, 2010 at 4:28 am |

Since mathematics is viewed so darkly by many people, authors are likely taking on considerable risk when they incorporate mathematics into their fictional stories. As such, I think authors should be cut plenty of slack. If they are portraying mathematics in a positive light, they are doing a service to the mathematics community. A positive light being shined on mathematics is more important than correctness right now. Although the incorrectness may disrupt the story for working mathematicians, they should let it slide for the greater good.

January 4, 2010 at 12:25 am |

It sounds like it was a translation error, but it’s kind of funny to imagine Wiles

with a big computer program. I don’t think he even writes TeX.

January 9, 2010 at 4:26 pm

To Patrick: I always assumed that Wiles wrote TeX, based on a remark Knuth made in an interview:

“One of the most important somehow to me was last month when I went to the library and saw Andrew Wiles’s solution to Fermat’s Last Theorem. I think a lot of you know that it was front-page news. . . Just as people can remember where they were when they heard about Kennedy being assassinated, I know mathematicians can all remember where they were when they ﬁrst heard that Fermat’s Theorem was solved. The paper came out in the Annals of Mathematics last month; it arrived in our library and I saw it sitting there, and I looked at it and

it was just wonderful for me because it was in TEX and it looked gorgeous! [laughter] This to me was the . . . you know, it was so . . . I mean, I almost felt like I had helped to solve the Theorem myself!”But, of course, that doesn’t say who actually typed the paper.

January 8, 2010 at 9:50 am |

To Timothy Chow. I don’t really see the problem. If both players in strategema can force a draw, the search for a winning strategy must naturally be in vain. And since the game apparently is infinite, there is no reason to think Data could have used something like backward induction which would solve both problems at once.

January 8, 2010 at 5:54 pm

If both players in Strategema can force a draw, then if Data had indeed played perfectly the first time around, then he would not have lost. He would have at worst drawn. Therefore Data did not play perfectly the first time around. If Data had sufficient computational power to solve Strategema (and we are given no indication that he didn’t) then he was correct to infer that he had a bug. Yet the plot indicates that he didn’t have a bug; his problem was some kind of psychological one that was best solved by Counselor-Troi-like wise words.

January 22, 2010 at 9:03 am |

Re Strategema:

My understanding was that it was a pure strategy game, but real time. It turned out that Data — while trying to win — was unable to respond fast enough to his opponent in the first game, and so he lost. In the second game (after the talk with various people), he adopted the simpler strategy of avoiding a loss. The resulting pruning of the possibilities enabled him to compute plans in time to keep up with his opponent (which would eventually result in a win for Data when his opponent succumbed to the effects of fatigue and slowed down enough for Data to explore winning possibilities safely).

January 22, 2010 at 7:31 pm

This is a clever attempt at resolving the problem, but I don’t find it very plausible. It’s been a while since I watched the episode, but as I recall, none of the verbal discussion of Strategema (as opposed to the video footage of people playing the game) suggested that computational speed was the issue. If it had been, surely Data would have realized that he simply did not have enough time to calculate the correct strategy, and would not have scurried off to debug himself. Furthermore, Data’s problem was solved not by a technical suggestion that he adopt a computationally more tractable strategy, but by wise-sounding words that changed his psychological mindset.

It seems clear to me that the script writers were just trying to send the message that for a

human beingto be a true champion, technical virtuosity is not enough, even in pure strategy games like chess and go. A chess match is also a psychological match, and one must be properly prepared psychologically in order to play one’s best. This is a fine message as far as it goes; it’s just that it doesn’t apply toperfectplayers. Hence the contradictions.June 29, 2010 at 1:26 am |

Four color theorem’s proof needed computers. He probably mixed up the stories.

August 27, 2010 at 6:21 am |

[…] genius who solves Fermat’s last theorem, or thinks she does, in a passage that Tim Gowers singled out for attention some time […]

November 4, 2010 at 5:54 am |

[…] the mathematically inclined, there’s a good discussion of it online here and some detailed methods […]

November 9, 2010 at 7:39 pm |

The answer lies in philosophy not mathmatics. It’s easy, just don’t think of it logically. When you stop trying to figure it out the answer will be obvious.

November 12, 2011 at 6:14 am |

http://divisbyzero.com/2010/05/24/mathematics-in-novels-and-martin-gardner-rip/

(at the very end)

February 26, 2012 at 1:45 pm |

[…] fines del 2009, en el blog de Tim Gowers, Barry Cunningham trajo a colación un supuesto error matemático de Borges, error que él detectara en alguna traducción al inglés […]

March 20, 2012 at 8:08 am |

Here is my solution – I was reading it in the wee small hours because I couldn’t put it down – which may help to explain a few things!

Can’t remember exact wording: She giggles and then there is something to the effect that it is more a question for philosophers or something like that.

“She GIGGLES” – it is a joke – it is funny! – get it?

… as in 1+1=”a window” all kids learn that – get it yet?

Well, fine, ok: what do horrible, unsolvable maths questions do? they put you to sleep, right? and z3 is in fact “zzz” which any child can tell you means “sleep” so x3 + y3 = “zzz”.

x2 + y2 = z2 is Pythagoras theorem for a right angled triangle and completely solvable: apparently x3 + y3 = z3 is not.

I don’t know the maths of trying to solve it but late at night reading the book, she is a maths genius who could not solve the problem, until she “gets the joke and giggles” – I actually just came on line to see if someone else had “discovered” the answer and reached the same conclusion I did – I laughed out loud reading it because my sleep deprived brain actually made the connection between being tired and “zzz”.

x3 + y3 = z3 is a parody and the answer is funny.

there is a Simpsons episode that had a maths joke with the solution being rdr2 (which is rdrr, or – say it – r d r r – “ha de ha ha”)

ps just in case: ( 1+1=window: if you write 1 with + touching the 1 then write another 1 touching the other side of the 1 then write the = as one line above the + and one below, you have drawn a window )

of course I could have it completely wrong but I don’t think so and I like it! She is a maths genius and recognises it can’t be solved and that the mathematician was having a laugh, all these serious people trying with great seriousness to solve the problem and they don’t realise it is a joke – she has just got the joke!

“The answer was so disarmingly simple. A game

with numbers that lined up and then fell into place in a simple formula that was most

similar to a rebus.

Fermat had no computer, of course, and Wiles’ solution was based on mathematics

that had not been invented when Fermat formulated his theorem. Fermat would never

have been able to produce the proof that Wiles had presented. Fermat’s solution was

quite different.

She was so stunned that she had to sit down on a tree stump. She gazed straight

ahead as she checked the equation.

So that’s what he meant. No wonder mathematicians were tearing out their

hair.

Then she giggled.

A philosopher would have had a better chance of solving this riddle.

She wished she could have known Fermat.

He was a cocky devil.”

The author refers to it as a riddle or a puzzle so you need to think laterally. ie the answer is z3, z3 “lined up” is zzz which we are told is a rebus, the rebus of “zzz” is sleep, an unsolvable maths problem puts you to sleep. The exponent of 3 is used as any child will tell you what “zzz” is. to me the joke is also that the larger the exponent the more z’s you get. The harder the equation the more it puts you to sleep.

I think that the author expected more of the general population to get the joke.

Sadly mathematicians try to solve it or pick holes in it, and non-mathematicians skip over it thinking they wouldn’t understand.

April 6, 2012 at 9:54 pm |

[…] numbers, and he was piqued to comment Re: Steig Larsson, or perhaps the translator Reg Keeling in Wiles meets his match. So, Salander’s picture perfect memory, capacity to defeat armed motorcycle gangs in […]

November 25, 2012 at 3:15 pm |

Why are you criticizing something that was always meant to be fiction?

November 25, 2012 at 4:18 pm

Because the extreme silliness of this passage spoilt it for me

as fiction: it made me too aware of the hand of the author.March 19, 2015 at 6:08 pm |

[…] en la sección de comentarios del blog del distinguido Tim Gowers, el matemático Barry Cunningham trajo a colación un supuesto error matemático de Borges, error que él detectara en alguna traducción al inglés […]

March 4, 2016 at 12:14 am |

[…] en la sección de comentarios del blog del distinguido Tim Gowers, el matemático Barry Cunningham trajo a colación un supuesto error matemático de Borges, error que él detectara en alguna traducción al inglés […]