SlideShare une entreprise Scribd logo
1  sur  8
Dynamic Programming

   Operations Research
Dynamic programming
• Series of inter-related decisions
• How to find the combination of most optimal
  decisions over time?
• Production Scheduling, Inventory Control,
  Warehousing, given changes in demand –
  How much to produce, store and sell over a
  period of time


                                                2
Sometimes its easier to work
        backwards from the end!
• You are going for an arranged marriage and
  you have 10 proposals, whom you will meet
  one after the other.
• Once you have rejected a proposal, you
  cannot get the same girl again!
• The current profile may be best or they may
  be better profiles yet to come . . .
• How to decide?
A problem along similar lines
•   Lets say you have 10 tries to receive a random amount between 0 and 100. At
    each try, you can either accept what you get and quit, or pass to next try.
•   At each try, when would you accept or reject the value that comes up?
•   Working backwards,
     – On the last attempt (assuming you passed 9 times), you will have to take whatever value
       comes – expected value = 50.
     – On the second last attempt, you can either accept whatever comes or pass to last attempt
       where you expect to get 50. So, in second last attempt, if you get more than 50 you should
       accept, else pass.
     – On the third last attempt, you can either accept or move to second last attempt, where you
       expect to get 75 or again pass to last attempt where you expect to get 50. On an average you
       would expect to get 62.5 over the last two attempts. Therefore, if you get more than 62.5 in
       third last attempt, you should accept, else pass.
     – On the 4th last attempt, you can either accept or move to 3rd last attempt where you expect to
       get 87.5 or pass to 2nd last attempt where you expect to get 75 or pass to last attempt where
       you expect to get 50. On an average you would expect to get 708 over last 3 attempts.
       Therefore, if you get more than 708 in 4th last attempt, you should accept, else pass.
     – And so on . . .
Finding Shortest Path




Stage 1   Stage 2   Stage 3   Stage 4   Stage 5
Working Backwards
Stage 3   H         I     SP        Go to
E         1+3       4+4   4         H
F         6+3       3+4   7         I
G         3+3       3+4   6         H


                Stage     E     F       G       SP       Go to
                4
                B         7+4   4+7     6+6     11       E or F
                C         3+4   2+7     4+6     7        E
                D         4+4   1+7     5+6     8        E or F



                                Stage       B        C       D     SP   Go to
                                5
                                A           2+11 4+7         2+8   10   D
ADEHJ =2+4+1+3=10
ADFIJ = 2+1+3+4=10
Bellman’s Principle of Optimality
• “An optimal policy has the property that
  whatever the initial state and initial decision
  are, the remaining decisions must constitute
  an optimal policy with regard to the state
  resulting from the first decision.”

Contenu connexe

Tendances

Dynamic Programming
Dynamic ProgrammingDynamic Programming
Dynamic Programmingcontact2kazi
 
(Radhika) presentation on chapter 2 ai
(Radhika) presentation on chapter 2 ai(Radhika) presentation on chapter 2 ai
(Radhika) presentation on chapter 2 aiRadhika Srinivasan
 
Knowledge representation and Predicate logic
Knowledge representation and Predicate logicKnowledge representation and Predicate logic
Knowledge representation and Predicate logicAmey Kerkar
 
Propositional logic
Propositional logicPropositional logic
Propositional logicRushdi Shams
 
Operation research complete note
Operation research  complete noteOperation research  complete note
Operation research complete notekabul university
 
Rod Cutting Problem
Rod Cutting ProblemRod Cutting Problem
Rod Cutting ProblemQuaziRossi
 
Travelling Salesman
Travelling SalesmanTravelling Salesman
Travelling SalesmanShuvojit Kar
 
sum of subset problem using Backtracking
sum of subset problem using Backtrackingsum of subset problem using Backtracking
sum of subset problem using BacktrackingAbhishek Singh
 
8 queens problem using back tracking
8 queens problem using back tracking8 queens problem using back tracking
8 queens problem using back trackingTech_MX
 
Pumping lemma Theory Of Automata
Pumping lemma Theory Of AutomataPumping lemma Theory Of Automata
Pumping lemma Theory Of Automatahafizhamza0322
 
Agents in Artificial intelligence
Agents in Artificial intelligence Agents in Artificial intelligence
Agents in Artificial intelligence Lalit Birla
 
primal and dual problem
primal and dual problemprimal and dual problem
primal and dual problemYash Lad
 
Simplification of cfg ppt
Simplification of cfg pptSimplification of cfg ppt
Simplification of cfg pptShiela Rani
 
