Discussion 4 - Black 1. Answered HW questions (mostly just clarifications) 2. Did coin-changing problem with coin denominations 1, 3, 8, and 17 Question: what is the min # coins with which we can make T cents? Let v_i be the value of coin i. Let C(t, i) be the min number of coins required to make t cents using only coins 1 thru i. C(t,i) = min{C(t, i-1), C(t-v_i,i)+1} Or (Rogaway's method): C(t) = 1 + min{C(t-1), C(t-3), C(t-8), C(t-17)} (these are roughly equivalent methods) Now we build a table: 0 1 2 3 4 5 6 7 8 9 <--- cents from 0 to 9 -------------------------------- 1 0 1 2 3 4 5 6 7 8 9 3 0 1 2 1 2 3 2 3 4 3 8 0 1 2 1 2 3 2 3 1 2 17 0 1 2 1 2 3 2 3 1 2