Requires define probability distribution the set inputs
these inputs may be important).
• We will have difficulty comparing the experimental running times of two algorithms unless the experiments were performed in the same hardware and
pose serious hurdles too, of course. Thus, we would ideally like to have an analysis
tool that allows us to avoid performing experiments.
This methodology aims at associating, with each algorithm, a function f(n) that
characterizes the running time of the algorithm as a function of the input size n.
we wish to analyze a particular algorithm without performing experiments on its
running time, we can perform an analysis directly on the high-level pseudo-code
169 | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||||
5 ms | - | - | - | - | - - | - | - | - | - |
|
||||||
|
- - | • | ||||||||||||||
1 ms | ||||||||||||||||
A | B | c | D | E | F | |||||||||||
|