Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3. Shipping Efficiently: A trucking company is responsible for shipping a large number of boxes that require many trips from New York to Boston each

image text in transcribed

3. Shipping Efficiently: A trucking company is responsible for shipping a large number of boxes that require many trips from New York to Boston each day. Each truck has a limit of W on the maximum amount or weight it is allowed to carry. Boxes arrive at the New York depot one at a time and each package has a weight of wi. The depot is small and only one truck can be loaded at a time. Company policy is that boxes must be shipped in the order they arrive, since customers might get upset if they saw a box that arrived later get to Boston earlier than one they sent earlier. Thus, the company uses a simple greedy algorithm for packing the boxes onto a truck. Pack the boxes in the order in which they arrive and once a box does not fit then send the truck on its way. The company asks you to determine if they can do better. E.g., perhaps they could reduce the number of trucks needed by sometimes sending off a truck that is less full but could allow later trucks to be better packed. A. Prove company's algorithm always ships the packages in the fewest trucks. B. Analyze the algorithm's complexity. 3. Shipping Efficiently: A trucking company is responsible for shipping a large number of boxes that require many trips from New York to Boston each day. Each truck has a limit of W on the maximum amount or weight it is allowed to carry. Boxes arrive at the New York depot one at a time and each package has a weight of wi. The depot is small and only one truck can be loaded at a time. Company policy is that boxes must be shipped in the order they arrive, since customers might get upset if they saw a box that arrived later get to Boston earlier than one they sent earlier. Thus, the company uses a simple greedy algorithm for packing the boxes onto a truck. Pack the boxes in the order in which they arrive and once a box does not fit then send the truck on its way. The company asks you to determine if they can do better. E.g., perhaps they could reduce the number of trucks needed by sometimes sending off a truck that is less full but could allow later trucks to be better packed. A. Prove company's algorithm always ships the packages in the fewest trucks. B. Analyze the algorithm's complexity

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_2

Step: 3

blur-text-image_3

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

Learning MySQL Get A Handle On Your Data

Authors: Seyed M M Tahaghoghi

1st Edition

0596529465, 9780596529468

More Books

Students also viewed these Databases questions