SlideShare uma empresa Scribd logo
1 de 3
DYNAMICDYNAMIC
PROGRAMMIPROGRAMMI
NGNG
Name: MD.Mojibul
Hoque
Roll: 504
Registration: WUB
3/10/23/504
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 sub-problems.
 Unlike divide and conquer, sub-problems are not
independent.
 Sub-problems may share sub-sub-problems,
DYNAMIC PROGRAMMING
 The term Dynamic Programming comes from
Control Theory, not computer science.
Programming refers to the use of tables (arrays)
to construct a solution.
 In dynamic programming we usually reduce time
by increasing the amount of space
 We solve the problem by solving sub-problems of
increasing size and saving each optimal solution
in a table (usually).
 The table is then used for finding the optimal
solution to larger problems.
 Time is saved since each sub-problem is solved
only once.

Mais conteúdo relacionado

Destaque

[ACM-ICPC] 0 - ACM-ICPC
[ACM-ICPC] 0 - ACM-ICPC[ACM-ICPC] 0 - ACM-ICPC
[ACM-ICPC] 0 - ACM-ICPCChih-Hsuan Kuo
 
[ACM-ICPC] Top-down & Bottom-up
[ACM-ICPC] Top-down & Bottom-up[ACM-ICPC] Top-down & Bottom-up
[ACM-ICPC] Top-down & Bottom-upChih-Hsuan Kuo
 
ACM ICPC 2013 NEERC (Northeastern European Regional Contest) Problems Review
ACM ICPC 2013 NEERC (Northeastern European Regional Contest) Problems ReviewACM ICPC 2013 NEERC (Northeastern European Regional Contest) Problems Review
ACM ICPC 2013 NEERC (Northeastern European Regional Contest) Problems ReviewRoman Elizarov
 
[ACM-ICPC] Bipartite Matching
[ACM-ICPC] Bipartite Matching[ACM-ICPC] Bipartite Matching
[ACM-ICPC] Bipartite MatchingChih-Hsuan Kuo
 
[ACM-ICPC] Efficient Algorithm
[ACM-ICPC] Efficient Algorithm[ACM-ICPC] Efficient Algorithm
[ACM-ICPC] Efficient AlgorithmChih-Hsuan Kuo
 
[ACM-ICPC] Minimum Cut
[ACM-ICPC] Minimum Cut[ACM-ICPC] Minimum Cut
[ACM-ICPC] Minimum CutChih-Hsuan Kuo
 
Effective Modern C++ - Item 35 & 36
Effective Modern C++ - Item 35 & 36Effective Modern C++ - Item 35 & 36
Effective Modern C++ - Item 35 & 36Chih-Hsuan Kuo
 
[ACM-ICPC] Binary Search
[ACM-ICPC] Binary Search[ACM-ICPC] Binary Search
[ACM-ICPC] Binary Search陳 鵬宇
 
[ACM-ICPC] Greedy Algorithm
[ACM-ICPC] Greedy Algorithm[ACM-ICPC] Greedy Algorithm
[ACM-ICPC] Greedy Algorithm陳 鵬宇
 
在開始工作以前,我以為我會寫扣。
在開始工作以前,我以為我會寫扣。在開始工作以前,我以為我會寫扣。
在開始工作以前,我以為我會寫扣。Chih-Hsuan Kuo
 
Preventing_Cuts_certificate
Preventing_Cuts_certificatePreventing_Cuts_certificate
Preventing_Cuts_certificateShona Marupo
 
Tanu_Dewan_eTOM
Tanu_Dewan_eTOMTanu_Dewan_eTOM
Tanu_Dewan_eTOMTanu Dewan
 
Az uvegtol az aranyig2
Az uvegtol az aranyig2Az uvegtol az aranyig2
Az uvegtol az aranyig2Agnes Tip
 

Destaque (20)

[ACM-ICPC] 0 - ACM-ICPC
[ACM-ICPC] 0 - ACM-ICPC[ACM-ICPC] 0 - ACM-ICPC
[ACM-ICPC] 0 - ACM-ICPC
 
[ACM-ICPC] Top-down & Bottom-up
[ACM-ICPC] Top-down & Bottom-up[ACM-ICPC] Top-down & Bottom-up
[ACM-ICPC] Top-down & Bottom-up
 
ACM ICPC 2013 NEERC (Northeastern European Regional Contest) Problems Review
ACM ICPC 2013 NEERC (Northeastern European Regional Contest) Problems ReviewACM ICPC 2013 NEERC (Northeastern European Regional Contest) Problems Review
ACM ICPC 2013 NEERC (Northeastern European Regional Contest) Problems Review
 
[ACM-ICPC] Bipartite Matching
[ACM-ICPC] Bipartite Matching[ACM-ICPC] Bipartite Matching
[ACM-ICPC] Bipartite Matching
 
