Home Navigation

Tuesday 27 September 2016

Dynamic programming intro

Dynamic programming is a method for solving a complex problem by breaking it down into a collection of simpler subproblems, solving each of those subproblems just once, and storing their solutions and reuse them. It is a powerful technique that allows one to solve many different types of problems in time O(n^2) or O(n^3) for which a naive approach would take exponential time.

Application of dynamic problem:

  • Tower of Hanoi
  • 0/1 Knapsack problem
  • Matrix chain multiplication
  • Longest common subsequence
  • Traveling salesmen problem

No comments:

Post a Comment