Feb 12, 2019 19:56:40

# FT6 Dynamic Programming

I am writing about Dynamic Programming as 6th Feynman Technique post today. When you hear about the word, do you come up with the questions like "what is that?", "Why dynamic?",  "Are there any static programming"? etc. I hope I can answer these questions today.

Dynamic Programming is a way of solving a mathematical or computer science problem by decomposing one big problem into smaller pieces, obtaining solutions for each of smaller problems, and then composing these solutions into the solution for the big original problem.

For example, as a clerk at a Boba shop that teems people, let's say you need to count up the number of people in a line waiting for a cup of Boba tea. If you start to count from the beginning to the end one by one, you will get the number 78 at the end. Now, two people come into the queue. So what is the current number of people in the queue? The answer is 78+2 people. You do not have to start from scratch as long as you remember the number.

So, dynamic programming is similarly the way to save the complex computation by dividing the problem into smaller ones and memorizing the solution for smaller ones.

While I start to write this, I found "How should I explain dynamic programming to a 4-year-old?", the amazing example of how to explain dynamic programming in Quora and tried to get the essence of it.

- Hiro

***

Grammarly: 7

Word of the day: teem

contact: email - twitter / Terms / Privacy