subject

You’re helping to run a high-performance computing system capable of processing several terabytes of data per day. For each of n days, you’re presented with a quantity of data; on day i, you’re presented with xi terabytes. For each terabyte you process, you receive a fixed revenue, but any unprocessed data becomes unavailable at the end of the day (i. e., you can’t work on it in any future day). You can’t always process everything each day because you’re constrained by the capabilities of your com- puting system, which can only process a fixed number of terabytes in a given day. In fact, it’s running some one-of-a-kind software that, while very sophisticated, is not totally reliable, and so the amount of data you can process goes down with each day that passes since the most recent reboot of the system. On the first day after a reboot, you can process s1 terabytes, on the second day after a reboot, you can process s2 terabytes, and so on, up to sn; we assume s1 > s2 > s3 > ··· > sn > 0. (Of course, on day i you can only process up to xi terabytes, regardless of how fast your system is.) To get the system back to peak performance, you can choose to reboot it; but on any day you choose to reboot the system, you can’t process any data at all.
The problem. Given the amounts of available data x1, x2, ..., xn for the next n days, and given the profile of your system as expressed by s1,s2,...,sn (and starting from a freshly rebooted system on day 1), choose the days on which you’re going to reboot so as to maximize the total amount of data you process.
Example. Suppose n = 4, and the values of xi and si are given by the following table.
day1 day2 day3 day4
x 10 1 7 7
s 8 4 2 1
The best solution would be to reboot on day 2 only; this way, you process 8 terabytes on day 1, then 0 on day 2, then 7 on day 3, then 4 on day 4, for a total of 19. (Note that if you didn’t reboot at all, you’d process 8 + 1 + 2 + 1 = 12; and other rebooting strategies give you less than 19 as well.)
a) Give an example of an instance with the following properties.
- There is a "surplus" of data in the sense that xi > s1 for every i.
- The optimal solution reboots the system at least twice.
In addition to the example, you should say what the optimal solution is. You do not need to provide proof that it is optimal.
b) Give an efficient algorithm that takes values for x1, x2, ...,xn and s1, s2, ...,sn and returns the total number of terabytes processed by an optimal solution. (Please give an algorithm in pseudocode, not code)

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 22:00
Take a critical look at three gui applications you have used—for example, a spreadsheet, a word-processing program, and a game. describe how well each conforms to the gui design guidelines listed in this chapter.
Answers: 3
question
Computers and Technology, 24.06.2019 02:30
Which option completes the explanation for conflict of interest in an organization
Answers: 1
question
Computers and Technology, 24.06.2019 02:40
Has anyone seen my grandma shes been gone for 4 years already
Answers: 1
question
Computers and Technology, 24.06.2019 10:00
1. which of these is not true about torsion bars? a. they can be used to adjust ride height b. they can be adjusted anytime since they don't affect alignment angles c. they attach between the frame and the lower control arm d. they twist to produce a spring effect
Answers: 1
You know the right answer?
You’re helping to run a high-performance computing system capable of processing several terabytes of...
Questions
question
Mathematics, 10.10.2019 06:10
question
Mathematics, 10.10.2019 06:10
question
Mathematics, 10.10.2019 06:10
question
Mathematics, 10.10.2019 06:10
question
Mathematics, 10.10.2019 06:10
question
Mathematics, 10.10.2019 06:10
Questions on the website: 13722361