Question: points ) There are ' n ' programs that are to be stored on a computer tape of total length ' X ' . Associated
points There are n programs that are to be stored on a computer tape of total length X Associated with each
programi is length Li i n Clearly all the programs can be stored on the tape if and only if the sum of the lengths of
the programs is at most X We shall assume that whenever a program is to be scanned to on the tape, the tape is initially
positioned at the front. Hence, if programs are stored in the order programprogramprogramprogramn the time tj
needed to scan to programj is proportional to how far along the tape programj is which depends on the lengths of the
programs before programj on the tape. For example, if the programs are stored on the tape in the following order
program program program program ; then the time t needed to scan to the fourth program in the list program is
proportional to LLL If all programs are scanned to equally often each program has the same chance of being
scanned to then the expected or mean retrieval time MRT is
In the optimal storage on tape problem, we are required to find a permutation ordering for the n programs so that when
they are stored on the tape the MRT is minimized.
a Give an example of three programs n with different integer lengths LLL Show all the permutations
orderings possible to store the programs on the tape. Calculate the mean retrieval time for each permutation and find the
optimal ordering. This should give you an indication of a possible greedy choice strategy.
b Discuss and prove optimal substructure for the optimal storage on tape problem.
c Discuss and prove the greedy choice property for the optimal storage on tape problem.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
