Complexity of Algorithms 4
The king considered these choices and
decided to go with the second options.
After all, how could a few kernels of
corn compare with a fifth of the crops
for five years!
A year went by and Mathew finished his work
and it was time for payment. The king
ordered baskets of grain to be brought in
and the counting began. For the first row
of the chess board (eight squares), the
payment was,
1+2+22+23+24+25+26+27 or
1+2+4+8+16+32+64+128=3D255 kernels of corn
much less than a bushel and the king was
smiling!
For the next row, the payment was,
28+29+210+211+212+213+214+215=3D65,280
(a bushel of corn=3D72,800 kernels). For the
third row,
216+217+218+219+220+221+222+223=3D963,040,
about 13 bushels of corn and the king was
no more smiling. The counting continued,
and for the 64th square alone, the payment
was 263=3D8x1018 kernels or about 110,000
billions bushels!! The king abdicated the
throne, and the mathemativally sophisticated
Mathew became the monarch of the kingdom.