Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Suppose you have five items with a total weight of 100lbs that you want to ship via USPS in a box. However. the maximum allowable

image text in transcribed
Suppose you have five items with a total weight of 100lbs that you want to ship via USPS in a box. However. the maximum allowable weight for domestic shipping is 70lbs so clearly you can't ship them all in one box. You can only afford to ship one box so you want to determine which are the best items to ship. Assume you have assigned a value to each item. The weight in pounds and value of each item is listed in the table below. 1. Obtain a solution to this problem using the Greedy Algorithm where the criteria for choosing the next item is the one with the highest value. (a) List the items in order from highest to lowest value. (b) Go through 5 loops of the algorithm where you consider an item and decide whether or not to add the item to the box or discard it. Tabulate your results in a table like the one below. 2. Obtain a solution to this problem using the Greedy Algorithm where the criteria for choosing the next item is the one with the highest value to weight ratio. (a) First determine the ratio of value/weight for each item and them list them in order from highest to lowest ratios. (b) Go through 5 loops of the algorithm where you consider an item and decide whether or not to add the item to the box or discard it. Tabulate your results in a table like the one from part (1.) (c) Compare results with (1.)

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

Harness The Power Of Big Data The IBM Big Data Platform

Authors: Paul Zikopoulos, David Corrigan James Giles Thomas Deutsch Krishnan Parasuraman Dirk DeRoos Paul Zikopoulos

1st Edition

0071808183, 9780071808187

More Books

Students also viewed these Databases questions

Question

Why must an immunized portfolio be rebalanced periodically?

Answered: 1 week ago

Question

How have their tactics changed?

Answered: 1 week ago