Read Chapters 5, 6
(A, U, C, G)
3 rules:
Question: What's the maximum number of bonds given these conditions?
Note that there are at most $n^2$ bonds.
$\mathrm{OPT}(i,\,j) \quad i<j$
$\mathrm{OPT}(i,\,j) = 0\quad i \geq j - 4$
Take the maximum of:
$\mathrm{OPT}(i,\, j- 1)$ $\mathrm{MAX}_{i\leq t\leq j}(1 + \mathrm{OPT}(i,\,t-1) + \mathrm{OPT}(t+1, j-1))$
Time: $O(N^3)$
Let $x = ``acbaddfg"$
Let $y=``azzb”$