SlideShare une entreprise Scribd logo
1  sur  4
1
UNIT 7
DYNAMIC PROGRAMMING
Introduction
 Dynamic programming is a useful mathematical technique for making a sequence of
interrelated decisions.
 It provides a systematic procedure for determining the optimal combination
of decisions.
 In contrast to linear programming, there does not exist a standard mathematical
formulation of “the” dynamic programming problem.
 Rather, dynamic programming is a general type of approach to problem solving, and the
particular equations used must be developed to fit each situation.
 Therefore, a certain degree of ingenuity and insight into the general structure of dynamic
programming problems is required to recognize when and how a problem can be solved
by dynamic programming procedures.
 These abilities can best be developed by an exposure to a wide variety of dynamic
programming applications and a study of the characteristics that are common to all these
situations.
 The technique is useful in a large number of multi-period business problems, such as
(a) smoothing production employment,
(b) allocating capital funds,
(c) allocating salespeople to marketing areas, and
(d)evaluating investment opportunities.
Definition
 The mathematical technique of optimizing a sequence of inter-related decisions over a
period of time is called dynamic programming.
Differences between Linear Programming (LP) and Dynamic Programming (DP)
(1) First, there is no algorithm (like the simplex method) that can be programmed to solve all
problems. Instead, dynamic programming is a technique that allows a difficult problem to be
broken down into a sequence of easier sub-problems, which are then evaluated by stages.
(2) Second, linear programming is a method that gives single-stage (i.e., one-time period)
solutions. Dynamic programming has the power to determine the optimal solution over a one-
year time horizon by breaking the problem into 12 smaller one-month horizon problems and to
solve each of these optimally. Hence, it uses a multistage approach.
Dynamic Programming uses the backward recursive method for solving the problems
2
Bellman’s Principle of Optimality
 Bellman’s principle of optimality is the principle which guides the solution of a problem
using dynamic programming.
 It states:
Regardless of the decisions taken to enter a particular state in a particular stage, the
remaining decisions made for leaving that stage must constitute an optimal policy”
Steps in Dynamic Programming
1. Divide the original problem into sub-problems called stages.
2. Solve the last stage of the problem for all possible conditions or states.
3. Working backward from that last stage, solve each intermediate stage.
4. Obtain the optimal solution for the original problem by solving all stages sequentially.
Terminologyof Dynamic Programming
1. Stage: a period or a logical sub-problem.
2. State variables: possible beginning situations or conditions of a stage. These have also
been called the input variables.
3. Decision variables: alternatives or possible decisions that exist at each stage.
4. Decision criterion: a statement concerning the objective of the problem.
5. Optimal policy: a set of decision rules, developed as a result of the decision criteria, that
gives optimal decisions for any entering condition at any stage.
6. Transformation: normally, an algebraic statement that reveals the relationship between
stages.
 In most applications, dynamic programming obtains solutions by working backward
from the end of the problem toward the beginning, thus breaking up a large, unwieldy
problem into a series of smaller, more tractable problems
3
Example: Shortest Route Problem
Find the shortest path from City 1 to City 10 in the diagram shown below using the
recursive principle of Dynamic Programming.
Solution
Stage 1
 There is only one path from node (8) to node (10). The distance of (8) – (10) = 6.
 Therefore, label node (8) with 6. Indicate the segment (8) –(10) with a *
 There is only one path from node (9) to node (10). The distance of (9) – (10) = 7.
 Therefore, label node (9) with 7. Indicate the segment (9) –(10) with a *
Stage 2
From node (5)
 There are two paths from (5) to (10) viz., (5)-(8)-(10) and (5)-(9)-(10)
 Distance of path (5)-(8)-(10) = Length of (5)-(8) + Label of (8) = 5 + 6 = 11
 Distance of path (5)-(9)-(10) = Length of (5)-(9) + Label of (9) = 3 + 7 = 10
 Therefore label of (5) = Min {11, 10} = 10. Indicate (5) –(9) with a *
From node (6)
 There are two paths from (6) to (10) viz., (6)-(8)-(10) and (6)-(9)-(10)
 Distance of path (6)-(8)-(10) = Length of (6)-(8) + Label of (8) = 7 + 6 = 13
 Distance of path (6)-(9)-(10) = Length of (6)-(9) + Label of (9) = 8 + 7 = 15
 Therefore label of (6) = Min {13, 15} = 13. Indicate (6) –(8) with a *
