subject

Exercise 7.8. There are n programs that are to be stored in some order on a computer tape of length `. Associated with each program i is a length `(i), 1 6 i 6 n. Assume that all programs can be stored in the tape (i. e., Pn i=1 `(i) 6 `). To retrieve a particular program from the tape the time needed is proportional to the distance from the beginning of the tape to the position where the program begins plus the length of the program. That is, if the programs are stored in the order I = i1, i2, . . . , in, the time tj needed to retrieve program ij is proportional to P 16k6j `(ik). We assume that all programs are retrieved equally often and hence we want to reduce the mean retrieval time (MRT) which is 1 n ( P 16j6n tj ). Our goal is to find a permutation for the n programs so that when they are stored on the tape in this order the MRT is minimized. Note that minimizing MRT is equivalent to minimizing d(I) = Pn j=1 Pj k=1 `(ik). (a) Consider the following example where we have 3 programs and (l1, l2, l3) = (5, 10, 3). What is the (optimal) ordering of these 3 programs that will minimize the MRT and what is the optimal value of MRT ? (b) Give a greedy algorithm to find the optimal order assuming that we have n programs and length of program i is `i , 1 6 i 6 n. What is the running time of your algorithm? (c) Prove that your greedy algorithm always gives the optimal ordering

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 21:30
Nathan wants to create multiple worksheet containing common formatting styles for his team members. which file extension him to save these worksheets? nathan to create multiple worksheets with common styles. he needs to save them with the extension.
Answers: 1
question
Computers and Technology, 24.06.2019 13:00
In a heat transfer course, we can derive the equation for the temperature distribution in a flat rectangular plate. in this example, we will look at a plate at steadystate with three sides being held at t1, and one side held at t2. the temperature for any location on the plate, t(x,y), can be calculated by where create a function (prob3_5) that will take inputs of vectors x and y in feet, scalar n, scalars l and w in feet and scalars t1 and t2 in degrees fahrenheit. it will output a matrix t which is the temperature of each x and y locations. t will have the number of columns equal to the number of elements in x and rows equal to the number of elements in y. though this can be done without loops (perhaps more efficiently), your program must use a nested loop.
Answers: 2
question
Computers and Technology, 24.06.2019 19:30
Dtp allows you to manipulate text boxes in the following ways. more than 1 answer. a.move them b.rotate them c.resize them d.all of the above e.none of the above
Answers: 1
question
Computers and Technology, 25.06.2019 04:30
What is the purpose of network permissions? a)to control access to network resources b)to convert to wireless networking c)to enable the installation of nics d)to reduce operating costs
Answers: 1
You know the right answer?
Exercise 7.8. There are n programs that are to be stored in some order on a computer tape of length...
Questions
question
Mathematics, 25.10.2021 05:40
question
Chemistry, 25.10.2021 05:40
question
Mathematics, 25.10.2021 05:50
question
Mathematics, 25.10.2021 05:50
Questions on the website: 13722360