[ACM-ICPC] Efficient Algorithm
[ACM-ICPC] Efficient Algorithm[ACM-ICPC] Efficient Algorithm
[ACM-ICPC] Efficient Algorithm
 
[ACM-ICPC] Minimum Cut
[ACM-ICPC] Minimum Cut[ACM-ICPC] Minimum Cut
[ACM-ICPC] Minimum Cut
 
[ACM-ICPC] Traversal
[ACM-ICPC] Traversal[ACM-ICPC] Traversal
[ACM-ICPC] Traversal
 
Effective Modern C++ - Item 35 & 36
Effective Modern C++ - Item 35 & 36Effective Modern C++ - Item 35 & 36
Effective Modern C++ - Item 35 & 36
 
[ACM-ICPC] Binary Search
[ACM-ICPC] Binary Search[ACM-ICPC] Binary Search
[ACM-ICPC] Binary Search
 
[ACM-ICPC] Greedy Algorithm
[ACM-ICPC] Greedy Algorithm[ACM-ICPC] Greedy Algorithm
[ACM-ICPC] Greedy Algorithm
 
在開始工作以前,我以為我會寫扣。
在開始工作以前,我以為我會寫扣。在開始工作以前,我以為我會寫扣。
在開始工作以前,我以為我會寫扣。
 
Lafontaine_Alexandre_2016_Thesis
Lafontaine_Alexandre_2016_ThesisLafontaine_Alexandre_2016_Thesis
Lafontaine_Alexandre_2016_Thesis
 
Preventing_Cuts_certificate
Preventing_Cuts_certificatePreventing_Cuts_certificate
Preventing_Cuts_certificate
 
Tp tics
Tp ticsTp tics
Tp tics
 
La Robótica. El CHAUX
La Robótica. El CHAUXLa Robótica. El CHAUX
La Robótica. El CHAUX
 
Lição 5
Lição 5Lição 5
Lição 5
 
Examen
ExamenExamen
Examen
 
Tanu_Dewan_eTOM
Tanu_Dewan_eTOMTanu_Dewan_eTOM
Tanu_Dewan_eTOM
 
Az uvegtol az aranyig2
Az uvegtol az aranyig2Az uvegtol az aranyig2
Az uvegtol az aranyig2
 
Sonsda nova tie correto
Sonsda nova tie corretoSonsda nova tie correto
Sonsda nova tie correto
 

Semelhante a Dynamic programming

Introduction to Dynamic Programming, Principle of Optimality
Introduction to Dynamic Programming, Principle of OptimalityIntroduction to Dynamic Programming, Principle of Optimality
Introduction to Dynamic Programming, Principle of OptimalityBhavin Darji
 
Introduction to dynamic programming
Introduction to dynamic programmingIntroduction to dynamic programming
Introduction to dynamic programmingAmisha Narsingani
 
Module 2ppt.pptx divid and conquer method
Module 2ppt.pptx divid and conquer methodModule 2ppt.pptx divid and conquer method
Module 2ppt.pptx divid and conquer methodJyoReddy9
 
Divide and conquer algorithm
Divide and conquer algorithmDivide and conquer algorithm
Divide and conquer algorithmCHANDAN KUMAR
 
Dynamic programming, Branch and bound algorithm & Greedy algorithms
Dynamic programming, Branch and bound algorithm & Greedy algorithms Dynamic programming, Branch and bound algorithm & Greedy algorithms
Dynamic programming, Branch and bound algorithm & Greedy algorithms SURBHI SAROHA
 
Algorithms Design Patterns
Algorithms Design PatternsAlgorithms Design Patterns
Algorithms Design PatternsAshwin Shiv
 
Dynamic programming 2
Dynamic programming 2Dynamic programming 2
Dynamic programming 2Roy Thomas
 
Dynamic Programming.pptx
Dynamic Programming.pptxDynamic Programming.pptx
Dynamic Programming.pptxMuktarHossain13
 
Algorithm Design Technique
Algorithm Design Technique Algorithm Design Technique
Algorithm Design Technique Bharat Bhushan
 
3. CPT121 - Introduction to Problem Solving - Module 1 - Unit 3.pptx
3. CPT121 - Introduction to Problem Solving - Module 1 - Unit 3.pptx3. CPT121 - Introduction to Problem Solving - Module 1 - Unit 3.pptx
3. CPT121 - Introduction to Problem Solving - Module 1 - Unit 3.pptxAgoyi1
 
csce411-set7.ppt
csce411-set7.pptcsce411-set7.ppt
csce411-set7.pptJoshCasas1
 
Session 3 : Competitive programming 1
Session 3 : Competitive programming 1Session 3 : Competitive programming 1
Session 3 : Competitive programming 1Koderunners
 
