本系列博客習(xí)題來自《算法(第四版)》,算是本人的讀書筆記伦忠,如果有人在讀這本書的,歡迎大家多多交流稿辙。為了方便討論昆码,本人新建了一個微信群(算法交流),想要加入的,請?zhí)砑游业奈⑿盘枺簔hujinhui207407 謝謝赋咽。另外旧噪,本人的個人博客 http://www.kyson.cn 也在不停的更新中,歡迎一起討論
算法(第4版)
知識點
- 二項樹
題目
1.5.15 二項樹脓匿。請證明淘钟,對于加權(quán) quick-union 算法,在最壞情況下樹中的每一層的結(jié)點數(shù)均為二項式系數(shù)陪毡。在這種情況下米母,計算含有 N=2n 個節(jié)點的樹中節(jié)點的平均深度。
1.5.15 Binomial trees. Show that the number of nodes at each level in the worst-case trees for weighted quick-union are binomial coefficients. Compute the average depth of a node in a worst-case tree with N = 2n nodes.