Introduction to Algorithms
Introduction to Algorithms
3rd Edition
ISBN: 9780262033848
Author: Thomas H. Cormen, Ronald L. Rivest, Charles E. Leiserson, Clifford Stein
Publisher: MIT Press
Question
Book Icon
Chapter 16, Problem 2P

(a)

Program Plan Intro

To design an algorithm that schedules the tasks that are running in pre-emptive fashion so as to minimize the average completion time and state the running time of the algorithm.

(b)

Program Plan Intro

Tasks are running in the preemptive fashion and cannot occur at the same time.Todesign algorithm to schedule tasks to minimizesthe average completion time and to show its complexity.

Blurred answer
Students have asked these similar questions
Job scheduling:  Consider the problem of scheduling n jobs of known durations t1, t2, . . . , tn for execution by a single processor. The jobs can be executed in any order, one job at a time. You want to find a schedule that minimizes the total time spent by all the jobs in the system. (The time spent by one job in the system is the sum of the time spent by this job in waiting plus the time spent on its execution.) Design a greedy algorithm for this problem. Does the greedy algorithm always yield an optimal solution? (Hint: You may get a clue from Prim’s Algorithm)
As a teaching administrator of the department, your responsibility is to schedule the classes for a particular classroom. Suppose there are n classes, each class i is represented by its start time and finishing time [Si, fi], and we say that two classes i and j are non-conflicting if they do not overlap in time (i.e., sizfj or szfi). You want to schedule as many classes for the classroom as possible, but the scheduled classes should be non-conflicting. Develop an algorithm so that you can select the maximum number of classes for the classroom. (We are expecting either pseudocode or language description of your algorithm)
In a private university, students can enrol for at least 1 to a maximum of 5 subjects in a semester. Subjects that are to be offered in that particular semester will be assigned to a class. One class should have at least 5 students and up to a maximum of 40 students. Multiple classes for a subject can be created if the students number enrolled for the subject is large. A subject might not be offered on that semester depending on the needs. A lecturer can be assigned to zero and up to a maximum of 4 classes on that particular semester. Draw the class diagram to represent the above scenario. Each entity should have at least 1 attribute as its identity. Provide the relevant associations between these entities and include the multiplicities.
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Operations Research : Applications and Algorithms
Computer Science
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Brooks Cole