資料結構 2-3樹 - 考試
By Anthony
at 2015-04-10T22:52
at 2015-04-10T22:52
Table of Contents
各位好,最近在看王致強老師的資料結構函授遇到一題,題目如下
若規定2-3樹的高度(height)是從樹根(root)到樹葉(leaf)的最長路徑。
請寫出一個高度為h的2-3樹,能夠儲存的最多資料數目是多少?能夠儲存的
最少資料數目是多少?
老師在上課的時候將公式更改成了 2*([m/2]^h)-1 ~ (m^(h+1))-1
然後將3代入得到最後答案為 (2^(h+1))-1 ~ (3^(h+1))-1
我可以理解高度h所以總共有h+1層,而且第h+1層為外部節點
所以實際上是算到h層的內部節點數目,
那這樣套用公式的話不是應該要長成
2*([m/2]^(h-1))-1 ~ (m^h)-1 其中,前面所提到的[m/2]都是取上限
想了許久還是不懂老師為何要更改公式....
希望有好心人可以幫我指點迷津....感激不盡
--
Tags:
考試
All Comments
By Emily
at 2015-04-13T20:26
at 2015-04-13T20:26
By Caitlin
at 2015-04-17T09:32
at 2015-04-17T09:32
By Eden
at 2015-04-18T11:33
at 2015-04-18T11:33
By Adele
at 2015-04-23T06:16
at 2015-04-23T06:16
By Queena
at 2015-04-25T22:30
at 2015-04-25T22:30
By Frederica
at 2015-04-28T08:12
at 2015-04-28T08:12
By Ivy
at 2015-04-29T05:42
at 2015-04-29T05:42
By Kama
at 2015-05-01T21:15
at 2015-05-01T21:15
By Skylar DavisLinda
at 2015-05-03T12:55
at 2015-05-03T12:55
By Sierra Rose
at 2015-05-07T19:13
at 2015-05-07T19:13
By Leila
at 2015-05-09T10:08
at 2015-05-09T10:08
By Selena
at 2015-05-12T11:37
at 2015-05-12T11:37
By Charlotte
at 2015-05-15T04:03
at 2015-05-15T04:03
By Rachel
at 2015-05-15T08:50
at 2015-05-15T08:50
Related Posts
民法-買賣不破租賃
By Puput
at 2015-04-10T22:48
at 2015-04-10T22:48
證交法Ꜳ2-2的小問題
By Lauren
at 2015-04-10T20:37
at 2015-04-10T20:37
知識達DRM事件
By Belly
at 2015-04-10T20:01
at 2015-04-10T20:01
一般行政警察四等函授師資
By Margaret
at 2015-04-10T18:32
at 2015-04-10T18:32
知識達DRM事件
By Oscar
at 2015-04-10T18:22
at 2015-04-10T18:22