Question
Suppose that n files having lengths L1, L2,, Ln are stored on a tape. If the files are stored in the order of i1,
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.
Step by Step Solution
3.39 Rating (152 Votes )
There are 3 Steps involved in it
Step: 1
The greedy algorithm that we propose here is to put files in increasing order of thier length which ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get StartedRecommended Textbook for
Vector Mechanics for Engineers Statics and Dynamics
Authors: Ferdinand Beer, E. Russell Johnston, Jr., Elliot Eisenberg, William Clausen, David Mazurek, Phillip Cornwell
8th Edition
73212229, 978-0073212227
Students also viewed these Accounting questions
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
View Answer in SolutionInn App