0

I have two algorithms has a complexity of O (n log n) and the B-complex algorithm (n^2). By imposing NA size the larger issue that a algorithm can solve in a given time and NB size the larger issue that the B algorithm can solve in the same time on the same machine. Prove that NB < NA.

How can I solve this question ? Thank you

  • Please credit the original source of the problem. – John L. May 20 '19 at 21:44
  • The statement you've been asked to prove isn't true in the generality that it's been stated. Suppose that $B$ takes exactly $n^2$ steps and $A$ takes $10^{10}n\log n$ steps. Then, for example, for all inputs of length less than $10^{10}$, $B$ is faster. – David Richerby May 20 '19 at 22:06
  • Actually, it's an exercise from my teacher, but I didn't know how to solve it. Thank you so much @DavidRicherby – user628688 May 21 '19 at 18:35

0 Answers0