Order On The Tape
Three files are written end to end on a tape. To read a file the drive must scan past everything stored before it, so if file sits at position the cost of one read is the total length of files 1 through . Each file will be read a known number of times over the life of the tape, so the total cost of an ordering is
| file | length | reads |
|---|---|---|
| P | 3 | 6 |
| Q | 10 | 10 |
| R | 8 | 4 |
Which ordering minimises the total, and what does it cost?
Sign in to answer questions and track your progress
Sign In