Need help with computer science to Find a pseudo-code to optimize this problem.

Dec 19th, 2015
FratBro23
Category:
Computer Science
Price: $20 USD

Question description

(Tools Rental) A customer working on a home project needs to rent n tools from a tool supply company.  All tools arrive together at the same time. He only uses one tool at a time, and each tool i is needed for a certain time duration ti(depending on the tool). He cannot switch to another tool before he finishes using one tool. When he finishes with one tool, he then checks in the tool on the rental company’s website, the company has shuttle cars to pick up any checked-in tools at any time. The customer only pays for each tool for the duration from the arrive time to the check-in time, and each tool i has a rental rate ri.

Find out in what order the customer should use these tools, so as to minimize the total rental cost. Assume that these tools may be used in any order.

Example: rent 2 tools, tool 1 is needed for 2 hours and rental rate is 10, tool 2 is needed for 3 hours and rental rate is 5. Using tool 1 first and then tool 2 yields a minimized rental cost: 10*2 +5*(2+3) = 45; while using tool 2 first and then tool 1 has the total cost as: 5*3 + 10*(3+2) = 65


Tutor Answer

(Top Tutor) Daniel C.
(997)
School: UIUC
PREMIUM TUTOR

Studypool has helped 1,244,100 students

8 Reviews


Summary
Quality
Communication
On Time
Value
ddg82
Dec 10th, 2016
" Thanks, good work "
tinytim47
Nov 27th, 2016
" Wow this is really good.... didn't expect it. Sweet!!!! "
kenmwao2
Nov 25th, 2016
" Solid work, thanks. "
jestin7
Nov 18th, 2016
" This tutor is great! "
lilmoe415
Nov 4th, 2016
" Thank you, Thank you, for top quality work, this is your guy!! "
dontuwannaknow
Oct 13th, 2016
" Excellent work as always thanks so much "
thargrow
Oct 4th, 2016
" Very Satisfied. "
SjSurvivor143
Sep 29th, 2016
" Thanks for the help. "
Ask your homework questions. Receive quality answers!

Type your question here (or upload an image)

1825 tutors are online

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors