MIT1_204S10_assn7

MIT1_204S10_assn7 - Computer Algorithms in Systems...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Computer Algorithms in Systems Engineering Spring 2010 Problem Set 7: Branch and bound: Staging building materials Due: 12 noon, Friday, May 8, 2010 Problem statement This homework explores the sum of subsets problem, which arises in many contexts. We will use a truck loading problem. A large number of trucks is used to carry structural elements and many types of equipment for construction projects. In many projects, this is a significant portion of the total cost. You must ship a series of items from a staging area to a construction site, each with a given weight, in the minimum number of trucks. Each truck has the same capacity. We assume that weight is the limiting factor, not the size of the shipment. For example, a truck may hold a maximum of 48,000 pounds of freight. We omit the thousands in the examples that follow, so we consider the truck to have a capacity of 48. If we have items that weigh 14, 12, 11, 6, 3 and 2, they can fit exactly on the truck. The input to the problem is 1,000 integers, which give the weight of each of 1,000 items to be shipped to the construction site. You are to design an algorithm to place these items on trucks with the maximum possible efficiency (i.e., using the smallest number of trucks). Suggestions: 1. Use a greedy algorithm to place ‘obvious’ combinations of items on a truck. For example, if a truck has a capacity of 48, you can assign it 48 weight-1 items or 24 weight-2 items, etc. Or you can assign it 12 weight-2 items and 6 weight-4 items. 2. After your greedy algorithm has handled the obvious combinations, you will be left with a smaller number of integers. Implement the ‘sum of subsets’ algorithm described below using a branch and bound framework to assign this next set of items to trucks, again with maximum efficiency. 3. Last, there will be some items left over that don’t fit on a truck exactly. Find a way to assign them to trucks so that there is minimal inefficiency. We don’t provide any hints for the greedy algorithm; this homework allows you to exercise some of the algorithm design knowledge you’ve been acquiring this semester. Sum of subsets The sum of subsets algorithm is described below, and in section 7.3 of the Horowitz text. It uses the backtracking version of branch and bound. The key steps are: Sort the weights in ascending order. There will be ties, since many items may have the same weight.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
In the branch and bound tree, whether to put each integer in the solution is a decision represented by a node and arcs to its two children, representing x
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/04/2011 for the course ESD 1.204 taught by Professor Georgekocur during the Spring '10 term at MIT.

Page1 / 6

MIT1_204S10_assn7 - Computer Algorithms in Systems...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online