Interval Partitioning: Greedy AnalysisObservation. Greedy algorithm never schedules two incompatible lectures in the same classroom. Theorem. Greedy algorithm is optimal. Pf. Let d = number of classrooms that the greedy algorithm allocates. Classroom d is opened because we needed to schedule a job, say j, that is incompatible with all d-1 other classrooms. These d jobs each end after sj. Since we sorted by start time, all these incompatibilities are caused by lectures that start no later than sj. Thus, we have d lectures overlapping at time sj + . Key observation all schedules use d classrooms.
04greedy算法设计与分析 贪心算法(14)
2021-02-21 09:31
04greedy算法设计与分析 贪心算法(14).doc
将本文的Word文档下载到电脑
下载失败或者文档不完整,请联系客服人员解决!