Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

a. Write the formula for the number of steps to perform k sequential searches on a list of size n f(n,k) = b. Write the

a. Write the formula for the number of steps to perform k sequential searches on a list of size n f(n,k) =

b. Write the formula for the number of steps to perform k binary searches on a list of size n g(n,k) =

c. If we have 10,000 names, how many times do we need to search before Sort+Binary search makes sense (e.g. is less than) over sequential search?

I.e. solve f (10,000,k) < g(10,000,k) (I recommend wolfram alpha!)

c. If we are searching 1,000,000 times, how big does the list need to be to make sorting worth it?

I.e. solve g(n,1,000,000) < f(n,1,000,000)

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_2

Step: 3

blur-text-image_3

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

Modern Database Management

Authors: Donald A. Carpenter Fred R. McFadden

1st Edition

8178088045, 978-8178088044

More Books

Students also viewed these Databases questions