134x Filetype PDF File size 1.20 MB Source: riptutorial.com
dynamic-programming
#dynamic-
programmin
g
Table of Contents
About 1
Chapter 1: Getting started with dynamic-programming 2
Remarks 2
Examples 2
Introduction To Dynamic Programming 2
Understanding State in Dynamic Programming 4
Constructing a DP Solution 6
Chapter 2: Coin Changing Problem 11
Examples 11
Number of Ways to Get Total 11
Minimum Number of Coins to Get Total 12
Chapter 3: Dynamic Time Warping 16
Examples 16
Introduction To Dynamic Time Warping 16
Chapter 4: Knapsack Problem 20
Remarks 20
Examples 20
0-1 Knapsack Problem 20
Chapter 5: Matrix Chain Multiplication 25
Examples 25
Recursive Solution 25
Chapter 6: Rod Cutting 28
Examples 28
Cutting the Rod to get the maximum profit 28
Chapter 7: Solving Graph Problems Using Dynamic Programming 31
Examples 31
Floyd-Warshall Algorithm 31
Minimum Vertex Cover 33
Chapter 8: Subsequence Related Algorithms 38
Examples 38
Longest Common Subsequence 38
Longest Increasing Subsequence 42
Longest Palindromic Subsequence 46
Chapter 9: Weighted Activity Selection 49
Examples 49
Weighted Job Scheduling Algorithm 49
Credits 54
About
You can share this PDF with anyone you feel could benefit from it, downloaded the latest version
from: dynamic-programming
It is an unofficial and free dynamic-programming ebook created for educational purposes. All the
content is extracted from Stack Overflow Documentation, which is written by many hardworking
individuals at Stack Overflow. It is neither affiliated with Stack Overflow nor official dynamic-
programming.
The content is released under Creative Commons BY-SA, and the list of contributors to each
chapter are provided in the credits section at the end of this book. Images may be copyright of
their respective owners unless otherwise specified. All trademarks and registered trademarks are
the property of their respective company owners.
Use the content presented in this book at your own risk; it is not guaranteed to be correct nor
accurate, please send your feedback and corrections to info@zzzprojects.com
https://riptutorial.com/ 1
no reviews yet
Please Login to review.