We are to complete a set of n jobs using m identical machines. Each job has a known duration. The goal is to schedule the jobs on m machines so that the time to finish the last job is as small as possible. Once a job is scheduled on a machine, it can’t be stopped and restarted. Any job can run on any machine. A greedy algorithm to solve this problem is as follows: sort jobs in decreasing order of duration. Schedule jobs one by one, choosing the machine where it can start the earliest. a. For m = 3 and n = 6 where the durations are <9, 12, 3, 8, 6, 5>, what is the finish time of the last job using greedy schedule? b. Exhibit an input for which the greedy schedule is NOT optimal

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter15: Recursion
Section: Chapter Questions
Problem 18SA
icon
Related questions
Question

We are to complete a set of n jobs using m identical machines. Each job has a known duration. The goal is to schedule the jobs on m machines so that the time to finish the last job is as small as possible. Once a job is scheduled on a machine, it can’t be stopped and restarted. Any job can run on any machine. A greedy algorithm to solve this problem is as follows: sort jobs in decreasing order of duration. Schedule jobs one by one, choosing the machine where it can start the earliest. a. For m = 3 and n = 6 where the durations are <9, 12, 3, 8, 6, 5>, what is the finish time of the last job using greedy schedule? b. Exhibit an input for which the greedy schedule is NOT optimal.

 

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Time complexity
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning