Skip to main content

UNIT: III - Dynamic Programming

 DYNAMIC PROGRAMMING:

 

Dynamic programming approach is similar to divide and conquer in breaking down the problem into smaller and yet smaller possible sub-problems. But unlike, divide and conquer, these sub-problems are not solved independently. Rather, results of these smaller sub-problems are remembered and used for similar or overlapping sub-problems.

 

Dynamic programming is used where we have problems, which can be divided into similar sub-problems, so that their results can be re-used. Mostly, these algorithms are used for optimization(the action of making the best or most effective use of a situation or resource.). Before solving the in-hand sub-problem, dynamic algorithm will try to examine the results of the previously solved sub-problems. The solutions of sub-problems are combined in order to achieve the best solution.

 

So we can say that 

 

The problem should be able to be divided into smaller overlapping sub-problem.

 

An optimum solution can be achieved by using an optimum solution of smaller sub-problems. Dynamic algorithms use memorization.

 

In contrast to greedy algorithms, where local optimization is addressed, dynamic algorithms are motivated for an overall optimization of the problem.

 

In contrast to divide and conquer algorithms, where solutions are combined to achieve an overall solution, dynamic algorithms use the output of a smaller sub-problem and then try to optimize a bigger sub-problem. Dynamic algorithms use memorization to remember the output of already solved sub-problems.

 

The following computer problems can be solved using dynamic programming approach 

                            Fibonacci number series Knapsack problem

    Tower of Hanoi

                           All pair shortest path by Floyd-Warshall Shortest path by Dijkstra

Dynamic programming can be used in both top-down and bottom-up manner. And of course, most of the times, referring to the previous solution output is cheaper than recomputing in terms of CPU cycles



Unit-III Complete Notes : Click Here




 

Comments

Popular posts from this blog

Web Application Development (WAD)

Web Application Development (WAD) WEB APPLICATION AND DEVELOPMENT ( WAD) Notes Unit Wise Unit I INTRODUCTION   HTML   CSS   WEB APPLICATION FUNDAMENTALS   Unit II XML   Unit III JQuery   JSON Java Script Unit IV AngularJS   Unit V MEAN Stack   SMACK Stack LAB PROGRAMS:  Click Here Important Question for MID I :  Click here WAD Previous Question : Click Here TEXT BOOK:  Click Hear Course Code Course Title Core/Elective PC 601 IT WEB APPLICATION DEVELOPMENT Core Prerequisite Contact hours per week CIE SEE Credits L T D P - 3 1 - - 30 70 3 Course Objective:     Ø    To develop dynamic web applications using the concepts of HTML 5.0 and   CSS     Ø    To understand the document structure and schemas and represent data in  t...

DESIGN AND ANALYSIS OF ALGORITHMS – QUESTION BANK (CSE)

  ISL ENGINEERING COLLEGE DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING DESIGN AND ANALYSIS OF ALGORITHMS QUESTION BANK                                         BE III Year II Semester (A & B Sections) –PC 603 CS     Academic Year: 2020-21 SHORT ANSWER QUESTIONS   UNIT-I 1.       Why is an algorithm analysis required? 2.       State about UNION & FIND operations. 3.       List out the UNION algorithm using weighting rule. 4.       Given f(n)=10n 2 +4n+3, then prove that f(n)=O(n 2 ). 5.       List and define operations performed on sets? 6.       What do you mean by performance analysis of an algorithm? Explain. 7. ...

DESIGN AND ANALYSIS OF ALGORITHMS – QUESTION BANK (IT)

  ISL ENGINEERING COLLEGE DEPARTMENT OF INFORMATION TECHNOLOGY DESIGN AND ANALYSIS OF ALGORITHMS QUESTION BANK BE III Year II Semester – PC 602 IT Academic Year: 2020-21 SHORT ANSWER QUESTIONS   UNIT-I 1.       Explain linear probing in Hashing with an example. 2.       Define Heap. 3.       List out the collision resolution techniques in hashing. 4.       Why is an algorithm analysis required? 5.       State about UNION & FIND operations. 6.       List out the UNION algorithm using weighting rule. 7.       Given f(n)=10n 2 +4n+3, then prove that f(n)=O(n 2 ). 8.       List and define operations performed on sets? 9.       What do you mean by performance analysi...