Next: Dynamic Programming
Up: Introduction to algorithm design
Previous: Big Oh Notation
Accurately modeling a problem is an art, and the key to applying algorithm
design techniques to real-world problems. Most algorithms are designed to
work on rigorously defined abstract structures. Algorithms and data
structures are inseparable, however, by data structures, we do not mean
data structure implementation for any specific OS or language.
Two basic paradigms used for modeling problems are divide and conquer and
dynamic programming.
- Divide and conquer usually splits the problem in half and solves for
each half, then combines the result to get the full solution.
- Dynamic
programming is typically applied to optimization problems. The development
of a dynamic-programming algorithm can be divided into a series of four
steps:
- Characterize the structure of an optimal solution.
- Recursively
define
value of an optimal solution.
- Compute the value of an optimal solution
in bottom-up fashion.
- construct an optimal solution from computed
information.
Nitin Sharma
Wed Oct 8 17:46:14 PDT 1997