Question: Algorithm Homework please help me Part 1: Problems 1. (15 points) Task Scheduling. In this problem we will revisit task scheduling, which we have solved

Algorithm Homework please help me

Algorithm Homework please help me Part 1: Problems 1. (15 points) Task

Part 1: Problems 1. (15 points) Task Scheduling. In this problem we will revisit task scheduling, which we have solved in class using a greedy approach. (a) (6 points) Recall that we have proved the optimality of our greedy approach using the earliest finish time as our greedy choice. For each of the following alternative greedy choices, show a counterexample to prove that this will not always succeed in outputting the optimal result (which is defined as the maximum number of scheduled tasks): (a) Longest duration (b) Lowest task ID (c) Latest finish time (b) (5 points) Suppose that instead of having the greedy choice be the earliest finish time, we instead use the latest starting time. Prove that this greedy choice holds and will yield an optimal solution. (c) (4 points) Suppose that now each activity has a cost c associated with it and the problem now is to find a set of non-conflicting activities such that cost is minimized (note that this is different than having the maximum number of activities). Show, using a counterexample that the greedy algorithm we developed in class will not yield an optimal solution for this new problem. Part 1: Problems 1. (15 points) Task Scheduling. In this problem we will revisit task scheduling, which we have solved in class using a greedy approach. (a) (6 points) Recall that we have proved the optimality of our greedy approach using the earliest finish time as our greedy choice. For each of the following alternative greedy choices, show a counterexample to prove that this will not always succeed in outputting the optimal result (which is defined as the maximum number of scheduled tasks): (a) Longest duration (b) Lowest task ID (c) Latest finish time (b) (5 points) Suppose that instead of having the greedy choice be the earliest finish time, we instead use the latest starting time. Prove that this greedy choice holds and will yield an optimal solution. (c) (4 points) Suppose that now each activity has a cost c associated with it and the problem now is to find a set of non-conflicting activities such that cost is minimized (note that this is different than having the maximum number of activities). Show, using a counterexample that the greedy algorithm we developed in class will not yield an optimal solution for this new

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!