Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 10 (a) Name two of the algorithmic strategies that we have discussed and briefly describe them. [4 marks] (b) You are trying to find

image text in transcribed

Question 10 (a) Name two of the algorithmic strategies that we have discussed and briefly describe them. [4 marks] (b) You are trying to find a book in the Barr Smith Library. Outline two different algorithms that you could use, with a discussion of your as- sumptions, overall efficiency and the worse case scenario. You may use approximations to give a sense of scale but your assumptions should be sensible. 8 marks] (c) StabSearch is an algorithm where you take all of the items in your search set, throw them into the air, wait until they land and then throw a knife at them. You check the object stabbed with the knife and you stop searching if it was what you were looking for. If you have not yet found it, you remove the knife, take all of the objects and throw them back up into the air. You repeat this until you find the object. How can you alter this algorithm to give it the same worst case com- putational complexity as exhaustive search? 2 marks] Question 10 (a) Name two of the algorithmic strategies that we have discussed and briefly describe them. [4 marks] (b) You are trying to find a book in the Barr Smith Library. Outline two different algorithms that you could use, with a discussion of your as- sumptions, overall efficiency and the worse case scenario. You may use approximations to give a sense of scale but your assumptions should be sensible. 8 marks] (c) StabSearch is an algorithm where you take all of the items in your search set, throw them into the air, wait until they land and then throw a knife at them. You check the object stabbed with the knife and you stop searching if it was what you were looking for. If you have not yet found it, you remove the knife, take all of the objects and throw them back up into the air. You repeat this until you find the object. How can you alter this algorithm to give it the same worst case com- putational complexity as exhaustive search? 2 marks]

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

MySQL/PHP Database Applications

Authors: Jay Greenspan, Brad Bulger

1st Edition

978-0764535376

More Books

Students also viewed these Databases questions

Question

Demonstrate how to use the Gaps Model for diagnosing and

Answered: 1 week ago