Simulation Expirment for Proofing the Theoretical Assumption of Time Complexity for Binary Search Tree

Main Article Content

Muna M. Salih

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(log N) 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 technique implementation and a statistical method  to prove the above hypothesis. Search time is estimated by the number of comparisons needed.

Article Details

How to Cite
Simulation Expirment for Proofing the Theoretical Assumption of Time Complexity for Binary Search Tree. (2017). Ibn AL-Haitham Journal For Pure and Applied Sciences, 27(2), 251-259. https://jih.uobaghdad.edu.iq/index.php/j/article/view/350
Section
Computer

How to Cite

Simulation Expirment for Proofing the Theoretical Assumption of Time Complexity for Binary Search Tree. (2017). Ibn AL-Haitham Journal For Pure and Applied Sciences, 27(2), 251-259. https://jih.uobaghdad.edu.iq/index.php/j/article/view/350

Publication Dates