00:01
All right, so this question, we have two parts, part a and part b.
00:04
So the first part is, suppose we have three different algorithms for solving the same problem.
00:09
Each algorithm takes a number of steps that is of the order of one of the functions listed.
00:15
So the functions we have are n, log base 2 of n, we have n 3 over 2, and we have n times log base 2 of n squared.
00:31
Which algorithm is most efficient.
00:33
So when we compare these three functions, we'll call this f, we'll call this 1g, and we'll call this 1h.
00:42
In order to solve the task of finding out which function goes at the smallest rate, in order to find out the answer, we need to find out which function goes at the smallest rate.
00:57
That's because we take the algorithm, which takes a number of steps.
01:01
We want to be able to do the least possible steps, so we want to take the one with the smallest growth.
01:06
So first we can compare the functions.
01:09
So limit x approaches infinity of n, log base 2 of n over n3 over 2.
01:19
That's equal to natural log of n over natural log of 2 over n over n over n over to the power of 3 over 2 minus 1.
01:37
And using log rules, we can simply get this is equal to 1 over natural lock of 2 by bringing that down times the limit as x approaches infinity of natural log of n over n to the 1 half.
01:52
Then we can apply lopoul's rule to the top and bottom here.
01:56
We'll get 1 over natural log of 2 times the limit as x approaches infinity.
02:04
Of 1 over n over 1 half n to the 1 half minus 1.
02:11
Once again, we can bring this 1 half out.
02:15
So that will be 2 over natural log of 2 times the limit as x approach infinity.
02:24
And we can rewrite the rest as n to 1 half because it will be a negative 1 half over n...