Engineering
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.

answer
Answers: 3

Other questions on the subject: Engineering

image
Engineering, 04.07.2019 18:10, skpdancer1605
Ariver flows from north to south at 8 km/h. a boat is to cross this river from west to east at a speed of 20 km/h (speed of the boat with respect to the earth/ground). at what angle (in degrees) must the boat be pointed upstream such that it will proceed directly across the river (hint: find the speed of the boat with respect to water/river)? a 288 b. 21.8 c. 326 d. 30.2
Answers: 3
image
Engineering, 04.07.2019 18:10, chadatkin
Which of the following ziegler nichols tuning methods the response of the controller to a step input should exhibit an s-shaped curve? a)-open loop mode b)-closed loop mode c)-both modes (open & closed) d)-none of the modes (open & closed)
Answers: 3
image
Engineering, 04.07.2019 18:20, 3076850
Prove the equivalence between the two statements of the 2nd law of thermodynamics (i. e., a violation of one statement leads to the violatio the other statement)
Answers: 2
image
Engineering, 04.07.2019 19:10, gabrielaperezcz
Air inially occupying a volume of 1 m2 at 100 kpa, 27 c undergoes three internally reversible processes in series. process 1-2 compression to 500 kpa during which pv constant process 2-3 adiabatic expanslon to 100 kpa process 3-1: constant-pressure expansion to 100 kpa (a) calculate the change of entropy for each of the three processes. (b) calculate the heat and work involved in each process. (c) is this cycle a power cycle or refrigeration cycle?
Answers: 3
Do you know the correct answer?
Enemy missiles are arriving over the course of n seconds; in the i-the second, xi missiles arrive. B...

Questions in other subjects:

Konu
History, 12.10.2020 22:01