Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

time interval (si, fi). Two activities can be assigned to the same room if their time intervals do not overlap. The task is to find

image text in transcribed

time interval (si, fi). Two activities can be assigned to the same room if their time intervals do not overlap. The task is to find an assignment of all activities to rooms using minimum number of rooms. (a) Algorithm A (greedy-by-room): Assign as many as possible activities to room 1 (an algorithm from the class can be used, for example), then assign as many as possible activities to room 2, etc. Does Algorithm A always solve the scheduling problem? Justify your answer. (b) Algorithm B (greedy-by-time): Initially R. Process the activities in increasing order of start times. If the current activity can be assigned to one of the rooms in R, then assign it to any such room; otherwise assign it to a new room and add this room to R. Does Algorithm B always solve the scheduling problem? Justify your answer. time interval (si, fi). Two activities can be assigned to the same room if their time intervals do not overlap. The task is to find an assignment of all activities to rooms using minimum number of rooms. (a) Algorithm A (greedy-by-room): Assign as many as possible activities to room 1 (an algorithm from the class can be used, for example), then assign as many as possible activities to room 2, etc. Does Algorithm A always solve the scheduling problem? Justify your answer. (b) Algorithm B (greedy-by-time): Initially R. Process the activities in increasing order of start times. If the current activity can be assigned to one of the rooms in R, then assign it to any such room; otherwise assign it to a new room and add this room to R. Does Algorithm B always solve the scheduling problem? Justify your

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_step_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

3. Is there opportunity to improve current circumstances? How so?

Answered: 1 week ago

Question

2. How will you handle the situation?

Answered: 1 week ago