SlideShare a Scribd company logo
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
Ad

More Related Content

What's hot (20)

Greedy algorithms
Greedy algorithmsGreedy algorithms
Greedy algorithms
sandeep54552
 
Dynamic pgmming
Dynamic pgmmingDynamic pgmming
Dynamic pgmming
Dr. C.V. Suresh Babu
 
Exhaustive Search
Exhaustive SearchExhaustive Search
Exhaustive Search
Kasun Ranga Wijeweera
 
Greedy Algorihm
Greedy AlgorihmGreedy Algorihm
Greedy Algorihm
Muhammad Amjad Rana
 
Dynamic programming
Dynamic programmingDynamic programming
Dynamic programming
Shakil Ahmed
 
Travelling Salesman Problem
Travelling Salesman ProblemTravelling Salesman Problem
Travelling Salesman Problem
Daniel Raditya
 
The analysis synthesis model of compilation
The analysis synthesis model of compilationThe analysis synthesis model of compilation
The analysis synthesis model of compilation
Huawei Technologies
 
Introduction to Dynamic Programming, Principle of Optimality
Introduction to Dynamic Programming, Principle of OptimalityIntroduction to Dynamic Programming, Principle of Optimality
Introduction to Dynamic Programming, Principle of Optimality
Bhavin Darji
 
Introduction to dynamic programming
Introduction to dynamic programmingIntroduction to dynamic programming
Introduction to dynamic programming
Amisha Narsingani
 
Divide and conquer - Quick sort
Divide and conquer - Quick sortDivide and conquer - Quick sort
Divide and conquer - Quick sort
Madhu Bala
 
Introduction TO Finite Automata
Introduction TO Finite AutomataIntroduction TO Finite Automata
Introduction TO Finite Automata
Ratnakar Mikkili
 
Dynamic programming class 16
Dynamic programming class 16Dynamic programming class 16
Dynamic programming class 16
Kumar
 
Algorithm chapter 10
Algorithm chapter 10Algorithm chapter 10
Algorithm chapter 10
chidabdu
 
Daa:Dynamic Programing
Daa:Dynamic ProgramingDaa:Dynamic Programing
Daa:Dynamic Programing
rupali_2bonde
 
Randomized algorithms ver 1.0
Randomized algorithms ver 1.0Randomized algorithms ver 1.0
Randomized algorithms ver 1.0
Dr. C.V. Suresh Babu
 
Greedy Algorithm
Greedy AlgorithmGreedy Algorithm
Greedy Algorithm
Waqar Akram
 
Greedy algorithm
Greedy algorithmGreedy algorithm
Greedy algorithm
International Islamic University
 
Tsp branch and-bound
Tsp branch and-boundTsp branch and-bound
Tsp branch and-bound
Saravanan Natarajan
 
What Is Dynamic Programming? | Dynamic Programming Explained | Programming Fo...
What Is Dynamic Programming? | Dynamic Programming Explained | Programming Fo...What Is Dynamic Programming? | Dynamic Programming Explained | Programming Fo...
What Is Dynamic Programming? | Dynamic Programming Explained | Programming Fo...
Simplilearn
 
Greedy Algorithm - Knapsack Problem
Greedy Algorithm - Knapsack ProblemGreedy Algorithm - Knapsack Problem
Greedy Algorithm - Knapsack Problem
Madhu Bala
 
Dynamic programming
Dynamic programmingDynamic programming
Dynamic programming
Shakil Ahmed
 
Travelling Salesman Problem
Travelling Salesman ProblemTravelling Salesman Problem
Travelling Salesman Problem
Daniel Raditya
 
The analysis synthesis model of compilation
The analysis synthesis model of compilationThe analysis synthesis model of compilation
The analysis synthesis model of compilation
Huawei Technologies
 
Introduction to Dynamic Programming, Principle of Optimality
Introduction to Dynamic Programming, Principle of OptimalityIntroduction to Dynamic Programming, Principle of Optimality
Introduction to Dynamic Programming, Principle of Optimality
Bhavin Darji
 
Introduction to dynamic programming
Introduction to dynamic programmingIntroduction to dynamic programming
Introduction to dynamic programming
Amisha Narsingani
 
Divide and conquer - Quick sort
Divide and conquer - Quick sortDivide and conquer - Quick sort
Divide and conquer - Quick sort
Madhu Bala
 
Introduction TO Finite Automata
Introduction TO Finite AutomataIntroduction TO Finite Automata
Introduction TO Finite Automata
Ratnakar Mikkili
 
