Greedy method Solve X=(2,36,13,27,52)ands=70 s>52? Yes zb1.s1=70-52=18 18>27?No=>b;=0 ·18>13?Yes=>bA=1.s2=18-13=5 5>6?No=>b2=0 5>3?Yes=>b2=1,S2=5-3=2 B=(12120,1,0,1)7 Greedy Method • Solve X = (2,3,6,13,27,52 ) and s = 70 • s > 52? Yes ==> b6 = 1, s1 = 70 - 52 = 18 • 18 > 27? No ==> b5 = 0 • 18 > 13? Yes ==> b4 = 1, s2 = 18 - 13 = 5 • 5 > 6? No ==> b3 = 0 • 5> 3? Yes ==> b2 = 1, s2 = 5 - 3 = 2 • b1= 1 • B = (1,1,0,1,0,1)