Brute force over fifty items is out of reach even for a computer, so the certificate comes from a second live computation instead: this book's own dynamic-programming table, run on the same instance, which reaches the same optimal value as the solver.

highlighted = computed this step

Why not brute force

Checking every subset of fifty items means checking two to the fiftieth power candidates, 1125899906842624. Why: unlike the assignment book's 120 permutations or the bin-packing book's 678570 set partitions, both small enough to enumerate exactly, that count is genuinely out of reach — this is the one instance in the track where enumeration is not an option at all, not even as a slow extra check.

250=11258999068426242^{50}=1125899906842624
Fifty-item knapsackRows I1 through I50, each cell showing weight and value.DP optimum 7534 matches solverI1*w7v360I2*w0v83I3w30v59I4*w22v130I5*w80v431I6w94v67I7*w11v230I8w81v52I9w70v93I10w64v125I11*w59v670I12*w18v892I13*w0v600I14w36v38I15*w3v48I16*w8v147I17*w15v78I18*w42v256I19*w9v63I20*w0v17I21w42v120I22*w47v164I23*w52v432I24w32v35I25*w26v92I26w48v110I27w55v22I28*w6v42I29*w29v50I30*w84v323I31*w2v514I32*w4v28I33*w18v87I34w56v73I35*w7v78I36w29v15I37w93v26I38w44v78I39*w71v210I40*w3v36I41w86v85I42*w66v189I43*w31v274I44w65v43I45*w0v33I46w79v10I47w20v19I48*w65v389I49*w52v276I50*w13v312items 50capacity 850DP optimum 7534selected 32weight 850 value 7534

This book's own DP agrees

This book's own dynamic-programming table, run on the same fifty items and the same capacity, reaches the identical optimal value. Why: dynamic programming is pseudo-polynomial — its cost depends on item count times capacity, not on the number of subsets — so it stays exact and fast here even though brute force cannot run at all.

DP optimum=7534=solver objective\text{DP optimum}=7534=\text{solver objective}
Fifty-item knapsackRows I1 through I50, each cell showing weight and value.DP optimum 7534 matches solverI1*w7v360I2*w0v83I3w30v59I4*w22v130I5*w80v431I6w94v67I7*w11v230I8w81v52I9w70v93I10w64v125I11*w59v670I12*w18v892I13*w0v600I14w36v38I15*w3v48I16*w8v147I17*w15v78I18*w42v256I19*w9v63I20*w0v17I21w42v120I22*w47v164I23*w52v432I24w32v35I25*w26v92I26w48v110I27w55v22I28*w6v42I29*w29v50I30*w84v323I31*w2v514I32*w4v28I33*w18v87I34w56v73I35*w7v78I36w29v15I37w93v26I38w44v78I39*w71v210I40*w3v36I41w86v85I42*w66v189I43*w31v274I44w65v43I45*w0v33I46w79v10I47w20v19I48*w65v389I49*w52v276I50*w13v312items 50capacity 850DP optimum 7534selected 32weight 850 value 7534

The selections happen to coincide

On this instance the solver's chosen items and the DP's traceback are the identical set. Why: that agreement is not the certificate and is not guaranteed in general — knapsack can have several optimal subsets at the same value; the certificate is the two independent computations landing on the same value, 7534.

same value, and here the same set\text{same value, and here the same set}
Fifty-item knapsackRows I1 through I50, each cell showing weight and value.DP optimum 7534 matches solverI1*w7v360I2*w0v83I3w30v59I4*w22v130I5*w80v431I6w94v67I7*w11v230I8w81v52I9w70v93I10w64v125I11*w59v670I12*w18v892I13*w0v600I14w36v38I15*w3v48I16*w8v147I17*w15v78I18*w42v256I19*w9v63I20*w0v17I21w42v120I22*w47v164I23*w52v432I24w32v35I25*w26v92I26w48v110I27w55v22I28*w6v42I29*w29v50I30*w84v323I31*w2v514I32*w4v28I33*w18v87I34w56v73I35*w7v78I36w29v15I37w93v26I38w44v78I39*w71v210I40*w3v36I41w86v85I42*w66v189I43*w31v274I44w65v43I45*w0v33I46w79v10I47w20v19I48*w65v389I49*w52v276I50*w13v312items 50capacity 850DP optimum 7534selected 32weight 850 value 7534

The selection fits exactly

The chosen items weigh exactly 850, filling the capacity of 850 with nothing left over. Why: this is a property of this pinned instance, re-verified with this book's own arithmetic on the decoded selection, not an assumption the atom takes on faith.

850=850850=850
Fifty-item knapsackRows I1 through I50, each cell showing weight and value.DP optimum 7534 matches solverI1*w7v360I2*w0v83I3w30v59I4*w22v130I5*w80v431I6w94v67I7*w11v230I8w81v52I9w70v93I10w64v125I11*w59v670I12*w18v892I13*w0v600I14w36v38I15*w3v48I16*w8v147I17*w15v78I18*w42v256I19*w9v63I20*w0v17I21w42v120I22*w47v164I23*w52v432I24w32v35I25*w26v92I26w48v110I27w55v22I28*w6v42I29*w29v50I30*w84v323I31*w2v514I32*w4v28I33*w18v87I34w56v73I35*w7v78I36w29v15I37w93v26I38w44v78I39*w71v210I40*w3v36I41w86v85I42*w66v189I43*w31v274I44w65v43I45*w0v33I46w79v10I47w20v19I48*w65v389I49*w52v276I50*w13v312items 50capacity 850DP optimum 7534selected 32weight 850 value 7534

Diagram note

The highlighted cells are the same decoded selection as the previous lesson; the caption's optimum is recomputed from this book's own DP on every build, not a copied number. Pixel positions are rounded for layout; every number shown is exact.

two independent computations, one value\text{two independent computations, one value}
Fifty-item knapsackRows I1 through I50, each cell showing weight and value.DP optimum 7534 matches solverI1*w7v360I2*w0v83I3w30v59I4*w22v130I5*w80v431I6w94v67I7*w11v230I8w81v52I9w70v93I10w64v125I11*w59v670I12*w18v892I13*w0v600I14w36v38I15*w3v48I16*w8v147I17*w15v78I18*w42v256I19*w9v63I20*w0v17I21w42v120I22*w47v164I23*w52v432I24w32v35I25*w26v92I26w48v110I27w55v22I28*w6v42I29*w29v50I30*w84v323I31*w2v514I32*w4v28I33*w18v87I34w56v73I35*w7v78I36w29v15I37w93v26I38w44v78I39*w71v210I40*w3v36I41w86v85I42*w66v189I43*w31v274I44w65v43I45*w0v33I46w79v10I47w20v19I48*w65v389I49*w52v276I50*w13v312items 50capacity 850DP optimum 7534selected 32weight 850 value 7534