Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Santa Cruz custom chair design company gets a lot of orders per day from their loyal c Each chair is first buit in their design

image text in transcribed

Santa Cruz custom chair design company gets a lot of orders per day from their loyal c Each chair is first buit in their design studio and then sent into their store. David works as a truck driver in the company and transfers the chairs between the studio and the store. They have so many orders that David has to drive between the two locations a number of times every day. David's vehicle has a size limit S, and each chairi has a ize i The company has one important rule that the chairs must be sent to the store in the order that they are built in the studio. The company is using a greedy algorithm for doing this transfer: They load David's truck with chairs in the order they are buit, and whenever the next chair does notfit, he drives to the store and comes back to bring the rest of them to the store David is paid by the lap. To decrease the delivery cost, his manager wonders if they could use fewer laps between the two locations by sometimes sending David on his way while his vehicle is less full, so that the next time he comes back it can be better packed, which means they delay some chairs to the next drive to make the next drive to be more efficient Given a sequence of chairs with size s1,82,,Sn prove that the simple greedy algorithm is in fact better than the "delay" algorithm Santa Cruz custom chair design company gets a lot of orders per day from their loyal c Each chair is first buit in their design studio and then sent into their store. David works as a truck driver in the company and transfers the chairs between the studio and the store. They have so many orders that David has to drive between the two locations a number of times every day. David's vehicle has a size limit S, and each chairi has a ize i The company has one important rule that the chairs must be sent to the store in the order that they are built in the studio. The company is using a greedy algorithm for doing this transfer: They load David's truck with chairs in the order they are buit, and whenever the next chair does notfit, he drives to the store and comes back to bring the rest of them to the store David is paid by the lap. To decrease the delivery cost, his manager wonders if they could use fewer laps between the two locations by sometimes sending David on his way while his vehicle is less full, so that the next time he comes back it can be better packed, which means they delay some chairs to the next drive to make the next drive to be more efficient Given a sequence of chairs with size s1,82,,Sn prove that the simple greedy algorithm is in fact better than the "delay" algorithm

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

Understanding Oracle APEX 5 Application Development

Authors: Edward Sciore

2nd Edition

1484209893, 9781484209899

More Books

Students also viewed these Databases questions