Computers and Technology, 02.07.2020 19:01 rhlalbin
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
Answers: 1
Computers and Technology, 22.06.2019 10:30
Choose the best explanation for the following statement communication is symbolic
Answers: 3
Computers and Technology, 22.06.2019 22:20
Avariable of the data type arrays is storing 10 quantities. what is true about these quantities? a. the quantities all have different characteristics. b. the quantities all have the same characteristics. c. five quantities have the same and five have different characteristics. d. it is necessary for all quantities to be integers. e. it is necessary for all quantities to be characters.
Answers: 2
Computers and Technology, 23.06.2019 20:30
Column a of irma’s spreadsheet contains titles for each row, but her document is too big and will be printed three pages across. she wants to be sure that every page will be understood. what can irma do to with this problem?
Answers: 3
Computers and Technology, 23.06.2019 22:30
How many points do i need before i can send a chat
Answers: 1
Exercise 7.8. There are n programs that are to be stored in some order on a computer tape of length...
Mathematics, 12.01.2021 19:30
Mathematics, 12.01.2021 19:30
Mathematics, 12.01.2021 19:30
SAT, 12.01.2021 19:30
Mathematics, 12.01.2021 19:30
English, 12.01.2021 19:30
Advanced Placement (AP), 12.01.2021 19:30
Chemistry, 12.01.2021 19:30
Mathematics, 12.01.2021 19:30
Mathematics, 12.01.2021 19:30
Social Studies, 12.01.2021 19:30