Computers and Technology
Computers and Technology, 10.06.2020 03:57, emily5400

Assume that you have a list of n home maintenance/repair tasks (numbered from 1 to n ) that must be done in numeric order on your house. You can either do each task i yourself at a positive cost (that includes your time and effort) of c[i] . Alternatively, you could hire a handyman who will do the next 4 tasks for the fixed cost h (regardless of how much time and effort those 4 tasks would cost you). The handyman always does 4 tasks and cannot be used if fewer than four tasks remain. Create a dynamic programming algorithm that finds a minimum cost way of completing the tasks. The inputs to the problem are h and the array of costs c[1],...,c[n] . a) Find and justify a recurrence (without boundary conditions) giving the optimal cost for completing the tasks. Use M(j) for the minimum cost required to do the first j tasks.

b) Give an O(n) -time recursive algorithm with memoization for calculating the M(j) values.

c) Give an O(n) -time bottom-up algorithm for filling in the array.

d) Describe how to determine which tasks to do yourself, and which tasks to hire the handyman for in an optimal solution.

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 10:50, Isaiahtate053
Write a 3-4 page apa formatted paper comparing your organization’s it strategy with the best practices outlined in your course text. content should include, but not be limited to: developing and delivering on the it value, developing it strategy for the business value and linking it to business metrics. your paper should include an abstract and a conclusion and a reference page with 3-5 references
Answers: 1
image
Computers and Technology, 24.06.2019 21:30, sandy2597
What need most led to the creation of the advanced research projects agency network? darpa wanted scientists to be able to collaborate and share research easily. darpa wanted american and russian politicians to be able to communicate. darpa wanted astronauts to be able to contact nasa and the white house. darpa wanted factory owners to be able to coordinate supply chains.
Answers: 1
image
Computers and Technology, 25.06.2019 06:50, pattydixon6
A1-megabit computer memory chip contains many 27 ff capacitors. each capacitor has a plate area of 3.09 × 10−11 m 2 . determine the plate separation of such a capacitor (assume an empty parallel-plate configuration). the characteristic atomic diameter is 10−10 m = 1 ˚a, and the permittivity of a vacuum is 8.8542 × 10−12 c 2 /n · m2 . answer in units of ˚a.
Answers: 3
image
Computers and Technology, 25.06.2019 09:50, ccory0626
In any one-minute interval, the number of requests for a popular web page is a poisson random variable with expected value 240 requests. (a) a web server has a capacity of requests per minute. if the number of requests in a one-minute interval is greater than the server is overloaded. use the central limit theorem to estimate the smallest value of for which the probability of overload is less than 0.035. note that your answer must be an integer. also, since this is a discrete random variable, don't forget to use "continuity correction". = 268 (b) now assume that the server's capacity in any one-second interval is ⌊/60⌋, where ⌊⌋ is the largest integer ≤ (this is called the floor function.) for the value of derived in part (a), what is the probability of overload in a one-second interval? this time, don't approximate via the clt, but compute the probability exactly.
Answers: 2
Do you know the correct answer?
Assume that you have a list of n home maintenance/repair tasks (numbered from 1 to n ) that must be...

Questions in other subjects:

Konu
Mathematics, 20.08.2019 23:30
Konu
Mathematics, 20.08.2019 23:30