4
From node (7)
 There are two paths from (7) to (10) viz., (7)-(8)-(10) and (7)-(9)-(10)
 Distance of path (7)-(8)-(10) = Length of (7)-(8) + Label of (8) = 2 + 6 = 8
 Distance of path (7)-(9)-(10) = Length of (7)-(9) + Label of (9) = 4 + 7 = 11
 Therefore label of (7) = Min {8, 11} = 8. Indicate (7) –(8) with a *
Stage 3
From node (2)
 There are three paths from (2) to (10) viz., (2)-(5), (2)-(6) and (2)-(7)
 Distance of path (2)-(5) = Length of (2)-(5) + Label of (5) = 4 +10 = 14
 Distance of path (2)-(6) = Length of (2)-(6) + Label of (6) = 2 + 13 = 15
 Distance of path (2)-(7) = Length of (2)-(7) + Label of (7) = 5 + 8 = 13
 Therefore label of (2) = Min {14, 15, 13} = 13. Indicate (2) –(7) with a *
From node (3)
 There are three paths from (3) to (10) viz., (3)-(5), (3)-(6) and (3)-(7)
 Distance of path (3)-(5) = Length of (3)-(5) + Label of (5) = 4 +10 = 14
 Distance of path (3)-(6) = Length of (3)-(6) + Label of (6) = 3 + 13 = 16
 Distance of path (3)-(7) = Length of (3)-(7) + Label of (7) = 7 + 8 = 15
 Therefore label of (3) = Min {14, 16, 15} = 14. Indicate (3) –(5) with a *
From node (4)
 There are three paths from (4) to (10) viz., (4)-(5), (4)-(6) and (4)-(7)
 Distance of path (4)-(5) = Length of (4)-(5) + Label of (5) = 2 +10 = 12
 Distance of path (4)-(6) = Length of (4)-(6) + Label of (6) = 1 + 13 = 14
 Distance of path (4)-(7) = Length of (4)-(7) + Label of (7) = 5 + 8 = 13
 Therefore label of (4) = Min {12, 14, 13} = 12. Indicate (4) –(5) with a *
Stage 4
From node (1)
 There are three paths from (1) to (10) viz., (1)-(2), (1)-(3) and (1)-(4)
 Distance of path (1)-(2) = Length of (1)-(2) + Label of (2) = 5 +13 = 18
 Distance of path (1)-(3) = Length of (1)-(3) + Label of (3) = 7 + 14 = 21
 Distance of path (1)-(4) = Length of (1)-(4) + Label of (4) = 3 + 12 = 15
 Therefore label of (1) = Min {18, 21, 15} = 15. Indicate (1) –(4) with a *
 Since the label of (1) is 15, the distance of the shortest path from (1) to (10) = 15.
Starting from (1) and following the paths indicated by *s,
the shortestpath is (1)-(4)-(5)-(9)-(10). Its distance is 15.

Contenu connexe

Tendances

Operation research (definition, phases)
Operation research (definition, phases)Operation research (definition, phases)
Operation research (definition, phases)DivyaKS12
 
Integer Linear Programming
Integer Linear ProgrammingInteger Linear Programming
Integer Linear ProgrammingSukhpalRamanand
 
Travelling salesman problem
Travelling salesman problemTravelling salesman problem
Travelling salesman problemhamza haseeb
 
Operation Research (Introduction of Operation Research)
Operation Research (Introduction of Operation Research)Operation Research (Introduction of Operation Research)
Operation Research (Introduction of Operation Research)Yamini Kahaliya
 
Simulation and its application
Simulation and its applicationSimulation and its application
Simulation and its applicationAlesh Dulal
 
Replacement theory
Replacement theoryReplacement theory
Replacement theoryR A Shah
 
Job shop scheduling
Job shop schedulingJob shop scheduling
Job shop schedulingSujeet TAMBE
 
Nonlinear programming 2013
Nonlinear programming 2013Nonlinear programming 2013
Nonlinear programming 2013sharifz
 
OPERATION RESEARCH Simulation
OPERATION RESEARCH SimulationOPERATION RESEARCH Simulation
OPERATION RESEARCH SimulationKomal Hambir
 