CH-1.1 Introduction (1).pptx
CH-1.1 Introduction (1).pptxCH-1.1 Introduction (1).pptx
CH-1.1 Introduction (1).pptxsatvikkushwaha1
 

Semelhante a Dynamic programming (20)

Introduction to Dynamic Programming, Principle of Optimality
Introduction to Dynamic Programming, Principle of OptimalityIntroduction to Dynamic Programming, Principle of Optimality
Introduction to Dynamic Programming, Principle of Optimality
 
ADA Unit 2.pptx
ADA Unit 2.pptxADA Unit 2.pptx
ADA Unit 2.pptx
 
Introduction to dynamic programming
Introduction to dynamic programmingIntroduction to dynamic programming
Introduction to dynamic programming
 
Pintu ram
Pintu ramPintu ram
Pintu ram
 
Module 2ppt.pptx divid and conquer method
Module 2ppt.pptx divid and conquer methodModule 2ppt.pptx divid and conquer method
Module 2ppt.pptx divid and conquer method
 
Algorithm1
Algorithm1Algorithm1
Algorithm1
 
Algorithm1
Algorithm1Algorithm1
Algorithm1
 
Divide and conquer algorithm
Divide and conquer algorithmDivide and conquer algorithm
Divide and conquer algorithm
 
Top down design
Top down designTop down design
Top down design
 
Dynamic programming, Branch and bound algorithm & Greedy algorithms
Dynamic programming, Branch and bound algorithm & Greedy algorithms Dynamic programming, Branch and bound algorithm & Greedy algorithms
Dynamic programming, Branch and bound algorithm & Greedy algorithms
 
Algorithms Design Patterns
Algorithms Design PatternsAlgorithms Design Patterns
Algorithms Design Patterns
 
Dynamic programming 2
Dynamic programming 2Dynamic programming 2
Dynamic programming 2
 
Dynamic Programming.pptx
Dynamic Programming.pptxDynamic Programming.pptx
Dynamic Programming.pptx
 
Dynamic Programming
Dynamic ProgrammingDynamic Programming
Dynamic Programming
 
Algorithm Design Technique
Algorithm Design Technique Algorithm Design Technique
Algorithm Design Technique
 
3. CPT121 - Introduction to Problem Solving - Module 1 - Unit 3.pptx
3. CPT121 - Introduction to Problem Solving - Module 1 - Unit 3.pptx3. CPT121 - Introduction to Problem Solving - Module 1 - Unit 3.pptx
3. CPT121 - Introduction to Problem Solving - Module 1 - Unit 3.pptx
 
csce411-set7.ppt
csce411-set7.pptcsce411-set7.ppt
csce411-set7.ppt
 
Session 3 : Competitive programming 1
Session 3 : Competitive programming 1Session 3 : Competitive programming 1
Session 3 : Competitive programming 1
 
DP Project Report
DP Project ReportDP Project Report
DP Project Report
 
CH-1.1 Introduction (1).pptx
CH-1.1 Introduction (1).pptxCH-1.1 Introduction (1).pptx
CH-1.1 Introduction (1).pptx
 

Mais de Md.Mojibul Hoque

Mais de Md.Mojibul Hoque (11)

Facebook Marketing
Facebook Marketing Facebook Marketing
Facebook Marketing
 
Surela
SurelaSurela
Surela
 
Harvard University database
Harvard University databaseHarvard University database
Harvard University database
 
Business level strategy
Business level strategyBusiness level strategy
Business level strategy
 
Establishing objectives
Establishing objectivesEstablishing objectives
Establishing objectives
 
Value chain and SWOT analysis
Value chain and SWOT analysisValue chain and SWOT analysis
Value chain and SWOT analysis
 
Ms sql-server
Ms sql-serverMs sql-server
Ms sql-server
 
University Student Payment System ( USPS )
University Student Payment System ( USPS )University Student Payment System ( USPS )
University Student Payment System ( USPS )
 
Code smells and remedies
Code smells and remediesCode smells and remedies
Code smells and remedies
 
Software design principles
Software design principlesSoftware design principles
Software design principles
 
Writing a research report
Writing a research reportWriting a research report
Writing a research report
 

Último

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 

Último (20)

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 

Dynamic programming

  • 2. 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 sub-problems.  Unlike divide and conquer, sub-problems are not independent.  Sub-problems may share sub-sub-problems,
  • 3. DYNAMIC PROGRAMMING  The term Dynamic Programming comes from Control Theory, not computer science. Programming refers to the use of tables (arrays) to construct a solution.  In dynamic programming we usually reduce time by increasing the amount of space  We solve the problem by solving sub-problems of increasing size and saving each optimal solution in a table (usually).  The table is then used for finding the optimal solution to larger problems.  Time is saved since each sub-problem is solved only once.