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, 21.06.2019 23:00
Give an example of a case where a two-way handshake to establish a connection could leave one side of the connection live while the other side does not believe there is a connection.
Answers: 1
question
Computers and Technology, 22.06.2019 19:30
When creating a presentation in libre office impress, where does the editing of slides take place? a. the slides panel b. the center panel c. the tasks panel, under the masters pages tab d. the tasks panel, under the layouts tab
Answers: 3
question
Computers and Technology, 24.06.2019 09:30
Retype the statements, correcting the syntax errors. system.out.println("num: " + songnum); system.out.println(int songnum); system.out.println(songnum " songs"); note: these activities may test code with different test values. this activity will perform two tests: the first with songnum = 5, the second with songnum = 9. see how to use zybooks.
Answers: 1
question
Computers and Technology, 24.06.2019 10:50
In 2009 to 2010, how many social network users were reported as being victims of online abuse? a. 1 in 10 b. 100% c.1 in 100 d. 50%
Answers: 2
You know the right answer?
You’re helping to run a high-performance computing system capable of processing several terabytes of...
Questions
question
Mathematics, 18.11.2020 22:20
question
Arts, 18.11.2020 22:20
question
Physics, 18.11.2020 22:20
Questions on the website: 13722361