Question

Prove that the Task Selection algorithm is correct, meaning that it always returns a maximum set...

Prove that the Task Selection algorithm is correct, meaning that it always returns a maximum set of non-overlapping tasks. (Hint: use a replacement-type argument similar to that used in proving correctness of Kruskal’s algorithm.)

Homework Answers

Answer #1

Explanation :

Assume that  each task t has a positive duration i.e., f(t) − s(t) > 0. Let t1, . . . , tn be the tasks selected by TSA(Task Selection Algorithm) , where the tasks are in the order in which they were selected (i.e. increasing start times). Let Topt be a maximum set of non-overlapping tasks. Let k be the least integer for which tk Topt. Thus t1, . . . , tk−1 ∈ Topt.

Claim: t1, . . . , tk−1 are the only tasks in Topt that start at or before tk−1. Suppose, by way of contradiction, that there is a task t in Topt that starts at or before tk−1, and t   ti , i = 1, . . . , k − 1. Since t does not overlap with any of these ti , either t is executed before t1 starts, in between two tasks ti and ti+1, where 1 ≤ i < k − 1. In the former case, ASA would have selected t instead of t1 since f(t) < f(t1). In the latter case, ASA would have selected t instead of ti+1, since both start after ti finishes, but f(t) < f(ti+1). This proves the claim.

Hence, the first k − 1 tasks (in order of start times) in Topt are identical to the first k − 1 tasks selected by TSA. Now let t be the k th task in Topt. Since TSA selected tk instead of t as the k th task to add to the output set, it follows that f(tk) ≤ f(t). Moreover, since both tasks begin after tk−1 finishes, the set Topt2 − t + tk is a non-overlapping set of tasks (since tk finishes before t, and starts after tk−1 finishes) with the same size as Topt. Hence, Topt2 is also optimal, and agrees with the TSA output in the first k tasks.

By repeating the above argument we are eventually led to an optimal set of tasks whose first n tasks coincide with those returned by TSA. Moreover, this optimal set could not contain any other tasks. For example, if it contained an additional task t, then t must start after tn finishes. But then the algorithm would have added t (or an alternate task that started after the finish of tn) to the output, and would have produced an output of size at least n+ 1. Therefore, there is an optimal set of tasks that is equal to the output set of TSA, meaning that TSA is a correct algorithm.

