Question: Please share code in PYTHON. Schedule (Greedy): Implement the scheduling with deadlines algorithm where we want to determine the schedule with maximum total profit. Only
Please share code in PYTHON.
Schedule (Greedy): Implement the scheduling with deadlines algorithm where we want to determine the schedule with maximum total profit. Only one job can be scheduled at a time, each job lasts one unit, and profit can only be obtained if the job is scheduled before or on deadline. Your program should determine and output the optimal feasible sequence of jobs and the total profit that can be obtained. Use the following data for the jobs:
| JOB | DEADLINE | PROFIT |
| 1 | 2 | 40 |
| 2 | 4 | 15 |
| 3 | 2 | 20 |
| 4 | 3 | 50 |
| 5 | 1 | 55 |
| 6 | 2 | 10 |
| 7 | 1 | 45 |
Please also share the optimal feasible sequence with total profit
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