Longest common subsequences in Algorithm Analysis
Longest common subsequences in Algorithm AnalysisLongest common subsequences in Algorithm Analysis
Longest common subsequences in Algorithm AnalysisRajendran
 

Tendances (20)

Branch and bound
Branch and boundBranch and bound
Branch and bound
 
Dynamic Programming
Dynamic ProgrammingDynamic Programming
Dynamic Programming
 
(Radhika) presentation on chapter 2 ai
(Radhika) presentation on chapter 2 ai(Radhika) presentation on chapter 2 ai
(Radhika) presentation on chapter 2 ai
 
Undecidabality
UndecidabalityUndecidabality
Undecidabality
 
Knowledge representation and Predicate logic
Knowledge representation and Predicate logicKnowledge representation and Predicate logic
Knowledge representation and Predicate logic
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
 
Operation research complete note
Operation research  complete noteOperation research  complete note
Operation research complete note
 
Rod Cutting Problem
Rod Cutting ProblemRod Cutting Problem
Rod Cutting Problem
 
Travelling Salesman
Travelling SalesmanTravelling Salesman
Travelling Salesman
 
Transportation problems
Transportation problemsTransportation problems
Transportation problems
 
Assignment Problem
Assignment ProblemAssignment Problem
Assignment Problem
 
sum of subset problem using Backtracking
sum of subset problem using Backtrackingsum of subset problem using Backtracking
sum of subset problem using Backtracking
 
8 queens problem using back tracking
8 queens problem using back tracking8 queens problem using back tracking
8 queens problem using back tracking
 
Pumping lemma Theory Of Automata
Pumping lemma Theory Of AutomataPumping lemma Theory Of Automata
Pumping lemma Theory Of Automata
 
Agents in Artificial intelligence
Agents in Artificial intelligence Agents in Artificial intelligence
Agents in Artificial intelligence
 
primal and dual problem
primal and dual problemprimal and dual problem
primal and dual problem
 
Planning
PlanningPlanning
Planning
 
Automata theory
Automata theoryAutomata theory
Automata theory
 
Simplification of cfg ppt
Simplification of cfg pptSimplification of cfg ppt
Simplification of cfg ppt
 
Longest common subsequences in Algorithm Analysis
Longest common subsequences in Algorithm AnalysisLongest common subsequences in Algorithm Analysis
Longest common subsequences in Algorithm Analysis
 

En vedette

Dynamic Programming
Dynamic ProgrammingDynamic Programming
Dynamic Programmingparamalways
 
Dynamic Programming
Dynamic ProgrammingDynamic Programming
Dynamic ProgrammingSahil Kumar
 
Daa:Dynamic Programing
Daa:Dynamic ProgramingDaa:Dynamic Programing
Daa:Dynamic Programingrupali_2bonde
 
Dynamic programming
Dynamic programmingDynamic programming
Dynamic programmingShakil Ahmed
 
Lecture 8 dynamic programming
Lecture 8 dynamic programmingLecture 8 dynamic programming
Lecture 8 dynamic programmingOye Tu
 
Elements of dynamic programming
Elements of dynamic programmingElements of dynamic programming
Elements of dynamic programmingTafhim Islam
 
Dynamic programming - fundamentals review
Dynamic programming - fundamentals reviewDynamic programming - fundamentals review
Dynamic programming - fundamentals reviewElifTech
 
Dynamic programming
Dynamic programmingDynamic programming
Dynamic programmingGopi Saiteja
 
5.3 dynamic programming
5.3 dynamic programming5.3 dynamic programming
5.3 dynamic programmingKrish_ver2
 
Optimum polygon triangulation
Optimum polygon triangulationOptimum polygon triangulation
Optimum polygon triangulationHarsukh Chandak
 
Lesson 19: Maximum and Minimum Values
Lesson 19: Maximum and Minimum ValuesLesson 19: Maximum and Minimum Values
Lesson 19: Maximum and Minimum ValuesMatthew Leingang
 
Recursion tree method
Recursion tree methodRecursion tree method
Recursion tree methodRajendran
 
Maximums and minimum
Maximums and minimum Maximums and minimum
Maximums and minimum rubimedina01
 
15 puzzle problem game on android
15 puzzle problem game on android15 puzzle problem game on android
15 puzzle problem game on androidAkhilesh Jain
 
Master method
Master method Master method
Master method Rajendran
 

En vedette (20)

Dynamic Programming
Dynamic ProgrammingDynamic Programming
Dynamic Programming
 
Dynamic Programming
Dynamic ProgrammingDynamic Programming
Dynamic Programming
 
