SlideShare a Scribd company logo
2
Most read
3
Most read
9
Most read
Prepared by-
▪ Bhavin Darji
Guided by –
SUBJECT-ADA (2150703)
Introduction to Dynamic Programming, Principle of Optimality
Introduction
▪ Typically applied to optimization problem.
▪ Invented by a U.S. Mathematician Richard Bellman in 1950.
▪ In the word Dynamic Programming the word programming stands for
planning.
▪ Dynamic Programming is technique for solving problems with
overlapping subproblems.
▪ In this method each subproblem is solved only once.
▪ The result of each subproblem is recorded in a table from which we
can obtain a solution to the original problem.
▪ In Dynamic computing duplications in solution is avoided totally.
▪ Efficient then Divide and conquer strategy.
▪ Uses bottom up approach of problem solving.
Dynamic Programming
▪ Dynamic Programming is an algorithm design technique for
optimization problems: often minimizing or maximizing.
▪ Like divide and conquer, DP solves problems by combining solutions
to subproblems.
▪ Unlike divide and conquer, subproblems are not independent.
▪ Subproblems may share subproblems
▪ However, solution to one subproblem may not affect the solutions
to other subproblems of the same problem.
DP reduces computation by
▪ Solving subproblems in a bottom-up fashion.
▪ Storing solution to a subproblem the first time it is solved.
▪ Looking up the solution when subproblem is encountered again.
Key Idea
 The key idea is to save answers of overlapping smaller sub-problems
to avoid recomputation.
▪ determine structure of optimal solutions.
Steps in Dynamic Programming
1. Characterize structure of an optimal solution.
2. Define value of optimal solution recursively.
3. Compute optimal solution values either top-down with
caching or bottom-up in a table.
4. Construct an optimal solution from computed values.
Dynamic Programming Properties
• An instance is solved using the solutions for smaller instances.
• The solutions for a smaller instance might be needed multiple times, so
store their results in a table.
• Thus each smaller instance is solved only once.
• Additional space is used to save time.
Principle of Optimality
▪ Obtains the solution using principle of optimality.
▪ In an optimal sequence of decisions or choices, each subsequence must
also be optimal.
▪ When it is not possible to apply the principle of optimality it is almost
impossible to obtain the solution using the dynamic programming
approach.
▪ Example: Finding of shortest path in a given graph uses the principle
of optimality.
Problem solving using Dynamic Programming
▪ Various problem that can be solved using dynamic
programming are-
▪ Calculating the Binomial coefficient
▪ Making change problem
▪ Assembly line scheduling
▪ Knapsack problem
▪ Shortest path
▪ Matrix chain Multiplication
ThankYou 

More Related Content

PPTX
Battery and Super Capacitor based Hybrid Energy Storage System (BSHESS)
PPTX
Dynamic programming
PPSX
Strain Gauges
PDF
Performance Marketing Strategy
PPTX
Maldi tof
PDF
Python programming
Battery and Super Capacitor based Hybrid Energy Storage System (BSHESS)
Dynamic programming
Strain Gauges
Performance Marketing Strategy
Maldi tof
Python programming

What's hot (20)

PDF
Artificial Intelligence - Hill climbing.
PPT
Problems, Problem spaces and Search
PPTX
Knowledge representation In Artificial Intelligence
PDF
Daa notes 1
PDF
A* Search Algorithm
PDF
Design and analysis of algorithms
PPT
Backtracking
PPTX
Analysis and Design of Algorithms
PDF
Artificial Intelligence Notes Unit 2
PPTX
Lecture 06 production system
PPTX
Fault tolerance in distributed systems
PPT
Np cooks theorem
PPTX
Unification and Lifting
PPTX
daa-unit-3-greedy method
PPTX
Logics for non monotonic reasoning-ai
PPTX
Predicate logic
PPT
AI Lecture 3 (solving problems by searching)
PPT
Heuristic Search Techniques Unit -II.ppt
PDF
I. Alpha-Beta Pruning in ai
PDF
I.BEST FIRST SEARCH IN AI
Artificial Intelligence - Hill climbing.
Problems, Problem spaces and Search
Knowledge representation In Artificial Intelligence
Daa notes 1
A* Search Algorithm
Design and analysis of algorithms
Backtracking
Analysis and Design of Algorithms
Artificial Intelligence Notes Unit 2
Lecture 06 production system
Fault tolerance in distributed systems
Np cooks theorem
Unification and Lifting
daa-unit-3-greedy method
Logics for non monotonic reasoning-ai
Predicate logic
AI Lecture 3 (solving problems by searching)
Heuristic Search Techniques Unit -II.ppt
I. Alpha-Beta Pruning in ai
I.BEST FIRST SEARCH IN AI
Ad

Similar to Introduction to Dynamic Programming, Principle of Optimality (20)

