Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started