Dynamic programming class 16
Dynamic programming class 16Dynamic programming class 16
Dynamic programming class 16
Kumar
 
Algorithm chapter 10
Algorithm chapter 10Algorithm chapter 10
Algorithm chapter 10
chidabdu
 
Daa:Dynamic Programing
Daa:Dynamic ProgramingDaa:Dynamic Programing
Daa:Dynamic Programing
rupali_2bonde
 
Greedy Algorithm
Greedy AlgorithmGreedy Algorithm
Greedy Algorithm
Waqar Akram
 
What Is Dynamic Programming? | Dynamic Programming Explained | Programming Fo...
What Is Dynamic Programming? | Dynamic Programming Explained | Programming Fo...What Is Dynamic Programming? | Dynamic Programming Explained | Programming Fo...
What Is Dynamic Programming? | Dynamic Programming Explained | Programming Fo...
Simplilearn
 
Greedy Algorithm - Knapsack Problem
Greedy Algorithm - Knapsack ProblemGreedy Algorithm - Knapsack Problem
Greedy Algorithm - Knapsack Problem
Madhu Bala
 

Similar to Dynamic Programming (20)

esign and Analysis of Algorithms Presentation.pptx
esign and Analysis of Algorithms Presentation.pptxesign and Analysis of Algorithms Presentation.pptx
esign and Analysis of Algorithms Presentation.pptx
Niraj759370
 
Dynamic Programming | Economics
Dynamic Programming | EconomicsDynamic Programming | Economics
Dynamic Programming | Economics
Transweb Global Inc
 
Use of Symbolic Computation is Solving Structural Analysis Problems
Use of Symbolic Computation is Solving Structural Analysis ProblemsUse of Symbolic Computation is Solving Structural Analysis Problems
Use of Symbolic Computation is Solving Structural Analysis Problems
Javed Alam
 
How to Design an Algorithm
How to Design an AlgorithmHow to Design an Algorithm
How to Design an Algorithm
Afaq Mansoor Khan
 
Algorithms Design Patterns
Algorithms Design PatternsAlgorithms Design Patterns
Algorithms Design Patterns
Ashwin Shiv
 
251 - Alogarithms Lects.pdf
251 - Alogarithms Lects.pdf251 - Alogarithms Lects.pdf
251 - Alogarithms Lects.pdf
Abdulkadir Jibril
 
Our presentation on algorithm design
Our presentation on algorithm designOur presentation on algorithm design
Our presentation on algorithm design
Nahid Hasan
 
Operation Research Techniques
Operation Research Techniques Operation Research Techniques
Operation Research Techniques
Lijin Mathew
 
deep-learning-ppt-full-notes.pdf notesss
deep-learning-ppt-full-notes.pdf notesssdeep-learning-ppt-full-notes.pdf notesss
deep-learning-ppt-full-notes.pdf notesss
RamakanthChhaparwal
 
Project report
Project report Project report
Project report
Vikram Singh
 
Maxima presentation
Maxima presentationMaxima presentation
Maxima presentation
Mohammad Tawfik
 
CH-1.1 Introduction (1).pptx
CH-1.1 Introduction (1).pptxCH-1.1 Introduction (1).pptx
CH-1.1 Introduction (1).pptx
satvikkushwaha1
 
Algorithm Design
Algorithm DesignAlgorithm Design
Algorithm Design
MD.ASHIQUZZAMAN KHONDAKER
 
Dynamic programming prasintation eaisy
Dynamic programming prasintation eaisyDynamic programming prasintation eaisy
Dynamic programming prasintation eaisy
ahmed51236
 
DP Project Report
DP Project ReportDP Project Report
DP Project Report
Chawal Ukesh
 
Notion of an algorithm
Notion of an algorithmNotion of an algorithm
Notion of an algorithm
Nisha Soms
 
The Download: Tech Talks by the HPCC Systems Community, Episode 16
The Download: Tech Talks by the HPCC Systems Community, Episode 16The Download: Tech Talks by the HPCC Systems Community, Episode 16
The Download: Tech Talks by the HPCC Systems Community, Episode 16
HPCC Systems
 
Overview of Approximation and Randomized Algorithms KARAN 461.pptx
Overview of Approximation and Randomized Algorithms KARAN 461.pptxOverview of Approximation and Randomized Algorithms KARAN 461.pptx
Overview of Approximation and Randomized Algorithms KARAN 461.pptx
karanjogi2021
 
Divide and conquer algorithm
Divide and conquer algorithmDivide and conquer algorithm
Divide and conquer algorithm
CHANDAN KUMAR
 
PROBLEM SOLVING TECHNIQUES
PROBLEM SOLVING TECHNIQUESPROBLEM SOLVING TECHNIQUES
PROBLEM SOLVING TECHNIQUES
sudhanagarajan5
 
esign and Analysis of Algorithms Presentation.pptx
esign and Analysis of Algorithms Presentation.pptxesign and Analysis of Algorithms Presentation.pptx
esign and Analysis of Algorithms Presentation.pptx
Niraj759370
 
Use of Symbolic Computation is Solving Structural Analysis Problems
Use of Symbolic Computation is Solving Structural Analysis ProblemsUse of Symbolic Computation is Solving Structural Analysis Problems
Use of Symbolic Computation is Solving Structural Analysis Problems
Javed Alam
 
Algorithms Design Patterns
Algorithms Design PatternsAlgorithms Design Patterns
Algorithms Design Patterns
Ashwin Shiv
 
Our presentation on algorithm design
Our presentation on algorithm designOur presentation on algorithm design
Our presentation on algorithm design
Nahid Hasan
 
Operation Research Techniques
Operation Research Techniques Operation Research Techniques
Operation Research Techniques
Lijin Mathew
 
deep-learning-ppt-full-notes.pdf notesss
deep-learning-ppt-full-notes.pdf notesssdeep-learning-ppt-full-notes.pdf notesss
deep-learning-ppt-full-notes.pdf notesss
RamakanthChhaparwal
 
CH-1.1 Introduction (1).pptx
CH-1.1 Introduction (1).pptxCH-1.1 Introduction (1).pptx
CH-1.1 Introduction (1).pptx
satvikkushwaha1
 
Dynamic programming prasintation eaisy
Dynamic programming prasintation eaisyDynamic programming prasintation eaisy
Dynamic programming prasintation eaisy
ahmed51236
 
Notion of an algorithm
Notion of an algorithmNotion of an algorithm
Notion of an algorithm
Nisha Soms
 
The Download: Tech Talks by the HPCC Systems Community, Episode 16
The Download: Tech Talks by the HPCC Systems Community, Episode 16The Download: Tech Talks by the HPCC Systems Community, Episode 16
The Download: Tech Talks by the HPCC Systems Community, Episode 16
HPCC Systems
 
Overview of Approximation and Randomized Algorithms KARAN 461.pptx
Overview of Approximation and Randomized Algorithms KARAN 461.pptxOverview of Approximation and Randomized Algorithms KARAN 461.pptx
Overview of Approximation and Randomized Algorithms KARAN 461.pptx
karanjogi2021
 
Divide and conquer algorithm
Divide and conquer algorithmDivide and conquer algorithm
Divide and conquer algorithm
CHANDAN KUMAR
 
PROBLEM SOLVING TECHNIQUES
PROBLEM SOLVING TECHNIQUESPROBLEM SOLVING TECHNIQUES
PROBLEM SOLVING TECHNIQUES
sudhanagarajan5
 
Ad

More from Bharat Bhushan (20)

NIMCET 2023 : Questions
NIMCET 2023  : QuestionsNIMCET 2023  : Questions
NIMCET 2023 : Questions
Bharat Bhushan
 
Heuristics Search Techniques in AI
Heuristics Search Techniques in AI Heuristics Search Techniques in AI
Heuristics Search Techniques in AI
Bharat Bhushan
 
Heuristics Search Techniques
Heuristics Search TechniquesHeuristics Search Techniques
Heuristics Search Techniques
Bharat Bhushan
 
Hill Climbing Algorithm in Artificial Intelligence
Hill Climbing Algorithm in Artificial IntelligenceHill Climbing Algorithm in Artificial Intelligence
Hill Climbing Algorithm in Artificial Intelligence
Bharat Bhushan
 
Hill Climbing Algorithm in Artificial Intelligence
Hill Climbing Algorithm in Artificial IntelligenceHill Climbing Algorithm in Artificial Intelligence
Hill Climbing Algorithm in Artificial Intelligence
Bharat Bhushan
 
Control Strategies in AI
Control Strategies in AI Control Strategies in AI
Control Strategies in AI
Bharat Bhushan
 
Control Strategies in AI
Control Strategies in AI Control Strategies in AI
Control Strategies in AI
Bharat Bhushan
 
