SlideShare a Scribd company logo
3
Most read
5
Most read
7
Most read
Presentation
on
By
BHARAT BHUSHAN
Asst. Professor, Department of Computer Sc.
RLSY College, Ranchi
Buddha Science and Technical Institute, Ranchi
www.bharatsir.com
Dynamic Programming in
Algorithm Design Technique
www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889
Algorithm Design
Dynamic Programming
Dynamic Programming (DP) is an algorithmic
technique for solving an optimization problem by
breaking it down into simpler sub problems and
utilizing the fact that the optimal solution to the
overall problem depends upon the optimal solution
to its sub problems.
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.
www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889
Algorithm Design
Dynamic Programming Approach Work
The following are the steps that the dynamic
programming follows:
 It breaks down the complex problem into simpler
sub problems.
 It finds the optimal solution to these sub-problems.
 It stores the results of sub problems.
 The process of storing the results of sub problems
is known as memorization.
 It reuses them so that same sub-problem is
calculated more than once.
 Finally, calculate the result of the complex
problem.
www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889
Algorithm Design
Approaches of Dynamic Programming
There are two approaches to dynamic programming:
 Top-down approach
 Bottom-up approach
Top-down approach : The top-down method
solves the overall problem before you break it
down into sub problems. This process works to
solve larger problems by finding the solution to
sub problems recursively, caching each result.
www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889
Algorithm Design
Approaches of Dynamic Programming
Bottom-up approach : The bottom-up approach is
also one of the techniques which can be used to
implement the dynamic programming. It uses the
tabulation technique to implement the dynamic
programming approach. It solves the same kind of
problems but it removes the recursion.
If we remove the recursion, there is no stack
overflow issue and no overhead of the recursive
functions. In this tabulation technique, we solve
the problems and store the results in a matrix.
www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889
Algorithm Design
Examples
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
 Project scheduling
www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889
Algorithm Design
Advantages of Dynamic Programming
1. Dynamic programming can be used to obtain
local as well as the total optimal solution.
2. Dynamic programming algorithms are
generally compact code pieces as they are
based on recursive functions.
3. The linear and non-linear problem, both kind
of problems can be solved using dynamic
programming.
4. Dynamic programming algorithms are easy to
debug.
www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889
Algorithm Design
Disadvantages of Dynamic Programming
1. Dynamic programming uses recursion, which
requires more memory in the call stack, and
leads to a stack overflow condition in the
runtime.
2. It takes memory to store the solutions of each
sub-problem. There is no guarantee that the
stored value will be used later in execution.
Bharat Bhushan, Assistant Professor, RLSY College, Ranchi
Algorithm Design

More Related Content

PPT
Top down parsing
PPTX
Binary Tree Traversal
PPT
Asymptotic notations
PPTX
Binary Tree in Data Structure
PDF
Sorting Algorithms
PPT
Regular Languages
PPTX
NFA & DFA
PPTX
Analysis of algorithm
Top down parsing
Binary Tree Traversal
Asymptotic notations
Binary Tree in Data Structure
Sorting Algorithms
Regular Languages
NFA & DFA
Analysis of algorithm

What's hot (20)

PPT
Binary search tree(bst)
PPT
Bottom - Up Parsing
PPT
3.6 radix sort
PDF
Singly linked list
PPTX
Linked List
PPTX
Radix sort presentation
PPTX
Binary Search Tree
PPTX
Sorting Algorithms
PPTX
linked list in Data Structure, Simple and Easy Tutorial
PPTX
Selection sorting
PDF
COMPILER DESIGN- Syntax Directed Translation
PDF
Cs2303 theory of computation all anna University question papers
PPT
Binary Search
PPTX
Parsing in Compiler Design
PPTX
Bubble sort | Data structure |
PPTX
6-Practice Problems - LL(1) parser-16-05-2023.pptx
PPTX
Asymptotic notations
PPTX
Local beam search example
PPTX
Skip lists (Advance Data structure)
Binary search tree(bst)
Bottom - Up Parsing
3.6 radix sort
Singly linked list
Linked List
Radix sort presentation
Binary Search Tree
Sorting Algorithms
linked list in Data Structure, Simple and Easy Tutorial
Selection sorting
COMPILER DESIGN- Syntax Directed Translation
Cs2303 theory of computation all anna University question papers
Binary Search
Parsing in Compiler Design
Bubble sort | Data structure |
6-Practice Problems - LL(1) parser-16-05-2023.pptx
Asymptotic notations
Local beam search example
Skip lists (Advance Data structure)
Ad

