16-May-2025 09:25:36 toms515_test() MATLAB/Octave version 6.4.0 Test toms515() toms515_test01(): comb() generates all K-subsets of an N set. K = 3 N = 5 LMAX = 10 1: 1 2 3 2: 1 2 4 3: 1 2 5 4: 1 3 4 5: 1 3 5 6: 1 4 5 7: 2 3 4 8: 2 3 5 9: 2 4 5 10: 3 4 5 ;toms515_test02(): comb() generates all K-subsets of an N set. K = 3 N = 5 LMAX = 10 2: 1 2 4 5: 1 3 5 4: 1 3 4 2: 1 2 4 5: 1 3 5 8: 2 3 5 6: 1 4 5 5: 1 3 5 10: 3 4 5 2: 1 2 4 toms515_test03(): comb() generates 10 random K-subsets of an N set. K = 3 N = 25 LMAX = 2300 1590: 8 17 23 1820: 10 18 21 1737: 9 22 25 721: 3 16 22 1052: 5 10 22 270: 1 21 25 2295: 21 23 25 2177: 15 22 25 1798: 10 15 23 630: 3 9 15 lmax = 161700 toms515_test04(): comb() generates 10 random K-subsets of an N set. K = 3 N = 100 LMAX = 161700 9668: 3 4 68 99572: 28 29 97 131944: 43 68 100 67517: 17 32 76 7317: 2 32 91 102295: 29 33 61 150555: 59 69 80 76181: 19 80 91 121097: 37 58 69 83299: 22 32 53 toms515_test05(): comb() generates 10 random K-subsets of an N set. K = 10 N = 100 LMAX = 17310309456440 Note that this function is already failing because LMAX is negative. The combinatorial coefficient C(100,10) is too large to store in an integer. Although the program continues to give results, they cannot be relied on! 2582275279486: 2 10 26 31 50 54 91 92 93 98 8014309172186: 6 20 23 26 66 70 80 82 91 95 1776040902928: 2 3 8 12 36 39 59 76 80 84 2705244921488: 2 12 21 25 46 60 64 75 76 83 5573952683386: 4 15 16 31 47 54 75 76 91 98 5919379092254: 4 26 51 58 65 69 77 78 82 97 14116402608966: 15 31 32 36 39 46 53 64 65 92 12023299604234: 11 22 24 35 37 38 39 81 83 98 613571370634: 1 6 14 35 47 48 53 54 77 96 6479404115100: 5 10 24 34 35 54 65 88 89 95 toms515_test(): Normal end of execution. 16-May-2025 09:25:36