IELM_assignment_6_solution

# IELM_assignment_6_solution - IELM 202, Assignment #6 Due...

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

IELM 202, Assignment #6 Due date: 12 December 2005, Monday, 5:00 pm Submitted Location: Room 3208, near Lift 21 Question 1 (30 marks): A political campaign is entering its final stage, and polls indicate a very close election. One of the candidates has enough funds left to purchase TV time for a total of five prime- time commercials on TV stations located in four different areas. Based on polling information, an estimate has been made of the number of additional votes that can be won in the different broadcasting areas depending upon the number of commercials run. These estimates are given in the following table in thousands of votes: Area Commercials 1 2 3 4 0 0 0 0 0 1 4 6 5 3 2 7 8 9 7 3 9 10 11 12 4 12 11 10 14 5 15 12 9 16 Use dynamic programming to determinate how the five commercials should be distributed among the four areas on order to maximize the estimated number of votes won. Let i be the index of area s be the available commercials r id be the votes gained in area i by d commercials invested f(i, s) be the total votes obtained started at area i with s commercials Objective function: f(i, s) = max{r id + f(i+ 1, s - d) | 0 d 5, d s} Terminating Condition: f(4, s) = r 4s Starting Condition: f(1, 5) Solution: f(1, 5) = max{0 + f(2, 5), 4 + f(2, 4), 7 + f(2, 3), 9 + f(2, 2), 12 + f(2, 1), 15 + f(2, 0)} f(2, 5) = max{0 + f(3, 5), 6 + f(3, 4), 8 + f(3, 3), 10 + f(3, 2), 11 + f(3, 1), 12 + f(3, 0)} f(2, 4) = max{0 + f(3, 4), 6 + f(3, 3), 8 + f(3, 2), 10 + f(3, 1), 11 + f(3, 0)} f(2, 3) = max{0 + f(3, 3), 6 + f(3, 2), 8 + f(3, 1), 10 + f(3, 0)} f(2, 2) = max{0 + f(3, 2), 6 + f(3, 1), 8 + f(3, 0)}

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

View Full Document
f(2, 1) = max{0 + f(3, 1), 6 + f(3, 0)} f(3, 5) = max{0 + f(4, 5), 5 + f(4, 4), 9 + f(4, 3), 11 + f(4, 2), 10 + f(4, 1), 9 + f(4, 0)} f(3, 4) = max{0 + f(4, 4), 5 + f(4, 3), 9 + f(4, 2), 11 + f(4, 1), 10 + f(4, 0)} f(3, 3) = max{0 + f(4, 3), 5 + f(4, 2), 9 + f(4, 1), 11 + f(4, 0)} f(3, 2) = max{0 + f(4, 2), 5 + f(4, 1), 9 + f(4, 0)} f(3, 1) = max{0 + f(4, 1), 5 + f(4, 0)}
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 01/05/2011 for the course IELM IELM202 taught by Professor D during the Fall '10 term at HKUST.

### Page1 / 6

IELM_assignment_6_solution - IELM 202, Assignment #6 Due...

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

View Full Document
Ask a homework question - tutors are online