Using Decision Tree to prove that SEARCHING problem by compa

Using Decision Tree to prove that SEARCHING problem by comparison has lower bound of ( log n ) (the input of SEARCHING is a list of n element in arbitery order and a key k, the output is yes: k is in the list or no: k is not in the list).

Solution

Suppose there are four numbers 9,4,6,2 and 10 is the key which is used to perform searching . Now if we want to search the least number in the list then we can make a decision tree like 2,4,6,9 containing the numbers from ascending to descending order and thus we can get 2 as the least number in the list and we can see the comparison as log n.

Using Decision Tree to prove that SEARCHING problem by comparison has lower bound of ( log n ) (the input of SEARCHING is a list of n element in arbitery order

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site