Computers and Technology

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.โ€‹

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 17:30, yoyo9661
Under which key category do the page up and page down keys fall? page up and page down keys fall under the keys category.
Answers: 1
image
Computers and Technology, 22.06.2019 18:30, lailahussain99
Which of the following is an example of intellectual properly! oa. new version of a novelb. journal of ideasc. pages of a bookood. lines of a poem
Answers: 2
image
Computers and Technology, 22.06.2019 21:50, IdkHowToDoMath
Given int variables k and total that have already been declared, use a while loop to compute the sum of the squares of the first 50 counting numbers, and store this value in total. thus your code should put 11 + 22 + 33 + + 4949 + 50*50 into total. use no variables other than k and total.
Answers: 2
image
Computers and Technology, 23.06.2019 11:30, magicalpenguin48
In cell h5 enter a formula that will calculate the percentage of attendees that went to the altamonte springs job fair in 2018.
Answers: 1
Do you know the correct answer?
A car mechanic arrives at his garage in the morning and finds n customers. For each client ci , the...

Questions in other subjects:

Konu
Mathematics, 11.06.2021 19:00
Konu
Mathematics, 11.06.2021 19:00