in Programming in C
2,760 views
3 votes
3 votes
Let T be a binary search tree with n nodes and Sn be the average number of comparisons required for successful search and Un be the average number of comparison required for an unsuccessful search. Then what is the relation between Sn, Un and n
in Programming in C
by
2.8k views

1 Answer

5 votes
5 votes
Best answer

Sn=(I(n)+n)/n

Un=E(n)/(n+1)

Sn=(((n+1)/n)Un-1

where S be the average number of comparisons required for successful search and Un be the average number of comparison required for an unsuccessful search .

I(n) is total internal path length and E(n) is total external path length .

 

selected by

4 Comments

Thank you sir , but a brief explanation will make it more clear. :)
0
0
what is this intrernal path and external path you have taken.?
0
0

http://cse.iitkgp.ac.in/~pb/algo-1-pb-10.pdf

see this for more clearation.

3
3
What is internal and external path length?
0
0

Related questions