Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use the decision tree method to show: 1. [15 marks] Searching problem is defined as follows: Input: Given an input array A[1..n], and a number

Use the decision tree method to show:

image text in transcribed

1. [15 marks] Searching problem is defined as follows: Input: Given an input array A[1..n], and a number 3x Output: If x is in A, return an index i such that Alt] x. Otherwise, return -1. Imagine that we are only considering algorithms that can only compare the input elements (comparison-based). Use the decision tree method to show that there is a lower bound of 2(logn) on the worst-case running time of any comparison-based searching algorithm Hint: Similar to decision trees for comparison-based sorts, first bound the number of leaves in the decision tree of any searching algorithm, and then bound its height. Note that the input array is not necessarily sorted

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Data Mining

Authors: Pang Ning Tan, Michael Steinbach, Vipin Kumar

1st Edition

321321367, 978-0321321367

More Books

Students also viewed these Databases questions

Question

=+development and make the product, should you go ahead and do so?

Answered: 1 week ago