Theory of Algorithms Two computer scientists invented differ
Theory of Algorithms
Two computer scientists invented different algorithms for solvong the same problem, and each of them claimed that his/hers is the best. How can you determine which one is the best? In their report they stated:
scientist 1: T(N)=O(NlgN)
 scientist 2: T(N)= O(NsqrtN)
assume N to be large.
 
 can anyone assist?
 note. the O\'s have a line in them
Solution
We know that the complexity is generally calculated for worst case and we repressent it with the help of mathemectical function because we would represnt exact value of complexity
In case of log and sqrt log function gives smaller value
in that case scientist1 will give better solution.
Note Square root equations and and logarithmic equations are only similar in that f(x) is always increasing (when function is positive), but f\'(x) is constantly decreasing, with a lower bound of zero.

