26-Jul-2022 13:38:44 toms515_test() MATLAB/Octave version 9.8.0.1380330 (R2020a) Update 2 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 9: 2 4 5 10: 3 4 5 2: 1 2 4 10: 3 4 5 7: 2 3 4 1: 1 2 3 3: 1 2 5 6: 1 4 5 10: 3 4 5 10: 3 4 5 toms515_test03(): comb() generates 10 random K-subsets of an N set. K = 3 N = 25 LMAX = 2300 363: 2 7 12 2233: 17 20 24 2202: 16 20 21 1117: 5 16 18 1841: 10 22 24 327: 2 5 13 971: 5 6 7 2107: 14 17 25 1823: 10 18 24 2207: 16 21 22 lmax = 161700 toms515_test04(): comb() generates 10 random K-subsets of an N set. K = 3 N = 100 LMAX = 161700 106034: 30 57 77 5775: 2 12 99 137305: 47 56 77 151027: 59 95 97 109752: 32 39 98 122527: 38 48 73 120165: 37 40 46 63424: 16 23 34 105991: 30 56 77 27681: 7 8 33 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! 12221876274129: 11 49 53 54 59 69 74 86 91 99 551036421673: 1 5 36 37 48 49 67 89 92 96 4793622565275: 4 5 13 20 28 53 66 92 93 96 799241059860: 1 8 13 16 37 44 50 52 70 90 1681381191248: 1 32 53 54 65 73 82 90 92 97 14254309832674: 16 18 42 67 71 72 80 83 89 93 12027698482904: 11 22 26 47 63 69 72 76 94 100 5489090128330: 4 13 21 24 33 55 62 65 84 86 16448637717725: 25 35 48 60 63 65 66 68 94 97 596272313067: 1 6 11 39 49 52 59 60 68 94 toms515_test(): Normal end of execution. 26-Jul-2022 13:38:44