SlideShare a Scribd company logo
2
Most read
7
Most read
8
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

What's hot (20)

PPTX
Greedy Algorithm - Knapsack Problem
Madhu Bala
 
PDF
AI 7 | Constraint Satisfaction Problem
Mohammad Imam Hossain
 
PPTX
Design and Analysis of Algorithms.pptx
Syed Zaid Irshad
 
PPT
Graph coloring problem
V.V.Vanniaperumal College for Women
 
PPTX
Demand paging
Trinity Dwarka
 
PPT
Greedy Algorihm
Muhammad Amjad Rana
 
PPTX
First order predicate logic(fopl)
surbhi jha
 
PPTX
Lecture 14 run time environment
Iffat Anjum
 
PPTX
Divide and Conquer
Melaku Bayih Demessie
 
PPT
Np complete
Dr. C.V. Suresh Babu
 
PPT
5 csp
Mhd Sb
 
PPT
Divide and conquer
Dr Shashikant Athawale
 
PPTX
Assignment problem branch and bound.pptx
KrishnaVardhan50
 
PPTX
Asymptotic Notations
Rishabh Soni
 
PPTX
File allocation methods (1)
Dr. Jasmine Beulah Gnanadurai
 
PDF
Memory management
Rajni Sirohi
 
PPT
Asymptotic analysis
Soujanya V
 
PDF
Operating systems system structures
Mukesh Chinta
 
PDF
Time and Space Complexity
Ashutosh Satapathy
 
PPTX
Code generation
Aparna Nayak
 
Greedy Algorithm - Knapsack Problem
Madhu Bala
 
AI 7 | Constraint Satisfaction Problem
Mohammad Imam Hossain
 
Design and Analysis of Algorithms.pptx
Syed Zaid Irshad
 
Graph coloring problem
V.V.Vanniaperumal College for Women
 
Demand paging
Trinity Dwarka
 
Greedy Algorihm
Muhammad Amjad Rana
 
First order predicate logic(fopl)
surbhi jha
 
Lecture 14 run time environment
Iffat Anjum
 
Divide and Conquer
Melaku Bayih Demessie
 
5 csp
Mhd Sb
 
Divide and conquer
Dr Shashikant Athawale
 
Assignment problem branch and bound.pptx
KrishnaVardhan50
 
Asymptotic Notations
Rishabh Soni
 
File allocation methods (1)
Dr. Jasmine Beulah Gnanadurai
 
Memory management
Rajni Sirohi
 
Asymptotic analysis
Soujanya V
 
Operating systems system structures
Mukesh Chinta
 
Time and Space Complexity
Ashutosh Satapathy
 
Code generation
Aparna Nayak
 

Similar to Algorithm Design Technique (20)

PPTX
esign and Analysis of Algorithms Presentation.pptx
Niraj759370
 
PPTX
Dynamic Programming | Economics
Transweb Global Inc
 
PPTX
Use of Symbolic Computation is Solving Structural Analysis Problems
Javed Alam
 
PPTX
How to Design an Algorithm
Afaq Mansoor Khan
 
PPTX
Algorithms Design Patterns
Ashwin Shiv
 
PDF
251 - Alogarithms Lects.pdf
Abdulkadir Jibril
 
PPTX
Our presentation on algorithm design
Nahid Hasan
 
PPTX
Operation Research Techniques
Lijin Mathew
 
PDF
deep-learning-ppt-full-notes.pdf notesss
RamakanthChhaparwal
 
PDF
Project report
Vikram Singh
 
PPTX
Maxima presentation
Mohammad Tawfik
 
PPTX
CH-1.1 Introduction (1).pptx
satvikkushwaha1
 
PPT
Algorithm Design
MD.ASHIQUZZAMAN KHONDAKER
 
PPTX
Dynamic programming prasintation eaisy
ahmed51236
 
DOCX
DP Project Report
Chawal Ukesh
 
PPTX
Notion of an algorithm
Nisha Soms
 
PPTX
Computer science in Dynamic programming .pptx
shorabi2127061
 
PPTX
The Download: Tech Talks by the HPCC Systems Community, Episode 16
HPCC Systems
 
PPTX
Overview of Approximation and Randomized Algorithms KARAN 461.pptx
karanjogi2021
 
PPT
Divide and conquer algorithm
CHANDAN KUMAR
 
esign and Analysis of Algorithms Presentation.pptx
Niraj759370
 
