0

Was wondering if someone could give a practical understanding of what it means for an algorithm to perform in (log a / log b) time?

In other words, practically speaking for an algorithm to perform in nlogn time it would need to split a max of log n times and perform n amount of work at each level. For log n performance it would split a max of log n times and perform at most a constant amount of work at each level, etc.

What would be the equivalent way of explaining the performance of a log a / log b algorithm?

Thanks

yb212
  • 1
  • An algorithm with two size metrics: a and b which executes in time proportional to the graph of log a / log b. It would take about a time unit when a and b are similarly sized. When b is much larger than a then it will execute faster, when a is much larger than b it will execute slower. the scale is logarithmic so as the values of a and b get larger total execution time becomes more stable, simply adding 1 to either will have little effect. however when a and b are smaller adding 1 will be much more noticeable. – Kain0_0 Feb 24 '20 at 01:42
  • 3
    Care to notice that log a / log b equals log a base b. When we talk about logaritmic complexities, we usualy mean log base 2 which comes from binary nature of computer data representations. Now imagine merge sort algo which instead of bisecting, trisects. Its complexity would be nlog n base 3 which Is nlog n / log 3. – slepic Feb 24 '20 at 06:33
  • 1
    In other words, imagine your description of log n but instead of the word "Split" use word "bisect". And Now change the word to "b-sect" And you got yourself a description of log n / log b. – slepic Feb 24 '20 at 07:01

0 Answers0