Hi
I’m trying to find an example of an algorithm that will find an optimal set of numbers from a fixed list, which sum will be the closest to a given number. Example:
List of fixed Numbers: “0.147, 0.148, 0.149, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1” and given number is : 1.997” The answer should be :1 + 0.8 + 0.05 + 0.147.
Thanks
I’m trying to find an example of an algorithm that will find an optimal set of numbers from a fixed list, which sum will be the closest to a given number. Example:
List of fixed Numbers: “0.147, 0.148, 0.149, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1” and given number is : 1.997” The answer should be :1 + 0.8 + 0.05 + 0.147.
Thanks