The wheat and chessboard problem (sometimes expressed in terms of rice grains) is a mathematical problem expressed in textual form as:
The problem may be solved using simple addition. With 64 squares on a chessboard, if the number of grains doubles on successive squares, then the sum of grains on all 64 squares is: and so forth for the 64 squares. The total number of grains can be shown to be 264-1 or 18,446,744,073,709,551,615 (eighteen quintillion, four hundred forty-six quadrillion, seven hundred forty-four trillion, seventy-three billion, seven hundred nine million, five hundred fifty-one thousand, six hundred and fifteen, over 1.4 trillion metric tons), which is over 2,000 times the annual world production of wheat.[1]
This exercise can be used to demonstrate how quickly exponential sequences grow, as well as to introduce exponents, zero power, capital-sigma notation, and geometric series. Updated for modern times using pennies and a hypothetical question such as "Would you rather have a million dollars or a penny on day one, doubled every day until day 30?", the formula has been used to explain compound interest. (Doubling would yield over one billion seventy three million pennies, or over 10 million dollars: 230-1=1,073,741,823).[2] [3]
The problem appears in different stories about the invention of chess. One of them includes the geometric progression problem. The story is first known to have been recorded in 1256 by Ibn Khallikan.[4] Another version has the inventor of chess (in some tellings Sessa, an ancient Indian Minister) request his ruler give him wheat according to the wheat and chessboard problem. The ruler laughs it off as a meager prize for a brilliant invention, only to have court treasurers report the unexpectedly huge number of wheat grains would outstrip the ruler's resources. Versions differ as to whether the inventor becomes a high-ranking advisor or is executed.[5]
Macdonnell also investigates the earlier development of the theme.[6]
The simple, brute-force solution is just to manually double and add each step of the series:
T64
where
T64
The series may be expressed using exponents:
T64=20+21+22+ … +263
and, represented with capital-sigma notation as:
63 | |
\sum | |
k=0 |
2k.
It can also be solved much more easily using:
T64=264-1.
A proof of which is:
s=20+21+22+ … +263.
Multiply each side by 2:
2s=21+22+23+ … +263+264.
Subtract original series from each side:
\begin{align} 2s-s&= \cancel{21}+\cancel{22}+ … +\cancel{263
The solution above is a particular case of the sum of a geometric series, given by
a+ar+ar2+ar3+ … +arn-1=
n-1 | |
\sum | |
k=0 |
ark=a
1-rn | |
1-r |
,
where
a
r
n
In this problem
a=1
r=2
n=64
Thus,
\begin{align}
n-1 | |
\sum | |
k=0 |
2k&=20+21+22+ … +2n-1\\ &=2n-1 \end{align}
for
n
The exercise of working through this problem may be used to explain and demonstrate exponents and the quick growth of exponential and geometric sequences. It can also be used to illustrate sigma notation.When expressed as exponents, the geometric series is: 20 + 21 + 22 + 23 + ... and so forth, up to 263. The base of each exponentiation, "2", expresses the doubling at each square, while the exponents represent the position of each square (0 for the first square, 1 for the second, and so on.).
The number of grains is the 64th Mersenne number.
In technology strategy, the "second half of the chessboard" is a phrase, coined by Ray Kurzweil,[7] in reference to the point where an exponentially growing factor begins to have a significant economic impact on an organization's overall business strategy. While the number of grains on the first half of the chessboard is large, the amount on the second half is vastly (232 > 4 billion times) larger.
The number of grains of wheat on the first half of the chessboard is, for a total of 4,294,967,295 (232 - 1) grains, or about 279 tonnes of wheat (assuming 65 mg as the mass of one grain of wheat).[8]
The number of grains of wheat on the second half of the chessboard is, for a total of 264 - 232 grains. This is equal to the square of the number of grains on the first half of the board, plus itself. The first square of the second half alone contains one more grain than the entire first half. On the 64th square of the chessboard alone, there would be 263 = 9,223,372,036,854,775,808 grains, more than two billion times as many as on the first half of the chessboard.
On the entire chessboard there would be 264 - 1 = 18,446,744,073,709,551,615 grains of wheat, weighing about 1,199,000,000,000 metric tons. This is over 1,600 times the global production of wheat (729 million metric tons in 2014 and 780.8 million tonnes in 2019).[9]
Carl Sagan titled the second chapter of his final book "The Persian Chessboard" and wrote, referring to bacteria, that "Exponentials can't go on forever, because they will gobble up everything."[10] Similarly, The Limits to Growth uses the story to present suggested consequences of exponential growth: "Exponential growth never can go on very long in a finite space with finite resources."[11]