Dynamic pgmming
Dynamic pgmmingDynamic pgmming
Dynamic pgmming
 
Daa:Dynamic Programing
Daa:Dynamic ProgramingDaa:Dynamic Programing
Daa:Dynamic Programing
 
Dynamic programming
Dynamic programmingDynamic programming
Dynamic programming
 
Lecture 8 dynamic programming
Lecture 8 dynamic programmingLecture 8 dynamic programming
Lecture 8 dynamic programming
 
Elements of dynamic programming
Elements of dynamic programmingElements of dynamic programming
Elements of dynamic programming
 
Knapsack Problem
Knapsack ProblemKnapsack Problem
Knapsack Problem
 
Dynamic programming - fundamentals review
Dynamic programming - fundamentals reviewDynamic programming - fundamentals review
Dynamic programming - fundamentals review
 
Dynamic programming
Dynamic programmingDynamic programming
Dynamic programming
 
5.3 dynamic programming
5.3 dynamic programming5.3 dynamic programming
5.3 dynamic programming
 
Optimum polygon triangulation
Optimum polygon triangulationOptimum polygon triangulation
Optimum polygon triangulation
 
Lesson 19: Maximum and Minimum Values
Lesson 19: Maximum and Minimum ValuesLesson 19: Maximum and Minimum Values
Lesson 19: Maximum and Minimum Values
 
Recursion tree method
Recursion tree methodRecursion tree method
Recursion tree method
 
Unit 3 daa
Unit 3 daaUnit 3 daa
Unit 3 daa
 
Queuing problems
Queuing problemsQueuing problems
Queuing problems
 
Maximums and minimum
Maximums and minimum Maximums and minimum
Maximums and minimum
 
Kmp
KmpKmp
Kmp
 
15 puzzle problem game on android
15 puzzle problem game on android15 puzzle problem game on android
15 puzzle problem game on android
 
Master method
Master method Master method
Master method
 

Plus de Nilam Kabra

Layout Case Study
Layout Case StudyLayout Case Study
Layout Case StudyNilam Kabra
 
Facility & Layout Design Case Study
Facility & Layout Design Case StudyFacility & Layout Design Case Study
Facility & Layout Design Case StudyNilam Kabra
 
Capacity & Inventory Management
Capacity & Inventory ManagementCapacity & Inventory Management
Capacity & Inventory ManagementNilam Kabra
 
Organizational Behavior Chapter 9
Organizational Behavior Chapter 9Organizational Behavior Chapter 9
Organizational Behavior Chapter 9Nilam Kabra
 
Organizational Behavior Chapter 8
Organizational Behavior Chapter 8Organizational Behavior Chapter 8
Organizational Behavior Chapter 8Nilam Kabra
 
Organizational Behavior Chapter 7
Organizational Behavior Chapter 7Organizational Behavior Chapter 7
Organizational Behavior Chapter 7Nilam Kabra
 
Organizational Behavior Chapter 5
Organizational Behavior Chapter 5Organizational Behavior Chapter 5
Organizational Behavior Chapter 5Nilam Kabra
 
Organizational Behavior Chapter 4
Organizational Behavior Chapter 4Organizational Behavior Chapter 4
Organizational Behavior Chapter 4Nilam Kabra
 
Organizational Behavior Chapter 3
Organizational Behavior Chapter 3Organizational Behavior Chapter 3
Organizational Behavior Chapter 3Nilam Kabra
 
Organizational Behavior Chapter 2
Organizational Behavior Chapter 2Organizational Behavior Chapter 2
Organizational Behavior Chapter 2Nilam Kabra
 
Organizational Behavior Chapter 1
Organizational Behavior Chapter 1Organizational Behavior Chapter 1
Organizational Behavior Chapter 1Nilam Kabra
 
Transportation Assignment
Transportation AssignmentTransportation Assignment
Transportation AssignmentNilam Kabra
 
Replacement Theory
Replacement TheoryReplacement Theory
Replacement TheoryNilam Kabra
 
Relationship Marketing
Relationship MarketingRelationship Marketing
Relationship MarketingNilam Kabra
 
Human Resource Management
Human Resource ManagementHuman Resource Management
Human Resource ManagementNilam Kabra
 

Plus de Nilam Kabra (19)

The EOQ Formula
The EOQ FormulaThe EOQ Formula
The EOQ Formula
 
Layout Case Study
Layout Case StudyLayout Case Study
Layout Case Study
 
Facility & Layout Design Case Study
Facility & Layout Design Case StudyFacility & Layout Design Case Study
Facility & Layout Design Case Study
 
