This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Computer Science C73 September 17, 2007 Scarborough Campus University of Toronto Homework Assignment #1 Due: October 3, 2007, by 12 noon (in the course drop box) Appended to this document is a cover page for your assignment. Fill it out, staple your answers to it, and deposit the resulting document into the course drop box. Please do not enclose your assignment in an envelope. Question 1. (10 marks) We are given n jobs, 1 , 2 ,... ,n and the duration t ( i ) of each job i . A schedule s is a permutation of 1 , 2 ,... ,n . The waiting time of job i in schedule s is the sum of the durations of all jobs that appear before i in s . The total waiting time of s is the sum of the delays of all jobs. Give an efficient algorithm that finds a schedule with minimum total waiting time. Prove the correctness of your algorithm, and analyze its time complexity. Question 2. (10 marks) Consider the Interval Scheduling problem from Section 4.1 of the text. We have seen that the earliest-deadline-first greedy algorithm finds an optimal set of jobs, i.e., a compatible setseen that the earliest-deadline-first greedy algorithm finds an optimal set of jobs, i....
View Full Document
- Spring '08