Question: Problem description. Suppose there are 5 Departments and 5 Programmers, each identified with an integer number between 1 and 5. You are to assign each

Problem description. Suppose there are 5 Departments and 5 Programmers, each identified with an integer number between 1 and 5. You are to assign each Programmer to a Department according to the preferences given below. Each Department has a preference for the Programmers. For example, Department #1 preferences are as follows: 1 5 3 2 4, meaning that it would like to have programmer #1 as its first choice and programmer #4 as its last option. When there is a conflict, i.e., two Departments would like to have the same Programmer as their first choice, then consult with the Programmer in question, (that is, check his/her preferences) to determine which Department gets to hire him/her. When the program terminates, all Departments should have one programmer assigned to them. Sample data Programmers and their prefernces Programmer #1 Programmer #2 Programmer #3 Programmer #4 Programmer#5 AUTH NW WENUIA WHAUIN NUTH WA A UI N.H W Departments and their prefernces Department #1 Department #2 Department #3 Department #4 Department #5 Submit Assignment
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