Sequencing problems in Operations Research
Sequencing problems in Operations ResearchSequencing problems in Operations Research
Sequencing problems in Operations ResearchAbu Bashar
 
North West Corner Method
North West Corner MethodNorth West Corner Method
North West Corner MethodMuhammad Waleed
 
Travelling salesman problem
Travelling salesman problemTravelling salesman problem
Travelling salesman problemPradeep Behera
 
Lecture 2 process charts work study
Lecture 2 process charts work studyLecture 2 process charts work study
Lecture 2 process charts work studyrahulmeshram14
 

Tendances (20)

Method study
Method studyMethod study
Method study
 
Operation research (definition, phases)
Operation research (definition, phases)Operation research (definition, phases)
Operation research (definition, phases)
 
Integer Linear Programming
Integer Linear ProgrammingInteger Linear Programming
Integer Linear Programming
 
Travelling salesman problem
Travelling salesman problemTravelling salesman problem
Travelling salesman problem
 
Queueing theory
Queueing theoryQueueing theory
Queueing theory
 
Operation Research (Introduction of Operation Research)
Operation Research (Introduction of Operation Research)Operation Research (Introduction of Operation Research)
Operation Research (Introduction of Operation Research)
 
Dynamic programming
Dynamic programmingDynamic programming
Dynamic programming
 
Linear Programming
Linear ProgrammingLinear Programming
Linear Programming
 
Simulation and its application
Simulation and its applicationSimulation and its application
Simulation and its application
 
Replacement theory
Replacement theoryReplacement theory
Replacement theory
 
Introduction to optimization Problems
Introduction to optimization ProblemsIntroduction to optimization Problems
Introduction to optimization Problems
 
Job shop scheduling
Job shop schedulingJob shop scheduling
Job shop scheduling
 
Concept of Duality
Concept of DualityConcept of Duality
Concept of Duality
 
Nonlinear programming 2013
Nonlinear programming 2013Nonlinear programming 2013
Nonlinear programming 2013
 
OPERATION RESEARCH Simulation
OPERATION RESEARCH SimulationOPERATION RESEARCH Simulation
OPERATION RESEARCH Simulation
 
Sequencing problems in Operations Research
Sequencing problems in Operations ResearchSequencing problems in Operations Research
Sequencing problems in Operations Research
 
North West Corner Method
North West Corner MethodNorth West Corner Method
North West Corner Method
 
Travelling salesman problem
Travelling salesman problemTravelling salesman problem
Travelling salesman problem
 
Big m method
Big   m methodBig   m method
Big m method
 
Lecture 2 process charts work study
Lecture 2 process charts work studyLecture 2 process charts work study
Lecture 2 process charts work study
 

En vedette

Daa:Dynamic Programing
Daa:Dynamic ProgramingDaa:Dynamic Programing
Daa:Dynamic Programingrupali_2bonde
 
OR (JNTUK) III Mech Unit 8 simulation
OR (JNTUK) III Mech Unit 8  simulationOR (JNTUK) III Mech Unit 8  simulation
OR (JNTUK) III Mech Unit 8 simulationNageswara Rao Thots
 
Lecture 8 dynamic programming
Lecture 8 dynamic programmingLecture 8 dynamic programming
Lecture 8 dynamic programmingOye Tu
 
Dynamic Programming
Dynamic ProgrammingDynamic Programming
Dynamic ProgrammingSahil Kumar
 
Queuing theory
Queuing theoryQueuing theory
Queuing theoryAmit Sinha
 
Dynamic Programming
Dynamic ProgrammingDynamic Programming
Dynamic Programmingparamalways
 
Dynamic programming
Dynamic programmingDynamic programming
Dynamic programmingGopi Saiteja
 
A software approach to mathematical programming
A software approach to mathematical programmingA software approach to mathematical programming
A software approach to mathematical programmingArian Razmi Farooji
 
Classbfs121001503719748
Classbfs121001503719748Classbfs121001503719748
Classbfs121001503719748Raju Panthadi
 
A comparative study of initial basic feasible solution methods
A comparative study of initial basic feasible solution methodsA comparative study of initial basic feasible solution methods
A comparative study of initial basic feasible solution methodsAlexander Decker
 
