Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2. A system is computing results for a set of different requests. Each request is answered by first querying a database, and then processing

 2. A system is computing results for a set of different requests. Each request is answered by first querying  

2. A system is computing results for a set of different requests. Each request is answered by first querying a database, and then processing the query results to produce an answer. The system can process the query results in parallel (with one processor per request), but querying the database itself must be done sequentially (one request at a time). Consider that we have an entire set of requests, and we can respond to them in any order we wish. We also have, for each request i, the time q; that will be needed to query the database and the time p; that will be needed to process the query results into the answer. Processing this set of requests is monopolizing our system, so we would like to complete the entire process as soon as possible. (a) Consider a greedy approach that answers the requests in nondecreasing order of total time qi + Pi, with the shortest q + pi first. Give and demonstrate a counterexample to show that this approach does not always find the minimum total time elapsed. (b) Prove that answering the requests in nonincreasing order of p; (largest processing time first) always produces an optimum result.

Step by Step Solution

3.53 Rating (153 Votes )

There are 3 Steps involved in it

Step: 1

a Counterexample for Greedy Approach Consider three requests with the following parameters Request A ... 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

Accounting Information Systems

Authors: George H. Bodnar, William S. Hopwood

11th Edition

0132871939, 978-0132871938

More Books

Students also viewed these Programming questions

Question

In Exercises 7681, find the domain of each function. g(x) = 4 x - 7

Answered: 1 week ago

Question

What is your greatest weakness?

Answered: 1 week ago

Question

List the six steps in the systems approach.

Answered: 1 week ago