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

3
  • 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. Commented Feb 24, 2020 at 1: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. Commented Feb 24, 2020 at 6: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. Commented Feb 24, 2020 at 7:01

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.