subject

A car mechanic arrives at his garage in the morning and finds n customers. For each client ci , the engineer calculates the repair time ri of his car. When the engineer starts a repair, he completes it. Repairs can be performed in any order, one at a time. Your goal is to find the order in which repairs are performed with the shortest total waiting time for customers. The wi waiting time of a client ci equals the time it took to repair the cars of customers executed before the customer ci plus the repair time ri . The total T wait time of all customers is equal to the sum of customers' waiting times. For example, consider that there are 3 customers c1, c2, c3 with repair times r1 = 45, r2 = 28, r3 = 35 minutes, respectively. If the tasks are performed in the order of c3, c1, c2, then the customer waiting time is w1 = 35 + 45 = 80, w2 = 35 + 45 + 28 = 108, and w3 = 35. The total waiting time is T = 80 + 108 + 35 = 223. 1) Describe a greedy algorithm to work out problem. Highlight your greedy choice. What is the running time of your algorithm?

2)Formulate and leave in the capacity of greedy choice property. Public, proof, greedy choices in an optimal carefully.

3)Formulate and prove the optimal infrastructure property. That is, prove that the optimal solution to the problem contains the optimal solution of the problem that is created after your greedy choice.​

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 04:10
2pointswho was mikhail gorbachev? oa. a russian leader who opposed a coupob. a polish leader who founded the labor union "solidarityoc. a soviet leader who called for a closer relationship with the unitedstates, economic reform, and a more open societyd. a soviet leader who called for more oppression in the soviet union
Answers: 3
question
Computers and Technology, 23.06.2019 08:00
Which argument is not a valid filter? does not equal this quarter filter by cell color all of these are valid filter arguments.
Answers: 2
question
Computers and Technology, 23.06.2019 18:30
Write a program that prints the day number of the year, given the date in the form month-day-year. for example, if the input is 1-1-2006, the day number is 1; if the input is 12-25-2006, the day number is 359. the program should check for a leap year. a year is a leap year if it is divisible by 4, but not divisible by 100. for example, 1992 and 2008 are divisible by 4, but not by 100. a year that is divisible by 100 is a leap year if it is also divisible by 400. for example, 1600 and 2000 are divisible by 400. however, 1800 is not a leap year because 1800 is not divisible by 400.
Answers: 3
question
Computers and Technology, 24.06.2019 01:10
Create a program that will take in a single x and y coordinate as the origin. after the input is provided, the output should be all of the coordinates (all 26 coordinates read from the “coordinates.json” file), in order of closest-to-farthest from the origin.
Answers: 1
You know the right answer?
A car mechanic arrives at his garage in the morning and finds n customers. For each client ci , the...
Questions
question
Biology, 25.03.2020 00:12
question
Mathematics, 25.03.2020 00:12
question
Mathematics, 25.03.2020 00:12
Questions on the website: 13722362