I'm going to let t of b be the number of steps it takes to solve the problem of size b.
我会设立一个t作为,计算指数为b的时候解决问题需要的步骤数。
B "Ok, so I don't care if I don't get a B in the course.
我不在乎成绩是不是。
OK. So if I look at this code, first of all I'm calling search, it just has one call, so looks like search is constant, except I don't know what happens inside of b search. So I've got to look at b search.
首先调用一下搜索,就一步调用,看起来搜索是固定的,除非我不知道二分搜索的原理,那我们来看看二分搜索吧,所以让我们看看,第一行打印出来的内容。
And you know, A) I don't have the energy to do this, and B) it would probably violate four hundred different privacy laws or whatever But if I took all those faces and morphed them together, I would get a very pretty face ? And how do we know this?
你们知道,第一,我没有精力这么做,第二,这可能会违反400条不同的隐私条例,但如果我把你们的样子,混合在一起,会得到一张很漂亮的脸,我们怎么知道?
And a bit, B-I-T, just a shorthand for binary digit, 2 so a digit of zero over a one, bi means two, you only have two digits.
比特,B-I-T,是binary,digit的简写,从0到1的数字,而bi表示,所以你就只有两个数字。
So, let's just arbitrarily put it between these two in this case here, but actually there's no reason we couldn't also put it between oxygen b and c, so I'm going to draw another structure where we have it here.
那么,让我们任意地将它们放在这两个之间,但实际上我们没有理由,不能把它们放在氧原子,B,与,C,之间,因此我将把另外一个结构画在这里。
If you think of two towns down here, Brive,b-r-i-v-e,famous for its rugby, and Tulle,t-u-l-l-e,which is a capital.
如果你可以想起来这儿的两个城镇,布瑞福,b-r-i-v-e,以英式橄榄球运动而负有盛名,图勒,t-u-l-l-e,是一个省的首府
If I can tell a story in which A exists and B doesn't exist, it's got to follow that A and B are not the same thing.
如果我跟你说A存在但B不存在,就可以得出结论A和B不是一个东西
I personally don't like swings that much and it's the B-/B+ range, so I'd much rather prefer that to a swing from A to C, and that's my reason.
我不喜欢成绩波动很大的,比如B-/B+这个范围,所以我还是喜欢像A到C这样小点的,这就是我的原因
If I reduce that it would be 3 plus t of b minus 3, so in general 3*k+t this is 3 k plus t of b minus k. OK.
把b减去一个,在外面加个3就可以了,因此也就是。
It says, in either case in general, t of b-- and this is where I'm going to abuse notation a little bit but I can basically bound it by t, 12 steps plus t of b over 2.
我可以用一个,比12+t的数代表,这里有点不准确的地方,具体的步数依赖于奇数偶数,但是你们可以看到在两个case中。
t In the b even case, again I'm going to let t of b be the number of steps I want to go through.
如果b为偶数,那么我还是要用,来代表解决这个问题需要的步骤数。
In particular, how would I write an expression for t of b minus 1?
尤其是,我是怎么写出来t的表达式的?
And if I pull it out one more level, 12k it's 12 plus 12 plus t of b over 8, 12 k because I'll have 12 of those to add up, plus t of b over 2 to the k.
总结一下也就是说,在k步以后,总步数应该是,那这种情况什么时候才能停止呢?,才能到达最基本的情况呢?
On the next step though, this, we get substituted by that. Right, on the next step, I'm back in the even case, it's going to take six more steps, plus t of b minus 1. Oops, sorry about that, over 2.
这一步就是偶数了,这一步会让我们得到,6+t这样的结果,因为b-1现在是偶数了,别忽略这里的细节。
This is their profit. And I won't tell you what B is for now, but let's just.. I mean I won't tell you exactly what it is, but I'll explain it.
这就是利润表达式,先不讨论B,我是说我们先不讨论B到底多大,我们照常计算
应用推荐