|
|
||
| 1. Chapter 1 |
|
|
|
||
|
|
||
| 2. What CS is: |
|
|
|
||
|
|
||
| 4. The status of algorithms |
|
|
|
||
|
|
||
| 5. Complexity of Algorithms |
|
|
|
||
|
|
||
| 6. Complexity of Algorithms 2 |
|
|
|
||
|
|
||
| 7. Complexity of Algorithms 3 |
|
|
|
||
|
|
||
| 8. Complexity of Algorithms 4 |
|
|
|
||
|
|
||
| 9. Algorithm |
|
|
|
||
|
|
||
| 10. Algorithm definition |
|
|
|
||
|
|
||
| 11. This is NOT an Algorithm! |
|
|
|
||
|
|
||
| 12. Also NOT an Algorithm! |
|
|
|
||
|
|
||
| 13. A good Example of an algorithm |
|
|
|
||
|
|
||
| 14. CS studies algorithms |
|
|
|
||
|
|
||
| 15. Therefore, our task is to: |
|
|
|
||
Once upon a time a king needed a great
task performed. In response, a clever
young man named Mathew agreed to do the
work, if the amount of payment was
adequate. when the king asked Mathew
about his requirements for compensation,
Mathew responded that the king might
choose between two options:
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.
'Under this definition are combined the notions of four types of arithmetic calculations, namely, addition, multiplication, subtraction and division.'