Mathematical model for running time
Cost of basic operations
And there are many many other ops that can be calculated.
Example:
1-SUM
2-SUM
Maybe we should just count the ones that are most expensive!!!
Simplification
Cost model
Use some basic operations as proxy for running time.
Tilde notation
- Ignore the lower order terms
- Technical Definition: f(N)∼g(N) means limN→∞f(N)g(N)=1
How to estimate a discrete sum?
- 1 take discrete course!
- 2 replace the sum with an integral, and use calculus!