Similar to Algorithm Design Technique (20)

PPTX
esign and Analysis of Algorithms Presentation.pptx
PPTX
Dynamic Programming | Economics
PPTX
Use of Symbolic Computation is Solving Structural Analysis Problems
PPTX
How to Design an Algorithm
PPTX
Algorithms Design Patterns
PDF
251 - Alogarithms Lects.pdf
PPTX
Our presentation on algorithm design
PPTX
Operation Research Techniques
PDF
deep-learning-ppt-full-notes.pdf notesss
PDF
Project report
PDF
Unit 4 of design and analysis of algorithms
PPTX
Maxima presentation
PPTX
CH-1.1 Introduction (1).pptx
PPT
Algorithm Design
PPTX
Dynamic programming prasintation eaisy
DOCX
DP Project Report
PPTX
Notion of an algorithm
PPTX
Computer science in Dynamic programming .pptx
PPTX
The Download: Tech Talks by the HPCC Systems Community, Episode 16
PPTX
Overview of Approximation and Randomized Algorithms KARAN 461.pptx
esign and Analysis of Algorithms Presentation.pptx
Dynamic Programming | Economics
Use of Symbolic Computation is Solving Structural Analysis Problems
How to Design an Algorithm
Algorithms Design Patterns
251 - Alogarithms Lects.pdf
Our presentation on algorithm design
Operation Research Techniques
deep-learning-ppt-full-notes.pdf notesss
Project report
Unit 4 of design and analysis of algorithms
Maxima presentation
CH-1.1 Introduction (1).pptx
Algorithm Design
Dynamic programming prasintation eaisy
DP Project Report
Notion of an algorithm
Computer science in Dynamic programming .pptx
The Download: Tech Talks by the HPCC Systems Community, Episode 16
Overview of Approximation and Randomized Algorithms KARAN 461.pptx
Ad

More from Bharat Bhushan (20)

PDF
NIMCET 2023 : Questions
PPTX
Heuristics Search Techniques in AI
PDF
Heuristics Search Techniques
PPTX
Hill Climbing Algorithm in Artificial Intelligence
PDF
Hill Climbing Algorithm in Artificial Intelligence
PPTX
Control Strategies in AI
PDF
Control Strategies in AI
PDF
Dynamic Programming
PDF
Production System in AI
PPTX
Production System in AI
PPTX
Problem Characteristics in Artificial Intelligence
PDF
Problem Characteristics in Artificial Intelligence
PDF
Introduction to Artificial Intteligence
PPTX
Introduction to Artificial Intteligence
PDF
DESIGN AND ANALYSIS OF ALGORITHMS by Bharat Sir
PPTX
DESIGN AND ANALYSIS OF ALGORITHMS
PPTX
ARTIFICIAL INTELLIGENCE
PDF
ARTIFICIAL INTELLIGENCE SYLLABUS
PPTX
Cyber Security
PDF
Cyber Security
NIMCET 2023 : Questions
Heuristics Search Techniques in AI
Heuristics Search Techniques
Hill Climbing Algorithm in Artificial Intelligence
Hill Climbing Algorithm in Artificial Intelligence
Control Strategies in AI
Control Strategies in AI
Dynamic Programming
Production System in AI
Production System in AI
Problem Characteristics in Artificial Intelligence
Problem Characteristics in Artificial Intelligence
Introduction to Artificial Intteligence
Introduction to Artificial Intteligence
DESIGN AND ANALYSIS OF ALGORITHMS by Bharat Sir
DESIGN AND ANALYSIS OF ALGORITHMS
ARTIFICIAL INTELLIGENCE
ARTIFICIAL INTELLIGENCE SYLLABUS
Cyber Security
Cyber Security

