It's hard to count precisely!
- Appreciate that counting the exact number of RAM instructions requires too many details.
- Appreciate it can be tough to work out precisely the exact number of RAM instructions executed.
From the two previous exercises, you know it can be tedious and challenging to work out precisely the exact number of RAM instructions executed by a program/algorithm. Moreover, it often requires detailed information about any function/method called by the program.
It proves to be much easier to describe the running time of algorithms in terms of upper and lower bounds.
In the next chapter, we will introduce the Big-Oh notation, which significantly simplifies our analysis by ignoring details that do not impact the performance of an algorithm when the input size gets arbitrarily large.