Equations
EquationsEquations
Equations
 
EOQ Ken Homa
EOQ   Ken HomaEOQ   Ken Homa
EOQ Ken Homa
 
Capacity & Inventory Management
Capacity & Inventory ManagementCapacity & Inventory Management
Capacity & Inventory Management
 
Organizational Behavior Chapter 9
Organizational Behavior Chapter 9Organizational Behavior Chapter 9
Organizational Behavior Chapter 9
 
Organizational Behavior Chapter 8
Organizational Behavior Chapter 8Organizational Behavior Chapter 8
Organizational Behavior Chapter 8
 
Organizational Behavior Chapter 7
Organizational Behavior Chapter 7Organizational Behavior Chapter 7
Organizational Behavior Chapter 7
 
Organizational Behavior Chapter 5
Organizational Behavior Chapter 5Organizational Behavior Chapter 5
Organizational Behavior Chapter 5
 
Organizational Behavior Chapter 4
Organizational Behavior Chapter 4Organizational Behavior Chapter 4
Organizational Behavior Chapter 4
 
Organizational Behavior Chapter 3
Organizational Behavior Chapter 3Organizational Behavior Chapter 3
Organizational Behavior Chapter 3
 
Organizational Behavior Chapter 2
Organizational Behavior Chapter 2Organizational Behavior Chapter 2
Organizational Behavior Chapter 2
 
Organizational Behavior Chapter 1
Organizational Behavior Chapter 1Organizational Behavior Chapter 1
Organizational Behavior Chapter 1
 
Transportation Assignment
Transportation AssignmentTransportation Assignment
Transportation Assignment
 
Replacement Theory
Replacement TheoryReplacement Theory
Replacement Theory
 
Queuing Theory
Queuing TheoryQueuing Theory
Queuing Theory
 
Relationship Marketing
Relationship MarketingRelationship Marketing
Relationship Marketing
 
Human Resource Management
Human Resource ManagementHuman Resource Management
Human Resource Management
 

Dernier

Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxUmeshTimilsina1
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17Celine George
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfDr Vijay Vishwakarma
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 

Dernier (20)

Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 

Dynamic Programming

  • 1. Dynamic Programming Operations Research
  • 2. Dynamic programming • Series of inter-related decisions • How to find the combination of most optimal decisions over time? • Production Scheduling, Inventory Control, Warehousing, given changes in demand – How much to produce, store and sell over a period of time 2
  • 3. Sometimes its easier to work backwards from the end! • You are going for an arranged marriage and you have 10 proposals, whom you will meet one after the other. • Once you have rejected a proposal, you cannot get the same girl again! • The current profile may be best or they may be better profiles yet to come . . . • How to decide?
  • 4. A problem along similar lines • Lets say you have 10 tries to receive a random amount between 0 and 100. At each try, you can either accept what you get and quit, or pass to next try. • At each try, when would you accept or reject the value that comes up? • Working backwards, – On the last attempt (assuming you passed 9 times), you will have to take whatever value comes – expected value = 50. – On the second last attempt, you can either accept whatever comes or pass to last attempt where you expect to get 50. So, in second last attempt, if you get more than 50 you should accept, else pass. – On the third last attempt, you can either accept or move to second last attempt, where you expect to get 75 or again pass to last attempt where you expect to get 50. On an average you would expect to get 62.5 over the last two attempts. Therefore, if you get more than 62.5 in third last attempt, you should accept, else pass. – On the 4th last attempt, you can either accept or move to 3rd last attempt where you expect to get 87.5 or pass to 2nd last attempt where you expect to get 75 or pass to last attempt where you expect to get 50. On an average you would expect to get 708 over last 3 attempts. Therefore, if you get more than 708 in 4th last attempt, you should accept, else pass. – And so on . . .
  • 5. Finding Shortest Path Stage 1 Stage 2 Stage 3 Stage 4 Stage 5
  • 7. Stage 3 H I SP Go to E 1+3 4+4 4 H F 6+3 3+4 7 I G 3+3 3+4 6 H Stage E F G SP Go to 4 B 7+4 4+7 6+6 11 E or F C 3+4 2+7 4+6 7 E D 4+4 1+7 5+6 8 E or F Stage B C D SP Go to 5 A 2+11 4+7 2+8 10 D ADEHJ =2+4+1+3=10 ADFIJ = 2+1+3+4=10
  • 8. Bellman’s Principle of Optimality • “An optimal policy has the property that whatever the initial state and initial decision are, the remaining decisions must constitute an optimal policy with regard to the state resulting from the first decision.”