logo

Crowdly

Browser

Add to Chrome

A research group has a grant of exactly B dollars of compute credit, which mu...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

A research group has a grant of exactly BB dollars of compute credit, which must be spent down to zero. There are nn machine types. Renting a machine of type ii for one hour costs c_i > 0c_i > 0 dollars and completes j_i > 0j_i > 0 jobs. Any type may be rented any number of times. Maximise the jobs completed.

arraymeaning
c[1..n]dollars to rent a machine of type i for an hour
j[1..n]jobs that hour completes

We solve this by defining the subproblem

maxJobs[x] = the most jobs completable by spending exactly x dollars

For example, with c = [3, 4]c = [3, 4], j = [5, 7]j = [5, 7] and B = 10B = 10, the best is one of each type plus one more of type 1, for 17 jobs.

Write the recurrence relation for this subproblem. Your answer must give:

  • the base case or cases;
  • an infeasible case, because some budgets cannot be met exactly;
  • the general case, including the condition under which it applies;
  • one sentence saying, in words, what the subproblem means.

You do not need to give pseudocode, prove anything, or state a complexity. Write mathematics however is easiest to type; max, <= and -infinity are all fine.

More questions like this

Want instant access to all verified answers on learning.monash.edu?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome