In my earlier post P128(2,9) produces the same sequence as the existing P(2,9) - that's good, but for the exception at the end which still occurs, so will need looking into. So P128(n,k) where k<=64 look ok, but will need some testing against the same P(n,k) for k<=64.
For P128(2,74), it's giving erroneous results. I was expecting 74x73/2 = 2701 pairs, eg. 0,1 - 0,2 ... 72,73.
It's producing more pairs than expected:
- Code: Select all
Permutations128( 2, 74);
0: 0, 1
1: 0, 2
...
92736: 0, 64
...
92800: 0, 64 <- repeated many times
92864: 0, 64
92928: 0, 65
92992: 0, 64
...
93184: 0, 64
93248: 0, 65
93312: 0, 66
...
100624: 70, 71
To be dubugged.