Suppose that n files having lengths L1, L2,, Ln are stored on a tape. If the...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Suppose that n files having lengths L1, L2,, Ln are stored on a tape. If the files are stored in the order of i1, i2, ·., in, then the time to retrieve file ik is Tk = E-1 Li,. The average retrieval time is defined as E-1 Tk. Design a greedy algorithm for determining the order of the n files on a tape so as to minimize the average retrieval time. Show that your algorithm is optimal by stating and proving the greedy choice property and the optimal substructure property. Suppose that n files having lengths L1, L2,, Ln are stored on a tape. If the files are stored in the order of i1, i2, ·., in, then the time to retrieve file ik is Tk = E-1 Li,. The average retrieval time is defined as E-1 Tk. Design a greedy algorithm for determining the order of the n files on a tape so as to minimize the average retrieval time. Show that your algorithm is optimal by stating and proving the greedy choice property and the optimal substructure property.
Expert Answer:
Answer rating: 100% (QA)
The greedy algorithm that we propose here is to put files in increasing order of thier length which ... View the full answer
Related Book For
Vector Mechanics for Engineers Statics and Dynamics
ISBN: 978-0073212227
8th Edition
Authors: Ferdinand Beer, E. Russell Johnston, Jr., Elliot Eisenberg, William Clausen, David Mazurek, Phillip Cornwell
Posted Date:
Students also viewed these accounting questions
-
Bags of grass seed are stored on a wooden plank as shown. To move the plank, a 9° wedge is driven under end A. Knowing that the weight of the grass seed can be represented by the distributed load...
-
Rank the following six molecules in approximate order of decreasing SN1 reactivity and decreasing SN2 reactivity. () (b) CI (d) CI (f)
-
Rank the following six molecules in approximate order of decreasing S N 1 reactivity and decreasing S N 2 reactivity. () (b) CI (d) CI (f)
-
(1) How Does Strategy Respond to Environmental Factors Imprima Corporation is based in the United States and is examining the prospects for expanding into international markets with its main product,...
-
What is the logic of the percentage-of-sales method for constructing pro forma statements? On a year-to-year basis, which balance sheet and income statement items do you think will fluctuate most...
-
Helicopteros Sanitarios, an ambulance service in Fuengirola, Spain, receives an average of 20 calls per day during the time period 6 p.m. to 6 a.m. for assistance. For any given day what is the...
-
What is speed stability?
-
Orlandos Arnold Palmer Hospital, founded in 1989, specializes in treatment of women and children and is renowned for its high-quality rankings (top 10% of 2000 benchmarked hospitals), its labor and...
-
Assessment in the Transition Process. Objective: To explore, examine and discover the process and types of assessments supporting transition programs and services. a. click on this link to review...
-
Biome Startup, Inc. (BS) is dedicated to improving the world's soil health one farm at a time. BS implements AI technology in the science of soil management and crop production to create a virtual...
-
Lease Classification, Considering Firm Guidance (Issues Memo) Facts: On 1/1/20X1, Investor, Inc. (Lessee") signed a Lease Agreement with Developer Inc. (Landlord") to lease Landlord's newly...
-
Suppose we want returning RTCP reports from receivers to amount to no more than 5% of the outgoing primary RTP stream. If each report is 84 bytes, the RTP traffic is 20 kBps, and there are 1000...
-
Suppose that we run the sliding window algorithm with SWS = 5 and RWS = 3, and no out-of-order arrivals. (a) Find the smallest value for MaxSeqNum. You may assume that it suffices to find the...
-
The investment cost of a flood prevention project is EUR 400 million. The annual net benefit will depend on the amount of rainfall: EUR 10 million in a normal year, EUR 25 million in a flood year....
-
Give an example of an arrangement of routers grouped into autonomous systems so that the path with the fewest hops from a point A to another point B crosses the same AS twice. Explain what BGP would...
-
Use the whois utility/service to find out who is in charge of your site, at least as far as the InterNIC is concerned. Look up your site both by DNS name and by IP network number; for the latter, you...
-
question 10 (8 points) You are considering planting a garden to get fresh lettuce during the pandemic. You get $3 of happiness from every bag of lettuce you get from your garden. Your discount rate...
-
General Electric Capital, a division of General Electric, uses long-term debt extensively. In a recent year, GE Capital issued $11 billion in long-term debt to investors, then within days filed legal...
-
A line passes through the points (630 mm, 255 mm) and (210 mm, 270 mm). Determine the perpendicular distance d from the line to the origin O of the system of coordinates.
-
An airline pilot climbs to a new flight level along the path shown. The motion of the airplane between A and B is defined by the relation s = 3t (180 ? t), where s is the arc length in feet, t is the...
-
Determine the angular momentum HD of the disk of Prob. 18.8 about point D. Problem 8.18: A homogeneous disk of mass m = 6 kg rotates at the constant rate 1 = 16 rad/s with respect to arm ABC, which...
-
Isothermal compression efficiency can be achieved by running the compressor: (a) At a very high speed (b) At a very slow speed (c) At an average speed (d) At zero speed
-
Derive the expression of work done by the compressor in isothermal compression, adiabatic compression, and polytropic compression.
-
Maximum work is done in compressing air when the compression is: (a) Isothermal compression (b) Adiabatic compression (c) Polytropic compression (d) None of these
Study smarter with the SolutionInn App