This
** preview**
has intentionally

**sections.**

*blurred***to view the full version.**

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

D
D
y
y
n
n
a
a
m
m
i
i
c
c
P
P
r
r
o
o
g
g
r
r
a
a
m
m
m
m
i
i
n
n
g
g
©
Objective:
•
Dynamic programming is applied to optimization
problems.
©
Comparison
•
Divide-and-conquer algorithms partition the problem
into independent sub problems.
•
Greedy method generates a single decision "locally
optimal", at each time.
©
example:
•
S P: form S
→
d
•
At any given node i:
S
i
n
1
n
2
n
k
l
l
l
i

This
** preview**
has intentionally

Q: Which of the n
i
will be chosen in the S.P. from s to d. ?
Note:
There is no way to make the right choice or
decision at this time
guarantee that future decisions
lead to Optimal Solution.
©
Principle of optimality
•
An optimal sequence of decisions has the property that
what ever the initial state and decision are, the remaining
decisions must constitute an optimal decision sequence
with regard to the state resulting from the first decision.
©
Principle:
•
A sub solution for an optimal solution is an optimal
solution for the sub problem.
©
Dynamic Programming:
•
Uses the principle of optimality.
©
Example:
•
All pairs shortest paths.
•
Matrix- chain.

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

Ask a homework question
- tutors are online