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)

N queen problem
N queen problemN queen problem
N queen problem
Ridhima Chowdhury
 
Searching and Sorting Techniques in Data Structure
Searching and Sorting Techniques in Data StructureSearching and Sorting Techniques in Data Structure
Searching and Sorting Techniques in Data Structure
Balwant Gorad
 
Dynamic Programming
Dynamic ProgrammingDynamic Programming
Dynamic Programming
Bharat Bhushan
 
ProLog (Artificial Intelligence) Introduction
ProLog (Artificial Intelligence) IntroductionProLog (Artificial Intelligence) Introduction
ProLog (Artificial Intelligence) Introduction
wahab khan
 
Longest Common Subsequence
Longest Common SubsequenceLongest Common Subsequence
Longest Common Subsequence
Krishma Parekh
 
Algorithms Lecture 6: Searching Algorithms
Algorithms Lecture 6: Searching AlgorithmsAlgorithms Lecture 6: Searching Algorithms
Algorithms Lecture 6: Searching Algorithms
Mohamed Loey
 
Dynamic pgmming
Dynamic pgmmingDynamic pgmming
Dynamic pgmming
Dr. C.V. Suresh Babu
 
04 brute force
04 brute force04 brute force
04 brute force
Hira Gul
 
daa-unit-3-greedy method
daa-unit-3-greedy methoddaa-unit-3-greedy method
daa-unit-3-greedy method
hodcsencet
 
Branch and bound
Branch and boundBranch and bound
Branch and bound
Dr Shashikant Athawale
 
Lecture 3,4
Lecture 3,4Lecture 3,4
Lecture 3,4
shah zeb
 
heap Sort Algorithm
heap  Sort Algorithmheap  Sort Algorithm
heap Sort Algorithm
Lemia Algmri
 
Priority Queue in Data Structure
Priority Queue in Data StructurePriority Queue in Data Structure
Priority Queue in Data Structure
Meghaj Mallick
 
Searching
SearchingSearching
Searching
Ashim Lamichhane
 
Daa notes 1
Daa notes 1Daa notes 1
Daa notes 1
smruti sarangi
 
Longest common subsequence
Longest common subsequenceLongest common subsequence
Longest common subsequence
Kiran K
 
Linear Search Presentation
Linear Search PresentationLinear Search Presentation
Linear Search Presentation
Markajul Hasnain Alif
 
Linked List
Linked ListLinked List
Linked List
Ashim Lamichhane
 
String matching, naive,
String matching, naive,String matching, naive,
String matching, naive,
Amit Kumar Rathi
 
Algorithm: Quick-Sort
Algorithm: Quick-SortAlgorithm: Quick-Sort
Algorithm: Quick-Sort
Tareq Hasan
 
Searching and Sorting Techniques in Data Structure
Searching and Sorting Techniques in Data StructureSearching and Sorting Techniques in Data Structure
Searching and Sorting Techniques in Data Structure
Balwant Gorad
 
ProLog (Artificial Intelligence) Introduction
ProLog (Artificial Intelligence) IntroductionProLog (Artificial Intelligence) Introduction
ProLog (Artificial Intelligence) Introduction
wahab khan
 
Longest Common Subsequence
Longest Common SubsequenceLongest Common Subsequence
Longest Common Subsequence
Krishma Parekh
 
Algorithms Lecture 6: Searching Algorithms
Algorithms Lecture 6: Searching AlgorithmsAlgorithms Lecture 6: Searching Algorithms
Algorithms Lecture 6: Searching Algorithms
Mohamed Loey
 
04 brute force
04 brute force04 brute force
04 brute force
Hira Gul
 
daa-unit-3-greedy method
daa-unit-3-greedy methoddaa-unit-3-greedy method
daa-unit-3-greedy method
hodcsencet
 
Lecture 3,4
Lecture 3,4Lecture 3,4
Lecture 3,4
shah zeb
 
heap Sort Algorithm
heap  Sort Algorithmheap  Sort Algorithm
heap Sort Algorithm
Lemia Algmri
 
Priority Queue in Data Structure
Priority Queue in Data StructurePriority Queue in Data Structure
Priority Queue in Data Structure
Meghaj Mallick
 
Longest common subsequence
Longest common subsequenceLongest common subsequence
Longest common subsequence
Kiran K
 
Algorithm: Quick-Sort
Algorithm: Quick-SortAlgorithm: Quick-Sort
Algorithm: Quick-Sort
Tareq Hasan
 

Similar to Algorithm Design Technique (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
 
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
 
Digital Content Creation By Bharat Sir Kokar
Digital Content Creation By Bharat Sir KokarDigital Content Creation By Bharat Sir Kokar
Digital Content Creation By Bharat Sir Kokar
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
 
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
 
Digital Content Creation By Bharat Sir Kokar
Digital Content Creation By Bharat Sir KokarDigital Content Creation By Bharat Sir Kokar
Digital Content Creation By Bharat Sir Kokar
Bharat Bhushan
 
Ad

Recently uploaded (20)

Handling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptxHandling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptx
AuthorAIDNationalRes
 
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
 
LDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini UpdatesLDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini Updates
LDM Mia eStudios
 
Sinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_NameSinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_Name
keshanf79
 
2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx
contactwilliamm2546
 
Unit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdfUnit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdf
KanchanPatil34
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
How to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 WebsiteHow to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 Website
Celine George
 
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Library Association of Ireland
 
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 AccountingHow to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
Celine George
 
How to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POSHow to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POS
Celine George
 
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
 
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
 
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
 
Social Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy StudentsSocial Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy Students
DrNidhiAgarwal
 
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulsepulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
sushreesangita003
 
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public SchoolsK12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
dogden2
 
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
Celine George
 
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
 
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
 
Handling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptxHandling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptx
AuthorAIDNationalRes
 
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
 
LDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini UpdatesLDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini Updates
LDM Mia eStudios
 
Sinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_NameSinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_Name
keshanf79
 
2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx
contactwilliamm2546
 
Unit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdfUnit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdf
KanchanPatil34
 
How to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 WebsiteHow to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 Website
Celine George
 
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Library Association of Ireland
 
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 AccountingHow to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
Celine George
 
How to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POSHow to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POS
Celine George
 
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
 
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
 
Social Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy StudentsSocial Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy Students
DrNidhiAgarwal
 
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulsepulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
sushreesangita003
 
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public SchoolsK12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
dogden2
 
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
Celine George
 
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
 
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
 

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