These are part of my notes for the Coursera course: Algorithms, Pt I (Princeton).
##Doubling Hypothesis This is used to determine the variables of a power law quickly:
T = a*N^b
Methodology
-
Run algorithm many times, doubling inputs with each run.
-
Note the run time for each.
-
Take the ratios between consecutive runtime.
-
If the ratios converge to a value, take the log of that value.
b = log
(ratio) if the values to do not converge, the relationship is not a power-law relationship
-
Run the algorithm many times with different values of N to get values of T.
-
Solve for
a
for each of these. Possibly take an average.b
is known, we have values ofN
andT