Algorithm Design Technique
Algorithm Design Technique Algorithm Design Technique
Algorithm Design Technique
Bharat Bhushan
 
Production System in AI
Production System in AIProduction System in AI
Production System in AI
Bharat Bhushan
 
Production System in AI
Production System in AIProduction System in AI
Production System in AI
Bharat Bhushan
 
Problem Characteristics in Artificial Intelligence
Problem Characteristics in  Artificial IntelligenceProblem Characteristics in  Artificial Intelligence
Problem Characteristics in Artificial Intelligence
Bharat Bhushan
 
Problem Characteristics in Artificial Intelligence
Problem Characteristics in  Artificial IntelligenceProblem Characteristics in  Artificial Intelligence
Problem Characteristics in Artificial Intelligence
Bharat Bhushan
 
Introduction to Artificial Intteligence
Introduction to Artificial IntteligenceIntroduction to Artificial Intteligence
Introduction to Artificial Intteligence
Bharat Bhushan
 
Introduction to Artificial Intteligence
Introduction to Artificial IntteligenceIntroduction to Artificial Intteligence
Introduction to Artificial Intteligence
Bharat Bhushan
 
DESIGN AND ANALYSIS OF ALGORITHMS by Bharat Sir
DESIGN AND ANALYSIS OF ALGORITHMS by Bharat Sir DESIGN AND ANALYSIS OF ALGORITHMS by Bharat Sir
DESIGN AND ANALYSIS OF ALGORITHMS by Bharat Sir
Bharat Bhushan
 
DESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMSDESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMS
Bharat Bhushan
 
ARTIFICIAL INTELLIGENCE
ARTIFICIAL INTELLIGENCE ARTIFICIAL INTELLIGENCE
ARTIFICIAL INTELLIGENCE
Bharat Bhushan
 
ARTIFICIAL INTELLIGENCE SYLLABUS
ARTIFICIAL INTELLIGENCE SYLLABUS ARTIFICIAL INTELLIGENCE SYLLABUS
ARTIFICIAL INTELLIGENCE SYLLABUS
Bharat Bhushan
 
Cyber Security
Cyber Security Cyber Security
Cyber Security
Bharat Bhushan
 
Cyber Security
Cyber Security Cyber Security
Cyber Security
Bharat Bhushan
 
NIMCET 2023 : Questions
NIMCET 2023  : QuestionsNIMCET 2023  : Questions
NIMCET 2023 : Questions
Bharat Bhushan
 
Heuristics Search Techniques in AI
Heuristics Search Techniques in AI Heuristics Search Techniques in AI
Heuristics Search Techniques in AI
Bharat Bhushan
 
Heuristics Search Techniques
Heuristics Search TechniquesHeuristics Search Techniques
Heuristics Search Techniques
Bharat Bhushan
 
Hill Climbing Algorithm in Artificial Intelligence
Hill Climbing Algorithm in Artificial IntelligenceHill Climbing Algorithm in Artificial Intelligence
Hill Climbing Algorithm in Artificial Intelligence
Bharat Bhushan
 
Hill Climbing Algorithm in Artificial Intelligence
Hill Climbing Algorithm in Artificial IntelligenceHill Climbing Algorithm in Artificial Intelligence
Hill Climbing Algorithm in Artificial Intelligence
Bharat Bhushan
 
Control Strategies in AI
Control Strategies in AI Control Strategies in AI
Control Strategies in AI
Bharat Bhushan
 
Control Strategies in AI
Control Strategies in AI Control Strategies in AI
Control Strategies in AI
Bharat Bhushan
 
Algorithm Design Technique
Algorithm Design Technique Algorithm Design Technique
Algorithm Design Technique
Bharat Bhushan
 
Production System in AI
Production System in AIProduction System in AI
Production System in AI
Bharat Bhushan
 
Production System in AI
Production System in AIProduction System in AI
Production System in AI
Bharat Bhushan
 
Problem Characteristics in Artificial Intelligence
Problem Characteristics in  Artificial IntelligenceProblem Characteristics in  Artificial Intelligence
Problem Characteristics in Artificial Intelligence
Bharat Bhushan
 
Problem Characteristics in Artificial Intelligence
Problem Characteristics in  Artificial IntelligenceProblem Characteristics in  Artificial Intelligence
Problem Characteristics in Artificial Intelligence
Bharat Bhushan
 
Introduction to Artificial Intteligence
Introduction to Artificial IntteligenceIntroduction to Artificial Intteligence
Introduction to Artificial Intteligence
Bharat Bhushan
 
