请问log(2,m!)的近似值
log(2,1)+log(2,2)...+log(2,m)=log(2,1*2...*m)
=log(2,m!)
m比较大时m!很难算 \frac{1}{2} \log_2(2 \pi(m+\frac{1}{6}))+m \log_2(\frac{m}{e}) 怎么推导的? SQL> with t as
2(
3select 1 a,1 b from dual union all
4select 2 a,2 b from dual union all
5select 3 a,6 b from dual union all
6select 4 a,24 b from dual union all
7select 5 a,120 b from dual union all
8select 6 a,720 b from dual union all
9select 7 a,5040 b from dual union all
10select 8 a,40320 b from dual union all
11select 9 a,362880 b from dual union all
12select 10 a,3628800 b from dual)
13select a,log(2,b),1/2*log(2,(a+1/6)*asin(1)*2*2)+a*log(2,(a/exp(1))) from t;
A LOG(2,B) 1/2*LOG(2,(A+1/6)*ASIN(1)*2*2)+A*LOG(2,(A/EXP(1)))
---------- ---------- --------------------------------------------------
1 0 -.00575077
2 1 .998096592
32.5849625 2.58403295
44.5849625 4.58441475
56.9068906 6.90653024
69.4918531 9.49159826
712.299208 12.2990184
815.299208 15.2990614
918.469133 18.4690163
10 21.7910611 21.790966 真的很近似 本帖最后由 〇〇 于 2010-3-12 14:27 编辑
\frac{1}{2} \log _2(2 \pi (m+\frac{1}{6}))+m \log _2(\frac{m}{e})
wayne 发表于 2010-3-12 10:28 http://bbs.emath.ac.cn/images/common/back.gif
怎么看了有4个[?] 这个叫stirling公式.论坛里面已经出现多次了 wayne不是问过这个问题了吗?
楼主还要问,真是不应该啊。
见
http://bbs.emath.ac.cn/viewthread.php?tid=2090&fromuid=1394
已详细解答。 我第一次遇到一个实际问题,就是往一个平衡2叉树插入顺序新值的时间复杂度
页:
[1]