Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider a modification to the Activity Selection problem in which each activity i has, in addition to a start time s _ i and finish

Consider a modification to the Activity Selection problem in which each activity i has, in addition to a start time s_i and finish time f_i, a profit p_i. The goal is no longer to maximize the number of activities scheduled, but instead to maximize the total profit of the activities scheduled. That is, we wish to choose a set A of compatible activities such that _j in A p_j is maximized. Consider the following two greedy choices. For each one, determine whether it is a "safe" greedy choice for this modified Activity Selection problem. If your answer is yes, prove the "Greedy-choice property". If your answer is no, please give a counterexample and show that the greedy choice will not lead to an optimal solution. (1) Greedy choice 1: Always select a job with the earliest finish time that is compatible with all previously selected activities. (2) Greedy choice 2: Always select a job with the highest pro t per time unit (i.e.,.p_i /(f_i-s_i)) that is compatible with all previously selected activities.

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: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

DB2 Universal Database V7.1 Application Development Certification Guide

Authors: Steve Sanyal, David Martineau, Kevin Gashyna, Michael Kyprianou

1st Edition

0130913677, 978-0130913678

More Books

Students also viewed these Databases questions