subject
Engineering, 01.05.2021 19:20 chanel2371

Enemy missiles are arriving over the course of n seconds; in the i-the second, xi missiles arrive. Based on remote sensing data, you know the sequence x1, x2, . . . , xn in advance. You are in charge of an electromag- netic pulse (EMP), which can destroy some of the missiles as they arrive. The power of EMP depends on how long it has been allowed to charge up. More precisely, there is a function f so that if j seconds have passed since the EMP was last used, then it is capable of destroying up to f(j) missiles. So, if the EMP is being used in the k-th second and it has been j seconds since it was previously used, then it destroys min{xk, f(j)} missiles in the k-th second. After this use, it will be completely drained. We assume that the EMP starts off completely drained, so if it used for the first time in the j-th second, then it is capable of destroying up to f(j) missiles. Your goal is to choose the points in time at which the EMP is going to activated so as to destroy as many as missiles as possible. Give an efficient algorithm that takes the data on missile arrivals x1, . . . , xn, and the recharging function f, and returns the maximum number of missiles that can be destroyed by a sequence of EMP activations. Analyze the running time of your algorithm.

ansver
Answers: 3

Another question on Engineering

question
Engineering, 03.07.2019 14:10
Amass of 1.5 kg of air at 120 kpa and 24°c is contained in a gas-tight, frictionless piston-cylinder device. the air is now compressed to a final pressure of 720 kpa. during the process, heat is transferred from the air such that the temperature inside the cylinder remains constant. calculate the boundary work input during this process.
Answers: 2
question
Engineering, 04.07.2019 18:10
Which of the following refers to refers to how well the control system responds to sudden changes in the system. a)-transient regulation b)- distributed regulation c)-constant regulation d)-steady-state regulation
Answers: 1
question
Engineering, 04.07.2019 18:20
For a gate width of 2 m into the paper, determine the force required to hold the gate abc at its location.
Answers: 1
question
Engineering, 04.07.2019 18:20
Water vapor initially at 10 bar and 400 °c is contained within a piston-cylinder assembly. the water lost heat to the surrounding according to isochoric (iso-volumetric) process until its temperature is 150 °c. the water is then condensed isothermally to saturated liquid. for the water as a system, calculate the work in kj/kg
Answers: 2
You know the right answer?
Enemy missiles are arriving over the course of n seconds; in the i-the second, xi missiles arrive. B...
Questions
question
Mathematics, 21.05.2021 19:10
question
Mathematics, 21.05.2021 19:10
question
Mathematics, 21.05.2021 19:10
question
Mathematics, 21.05.2021 19:10
Questions on the website: 13722360