Dynamic Programming | Economics
Transweb Global Inc
 
Use of Symbolic Computation is Solving Structural Analysis Problems
Javed Alam
 
How to Design an Algorithm
Afaq Mansoor Khan
 
Algorithms Design Patterns
Ashwin Shiv
 
251 - Alogarithms Lects.pdf
Abdulkadir Jibril
 
Our presentation on algorithm design
Nahid Hasan
 
Operation Research Techniques
Lijin Mathew
 
deep-learning-ppt-full-notes.pdf notesss
RamakanthChhaparwal
 
Project report
Vikram Singh
 
Maxima presentation
Mohammad Tawfik
 
CH-1.1 Introduction (1).pptx
satvikkushwaha1
 
Algorithm Design
MD.ASHIQUZZAMAN KHONDAKER
 
Dynamic programming prasintation eaisy
ahmed51236
 
DP Project Report
Chawal Ukesh
 
Notion of an algorithm
Nisha Soms
 
Computer science in Dynamic programming .pptx
shorabi2127061
 
The Download: Tech Talks by the HPCC Systems Community, Episode 16
HPCC Systems
 
Overview of Approximation and Randomized Algorithms KARAN 461.pptx
karanjogi2021
 
Divide and conquer algorithm
CHANDAN KUMAR
 
Ad

More from Bharat Bhushan (20)

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

Recently uploaded (20)

PPTX
Nitrogen rule, ring rule, mc lafferty.pptx
nbisen2001
 
PDF
AI-Powered-Visual-Storytelling-for-Nonprofits.pdf
TechSoup
 
PDF
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
PPTX
HUMAN RESOURCE MANAGEMENT: RECRUITMENT, SELECTION, PLACEMENT, DEPLOYMENT, TRA...
PRADEEP ABOTHU
 
PPTX
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
PDF
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
PPTX
How to Manage Allocation Report for Manufacturing Orders in Odoo 18
Celine George
 
PPTX
How to Send Email From Odoo 18 Website - Odoo Slides
Celine George
 
PPTX
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
PDF
STATEMENT-BY-THE-HON.-MINISTER-FOR-HEALTH-ON-THE-COVID-19-OUTBREAK-AT-UG_revi...
nservice241
 
PDF
Introduction presentation of the patentbutler tool
MIPLM
 
PPTX
Post Dated Cheque(PDC) Management in Odoo 18
Celine George
 
PPTX
How to Configure Re-Ordering From Portal in Odoo 18 Website
Celine George
 
PDF
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
PDF
Android Programming - Basics of Mobile App, App tools and Android Basics
Kavitha P.V
 
PDF
Characteristics, Strengths and Weaknesses of Quantitative Research.pdf
Thelma Villaflores
 
PPTX
Controller Request and Response in Odoo18
Celine George
 
PPTX
infertility, types,causes, impact, and management
Ritu480198
 
PDF
Mahidol_Change_Agent_Note_2025-06-27-29_MUSEF
Tassanee Lerksuthirat
 
PDF
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
Nitrogen rule, ring rule, mc lafferty.pptx
nbisen2001
 
AI-Powered-Visual-Storytelling-for-Nonprofits.pdf
TechSoup
 
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
HUMAN RESOURCE MANAGEMENT: RECRUITMENT, SELECTION, PLACEMENT, DEPLOYMENT, TRA...
PRADEEP ABOTHU
 
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
How to Manage Allocation Report for Manufacturing Orders in Odoo 18
Celine George
 
How to Send Email From Odoo 18 Website - Odoo Slides
Celine George
 
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
STATEMENT-BY-THE-HON.-MINISTER-FOR-HEALTH-ON-THE-COVID-19-OUTBREAK-AT-UG_revi...
nservice241
 
Introduction presentation of the patentbutler tool
MIPLM
 
Post Dated Cheque(PDC) Management in Odoo 18
Celine George
 
How to Configure Re-Ordering From Portal in Odoo 18 Website
Celine George
 
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
Android Programming - Basics of Mobile App, App tools and Android Basics
Kavitha P.V
 
Characteristics, Strengths and Weaknesses of Quantitative Research.pdf
Thelma Villaflores
 
Controller Request and Response in Odoo18
Celine George
 
infertility, types,causes, impact, and management
Ritu480198
 
Mahidol_Change_Agent_Note_2025-06-27-29_MUSEF
Tassanee Lerksuthirat
 
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 

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