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 08:10, doggo242
Which of the following is an easy way to remember the modified “x” tire rotation? a. nondrive wheels straight, cross the drive wheels b. drive wheels straight, cross the nondrive wheels c. drive wheels crossed, nondrive wheels straight d. drive wheels crossed, nondrive wheels crossed
Answers: 1
image
Engineering, 04.07.2019 18:10, heidiburgos1own6c0
Fluids at rest possess no flow energy. a)- true b)- false
Answers: 3
image
Engineering, 04.07.2019 18:10, siri5645
At 12 noon, the count in a bacteria culture was 400; at 4: 00 pm the count was 1200 let p(t) denote the bacteria cou population growth law. find: (a) an expression for the bacteria count at any time t (b) the bacteria count at 10 am. (c) the time required for the bacteria count to reach 1800.
Answers: 1
image
Engineering, 04.07.2019 18:20, maustin5323
Athin walled concentric tube exchanger is used to cool engine oil from 160°c to 60°c with water that is available at 25°c acting as a coolant. the oil and water flow rates are each at 2 kg/s, and the diameter of the inner tube is 0.5 m and the corresponding value of the overall heat transfer coefficient is 250 w/m2. oc. how long must the heat exchanger be to accomplish the desired cooling? cpwater=4.187 kj/kg-candcpengine el=2.035 kj/kg·°c, oil . 120]
Answers: 1
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
Mathematics, 29.08.2020 21:01