"As I was going to St Ives" (Roud 19772) is a traditional English-languagenursery rhyme in the form of ariddle.
The most common modern version is:
The following version is found in a manuscript (Harley MS 7316) dating from approximately 1730:[1]
A version very similar to that accepted today was published in theWeekly Magazine of August 4, 1779:[2]
The earliest known published versions omit the words "a man with" immediately preceding the seven (or nine) wives, but he is present in the rhyme by 1837.[3]
There were a number of places calledSt Ives in England when the rhyme was first published. It is generally thought that the rhyme refers toSt Ives, Cornwall, when it was a busy fishing port and had many cats to stop the rats and mice destroying the fishing gear, although some people argue it wasSt Ives, Cambridgeshire, as this is an ancientmarket town and therefore a similarly plausible destination.[4][5]
The traditional understanding of this rhyme is that onlyone is going to St Ives—the narrator. All of the others are comingfrom St Ives. The trick is that the listener assumes that all of the others must be totaled up, forgetting that only the narrator is said to be goingto St Ives.[1][6] If everyone mentioned in the riddle were bound for St Ives, then the number would be 2,802: the narrator, the man and his seven wives, 49 sacks, 343 cats, and 2,401 kits.
This interpretation provided the basis for a verse reply from "Philo-Rhithmus" ofEdinburgh, in the September 8, 1779, issue of theWeekly Magazine:[7]
Owing to various ambiguities in the language of the riddle, several other solutions are possible. While it is generally assumed that the narrator met the man and his wives comingfrom St Ives, the word "met" does not necessarily exclude the possibility that they fell in while traveling in the same direction.[8] In this case, there is no trick; just an arithmetical calculation of the number of kits, cats, sacks, and wives, along with the man and the narrator. Another possible answer is that the man with seven wives mighthave seven wives, but that none of them was accompanying him on the journey. One way of stating the answer, taking account of these ambiguities, is "at least one, the narrator plus anyone who happens to be travelling in the same direction".[9] Still other interpretations concern the phrasing of the question, which might be understood to exclude the narrator. If only the narrator were travelling to St Ives, but the phrase, "kits, cats, sacks, and wives" excludes him, then the answer to the riddle is zero. If everyone—including those being carried—were travelling to St Ives, but only the kits, cats, sacks, and wives are counted, then the answer is precisely 2,800.
A similar problem is found in theRhind Mathematical Papyrus (Problem 79), dated to around 1650 BC. The papyrus is translated as follows:[10]
houses | 7 | |||
1 | 2,801 | cats | 49 | |
2 | 5,602 | mice | 343 | |
4 | 11,204 | spelt | 2,301 [sic] | |
hekat | 16,807 | |||
Total | 19,607 | Total | 19,607 |
The problem appears to be an illustration of analgorithm formultiplying numbers. The sequence 7, 72, 73, 74, 75 appears in the right-hand column, and the terms 2,801, 2×2,801, 4×2,801 appear in the left; the sum on the left is 7×2,801 = 19,607, the same as the sum of the terms on the right. The equality of the two geometric sequences can be stated as the equation (20 + 21 + 22)(70 + 71 + 72 + 73 + 74) = 71 + 72 + 73 + 74 + 75, which relies on the coincidence 20 + 21 + 22 = 7.
Note that the author of the papyrus listed a wrong value for the fourth power of 7; it should be 2,401, not 2,301. However, the sum of the powers (19,607) is correct.
The problem has beenparaphrased by modern commentators as astory problem involving houses, cats, mice, and grain,[11] although in the Rhind Mathematical Papyrus there is no discussion beyond the bare outline stated above. Thehekat was1⁄30 of a cubiccubit (approximately 4.8 L or 1.1 imp gal or 1.3 US gal).