作者lovefo (lovefo)
看板Grad-ProbAsk
標題[理工] [計概]-中興94-資科所
時間Fri Feb 26 13:40:18 2010
Five keys k1,k2,k3,k4,k5 are give in ascending order.There are six "dummy keys"
d0,d1,d2,d3,d4,d5,where di represents the values lying between ki and ki+1 with
k0=-∞ and k0=+∞. The searching probabilities for k1,k2,k3,k4,k5 are 0.15,0.1
,0.05,0.1,0.2 respectively.
The searching probabilities for d0,d1,d2,d3,d4,d5 are 0.05,0.1,0.05,0.05,
0.05,0.1 respectively Please find the optimal binary search tree.Write down
the optimal binary search tree first.then the details by which you derive this
answer.Without the detaols,you will gain no points.
這題實在是...
大工程
我努力把他算出來是:
k4
/ \
k2 k5
/ \ / \
k1 k3 d4 d5
/ \ / \
d0 d1 d2 d3
有沒有人有興趣算一下...
我想確定答案對不對
--
一切....
似乎不再那麼重要....
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.46.164.208
推 lightergogo:你用資結還是演算法的定義? 02/26 16:15
→ lovefo:樓上 我是用資結的 02/26 16:24
推 lightergogo:跟你算的一樣... 總成本2.35 02/26 17:13
→ lightergogo:剛剛看了一下考卷 發現這題配分才7.5 .... 02/26 17:42
→ lovefo:沒錯...有夠狠的 我只是想看看對OBST熟不熟練 02/26 17:44