Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the problem of optimally assigning tasks to identical machines so that all tasks are completed as soon as possible. Let each task have a

image text in transcribedimage text in transcribed

Consider the problem of optimally assigning tasks to identical machines so that all tasks are completed as soon as possible. Let each task have a processing duration, which is a positive integer. The goal is to ensure that the maximum task completion time is smallest. As an example, assume that the set of list of processing times is [10,15,10,15,10], and there are two identical machines. If the tasks are assigned as: - Machine 1: [10,15,10] - Machine 2: [15,10] Then the last task processed by Machine 1 would end at time 35 , where the last task processed by Machine 2 would end at time 25 . Hence, the maximum task completion time for this assignment is 35 . However, as an alternative consider the task assignment - Machine 1: [10,10,10] - Machine 2: [15,15] Then the maximum task completion time would be 30 , which is optimal for this problem instance. Part A: Implement a function that takes a list of processing times and the number of machines, and returns maximum task completion time using earliest start time approach. Specifically, consider tasks in the given sequence and assign each task to the machine that can start processing the task as early as possible. def first_in_first_out(tasks, n_machines): Part B: Implement a variant of the function that sorts tasks in non-increasing order of processing times, then assigns each task to the machine that can start processing the task as early as possible. def longest_processing_time(tasks, n_machines): Part C: Implement a variant of the function that evaluates all possible assignments of tasks to machines, and finds an optimal assignment that minimizes maximum task completion time. Hint: you may define a helper recursive function. def exhaustive_enumeration(tasks, n_machines): Run random tests considering various number of tasks and number of machines. Measure and report i) number of tasks ii) number of machines iii) maximum task completion time with part A iv) computation time with part A v) maximum task completion time with part BB vi) computation time with part B vii) maximum task completion time with part C viii) computation time with part C Interpret results considering complexity of the functions that you implemented for all parts and quality of obtained solutions

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing

Authors: David M. Kroenke, David Auer

11th Edition

B003Y7CIBU, 978-0132302678

More Books

Students also viewed these Databases questions