Welcome to our community

Be a part of something great, join today!

Fractional knapsack

evinda

Well-known member
MHB Site Helper
Apr 13, 2013
3,723
Hello!!! (Wave)

I found the following algorithm for the fractional knapsack problem.

fractional_knapsack.PNG



Why at the case else, we do not change the variable w to w+(W-w)/S.weight? (Thinking)
 

Evgeny.Makarov

Well-known member
MHB Math Scholar
Jan 30, 2012
2,502
Why at the case else, we do not change the variable w to w+(W-w)/S.weight?
That would be adding a dimensionless number to pounds.