Optimal Binary Search Tree课件.pptVIP

  • 12
  • 0
  • 约4.35千字
  • 约 25页
  • 2017-08-16 发布于河南
  • 举报
Optimal Binary Search Tree课件

Optimal Binary Search Tree;1.Preface;2.Premise;3.Formula Prove;Because we have probabilities of searches for each key and each dummy key, we can determine the expected cost of a search in a given binary search tree T. Let us assume that the actual cost of a search is the number of nodes examined, i.e., the depth of the node found by the search in T,plus1. Then the expected cost of a search in T is : (The second statement) E[ search cost in T] = (i=1~n) ∑ pi .(depthT(ki)+1) + (i=0~n) ∑ qi .(depthT(di)+1) =1 + (i=1~n) ∑ pi .depthT(ki) + (i=0~n) ∑ qi .depthT(di) Where depthT de

文档评论(0)

1亿VIP精品文档

相关文档