A Very Short Intro To Dynamic Programming in DAA

 Dynamic Programming: 

Dynamic programming is a technique for solving problems with overlapping subproblems. Now , to understand dynamic programming we must need the knowledge of recursion, because dynamic programming is nothing but recursion with some further modifications. The further modification is totally based on 'overlapping subproblems'. 

Overlapping Condition: 

In recursion, the function calls itself again and again until it reach the base condition. For some values the recursive function would be called more than once, this is called the overlapping condition. In dynamic programming what we will do? If we find any value, for that the recursive function would call more than once, then we will store the value of that function in a top-down table, so that when second time the same function would be called then it will first check the top-down table if the function value is already present or not, if it is present then the function would not be called again, it will access the value from that table. 








Post a Comment (0)
Previous Post Next Post