Question: One constraint present in the assignment heuristic discussed in class is that one person cannot be assigned more than one task. Consider a scenario where
One constraint present in the assignment heuristic discussed in class is that one person cannot
be assigned more than one task. Consider a scenario where this constraint is relaxed (i.e. one
person can be assigned multiple (or zero) tasks). Develop a heuristic in pseudocode and write a
Python program that tries to minimize the total cost, where each task must be assigned exactly
once and each person can be assigned multiple (or zero) tasks. Name your function
assignmentV2 with one input that is a list of lists for the cost matrix. Your function should
return a list with the person assigned to each job (so the list will have one entry per job/task).
Outside of your function, write a test case that creates a cost matrix using your function from
problem 3 and uses your assignmentV2 function to execute the heuristic.
*I need to do the python code for the assignment problem using a cost matrix such as [[1,3,1],[2,4,6],[1,2,5]].
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
