level 9
解决一个问题的方法,不随着问题规模的增大而增大,它就是O(1)
2012年12月11日 15点12分
3
也就是常数阶啊
2012年12月12日 01点12分
level 12
DEFINITION T(N) = O(
f(N)) if there are positive constants c and n0 such that T(N) <=
c f(N) when N >= n0.
=>
DEFINITION T(N) = O(
1) if there are positive constants c and n0 such that T(N) <=
c when N >= n0.
2012年12月11日 16点12分
7
level 6
其实别被等号误导,这不算f(n)=O(h(n))其实不是一个等式,可以这么解释,O(h(n))表示的是一个**,而f(n)是这个**的一个元素
2012年12月11日 16点12分
8
**(这也屏蔽?)
2012年12月11日 16点12分
算导说的很清楚, 就是指属于, 这里abuse了一下等号
2012年12月11日 17点12分
set必须屏蔽..
2012年12月11日 18点12分
是啊,没微积分基础,被误导了
2012年12月12日 07点12分
level 11
至少我这种看个开头就扔的家伙也知道 书上是有解释的
2012年12月11日 16点12分
9
level 12
说的很清楚吧, 就是指O(n^0).
n为输入数据大小, 跟O(n^2)里的一样.
2012年12月11日 17点12分
10
但奇怪雇佣问题里不管输入多少应聘者,O(n^0)都是0.577215...
2012年12月12日 02点12分
level 12
根据定义的话, 嗯, 耗子说的很清楚了..
话说我也看到这, 但是习题不会做了(于是卡在这了)..
2012年12月11日 17点12分
11
level 5
n的零次方不就是1么。比如我的代码是对比一个数据,这个时候就把它的复杂度看作’1’,之后要对比n个数据,复杂度就是’n’咯,代码里的表现就是多了个关于n的for循环,
2012年12月12日 00点12分
12
level 12
For a given function g(n), we denote by O(g(n)) (pronounced “big-oh of g of n” or sometimes just “oh of g of n”) the set of functions
O(g(n)) = {f(n) : there exist positive constants c and n0 such that 0 <= f(n) <= cg(n) for all n > n0} .
-- Introduction to Algorithms, p.47
Since any constant is a degree-0 polynomial, we can express any constant function as Theta(n0), or Theta(1). This latter notation is a minor abuse, however, because the expression does not indicate what variable is tending to infinity.2 We shall often use the notation Theta(1) to mean either a constant or a constant function with respect to some variable.
-- p.46
2012年12月12日 05点12分
15
看了下书,渐进的作用是略去等式无关紧要的细节,看来要算具体值得还原出整个等式。。。雇佣问题应该是个特例,计算期望值的时候把多项式E[X]=H_n完整表示了
2012年12月12日 07点12分
回复 endrollex :
![[汗]](/static/emoticons/u6c57.png)
先把前面的内容看完吧. 2.2节(第三版)有一个详细的例子(关于Insertion sort).
2012年12月12日 07点12分