I have a recurrece equation
Changed notations: $\qquad\displaystyle G(W) = \max \{ G(W - s_i) + v_i \mid 0 \leq i \leq n, w_i \leq W \}$,
I am not sure if I understand $\ w_i $ correctly.
On each iteration my $ w_i \leq W $ . So my $ w_i $ will be previous $ W-s_i $ since G takes one argument?