This record is called a ship's log.
VOA: special.2009.12.23
Here's another way to think about why is this log.
那我来问一个完全不一样的问题。
We started off talking about binary search, and I suggested that this was a log algorithm which it is, which is really kind of nice.
我告诉了你们这是一个对,数级的算法,这是很棒的,我们来一起看看这个算法到底做了什么。
And realize too, as we say on this home page here, by default, we anonomize you when you log into this bulletin board, whereby, you're all logged in as quote unquote students.
并且认识到,像我们说的这个主页,默认情况下,当你登陆这个电子公告牌,我们禁止你们,都匿名学生登陆。
And if you look at this series, the series log of one, what is the series expansion?
如果你们看这个式子,它的对数分之一,它的指数是多少?
And so, we can rewrite this as the work nRTln is equal to minus nRT log p1 over p2, nRTln or nRT log p2 over p1.
因此我们可以把这个式子改写一下,功等于负的,或者。
It'll say is this really what you ate, and if you ate it, then you say yes I ate this, and then it adds to the electronic log.
系统会问这是否确实是你吃的,如果确实是 就选择是,你的选择会被记入电子日志
All right? It's now something that I can search in constant time. And that's what's going to allow me to keep this thing as being log.
在固定的时间内搜索,这样就可以让时间复杂度保持在对数级,好的,考虑过了这些。
OK. So this is, in fact, log. Now, having said that I actually snuck something by you.
就是对数次,我已经教给你们一些。
OK. There's some constants in there, but this is order log b.
对数级的,这太重要了,接下来我要给你们看个例子。
And so we can write this, ln minus nRT log V2 over V1.
所以结果是,负的nRT除以。
If we can sort things, you know, we get this n log n behavior, and we got a n log n behavior overall. But can we actually do better in terms of searching.
如果我们可以排序,如你所知,我们有n,log,n级别的算法,并且我有一个整体的n,log,n级别的算法,但是我们在搜索方面可以做的更好吗?
So you can log into this, not only chat with this interactively, but on the right-hand side here, which is just a wallpaper right now, you can actually grant us view or control of your own screen.
所以你可以登录进去,不仅仅是,相互间的聊天,在这里的右手边,这只是一张壁纸,你可以允许我们查看或者控制你的屏幕。
But mathematically, we've mentioned this before, log N or really to be precise, log base 2 of N, is the way you express this mathematically.
但从数学上说,之前我们已经提到过了,准确地说是log,N,以2为底N的对数,这就是它在数学上的表示。
N 6 Sixteen, so that's 16 times log base 2 of 16 and though I'm writing small here, log base 2 of 16, 16 this gives me 4 'cause 2 to the 4 equals 16.
是多少呢?,Well,,N,is,what?,16,那就是16乘以以2为底16的对数6,在这儿我将2写小一些,以2为底16的对数是4,因为2^4等于。
w This is just q plus w. There's w, RT1 ln q has to be R T1 log of V2 over V1.
而U等于q加,那是w,q应该是。
Now, one of the questions we could still ask is, right, we've got binary search, which has got this nice log behavior.
目前,还有一个问题我们仍然要问的是,对,我们已经学了二分查找,有着非常好的log级别的行为。
But that merging process only takes N steps, N*log N so that's N times log of N. Now, it's a little tricky to reason through this perhaps the first time, let's just take a very simple example and see if we can do a little sanity check here.
但这个合并过程只需要N步,所以时间复杂度是,第一次对此进行推论可能会有点儿棘手,我们举一个简单的例子,看看我们能否做一些完整性的检查。
应用推荐