09 May 2025 9:16:50.770 PM knapsack_random_test(): Fortran90 version Test knapsack_random() subset_random_test(): Test subset_random() Subsets will be of size n = 5 10: 0 1 0 1 0 7: 0 0 1 1 1 2: 0 0 0 1 0 9: 0 1 0 0 1 2: 0 0 0 1 0 9: 0 1 0 0 1 17: 1 0 0 0 1 18: 1 0 0 1 0 22: 1 0 1 1 0 22: 1 0 1 1 0 knapsack_random_test01(): knapsack_random() randomly selects a subset of n items and considers it as a solution to a knapsack problem. Maximize profit without exceeding weight limit. Number of items is 5 Value array: 1: 24 2: 13 3: 23 4: 15 5: 16 Weight array: 1: 12 2: 7 3: 11 4: 8 5: 9 Weight limit is 26 Selected items: 1: 0 2: 1 3: 1 4: 0 5: 0 Weight 18 Value 36 Ratio 2.00 Selected items: 1: 1 2: 1 3: 1 4: 0 5: 0 Weight 30 exceeds weight limit 26 Selected items: 1: 1 2: 1 3: 1 4: 0 5: 1 Weight 39 exceeds weight limit 26 Selected items: 1: 0 2: 1 3: 0 4: 0 5: 0 Weight 7 Value 13 Ratio 1.86 Selected items: 1: 0 2: 1 3: 0 4: 1 5: 1 Weight 24 Value 44 Ratio 1.83 Selected items: 1: 0 2: 0 3: 0 4: 0 5: 0 Weight 0 Value 0 Ratio 0.00 Selected items: 1: 1 2: 0 3: 1 4: 0 5: 0 Weight 23 Value 47 Ratio 2.04 Selected items: 1: 0 2: 0 3: 0 4: 0 5: 0 Weight 0 Value 0 Ratio 0.00 Selected items: 1: 1 2: 1 3: 1 4: 1 5: 0 Weight 38 exceeds weight limit 26 Selected items: 1: 0 2: 0 3: 0 4: 0 5: 0 Weight 0 Value 0 Ratio 0.00 knapsack_random_test(): Normal end of execution.