Answered step by step
Verified Expert Solution
Question
1 Approved Answer
2. We now consider another variation of the scheduling problem in which we have a processor that operates 24 hours a day, each day. Jobs
2. We now consider another variation of the scheduling problem in which we have a processor that operates 24 hours a day, each day. Jobs requests are submitted to run daily on the processor (ie, every day) Each job ji has a start time s, and finish time f.. The jobs selected to run on the processor run every day during their required interval. The processor can handle one job at a time. The goal is to accept as many jobs as possible. Given a list J of n jobs, return the largest sublist of J such that no two jobs conflict. Note that job intervals may begin before midnight and end after. You may assume that no two jobs start (or end) at the same time. An example of such a list J, with n- 4 is: (lam, 12pm), (7pm, 2am), (4pm, 4am), (1lam, 5pm) An optimal solution could be the two jobs (7pm, 2am) and (11am, 5pm). Your algorithm should run in O(n2) time. Prove your algorithm is correct and explain the complexity
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started