Difference between revisions of "CSC103: DT's Notes 1"
Line 1,641: | Line 1,641: | ||
There are many such puzzles in our cultures that attempt to demonstrate the extraordinary power of exponential growth through seemingly impossible feats. Another one is the story of grains of rice on a chessboard as told by David R. Henderson and Charles L. Hooper<ref name="rice">David R. Henderson and Charles L. Hooper, ''Making Great Decisions in Business and Life'', Chicago Park Press, 1st edition, March 12, 2007.</ref>: | There are many such puzzles in our cultures that attempt to demonstrate the extraordinary power of exponential growth through seemingly impossible feats. Another one is the story of grains of rice on a chessboard as told by David R. Henderson and Charles L. Hooper<ref name="rice">David R. Henderson and Charles L. Hooper, ''Making Great Decisions in Business and Life'', Chicago Park Press, 1st edition, March 12, 2007.</ref>: | ||
<br /> | <br /> | ||
− | :::In a time of hunger, the Emperor of China wanted to repay a peasant who had saved the life of his child. The peasant could have any reward he chose, but the Emperor laughed when he heard the silly payment the foolish peasant selected: rice on a chessboard. The peasant wanted one grain of rice on the first square, doubling to two on the second, doubling to four on the third, and so on. After the Emperor agreed, his servants brought one bag of rice into his court and began tediously counting rice. Soon, he called for more and more bags of rice... | + | :::''In a time of hunger, the Emperor of China wanted to repay a peasant who had saved the life of his child. The peasant could have any reward he chose, but the Emperor laughed when he heard the silly payment the foolish peasant selected: rice on a chessboard. The peasant wanted one grain of rice on the first square, doubling to two on the second, doubling to four on the third, and so on. After the Emperor agreed, his servants brought one bag of rice into his court and began tediously counting rice. Soon, he called for more and more bags of rice...'' |
− | |||
− | |||
<br /> | <br /> | ||
+ | It turns out that it is impossible to grant such as wish, as the number of grains that would have to be put on the 64th square of the 8-by-8 chessboard is 2 times 2 times 2 times 2... 64 times. That is a series of 64 numbers 2 multiplying each other. That is 2<sup>64</sup>, or 18,446,744,073,709,551,616, much more than the quantity of rice produced on earth in a single year. | ||
+ | |||
+ | |||
Let's stay with this second example and write down the number of the square followed by the quantity of grains of rice: | Let's stay with this second example and write down the number of the square followed by the quantity of grains of rice: | ||
Revision as of 07:32, 1 October 2013
--© D. Thiebaut 08:10, 30 January 2012 (EST)