19 March 2018 2:23:31.752 PM SUBSET_SUM_TEST: FORTRAN90 version Test the SUBSET_SUM library. 19 March 2018 2:23:31.752 PM SUBSET_SUM_COUNT_TESTS: SUBSET_SUM_COUNT_TEST calls SUBSET_SUM_COUNT with a particular set of problem data. SUBSET_SUM_COUNT_TEST: SUBSET_SUM_COUNT_TEST counts solutions to the subset sum problem. Target value T = 53 I W(I) 1 15 2 22 3 14 4 26 5 32 6 9 7 16 8 8 Searching from IND_MIN = 0 through IND_MAX = 255 Number of solutions = 3 SUBSET_SUM_COUNT_TEST: SUBSET_SUM_COUNT_TEST counts solutions to the subset sum problem. Target value T = 53 I W(I) 1 15 2 22 3 14 4 26 5 32 6 9 7 16 8 8 Searching from IND_MIN = 68 through IND_MAX = 255 Number of solutions = 2 SUBSET_SUM_COUNT_TEST: SUBSET_SUM_COUNT_TEST counts solutions to the subset sum problem. Target value T = 53 I W(I) 1 15 2 22 3 14 4 26 5 32 6 9 7 16 8 8 Searching from IND_MIN = 167 through IND_MAX = 255 Number of solutions = 1 SUBSET_SUM_COUNT_TEST: SUBSET_SUM_COUNT_TEST counts solutions to the subset sum problem. Target value T = 5842 I W(I) 1 267 2 493 3 869 4 961 5 1000 6 1153 7 1246 8 1598 9 1766 10 1922 Searching from IND_MIN = 0 through IND_MAX = 1023 Number of solutions = 1 SUBSET_SUM_COUNT_TEST: SUBSET_SUM_COUNT_TEST counts solutions to the subset sum problem. Target value T = 2463098 I W(I) 1 518533 2 1037066 3 2074132 4 1648264 5 796528 6 1593056 7 686112 8 1372224 9 244448 10 488896 11 977792 12 1955584 13 1411168 14 322336 15 644672 16 1289344 17 78688 18 157376 19 314752 20 629504 21 1259008 Searching from IND_MIN = 0 through IND_MAX = 2097151 Number of solutions = 1 SUBSET_SUM_COUNT_TEST: SUBSET_SUM_COUNT_TEST counts solutions to the subset sum problem. Target value T = 50 I W(I) 1 41 2 34 3 21 4 20 5 8 6 7 7 7 8 4 9 3 10 3 Searching from IND_MIN = 0 through IND_MAX = 1023 Number of solutions = 2 SUBSET_SUM_COUNT_TEST: SUBSET_SUM_COUNT_TEST counts solutions to the subset sum problem. Target value T = 100 I W(I) 1 81 2 80 3 43 4 40 5 30 6 26 7 12 8 11 9 9 Searching from IND_MIN = 0 through IND_MAX = 511 Number of solutions = 1 SUBSET_SUM_COUNT_TEST: SUBSET_SUM_COUNT_TEST counts solutions to the subset sum problem. Target value T = 22 I W(I) 1 1 2 2 3 4 4 8 5 16 6 32 Searching from IND_MIN = 0 through IND_MAX = 63 Number of solutions = 1 SUBSET_SUM_COUNT_TEST: SUBSET_SUM_COUNT_TEST counts solutions to the subset sum problem. Target value T = 50 I W(I) 1 25 2 27 3 3 4 12 5 6 6 15 7 9 8 30 9 21 10 19 Searching from IND_MIN = 0 through IND_MAX = 1023 Number of solutions = 1 SUBSET_SUM_FIND_TESTS: SUBSET_SUM_FIND_TEST calls SUBSET_SUM_FIND with a particular set of problem data. SUBSET_SUM_FIND_TEST: SUBSET_SUM_FIND seeks a subset of W that sums to T. Target value T = 53 I W(I) 1 15 2 22 3 14 4 26 5 32 6 9 7 16 8 8 Searching from IND_MIN = 0 through IND_MAX = 255 Solution index = 67 I W(I) C(I) 1 15 1 2 22 1 3 14 0 4 26 0 5 32 0 6 9 0 7 16 1 8 8 0 SUBSET_SUM_FIND_TEST: SUBSET_SUM_FIND seeks a subset of W that sums to T. Target value T = 53 I W(I) 1 15 2 22 3 14 4 26 5 32 6 9 7 16 8 8 Searching from IND_MIN = 68 through IND_MAX = 255 Solution index = 166 I W(I) C(I) 1 15 0 2 22 1 3 14 1 4 26 0 5 32 0 6 9 1 7 16 0 8 8 1 SUBSET_SUM_FIND_TEST: SUBSET_SUM_FIND seeks a subset of W that sums to T. Target value T = 53 I W(I) 1 15 2 22 3 14 4 26 5 32 6 9 7 16 8 8 Searching from IND_MIN = 167 through IND_MAX = 255 Solution index = 197 I W(I) C(I) 1 15 1 2 22 0 3 14 1 4 26 0 5 32 0 6 9 0 7 16 1 8 8 1 SUBSET_SUM_FIND_TEST: SUBSET_SUM_FIND seeks a subset of W that sums to T. Target value T = 5842 I W(I) 1 267 2 493 3 869 4 961 5 1000 6 1153 7 1246 8 1598 9 1766 10 1922 Searching from IND_MIN = 0 through IND_MAX = 1023 Solution index = 348 I W(I) C(I) 1 267 0 2 493 0 3 869 1 4 961 1 5 1000 1 6 1153 0 7 1246 1 8 1598 0 9 1766 1 10 1922 0 SUBSET_SUM_FIND_TEST: SUBSET_SUM_FIND seeks a subset of W that sums to T. Target value T = 2463098 I W(I) 1 518533 2 1037066 3 2074132 4 1648264 5 796528 6 1593056 7 686112 8 1372224 9 244448 10 488896 11 977792 12 1955584 13 1411168 14 322336 15 644672 16 1289344 17 78688 18 157376 19 314752 20 629504 21 1259008 Searching from IND_MIN = 0 through IND_MAX = 2097151 Solution index = 524306 I W(I) C(I) 1 518533 0 2 1037066 1 3 2074132 0 4 1648264 0 5 796528 1 6 1593056 0 7 686112 0 8 1372224 0 9 244448 0 10 488896 0 11 977792 0 12 1955584 0 13 1411168 0 14 322336 0 15 644672 0 16 1289344 0 17 78688 0 18 157376 0 19 314752 0 20 629504 1 21 1259008 0 SUBSET_SUM_FIND_TEST: SUBSET_SUM_FIND seeks a subset of W that sums to T. Target value T = 50 I W(I) 1 41 2 34 3 21 4 20 5 8 6 7 7 7 8 4 9 3 10 3 Searching from IND_MIN = 0 through IND_MAX = 1023 Solution index = 500 I W(I) C(I) 1 41 0 2 34 0 3 21 1 4 20 0 5 8 1 6 7 1 7 7 1 8 4 1 9 3 1 10 3 0 SUBSET_SUM_FIND_TEST: SUBSET_SUM_FIND seeks a subset of W that sums to T. Target value T = 100 I W(I) 1 81 2 80 3 43 4 40 5 30 6 26 7 12 8 11 9 9 Searching from IND_MIN = 0 through IND_MAX = 511 Solution index = 386 I W(I) C(I) 1 81 0 2 80 1 3 43 0 4 40 0 5 30 0 6 26 0 7 12 0 8 11 1 9 9 1 SUBSET_SUM_FIND_TEST: SUBSET_SUM_FIND seeks a subset of W that sums to T. Target value T = 22 I W(I) 1 1 2 2 3 4 4 8 5 16 6 32 Searching from IND_MIN = 0 through IND_MAX = 63 Solution index = 22 I W(I) C(I) 1 1 0 2 2 1 3 4 1 4 8 0 5 16 1 6 32 0 SUBSET_SUM_FIND_TEST: SUBSET_SUM_FIND seeks a subset of W that sums to T. Target value T = 50 I W(I) 1 25 2 27 3 3 4 12 5 6 6 15 7 9 8 30 9 21 10 19 Searching from IND_MIN = 0 through IND_MAX = 1023 Solution index = 529 I W(I) C(I) 1 25 1 2 27 0 3 3 0 4 12 0 5 6 1 6 15 0 7 9 0 8 30 0 9 21 0 10 19 1 SUBSET_SUM_NEXT_TESTS: SUBSET_SUM_NEXT_TEST solves the subset sum problem for specific values of S, N and V. SUBSET_SUM_NEXT_TEST: SUBSET_SUM_NEXT finds the "next" subset of the values V which sum to the desired total S. Desired sum S = 9 Number of targets = 5 Targets: 1 2 3 5 7 1: 9 = 1 + 3 + 5 2: 9 = 2 + 7 SUBSET_SUM_NEXT_TEST: SUBSET_SUM_NEXT finds the "next" subset of the values V which sum to the desired total S. Desired sum S = 8 Number of targets = 9 Targets: 1 2 3 4 5 6 7 8 9 1: 8 = 1 + 2 + 5 2: 8 = 1 + 3 + 4 3: 8 = 1 + 7 4: 8 = 2 + 6 5: 8 = 3 + 5 6: 8 = 8 SUBSET_SUM_NEXT_TEST: SUBSET_SUM_NEXT finds the "next" subset of the values V which sum to the desired total S. Desired sum S = 8 Number of targets = 9 Targets: 1 2 3 3 5 6 7 8 9 1: 8 = 1 + 2 + 5 2: 8 = 1 + 7 3: 8 = 2 + 3 + 3 4: 8 = 2 + 6 5: 8 = 3 + 5 6: 8 = 3 + 5 7: 8 = 8 SUBSET_SUM_NEXT_TEST: SUBSET_SUM_NEXT finds the "next" subset of the values V which sum to the desired total S. Desired sum S = 18 Number of targets = 5 Targets: 1 2 3 5 7 1: 18 = 1 + 2 + 3 + 5 + 7 SUBSET_SUM_NEXT_TEST: SUBSET_SUM_NEXT finds the "next" subset of the values V which sum to the desired total S. Desired sum S = 5842 Number of targets = 10 Targets: 267 493 869 961 1000 1153 1246 1598 1766 1922 1: 5842 = 869 + 961 + 1000 + 1246 + 1766 SUBSET_SUM_NEXT_TESTS: Normal end of execution. SUBSET_SUM_TABLE_TESTS: SUBSET_SUM_TABLE_TEST calls SUBSET_SUM_TABLE with a particular set of problem data. SUBSET_SUM_TABLE_TEST: SUBSET_SUM_TABLE seeks a subset of W that sums to T. Target value T = 53 I W(I) 1 15 2 22 3 14 4 26 5 32 6 9 7 16 8 8 53 = 16 + 22 + 15 SUBSET_SUM_TABLE_TEST: SUBSET_SUM_TABLE seeks a subset of W that sums to T. Target value T = 5842 I W(I) 1 267 2 493 3 869 4 961 5 1000 6 1153 7 1246 8 1598 9 1766 10 1922 5842 = 1766 + 1246 + 1000 + 961 + 869 SUBSET_SUM_TABLE_TEST: SUBSET_SUM_TABLE seeks a subset of W that sums to T. Target value T = 2463098 I W(I) 1 518533 2 1037066 3 2074132 4 1648264 5 796528 6 1593056 7 686112 8 1372224 9 244448 10 488896 11 977792 12 1955584 13 1411168 14 322336 15 644672 16 1289344 17 78688 18 157376 19 314752 20 629504 21 1259008 2463098 = 629504 + 796528 + 1037066 SUBSET_SUM_TABLE_TEST: SUBSET_SUM_TABLE seeks a subset of W that sums to T. Target value T = 50 I W(I) 1 41 2 34 3 21 4 20 5 8 6 7 7 7 8 4 9 3 10 3 50 = 3 + 4 + 7 + 7 + 8 + 21 SUBSET_SUM_TABLE_TEST: SUBSET_SUM_TABLE seeks a subset of W that sums to T. Target value T = 100 I W(I) 1 81 2 80 3 43 4 40 5 30 6 26 7 12 8 11 9 9 100 = 9 + 11 + 80 SUBSET_SUM_TABLE_TEST: SUBSET_SUM_TABLE seeks a subset of W that sums to T. Target value T = 22 I W(I) 1 1 2 2 3 4 4 8 5 16 6 32 22 = 16 + 4 + 2 SUBSET_SUM_TABLE_TEST: SUBSET_SUM_TABLE seeks a subset of W that sums to T. Target value T = 50 I W(I) 1 25 2 27 3 3 4 12 5 6 6 15 7 9 8 30 9 21 10 19 50 = 19 + 6 + 25 SUBSET_SUM_TEST Normal end of execution. 19 March 2018 2:23:32.019 PM