Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Algorithm Problem: Loading problem A large ship is to be loaded with containers of cargos. Different containers, although of equal size, will have different weights.

Algorithm Problem: Loading problem

A large ship is to be loaded with containers of cargos. Different containers, although of equal size, will have different weights.

Let wi be the weight of the i th container, 1 ? i ? n, and the capacity of the ship is c, we want to find out a way to load the ship with the maximum number of containers, without tipping over the ship.

Let xi ? {0, 1}. If xi = 1, we will load the i th container, otherwise, we will not load it.

We wish to assign values to xi s such that Pn i=1 xiwi ? c, and Pn i=1 xi is maximized.

Goal: Come up with a solution as how we should load into the ship

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

Databases A Beginners Guide

Authors: Andy Oppel

1st Edition

007160846X, 978-0071608466

Students also viewed these Databases questions