video thumbnail 21:26
5 Simple Steps for Solving Dynamic Programming Problems

2020-08-16

[public] 269K views, 32.0K likes, 208 dislikes audio only

channel thumbReducible

In this video, we go over five steps that you can use as a framework to solve dynamic programming problems. You will see how these steps are applied to two specific dynamic programming problems: the longest increasing subsequence problem and optimal box stacking. The five steps in order are as follows:

1. Visualize examples

2. Find an appropriate subproblem

3. Find relationships among subproblems

4. Generalize the relationship

5. Implement by solving subproblems in order

After taking an in depth look at these problems, at the end of the video we will also have a discussion about common subproblems that you may encounter while solving dynamic programming problems.

Error correction: for the box problem, using dictionary solutions only works if we are given unique boxes -- using a list of subproblems would be a better way to solve it if we wanted to handle duplicate boxes (similar to how we did the longest increasing subsequence).

Support: https://www.patreon.com/reducible

This video wouldn't be possible without the open source manim library created by 3blue1brown: https://github.com/3b1b/manim

Here is link to the repository that contains the code used to generate the animations in this video: https://github.com/nipunramk/Reducible

Music:

Prelude No. 2 by Chris Zabriskie is licensed under a Creative Commons Attribution license (https://creativecommons.org/licenses/by/4.0/)

Source: http://chriszabriskie.com/preludes/

Artist: http://chriszabriskie.com/

All other music by Aakash Gandhi


5 Simple Steps for Solving Any Recursive Problem by Reducible
/youtube/video/ngCos392W4w
Introduction to Graph Theory: A Computer Science Perspective by Reducible
/youtube/video/LFKZLXVO-Dg
Introduction
/youtube/video/aPQY__2H3tE?t=0
Longest Increasing Subsequence Problem
/youtube/video/aPQY__2H3tE?t=61
Finding an Appropriate Subproblem
/youtube/video/aPQY__2H3tE?t=143
Finding Relationships among Subproblems
/youtube/video/aPQY__2H3tE?t=268
Implementation
/youtube/video/aPQY__2H3tE?t=411
Tracking Previous Indices
/youtube/video/aPQY__2H3tE?t=474
Common Subproblems
/youtube/video/aPQY__2H3tE?t=1156
Outro
/youtube/video/aPQY__2H3tE?t=1265
Reducible This channel is all about animating computer science concepts in a fun, interactive, and intuitive manner.
/youtube/channel/UCK8XIGR5kRidIw2fWqwyHRA
The Discrete Fourier Transform: Most Important Algorithm Ever? 24,415 views
/youtube/video/yYEMxqreA10
Patreon patreon.com
https://www.patreon.com/reducible