Mathematical analysis of an algorithm replaces the stopwatch with
Arunning the code on 10,000 random inputs
Bbuying faster hardware to reduce variance
Ccounting operations as a function of input size
Dwriting the code in a faster language like C
Answer & Solution
Correct answer: C. counting operations as a function of input size
Mathematical analysis sidesteps hardware and language entirely by expressing the work the algorithm does as a function of input size. The other options are still empirical: they may speed up the experiment but cannot generalise to unseen inputs or hardware.
Related questions
An NP-hard problem differs from an NP-complete one because NP-hard problemsThe first problem proved to be NP-complete wasA problem X is NP-complete if and only ifWhy does theoretical computer science draw the line at 'polynomial-time' for tractability?Which set inclusion is established (i.e., proven, not open)?The class NP is the set of decision problems for whichFloyd-Warshall detects the presence of a negative cycle byTopological sort is well-defined for