For Better understanding (In image form) :

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Suppose you are given a set S = {a1,a2,···,an} of tasks, where task ai requires pi...
Suppose you are given a set S = {a1,a2,···,an} of tasks, where task ai requires pi units of processing time to complete, once it has started. You have one computer on which to run these tasks, and the computer can run only one task at a time. Let ci be the completion time of task ai, that is, the time at which task ai completes processing. Your goal is to minimize the average completion time, that is, to minimize n1...
Suppose that you want to add items to an array such that the items are always...
Suppose that you want to add items to an array such that the items are always ordered in ascending order; e.g., [1, 2, 2, 4, 5, 8, 9, 14, 32], and any duplicate values are adjacent to each other. We haven’t talked about sorting algorithms yet, so assume you want to be able to keep the items in the array in order without having to sort them. So for example, suppose you want to add the integer value 7 to...
Design a FSM for a Vending Machine In this task, you will design a FSM for...
Design a FSM for a Vending Machine In this task, you will design a FSM for a simple (albeit strange) vending machine of office supplies. The vending machine sells three possible items, each at a different cost: Item Cost Pencil 10 cents Eraser 20 cents Pen 30 cents The vending machines accepts nickels (worth 5 cents), dimes (worth 10 cents), and quarters (worth 25 cents). Physically, it is only possible to insert a single coin at a time. The vending...
You will write a program that loops until the user selects 0 to exit. In the...
You will write a program that loops until the user selects 0 to exit. In the loop the user interactively selects a menu choice to compress or decompress a file. There are three menu options: Option 0: allows the user to exit the program. Option 1: allows the user to compress the specified input file and store the result in an output file. Option 2: allows the user to decompress the specified input file and store the result in an...
The Business Case for Agility “The battle is not always to the strongest, nor the race...
The Business Case for Agility “The battle is not always to the strongest, nor the race to the swiftest, but that’s the way to bet ’em!”  —C. Morgan Cofer In This Chapter This chapter discusses the business case for Agility, presenting six benefits for teams and the enterprise. It also describes a financial model that shows why incremental development works. Takeaways Agility is not just about the team. There are product-management, project-management, and technical issues beyond the team’s control. Lean-Agile provides...
BridgeRock is a major manufacturer of tires in the U.S.. The company had five manufacturing facilities...
BridgeRock is a major manufacturer of tires in the U.S.. The company had five manufacturing facilities where tires were made and another 20 facilities for various components and materials used in tires. Each manufacturing facility produced 10,000 tires every hour. Quality had always been emphasized at BridgeRock, but lately quality was a bigger issue because of recent fatal accidents involving tires made by other manufacturers due to tread separation. All tire manufacturers were under pressure to ensure problems did not...
Please read the article and answear about questions. Determining the Value of the Business After you...
Please read the article and answear about questions. Determining the Value of the Business After you have completed a thorough and exacting investigation, you need to analyze all the infor- mation you have gathered. This is the time to consult with your business, financial, and legal advis- ers to arrive at an estimate of the value of the business. Outside advisers are impartial and are more likely to see the bad things about the business than are you. You should...
In February 2012, the Pepsi Next product was launched into the US market. This case study...
In February 2012, the Pepsi Next product was launched into the US market. This case study provides students with an interesting insight into PepsiCo’s new product process and some of the challenging decisions that they faced along the way. Pepsi Next Case Study Introduction Pepsi Next was launched by PepsiCo into the US market in February 2012, and has since been rolled out to various international markets (for instance, it was launched in Australia in September 2012). The new product...
Please answer the following Case analysis questions 1-How is New Balance performing compared to its primary...
Please answer the following Case analysis questions 1-How is New Balance performing compared to its primary rivals? How will the acquisition of Reebok by Adidas impact the structure of the athletic shoe industry? Is this likely to be favorable or unfavorable for New Balance? 2- What issues does New Balance management need to address? 3-What recommendations would you make to New Balance Management? What does New Balance need to do to continue to be successful? Should management continue to invest...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT
Active Questions
  • The earth's magnetic field can affect the electron beam in an oscilloscope or a television tube....
    asked 1 minute ago
  • The Huntington Boys and Girls Club is conducting a fundraiser by selling chili dinners to go....
    asked 10 minutes ago
  • 2. Please determinate the correctness of the following statements and justify your answers (preferably by examples)....
    asked 15 minutes ago
  • Explain the various methods of intelligence collection, specifically human intelligence and signals intelligence.
    asked 18 minutes ago
  • The provided file has syntax and/or logical errors. Determine the problem and fix the program. using...
    asked 22 minutes ago
  • What new items will you need to replace a failing processor? Select all that apply.   ...
    asked 40 minutes ago
  • A system is to be developed for an airport. When passengers have boarded an aircraft, a...
    asked 48 minutes ago
  • After reading Module 5 PowerPoint 1 - The Philosophy of Human Existance and Health Care Policy,...
    asked 57 minutes ago
  • 1. Do you feel play has a place in supporting literacy development in early childhood? Explain...
    asked 1 hour ago
  • How should roles be selected for the Emergency Operations Center (EOC)?  Is seniority less important than experience?...
    asked 1 hour ago
  • Discuss routing issues and solutions namely, count-to-infinity, split horizon, split horizon with poison reverse, and hold-down...
    asked 1 hour ago
  • Find an optimal parenthesization of a matrix-chain product whose sequence of dimensions is〈5,10,3,12,5,50,6〉.
    asked 1 hour ago