--- title: "Limitations of Dynamic Programming" format: html: toc: true number-sections: true code-line-numbers: true --- [In-class notes](hand_written_notes/DP_limits2.pdf) ## Learning Goals - Assess whether $\mathbb{Z}, \mathbb{R}$, etc choices impact dynamic programming runtime correctness ## The Problem with Real Numbers Recall the Knapsack problem ::: {.callout-note title="Knapsack Problem Definition" appearance="simple"} **Input:** - $n$ items where * $v_i\in \mathbb{N}$ is the value of the $i^\textrm{th}$ item. * $w_i\in \mathbb{N}$ is the weight of the $i^\textrm{th}$ item. - $W\in \mathbb{N}$, the capacity, or maximum allowed weight of the knapsack. **Output:** $S\subseteq [n]$ * $V(S)=\sum_{i\in S}v_i$ is maximized. * $W(S)=\sum_{i\in S}w_i