Transportation lecture
Transportation lectureTransportation lecture
Transportation lectureMoudud Hasan
 
Dynamic programming class 16
Dynamic programming class 16Dynamic programming class 16
Dynamic programming class 16Kumar
 
BC 504-Operation Research
BC 504-Operation ResearchBC 504-Operation Research
BC 504-Operation ResearchPCTE
 

En vedette (20)

Daa:Dynamic Programing
Daa:Dynamic ProgramingDaa:Dynamic Programing
Daa:Dynamic Programing
 
Unit 6 inventory
Unit 6 inventoryUnit 6 inventory
Unit 6 inventory
 
OR 14 15-unit_4
OR 14 15-unit_4OR 14 15-unit_4
OR 14 15-unit_4
 
OR (JNTUK) III Mech Unit 8 simulation
OR (JNTUK) III Mech Unit 8  simulationOR (JNTUK) III Mech Unit 8  simulation
OR (JNTUK) III Mech Unit 8 simulation
 
OR 14 15-unit_2
OR 14 15-unit_2OR 14 15-unit_2
OR 14 15-unit_2
 
OR 14 15-unit_1
OR 14 15-unit_1OR 14 15-unit_1
OR 14 15-unit_1
 
Lecture 8 dynamic programming
Lecture 8 dynamic programmingLecture 8 dynamic programming
Lecture 8 dynamic programming
 
OR Unit 5 queuing theory
OR Unit 5 queuing theoryOR Unit 5 queuing theory
OR Unit 5 queuing theory
 
Dynamic Programming
Dynamic ProgrammingDynamic Programming
Dynamic Programming
 
Queuing theory
Queuing theoryQueuing theory
Queuing theory
 
Dynamic Programming
Dynamic ProgrammingDynamic Programming
Dynamic Programming
 
Dynamic programming
Dynamic programmingDynamic programming
Dynamic programming
 
A software approach to mathematical programming
A software approach to mathematical programmingA software approach to mathematical programming
A software approach to mathematical programming
 
Classbfs121001503719748
Classbfs121001503719748Classbfs121001503719748
Classbfs121001503719748
 
Dynamic programming
Dynamic programmingDynamic programming
Dynamic programming
 
A comparative study of initial basic feasible solution methods
A comparative study of initial basic feasible solution methodsA comparative study of initial basic feasible solution methods
A comparative study of initial basic feasible solution methods
 
OR 14 15-unit_3
OR 14 15-unit_3OR 14 15-unit_3
OR 14 15-unit_3
 
Transportation lecture
Transportation lectureTransportation lecture
Transportation lecture
 
Dynamic programming class 16
Dynamic programming class 16Dynamic programming class 16
Dynamic programming class 16
 
BC 504-Operation Research
BC 504-Operation ResearchBC 504-Operation Research
BC 504-Operation Research
 

Similaire à Unit 7 dynamic programming

dynamic programming complete by Mumtaz Ali (03154103173)
dynamic programming complete by Mumtaz Ali (03154103173)dynamic programming complete by Mumtaz Ali (03154103173)
dynamic programming complete by Mumtaz Ali (03154103173)Mumtaz Ali
 
A practical work of matlab
A practical work of matlabA practical work of matlab
A practical work of matlabSalanSD
 
Improved Timing Estimation Using Iterative Normalization Technique for OFDM S...
Improved Timing Estimation Using Iterative Normalization Technique for OFDM S...Improved Timing Estimation Using Iterative Normalization Technique for OFDM S...
Improved Timing Estimation Using Iterative Normalization Technique for OFDM S...IJECEIAES
 
Nth term algebra_level_6
Nth term algebra_level_6Nth term algebra_level_6
Nth term algebra_level_6harlie90
 
An improved tabular technique for presenting the various
An improved tabular technique for presenting the variousAn improved tabular technique for presenting the various
An improved tabular technique for presenting the variousAlexander Decker
 
An improved tabular technique for presenting the various
An improved tabular technique for presenting the variousAn improved tabular technique for presenting the various
An improved tabular technique for presenting the variousAlexander Decker
 