Introduction to Artificial Intteligence
Introduction to Artificial IntteligenceIntroduction to Artificial Intteligence
Introduction to Artificial Intteligence
Bharat Bhushan
 
DESIGN AND ANALYSIS OF ALGORITHMS by Bharat Sir
DESIGN AND ANALYSIS OF ALGORITHMS by Bharat Sir DESIGN AND ANALYSIS OF ALGORITHMS by Bharat Sir
DESIGN AND ANALYSIS OF ALGORITHMS by Bharat Sir
Bharat Bhushan
 
DESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMSDESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMS
Bharat Bhushan
 
ARTIFICIAL INTELLIGENCE
ARTIFICIAL INTELLIGENCE ARTIFICIAL INTELLIGENCE
ARTIFICIAL INTELLIGENCE
Bharat Bhushan
 
ARTIFICIAL INTELLIGENCE SYLLABUS
ARTIFICIAL INTELLIGENCE SYLLABUS ARTIFICIAL INTELLIGENCE SYLLABUS
ARTIFICIAL INTELLIGENCE SYLLABUS
Bharat Bhushan
 
Ad

Recently uploaded (20)

Studying Drama: Definition, types and elements
Studying Drama: Definition, types and elementsStudying Drama: Definition, types and elements
Studying Drama: Definition, types and elements
AbdelFattahAdel2
 
Understanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s GuideUnderstanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s Guide
GS Virdi
 
Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025
Mebane Rash
 
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
larencebapu132
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 4-26-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 4-26-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 4-26-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 4-26-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
P-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 finalP-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 final
bs22n2s
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 4-30-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 4-30-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 4-30-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 4-30-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Library Association of Ireland
 
Presentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem KayaPresentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem Kaya
MIPLM
 
The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...
Sandeep Swamy
 
Envenomation---Clinical Toxicology. pptx
Envenomation---Clinical Toxicology. pptxEnvenomation---Clinical Toxicology. pptx
Envenomation---Clinical Toxicology. pptx
rekhapositivity
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
One Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learningOne Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learning
momer9505
 
To study Digestive system of insect.pptx
To study Digestive system of insect.pptxTo study Digestive system of insect.pptx
To study Digestive system of insect.pptx
Arshad Shaikh
 
Operations Management (Dr. Abdulfatah Salem).pdf
Operations Management (Dr. Abdulfatah Salem).pdfOperations Management (Dr. Abdulfatah Salem).pdf
Operations Management (Dr. Abdulfatah Salem).pdf
Arab Academy for Science, Technology and Maritime Transport
 
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - WorksheetCBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
Sritoma Majumder
 
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Library Association of Ireland
 
Unit 4: Long term- Capital budgeting and its types
Unit 4: Long term- Capital budgeting and its typesUnit 4: Long term- Capital budgeting and its types
Unit 4: Long term- Capital budgeting and its types
bharath321164
 
SPRING FESTIVITIES - UK AND USA -
SPRING FESTIVITIES - UK AND USA            -SPRING FESTIVITIES - UK AND USA            -
SPRING FESTIVITIES - UK AND USA -
Colégio Santa Teresinha
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
Studying Drama: Definition, types and elements
Studying Drama: Definition, types and elementsStudying Drama: Definition, types and elements
Studying Drama: Definition, types and elements
AbdelFattahAdel2
 
Understanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s GuideUnderstanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s Guide
GS Virdi
 
Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025
Mebane Rash
 
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
larencebapu132
 
P-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 finalP-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 final
bs22n2s
 
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Library Association of Ireland
 
Presentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem KayaPresentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem Kaya
MIPLM
 
The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...
Sandeep Swamy
 
Envenomation---Clinical Toxicology. pptx
Envenomation---Clinical Toxicology. pptxEnvenomation---Clinical Toxicology. pptx
Envenomation---Clinical Toxicology. pptx
rekhapositivity
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
One Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learningOne Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learning
momer9505
 
To study Digestive system of insect.pptx
To study Digestive system of insect.pptxTo study Digestive system of insect.pptx
To study Digestive system of insect.pptx
Arshad Shaikh
 
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - WorksheetCBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
Sritoma Majumder
 
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Library Association of Ireland
 
Unit 4: Long term- Capital budgeting and its types
Unit 4: Long term- Capital budgeting and its typesUnit 4: Long term- Capital budgeting and its types
Unit 4: Long term- Capital budgeting and its types
bharath321164
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 

Dynamic Programming

  • 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