Knapsack problem branch and bound, dynamic FPTAS and genetic algorithm implementation in Ruby