Example: 3-SUM
Given N distinct integers, how many triples sum to exactly zero?
Brute Force Algorithm
Measuring the running time
We can calculate the real running time for various input sizes and make a plot.
Seems non-linear, we could make the log-log plot to make it look more linear. And after that regression could be performed to get the coefficient.
Hereby we assume the function is exponential function, and we can use the computed function to predict the running time for different input size.
Experimental Algorithm
- System independent effects
- Algorithm
- Input Data
- System dependent effects
- Hardware
- Software
- System