HiveBrain v1.2.0
Get Started
← Back to all entries
patternMajor

Deciding on Sub-Problems for Dynamic Programming

Submitted by: @import:stackexchange-cs··
0
Viewed 0 times
programmingsubfordecidingdynamicproblems

Problem

I have used the technique of dynamic programming multiple times however today a friend asked me how I go about defining my sub-problems, I realized I had no way of providing an objective formal answer. How do you formally define a sub-problem for a problem that you would solve using dynamic programming?

Solution

The principle of dynamic programming is to think top-down (i.e recursively) but solve bottom up. So a good strategy for designing a DP is to formulate the problem recursively and generate sub-problems that way.

Context

StackExchange Computer Science Q#645, answer score: 39

Revisions (0)

No revisions yet.