Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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 qi that will be needed to query the database and the time pi 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.

1. Design and write a greedy algorithm that, given the times qi and pi needed for each of n requests, will find the minimum time elapsed from the start of the first query until all requests have been answered.

2. Prove that your algorithm always finds an optimum result.

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

Database Concepts

Authors: David M Kroenke, David J Auer

6th Edition

0132742926, 978-0132742924

More Books

Students also viewed these Databases questions

Question

5. What information would the team members need?

Answered: 1 week ago

Question

3.What are the Importance / Role of Bank in Business?

Answered: 1 week ago

Question

What is the most important part of any HCM Project Map and why?

Answered: 1 week ago