CO-351-1071-Midterm_solutions

# CO-351-1071-Midterm_solutions - 1 UNIVERSITY OF WATERLOO...

This preview shows pages 1–4. Sign up to view the full content.

1 UNIVERSITY OF WATERLOO MIDTERM EXAMINATION CO351, Winter Term 2007 SOLUTIONS

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

View Full Document
2 1. Modeling with Shortest Paths (20 Points) A factory requires the following number of units of certain chemical component “X” for each of the next 4 days. Days 1 2 3 4 Requirements (in units) 5 9 6 2 Component “X” is stored in a special container. This container can only be refilled after it has been completely emptied. You can buy the chemical at the start of each day. The price varies from day to day. When refilling the container you pay a fixed cost, plus the cost per unit, times the number of units you buy. Days 1 2 3 4 Fixed cost 25\$ 15\$ 16\$ 2\$ Cost per unit 8\$ 9\$ 13\$ 11\$ To meet all requirement we could, for instance, buy 14 units on day one at a cost of 25 + 8 × 14 and 8 units on day three at a cost of 16 + 13 × 8 . The goal is to find how many units of chemical “X” to buy each day so as to satisfy the requirement of the factory while minimizing the total purchasing cost. Formulate this problem as a shortest dipath problem. Explain the correspondance between shortest paths in your digraph and solutions to the above problem as precisely as you can. You do not have to find a shortest path. Solution: The figure below shows a digraph in which each s, t -dipath corresponds to a refilling strategy. Arc ij is in an st -dipath if the company decides to refill at the start of day i + 1 for days i + 1 , . . ., j . 25+(5+9+6+2)*8 15+(9+6+2)*9 16+(6+2)*13 2+2*11 16+6*13 15+9*9 15+(9+6)*9 25+(5+9)*8 S t 25+(5*8) 25+(5+9+6)*8 0 3 1 2 4
3 2. Computing Shortest Paths (24 Points) Consider the digraph D = ( N, A ) given in the following figure. As usual, the arcs are labeled by their lengths. 3

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 6

CO-351-1071-Midterm_solutions - 1 UNIVERSITY OF WATERLOO...

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

View Full Document
Ask a homework question - tutors are online