The Story Behind the Name: Dynamic Programming

Arguably, the most feared technical interview topic for software engineers is dynamic programming or DP. The technique itself is elusive. It is hard to learn on your own and it is rarely taught well.

When I was a kid, I also feared to see a dynamic programming problem in a coding competition as I was not well-versed on the topic. I knew the theory and I knew how to solve the classic problems, but I couldn’t always apply my knowledge to dynamic programming problems where the solution wasn’t obvious.

What confused me even more than the topic itself is the name dynamic programming. In what sense is it dynamic? Why programming? Isn’t it what we do with computers anyways? In the field where people take naming seriously, this name falls short significantly. It sounds too generic, catch-all kind of phrase that doesn’t give a clue about the concept itself.

It turns out, that was intentional.

Richard Bellman, the creator of dynamic programming, shared an interesting anecdote in his autobiography, Eye of the Hurricane. When Bellman was working on the concept, he was afraid that his work wouldn’t get funded as the people in charge of funding at the time didn’t want to fund research projects, even less so mathematical research projects. So he chose a name for his research topic that was intentionally vague so that the bureaucrats woudn’t cut it from the budget. And thanks to his ingenuity, we now have dynamic programming and the Bellman equation. The story doesn’t make the name any clearer, but if that was the only way he could do his research, then I guess it’s a small price for all of us to pay.

I am yet to meet a dynamic programming problem in the wild, either in a competition or in an interview, but I still find the topic fascinating. I keep my DP problem-solving skills sharp and I’ve largely overcome my fear of it. In a world as dynamic as ours, it’s hard to predict when you’ll need to dynamically program your way out of a problem!