00:01
So a lot of times you see algorithms, and again, computer scientists are always trying to reduce the order of the algorithms that are, you know, computationally intensive.
00:11
And so you'll see that they're usually given by, you know, order of some kind of n, where n is, you know, whether the number of elements you're searching through or multiplying or doing operations.
00:26
How many operations does the algorithm take to get an answer? at most.
00:33
And how does that grow as the number of elements grows? and the best thing you want would be that it grows like n.
00:41
So as the number of the number of elements doubles, your, the effort doubles.
00:50
But, you know, obviously most algorithms aren't like that because you, you know, you need to do more sophisticated computations to, you know, find results.
01:01
So they ask, they give us three algorithms.
01:04
One goes to n log base 2 of n.
01:08
One goes to n to the three halves.
01:12
And the final one goes to n log base 2 of n all squared.
01:18
So again, what we're going to do is, you know, look at the limit as of, you know, of these two, of all these functions as n gets very large.
01:29
So let's take a look at n, log base 2 of n.
01:33
Over n to the three halves.
01:35
Well, that's just the natural log of n over the natural log of two times n to the three halves.
01:42
We can use lapitals rule now and we get this and we can then, um, you know, pull the two, multiply by two in here and then, um, you know, factor this, simplify this, and that's this just becomes square one over square root of n.
02:02
And so we can see as n goes to, infinity this goes to zero so in fact and ln in fact i mean i'm just going to call it the log log or log base 2 n grows more slowly than n to the 3 have so if you had this algorithm it would generally be better if n were large than then this algorithm now if we look at so if you want to see what what happens with with they ask us what so they want to know which is most efficient so we know this one is out and so let's check this one the end to the log base 2 n squared and again this this one should be fairly obvious because this ratio is just one over um log base 2 of n and and obviously this goes to zero as n goes to bigger so and log base 2 of n it grows slower an n log base 2 of n squared.
03:12
So that should have been pretty obvious...