Docsity

Dynamic Programming - Introduction to Operations Research - Lecture Slides, Slides of Operational Research

Partial preview of the text

Download Dynamic Programming - Introduction to Operations Research - Lecture Slides and more Slides Operational Research in PDF only on Docsity!

1

Dynamic Programming

  • General Problem-Solving strategy
  • Was born in the 1950s (Bellman)
  • Based on successive decomposition
  • Leads to functional equations
  • More ā€œArtā€ than ā€œScienceā€ (?)
  • Difficult to teach/learn
  • No general purpose software
  • Usually taught/learned by example

2

programme

  • Shortest Path problem
  • Knapsack problem
  • Tower of Hanoi Puzzle
  • Travelling Salesman Problem (??)
  • Critical Path Problem (Chapter 10)
  • And
  • Dijkstra’s Algorithm (BYO) (details in due course)

4

  • The significance of the ā€œdrawingā€ is the precedence relationships it represents, not the visual picture.
  • On the other hand, the picture can tell us a lot about the nature of the relationships...
  • Make sure that you distinguish between the drawing and the relationships!!!!!

5

5

1

4 3

2

5

1 2 3 4

7

Notation

  • S(n) := Set of immediate predecessors of node n
  • P(n) := Set of Immediate successors of node n.
  • φ := empty set

8

Lemma 9.1.

  • If a directed graph with a finite number of nodes N is acyclic, then the nodes can be numbered in such a way that the following condition is satisfied: m < n for all m in P(n), n=1,2,...,N

In words, an ordering of nodes exists such that all arcs are directed from a lower numbered node to a higher numbered node.

10

Example 9.1.

11

1

1

2

13

Problem Statement

  • Given a directed graph where each arc is assigned a numerical length, we want to find the shortest path between a specified origin s and a specified destination t, where the length of a path is equal to the sum of the arc lengths on that path.
  • There are ā€œgeneralisedā€ shortest path problems where the length of a path is not ā€œadditiveā€ (Eg. ??????)

14

DP Strategy

  • We embed the problem of interest (shortest path from origin to destination) in a family of other related problems.
  • We establish some relationaships between the optimal solutions to these problems.
  • We solve this relationship (functional equation)
  • From the solution of the functional equation we obtain the solution to the problem of interest.

16

  • Let
  • f(j) := length of the shortest path

from the origin to node j,

j=1,2,...,N

  • Note that we are interested ā€œonlyā€ in f(N).

17

Observation

f(j) = f(k) + a k,j

for some k in P(j) (why?)

j

k

1

N

(NILN) Docsity.com

19

result

  • DP functional equation

f j { f k a } j N

k j kj

( ) = min ( ) + , = ,. ..,

≠

f ( ) 1 = 0

20

Remark

  • Since a (^) ij = infinity if k is not in P(j), the functional equation can be rewritten as follows:

f j { f k a } j N

k P j kj

( ) min ( ) , ,...,

( )

∈

f ( ) 1 = 0