Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You are a high - level manager in a software firm and you are managing n software projects. You are asked to assign m of
You are a highlevel manager in a software firm and you are managing n software projects. You are asked
to assign m of the programmers in your firm among these n projects. Assume that all of the programmers
are equally competent.
After some careful thought, you have figured out how much benefit i programmers will bring to project j
View this benefit as a number. Formally put, for each project j you have computed an array Aj m where
Aj i is the benefit obtained by assigning i programmers to project j Assume that Aj i is nondecreasing
with increasing i
In this question, you will design a dynamic programming algorithm to determine how many programmers
you will assign to each project so that the total benefit obtained over all projects is maximized.
a Describe the set of subproblems that your dynamic programming algorithm will consider. Your solution
should look something like For every we define OP T to be
b Give a recurrence expressing the solution to each subproblem in terms of the solution to smaller
subproblems.
c Using your recurrence, design a dynamic programming algorithm to output the optimal allocation of
programmers to the n projects. You may use either a topdown or bottomup approach. Remember
that your algorithm needs to output the optimal allocation, not only its benefit. The output of your
algorithm can be an array of length n where the ith entry gives the number of programmers allocated
to project i in the optimal allocation.
d Analyze the running time and space usage of your algorithm.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started