SURVEY ON POLYGONAL APPROXIMATION TECHNIQUES FOR DIGITAL PLANAR CURVES
SURVEY ON POLYGONAL APPROXIMATION TECHNIQUES FOR DIGITAL PLANAR CURVESSURVEY ON POLYGONAL APPROXIMATION TECHNIQUES FOR DIGITAL PLANAR CURVES
SURVEY ON POLYGONAL APPROXIMATION TECHNIQUES FOR DIGITAL PLANAR CURVESZac Darcy
 
Operation research model for solving TSP
Operation research model for solving TSPOperation research model for solving TSP
Operation research model for solving TSPDrGovindshaysharma
 
Branch and bounding : Data structures
Branch and bounding : Data structuresBranch and bounding : Data structures
Branch and bounding : Data structuresKàŕtheek Jåvvàjí
 
Hand gesture recognition using discrete wavelet transform and hidden Markov m...
Hand gesture recognition using discrete wavelet transform and hidden Markov m...Hand gesture recognition using discrete wavelet transform and hidden Markov m...
Hand gesture recognition using discrete wavelet transform and hidden Markov m...TELKOMNIKA JOURNAL
 
7-White Box Testing.ppt
7-White Box Testing.ppt7-White Box Testing.ppt
7-White Box Testing.pptHirenderPal
 
Data_Structure_and_Algorithms_Lecture_1.ppt
Data_Structure_and_Algorithms_Lecture_1.pptData_Structure_and_Algorithms_Lecture_1.ppt
Data_Structure_and_Algorithms_Lecture_1.pptISHANAMRITSRIVASTAVA
 
Ch07 1-2-overview graphcoverage
Ch07 1-2-overview graphcoverageCh07 1-2-overview graphcoverage
Ch07 1-2-overview graphcoverageRija Hameed
 
Measures of Variation (Ungrouped Data)
Measures of Variation (Ungrouped Data)Measures of Variation (Ungrouped Data)
Measures of Variation (Ungrouped Data)Zaira Mae
 
Monte Carlo Simulation
Monte Carlo SimulationMonte Carlo Simulation
Monte Carlo SimulationDeepti Singh
 

Similaire à Unit 7 dynamic programming (20)

algorithm Unit 3
algorithm Unit 3algorithm Unit 3
algorithm Unit 3
 
Unit 3 daa
Unit 3 daaUnit 3 daa
Unit 3 daa
 
dynamic programming complete by Mumtaz Ali (03154103173)
dynamic programming complete by Mumtaz Ali (03154103173)dynamic programming complete by Mumtaz Ali (03154103173)
dynamic programming complete by Mumtaz Ali (03154103173)
 
Lecture#9
Lecture#9Lecture#9
Lecture#9
 
A practical work of matlab
A practical work of matlabA practical work of matlab
A practical work of matlab
 
Improved Timing Estimation Using Iterative Normalization Technique for OFDM S...
Improved Timing Estimation Using Iterative Normalization Technique for OFDM S...Improved Timing Estimation Using Iterative Normalization Technique for OFDM S...
Improved Timing Estimation Using Iterative Normalization Technique for OFDM S...
 
Algorithmic research
Algorithmic researchAlgorithmic research
Algorithmic research
 
Nth term algebra_level_6
Nth term algebra_level_6Nth term algebra_level_6
Nth term algebra_level_6
 
An improved tabular technique for presenting the various
An improved tabular technique for presenting the variousAn improved tabular technique for presenting the various
An improved tabular technique for presenting the various
 
An improved tabular technique for presenting the various
An improved tabular technique for presenting the variousAn improved tabular technique for presenting the various
An improved tabular technique for presenting the various
 
SURVEY ON POLYGONAL APPROXIMATION TECHNIQUES FOR DIGITAL PLANAR CURVES
SURVEY ON POLYGONAL APPROXIMATION TECHNIQUES FOR DIGITAL PLANAR CURVESSURVEY ON POLYGONAL APPROXIMATION TECHNIQUES FOR DIGITAL PLANAR CURVES
SURVEY ON POLYGONAL APPROXIMATION TECHNIQUES FOR DIGITAL PLANAR CURVES
 
Operation research model for solving TSP
Operation research model for solving TSPOperation research model for solving TSP
Operation research model for solving TSP
 
Branch and bounding : Data structures
Branch and bounding : Data structuresBranch and bounding : Data structures
Branch and bounding : Data structures
 
