Simulation Expirment for Proofing the Theoretical As-sumption of Time Complexity for Binary Search Tree

Abstract

It is frequently asserted that an advantage of a binary search tree implementation of a set over linked list implementation is that for reasonably well balanced binary search trees the average search time (to discover whether or not a particular element is present in the set) is O(logN) to the base 2 where N is the number of element in the set(the size of the tree).This paper presents an experiment for measuring and comparing the obtained binary search tree time with the expected time(theoretical), this experiment proved the correctness of the hypothesis, the experiment is carried out using a program in turbo Pascal with recursion tech-nique implementation and astatistical method to prove the above hypothesis. Search time is estimated by the number of comparisons needed.