作者bjk (Up2u)
看板Grad-ProbAsk
標題[理工] [algo] 99 成大資工 time
時間Wed Jan 4 10:10:21 2012
t(n) = t(n-2) + 2lgn
代代代代..
2lgn + 2lg(n-2) + 2lg(n-4) + ... + 2 <= nlgn
是這樣嗎??
--
When we toss a coin , we obtain either head or tail. Now we toss a coin 5
times. There are 2^5 possible outcomes. How many of them contain no two
consecutive heads?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 203.70.50.212
推 simonjoker:T(n)=2( lgn+lg(n-2)+lg(n-2*2)+... ) 01/04 15:37
→ simonjoker:=2*(lg 2*n!) =2*(lg2 +lg(n!) ) 01/04 15:38
→ simonjoker:=2*(1+n*lgn) 01/04 15:40
→ simonjoker:= O(n*lgn) 差不多啦 囧 01/04 15:40
→ bjk:3QQ 01/04 16:42