Professional Documents
Culture Documents
Stagecoach Problem
Stagecoach Problem
Stagecoach Problem
Stagecoach Problem
Source: Hillier, F. S., Lieberman, G., Introduction to Operations Research, McGraw Hill, 2015
• This fortune seeker was a prudent man who was quite concerned about his safety.
After some thought, he came up with a rather clever way of determining the safest
route. Life insurance policies were offered to stagecoach passengers. Because the
cost of the policy for taking any given stagecoach run was based on a careful
evaluation of the safety of that run, the safest route should be the one with the
cheapest total life insurance policy. The cost for the standard policy on the
stagecoach run from state i to state j, which will be denoted by c ij, is as follow
4
• The road system and costs for the stagecoach problem is presented below
(Fig. 10.1)
5
• First note that the shortsighted approach of selecting the cheapest run offered by
each successive stage need not yield an overall optimal decision. Following this
strategy would give the route A B F I J, at a total cost of 13. However, sacrificing
a little on one stage may permit greater savings thereafter. For example, A D F is
cheaper overall than A B F. One possible approach to solving this problem is to
use trial and error. However, the number of possible routes is large (18), and
having to calculate the total cost for each route is not an appealing task.
Fortunately, dynamic programming provides a solution with much less effort than
exhaustive enumeration. (The computational savings are enormous for larger
versions of this problem.) Dynamic programming starts with a small portion of the
original problem and finds the optimal solution for this smaller problem. It then
gradually enlarges the problem, finding the current optimal solution from the
preceding one, until the original problem is solved in its entirety.
7
• For the stagecoach problem, we start with the smaller problem where the fortune
seeker has nearly completed his journey and has only one more stage (stagecoach
run) to go. The obvious optimal solution for this smaller problem is to go from his
current state (whatever it is) to his ultimate destination (state J). At each
subsequent iteration, the problem is enlarged by increasing by 1 the number of
stages left to go to complete the journey. For this enlarged problem, the optimal
solution for where to go next from each possible state can be found relatively
easily from the results obtained at the preceding iteration. The details involved in
implementing this approach follow
8
Formulation
• Let the decision variables xn (n = 1, 2, 3, 4) be the immediate destination on stage n (the nth
stagecoach run to be taken). Thus, the route selected is A x1 x2 x3 x4, where x4
J.
• Let fn(s, xn) be the total cost of the best overall policy for the remaining stages, given that
the fortune seeker is in state s, ready to start stage n, and selects x n as the immediate
destination.
• Given s and n, let xn * denote any value of xn (not necessarily unique) that minimizes fn(s, xn),
and let fn * (s) be the corresponding minimum value of fn(s, xn). Thus,
9
Formulation
• The value of csxn is given by the preceding tables for cij by setting i = s (the current state)
and j = xn (the immediate destination). Because the ultimate destination (state J) is reached
at the end of stage 4, f5* ( J) = 0.
• The objective is to find f1* (A) and the corresponding route. Dynamic programming finds it
by successively finding f4*(s), f3* s), f2* s), for each of the possible states s and then using f 2*
(s) to solve for f1*(A).
10
The minimum of these three numbers is 7, so the minimum total cost from state C
to the end is f2*(C) 7, and the immediate destination should be x2* =E.
14
• In the first and third rows of this table, note that E and F tie as the minimizing value of x 2,
so the immediate destination from either state B or D should be x2* = E or F.
15
SOLUTION
18
TERIMA KASIH
18