Hand gesture recognition using discrete wavelet transform and hidden Markov m...
Hand gesture recognition using discrete wavelet transform and hidden Markov m...Hand gesture recognition using discrete wavelet transform and hidden Markov m...
Hand gesture recognition using discrete wavelet transform and hidden Markov m...
 
7-White Box Testing.ppt
7-White Box Testing.ppt7-White Box Testing.ppt
7-White Box Testing.ppt
 
Data_Structure_and_Algorithms_Lecture_1.ppt
Data_Structure_and_Algorithms_Lecture_1.pptData_Structure_and_Algorithms_Lecture_1.ppt
Data_Structure_and_Algorithms_Lecture_1.ppt
 
Ch07 1-2-overview graphcoverage
Ch07 1-2-overview graphcoverageCh07 1-2-overview graphcoverage
Ch07 1-2-overview graphcoverage
 
Measures of Variation (Ungrouped Data)
Measures of Variation (Ungrouped Data)Measures of Variation (Ungrouped Data)
Measures of Variation (Ungrouped Data)
 
Monte Carlo Simulation
Monte Carlo SimulationMonte Carlo Simulation
Monte Carlo Simulation
 
White box testing
White box testingWhite box testing
White box testing
 

Dernier

Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfSanaAli374401
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...KokoStevan
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.MateoGardella
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterMateoGardella
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 

Dernier (20)

Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 

