Notation for Dynamic Programming Algorithms
Here we collect notation related to dyanmic programming algorithms (and the problems they solve).
Subset Sum Problem
Notation | Meaning |
w1,…,wn | The set of all n integers (assume wi>0 for every i∈[n]) |
W | The total bound/budget W≥0. |
S | A subset S⊆[n], what we should output. |
w(S) | Weight of S, defined as ∑i∈Swi. Our goal is to put an S that maximizes w(S). |
OPT(j,B) | Weight of the optimal subset for the numbers w1,…,wj and budget B. |
M | An (W+1)×(n+1) matrix that is computed by the algorithm such that M[B][j]=OPT(j,B). |
Shortest Path Problem
Notation | Meaning |
ce | Given a (directed) graph G=(V,E) where every edge e∈E has a cost ce (which can be negative). |
t | Terminal t∈V. The goal is to find the shorest path from every s∈V to t. |
Negative cycle | A cycle C such that ∑e∈Cce<0. We assume G has no negative cycles. |
OPT(u,i) | Cost of shortest u−t path with at most i edges in it. We are interested in OPT(s,n−1) for every s∈V. |