PPTX
Computer science in Dynamic programming .pptx
PPT
Dynamic programming 2
PPTX
esign and Analysis of Algorithms Presentation.pptx
PDF
L21_L27_Unit_5_Dynamic_Programming Computer Science
PDF
Unit 4 of design and analysis of algorithms
PPTX
Dynamic programming, Branch and bound algorithm & Greedy algorithms
PDF
Dynamic Programming Algorithm CSI-504.pdf
PPTX
Dynamic programming in Design Analysis and Algorithms
PPTX
Module 2ppt.pptx divid and conquer method
PPTX
dinosourrrrrrrrrrrrrrrrrrrrrr formula .pptx
PPTX
Introduction to dynamic programming
PPTX
Algorithms Design Patterns
PPTX
Dynamic programming class 16
PPT
Dynamic programming
PPTX
DynamicProgramming.pptx
PPT
Pintu ram
PPTX
3. CPT121 - Introduction to Problem Solving - Module 1 - Unit 3.pptx
PPTX
CH-1.1 Introduction (1).pptx
PPTX
algo classification.pptx
PPTX
ADA Unit 2.pptx
Computer science in Dynamic programming .pptx
Dynamic programming 2
esign and Analysis of Algorithms Presentation.pptx
L21_L27_Unit_5_Dynamic_Programming Computer Science
Unit 4 of design and analysis of algorithms
Dynamic programming, Branch and bound algorithm & Greedy algorithms
Dynamic Programming Algorithm CSI-504.pdf
Dynamic programming in Design Analysis and Algorithms
Module 2ppt.pptx divid and conquer method
dinosourrrrrrrrrrrrrrrrrrrrrr formula .pptx
Introduction to dynamic programming
Algorithms Design Patterns
Dynamic programming class 16
Dynamic programming
DynamicProgramming.pptx
Pintu ram
3. CPT121 - Introduction to Problem Solving - Module 1 - Unit 3.pptx
CH-1.1 Introduction (1).pptx
algo classification.pptx
ADA Unit 2.pptx
Ad

Recently uploaded (20)

DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPTX
additive manufacturing of ss316l using mig welding
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PDF
Arduino robotics embedded978-1-4302-3184-4.pdf
PPT
Mechanical Engineering MATERIALS Selection
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PDF
Structs to JSON How Go Powers REST APIs.pdf
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PDF
composite construction of structures.pdf
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
web development for engineering and engineering
PPTX
UNIT 4 Total Quality Management .pptx
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PPTX
CH1 Production IntroductoryConcepts.pptx
PPT
Project quality management in manufacturing
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
additive manufacturing of ss316l using mig welding
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Arduino robotics embedded978-1-4302-3184-4.pdf
Mechanical Engineering MATERIALS Selection
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Structs to JSON How Go Powers REST APIs.pdf
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
composite construction of structures.pdf
Model Code of Practice - Construction Work - 21102022 .pdf
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
web development for engineering and engineering
UNIT 4 Total Quality Management .pptx
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
CH1 Production IntroductoryConcepts.pptx
Project quality management in manufacturing

Introduction to Dynamic Programming, Principle of Optimality

  • 1. Prepared by- ▪ Bhavin Darji Guided by – SUBJECT-ADA (2150703) Introduction to Dynamic Programming, Principle of Optimality
  • 2. Introduction ▪ Typically applied to optimization problem. ▪ Invented by a U.S. Mathematician Richard Bellman in 1950. ▪ In the word Dynamic Programming the word programming stands for planning.
  • 3. ▪ Dynamic Programming is technique for solving problems with overlapping subproblems. ▪ In this method each subproblem is solved only once. ▪ The result of each subproblem is recorded in a table from which we can obtain a solution to the original problem. ▪ In Dynamic computing duplications in solution is avoided totally. ▪ Efficient then Divide and conquer strategy. ▪ Uses bottom up approach of problem solving.
  • 4. Dynamic Programming ▪ Dynamic Programming is an algorithm design technique for optimization problems: often minimizing or maximizing. ▪ Like divide and conquer, DP solves problems by combining solutions to subproblems. ▪ Unlike divide and conquer, subproblems are not independent. ▪ Subproblems may share subproblems ▪ However, solution to one subproblem may not affect the solutions to other subproblems of the same problem.
  • 5. DP reduces computation by ▪ Solving subproblems in a bottom-up fashion. ▪ Storing solution to a subproblem the first time it is solved. ▪ Looking up the solution when subproblem is encountered again.
  • 6. Key Idea  The key idea is to save answers of overlapping smaller sub-problems to avoid recomputation. ▪ determine structure of optimal solutions.
  • 7. Steps in Dynamic Programming 1. Characterize structure of an optimal solution. 2. Define value of optimal solution recursively. 3. Compute optimal solution values either top-down with caching or bottom-up in a table. 4. Construct an optimal solution from computed values.
  • 8. Dynamic Programming Properties • An instance is solved using the solutions for smaller instances. • The solutions for a smaller instance might be needed multiple times, so store their results in a table. • Thus each smaller instance is solved only once. • Additional space is used to save time.
  • 9. Principle of Optimality ▪ Obtains the solution using principle of optimality. ▪ In an optimal sequence of decisions or choices, each subsequence must also be optimal. ▪ When it is not possible to apply the principle of optimality it is almost impossible to obtain the solution using the dynamic programming approach. ▪ Example: Finding of shortest path in a given graph uses the principle of optimality.
  • 10. Problem solving using Dynamic Programming ▪ Various problem that can be solved using dynamic programming are- ▪ Calculating the Binomial coefficient ▪ Making change problem ▪ Assembly line scheduling ▪ Knapsack problem ▪ Shortest path ▪ Matrix chain Multiplication