Recently uploaded (20)

PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
Cell Structure & Organelles in detailed.
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PPTX
GDM (1) (1).pptx small presentation for students
PDF
The Final Stretch: How to Release a Game and Not Die in the Process.
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
Open Quiz Monsoon Mind Game Prelims.pptx
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
Pharma ospi slides which help in ospi learning
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
human mycosis Human fungal infections are called human mycosis..pptx
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
Cell Structure & Organelles in detailed.
Microbial diseases, their pathogenesis and prophylaxis
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
GDM (1) (1).pptx small presentation for students
The Final Stretch: How to Release a Game and Not Die in the Process.
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
O7-L3 Supply Chain Operations - ICLT Program
Open Quiz Monsoon Mind Game Prelims.pptx
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
102 student loan defaulters named and shamed – Is someone you know on the list?
Pharma ospi slides which help in ospi learning
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf

Algorithm Design Technique

  • 1. Presentation on By BHARAT BHUSHAN Asst. Professor, Department of Computer Sc. RLSY College, Ranchi Buddha Science and Technical Institute, Ranchi www.bharatsir.com Dynamic Programming in Algorithm Design Technique
  • 2. www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889 Algorithm Design Dynamic Programming Dynamic Programming (DP) is an algorithmic technique for solving an optimization problem by breaking it down into simpler sub problems and utilizing the fact that the optimal solution to the overall problem depends upon the optimal solution to its sub problems. 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.
  • 3. www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889 Algorithm Design Dynamic Programming Approach Work The following are the steps that the dynamic programming follows:  It breaks down the complex problem into simpler sub problems.  It finds the optimal solution to these sub-problems.  It stores the results of sub problems.  The process of storing the results of sub problems is known as memorization.  It reuses them so that same sub-problem is calculated more than once.  Finally, calculate the result of the complex problem.
  • 4. www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889 Algorithm Design Approaches of Dynamic Programming There are two approaches to dynamic programming:  Top-down approach  Bottom-up approach Top-down approach : The top-down method solves the overall problem before you break it down into sub problems. This process works to solve larger problems by finding the solution to sub problems recursively, caching each result.
  • 5. www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889 Algorithm Design Approaches of Dynamic Programming Bottom-up approach : The bottom-up approach is also one of the techniques which can be used to implement the dynamic programming. It uses the tabulation technique to implement the dynamic programming approach. It solves the same kind of problems but it removes the recursion. If we remove the recursion, there is no stack overflow issue and no overhead of the recursive functions. In this tabulation technique, we solve the problems and store the results in a matrix.
  • 6. www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889 Algorithm Design Examples 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  Project scheduling
  • 7. www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889 Algorithm Design Advantages of Dynamic Programming 1. Dynamic programming can be used to obtain local as well as the total optimal solution. 2. Dynamic programming algorithms are generally compact code pieces as they are based on recursive functions. 3. The linear and non-linear problem, both kind of problems can be solved using dynamic programming. 4. Dynamic programming algorithms are easy to debug.
  • 8. www.bharatsir.com || Mo No : 09835376044 || WhtasApp : 09006365889 Algorithm Design Disadvantages of Dynamic Programming 1. Dynamic programming uses recursion, which requires more memory in the call stack, and leads to a stack overflow condition in the runtime. 2. It takes memory to store the solutions of each sub-problem. There is no guarantee that the stored value will be used later in execution.
  • 9. Bharat Bhushan, Assistant Professor, RLSY College, Ranchi Algorithm Design