Unit 7 dynamic programming

  • 1. 1 UNIT 7 DYNAMIC PROGRAMMING Introduction  Dynamic programming is a useful mathematical technique for making a sequence of interrelated decisions.  It provides a systematic procedure for determining the optimal combination of decisions.  In contrast to linear programming, there does not exist a standard mathematical formulation of “the” dynamic programming problem.  Rather, dynamic programming is a general type of approach to problem solving, and the particular equations used must be developed to fit each situation.  Therefore, a certain degree of ingenuity and insight into the general structure of dynamic programming problems is required to recognize when and how a problem can be solved by dynamic programming procedures.  These abilities can best be developed by an exposure to a wide variety of dynamic programming applications and a study of the characteristics that are common to all these situations.  The technique is useful in a large number of multi-period business problems, such as (a) smoothing production employment, (b) allocating capital funds, (c) allocating salespeople to marketing areas, and (d)evaluating investment opportunities. Definition  The mathematical technique of optimizing a sequence of inter-related decisions over a period of time is called dynamic programming. Differences between Linear Programming (LP) and Dynamic Programming (DP) (1) First, there is no algorithm (like the simplex method) that can be programmed to solve all problems. Instead, dynamic programming is a technique that allows a difficult problem to be broken down into a sequence of easier sub-problems, which are then evaluated by stages. (2) Second, linear programming is a method that gives single-stage (i.e., one-time period) solutions. Dynamic programming has the power to determine the optimal solution over a one- year time horizon by breaking the problem into 12 smaller one-month horizon problems and to solve each of these optimally. Hence, it uses a multistage approach. Dynamic Programming uses the backward recursive method for solving the problems
  • 2. 2 Bellman’s Principle of Optimality  Bellman’s principle of optimality is the principle which guides the solution of a problem using dynamic programming.  It states: Regardless of the decisions taken to enter a particular state in a particular stage, the remaining decisions made for leaving that stage must constitute an optimal policy” Steps in Dynamic Programming 1. Divide the original problem into sub-problems called stages. 2. Solve the last stage of the problem for all possible conditions or states. 3. Working backward from that last stage, solve each intermediate stage. 4. Obtain the optimal solution for the original problem by solving all stages sequentially. Terminologyof Dynamic Programming 1. Stage: a period or a logical sub-problem. 2. State variables: possible beginning situations or conditions of a stage. These have also been called the input variables. 3. Decision variables: alternatives or possible decisions that exist at each stage. 4. Decision criterion: a statement concerning the objective of the problem. 5. Optimal policy: a set of decision rules, developed as a result of the decision criteria, that gives optimal decisions for any entering condition at any stage. 6. Transformation: normally, an algebraic statement that reveals the relationship between stages.  In most applications, dynamic programming obtains solutions by working backward from the end of the problem toward the beginning, thus breaking up a large, unwieldy problem into a series of smaller, more tractable problems
  • 3. 3 Example: Shortest Route Problem Find the shortest path from City 1 to City 10 in the diagram shown below using the recursive principle of Dynamic Programming. Solution Stage 1  There is only one path from node (8) to node (10). The distance of (8) – (10) = 6.  Therefore, label node (8) with 6. Indicate the segment (8) –(10) with a *  There is only one path from node (9) to node (10). The distance of (9) – (10) = 7.  Therefore, label node (9) with 7. Indicate the segment (9) –(10) with a * Stage 2 From node (5)  There are two paths from (5) to (10) viz., (5)-(8)-(10) and (5)-(9)-(10)  Distance of path (5)-(8)-(10) = Length of (5)-(8) + Label of (8) = 5 + 6 = 11  Distance of path (5)-(9)-(10) = Length of (5)-(9) + Label of (9) = 3 + 7 = 10  Therefore label of (5) = Min {11, 10} = 10. Indicate (5) –(9) with a * From node (6)  There are two paths from (6) to (10) viz., (6)-(8)-(10) and (6)-(9)-(10)  Distance of path (6)-(8)-(10) = Length of (6)-(8) + Label of (8) = 7 + 6 = 13  Distance of path (6)-(9)-(10) = Length of (6)-(9) + Label of (9) = 8 + 7 = 15  Therefore label of (6) = Min {13, 15} = 13. Indicate (6) –(8) with a *
  • 4. 4 From node (7)  There are two paths from (7) to (10) viz., (7)-(8)-(10) and (7)-(9)-(10)  Distance of path (7)-(8)-(10) = Length of (7)-(8) + Label of (8) = 2 + 6 = 8  Distance of path (7)-(9)-(10) = Length of (7)-(9) + Label of (9) = 4 + 7 = 11  Therefore label of (7) = Min {8, 11} = 8. Indicate (7) –(8) with a * Stage 3 From node (2)  There are three paths from (2) to (10) viz., (2)-(5), (2)-(6) and (2)-(7)  Distance of path (2)-(5) = Length of (2)-(5) + Label of (5) = 4 +10 = 14  Distance of path (2)-(6) = Length of (2)-(6) + Label of (6) = 2 + 13 = 15  Distance of path (2)-(7) = Length of (2)-(7) + Label of (7) = 5 + 8 = 13  Therefore label of (2) = Min {14, 15, 13} = 13. Indicate (2) –(7) with a * From node (3)  There are three paths from (3) to (10) viz., (3)-(5), (3)-(6) and (3)-(7)  Distance of path (3)-(5) = Length of (3)-(5) + Label of (5) = 4 +10 = 14  Distance of path (3)-(6) = Length of (3)-(6) + Label of (6) = 3 + 13 = 16  Distance of path (3)-(7) = Length of (3)-(7) + Label of (7) = 7 + 8 = 15  Therefore label of (3) = Min {14, 16, 15} = 14. Indicate (3) –(5) with a * From node (4)  There are three paths from (4) to (10) viz., (4)-(5), (4)-(6) and (4)-(7)  Distance of path (4)-(5) = Length of (4)-(5) + Label of (5) = 2 +10 = 12  Distance of path (4)-(6) = Length of (4)-(6) + Label of (6) = 1 + 13 = 14  Distance of path (4)-(7) = Length of (4)-(7) + Label of (7) = 5 + 8 = 13  Therefore label of (4) = Min {12, 14, 13} = 12. Indicate (4) –(5) with a * Stage 4 From node (1)  There are three paths from (1) to (10) viz., (1)-(2), (1)-(3) and (1)-(4)  Distance of path (1)-(2) = Length of (1)-(2) + Label of (2) = 5 +13 = 18  Distance of path (1)-(3) = Length of (1)-(3) + Label of (3) = 7 + 14 = 21  Distance of path (1)-(4) = Length of (1)-(4) + Label of (4) = 3 + 12 = 15  Therefore label of (1) = Min {18, 21, 15} = 15. Indicate (1) –(4) with a *  Since the label of (1) is 15, the distance of the shortest path from (1) to (10) = 15. Starting from (1) and following the paths indicated by *s, the shortestpath is (1)-(4)-(5)-(9)-(10). Its distance is 15.