# Giao trinh bai tap 08 khoan dinh huong

ECE 307 – Techniques for Engineering
Decisions
Dynamic Programming

George Gross
Department of Electrical and Computer Engineering
University of Illinois at Urbana-Champaign

© 2006 – 2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

1

DYNAMIC PROGRAMMING
 Systematic approach to solving sequential decision
making problems
 Salient problem characteristic: ability to separate
the problem into stages
 Multi-stage problem solving technique
© 2006 – 2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

2

STAGES AND STATES
 We consider the problem to be composed of
multiple stages
 A stage is the “point” in time, space, geographic
location or structural element at which we make a
decision; this “point” is associated with one or
more states
 A state of the system describes a possible
configuration of the system in a given stage
© 2006 – 2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

3

STAGES AND STATES
dn

sn

state
(input)

stage n

decision variable
(decision)

s n

state
(output)
© 2006 – 2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

4

RETURN FUNCTION

 A decision d n in the stage n transforms the state s n in
the stage n into the state s n + 1 in the stage n + 1
 The state s n and the decision d n have an impact on
the objective function; the effect is measured in
terms of the return function denoted by rn (s n , d n )
 The optimal decision at stage n is the decision d *n
that optimizes the return function for the state s n
© 2006 – 2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

5

RETURN FUNCTION
decision variable
(decision)

sn

state
(input)

dn

state
(output)

stage n

s n

rn ( s n , d n )

return
function

© 2006 – 2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

6

ROAD TRIP EXAMPLE
 A poor student is traveling from NY to LA
 To minimize costs, the student plans to sleep at
friends’ houses each night in cities along the trip
 Based on past experience he can reach
 Columbus, Nashville or Louisville after 1 day
 Kansas City, Omaha or Dallas after 2 days
 San Antonio or Denver after 3 days
 LA after 4 days
© 2006 – 2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

7

ROAD TRIP EXAMPLE
2 Columbus

680

5 K. City

610

580

550

8 Denver
540

1030

790
790

NY 1

900

3 Nashville

760 6 Omaha

10 LA
790

700
770

4 Louisville

day 1

1050
660

510

day 2

830

7 Dallas

day 3

940

270

1390

9 S. Antonio

day 4

© 2006 – 2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

day 5
8

ROAD TRIP
 The student wishes to minimize the number of
miles driven and so he wishes to determine the

shortest path from NY to LA
 To solve the problem, he works backwards
 We adopt the following notation

c ij

= distance between states i and j

f k( i ) = distance of the shortest path to
LA from state i in the stage k
© 2006 – 2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

9

ROAD TRIP EXAMPLE CALCULATIONS
day 4 :

day 3

:

f 4 (8) = 1,030

f 4 (9) = 1,390

f 3 (5) = min ⎨(610 + 1,030),(790 + 1,390)⎬ = 1,640




⎪⎩
⎪⎭
1,640
2,180

f 3 (6) = min ⎨(540 + 1,030),(940 + 1,390)⎬ = 1,570


### Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Tải bản đầy đủ ngay

×