Skip to main content

Dynamic Programming and Applications


This is a workshop on the dynmaic programming paradigm and its applications over a range of topics.


Dynamic programming (DP) is a widely used idea in computer science: you break a hard problem into smaller overlapping sub-problems and build the answer from their solutions. The same idea aligns DNA (or string) sequences, finds shortest routes through networks, decodes hidden structure in biological data, and is used in reinforcement learning.

This workshop (designed for five days) shows how Bellman’s principle of optimality ties all of these together. We start with the foundations: memoization, tabulation, complexity analysis, the knapsack problem, and shortest-path algorithms such as Dijkstra and Bellman-Ford. We then turn to applications in bioinformatics (one of the biggest areas using DP): global and local sequence alignment, and hidden Markov models with the Viterbi and forward-backward algorithms. In the second half, we add uncertainty, advancing to stochastic dynamic programming and Markov decision processes. The workshop ends with reinforcement learning, where the same equations are solved from experience instead of from a known model.

Each day has two lectures (roughly 90 minutes) and two hands-on practical sessions that mix pen-and-paper derivations with implementation in Python. By the end, participants will have built a toolkit of core algorithms from scratch. They will also understand when DP applies, how to design a DP solution, and how far it scales.

Prerequisites: basic Python or general familiarity with programming, some familiarity with probability and maths.

Tentative schedule: 5 non-consecutive days in January and February 2027

What is DP?

What is DP

What is DP, taken from Eddy (2004).

Hosted by:
Lars Berling
MAGPIE group, SFU Maths