Niclas Alexandersson edited b) Algorithm.tex  almost 10 years ago

Commit id: 3fe8674cb27df5c429ff15e0d23883b1dca9670d

deletions | additions      

       

For this algorithm, if we use the input itself to calculate the running time, we get:  \[  T(p, k) = \sum_{i=1}^{k}{\left[\floor{\log_2 p^{i-1}} \sum_{i=1}^{k}{\left[\floor{\log_2(p^{i-1})}  \cdot \floor{\log_2 p} \floor{\log_2(p)}  \right]} \]