Mexico
Member #193,547
November 3, 2018
315 Posts
Offline
Hello friends, a long time ago the user geodesic recommended this program to convert the combination number to lexicographic order number, the problem is that it only converts one combination at a time, does anyone know how to program the code to convert the combination number to its order lexicographic in a massive way, that is, at least about 100 draws, please, greetings...
Ohio United States
Member #179,976
February 15, 2017
1,283 Posts
Offline
Quote: Originally posted by Mayte on Nov 6, 2023
Hello friends, a long time ago the user geodesic recommended this program to convert the combination number to lexicographic order number, the problem is that it only converts one combination at a time, does anyone know how to program the code to convert the combination number to its order lexicographic in a massive way, that is, at least about 100 draws, please, greetings...
Have you tried using a FOR/NEXT loop to process all the draws?
United States
Member #139,773
March 3, 2013
605 Posts
Offline
There is a program that does this for you it's called lottery stastic analyzer. If you can find it. I think the author abandoned it. I think it was either written in VB or C.
Missouri United States
Member #208,879
August 9, 2020
334 Posts
Offline
You might try using ChatGPT to do source code to source code conversion for you... Additionally, you can prompt ChatGPT to generate source code via your native english directions...
New Jersey United States
Member #17,842
June 28, 2005
180,983 Posts
Offline
Quote: Originally posted by lottologix on Nov 7, 2023
There is a program that does this for you it's called lottery stastic analyzer. If you can find it. I think the author abandoned it. I think it was either written in VB or C.
Texas United States
Member #4,549
May 2, 2004
4,230 Posts
Offline
Quote: Originally posted by Mayte on Nov 8, 2023
Could you create a program for a 6/39 lottery? Please, if it's not too much trouble, please
You're talking 3,262,623 combinations. A program will write that easily, but opening the file in Excel will be a problem since Excel will only handle 1,048,576 rows.
An option would be to write multiple files or write a program to compare the list of 100 against the matrix and write a new file with the information required.
G
I'm probably here unless I'm not.
Dreaming would be a perfectly useless function if it's only purpose was to entertain.
FOR A = 1 TO 24
FOR B=(A+1) TO 25
FOR C=(B+1) TO 26
FOR D=(C+1) TO 27
FOR E=(D+1) TO 28
N=N+1 'the index counter
[qwerty]
IF A=N1 AND B=N2 AND C=N3 AND D=N4 AND E=N5 THEN _
print N1;"-";N2;"-";N3;"-";N4;"-";N5;" = ";null$;N: A = 24
'A = 24 to exit the for next loop and speed program
NEXT E
NEXT D
NEXT C
NEXT B
NEXT A
[idx]
print
input "type r to repeat or press ENTER to end program ";A$
if A$ = "r" then goto [str]
FOR A = 1 TO 24
FOR B=(A+1) TO 25
FOR C=(B+1) TO 26
FOR D=(C+1) TO 27
FOR E=(D+1) TO 28
N=N+1 'the index counter
[qwerty]
IF A=N1 AND B=N2 AND C=N3 AND D=N4 AND E=N5 THEN _
print N1;"-";N2;"-";N3;"-";N4;"-";N5;" = ";null$;N: A = 24
'A = 24 to exit the for next loop and speed program
NEXT E
NEXT D
NEXT C
NEXT B
NEXT A
[idx]
print
input "type r to repeat or press ENTER to end program ";A$
if A$ = "r" then goto [str]
print:print "*** program ended ***"
END
Ok, I took a crash course on Just Basic and came up with this. [your code in red]
The routine in your code is not optimized for the task at hand, but it works just the same. I have code that would do the same in a second or 2, but I don't have time to convert it to Just Basic code.
I created a lexi test 6_39.txt file with 100, 6/39 drawings, and the code took 20 minutes to process all 100. You'll need to have your own text file filled with drawings using spaces to separate the numbers, and no dates, just the drawing numbers. You'll also need to change the name of the file in the code to match with your file.
'program to generate Combinational Sequence Number [INDEX]
[start] cls null$ ="" OPEN "lexi test 6_39.txt" for INPUT as #draws
N=0 FOR A = 1 TO 34 FOR B=(A+1) TO 35 FOR C=(B+1) TO 36 FOR D=(C+1) TO 37 FOR E=(D+1) TO 38 FOR F=(E+1) TO 39
N=N+1 'the index counter
IF A=N1 AND B=N2 AND C=N3 AND D=N4 AND E=N5 AND F=N6 THEN _ print N1;" ";N2;" ";N3;" ";N4;" ";N5;" ";N6;" = ";null$;N: A = 34 'A = 34 to exit the for next loop and speed program NEXT F NEXT E NEXT D NEXT C NEXT B NEXT A WEND CLOSE #draws [stop] print:print "*** program ended ***"
Ohio United States
Member #179,976
February 15, 2017
1,283 Posts
Offline
I ported some code to this web app for you this afternoon. It will do in milliseconds what the Just Basic code did in 20 minutes.
1. Select your game's number pool (39)
2. Select how many numbers are drawn (6)
3. Copy your drawings (no dates, just drawing numbers) or use the sample drawings below
4. Click the text area then Ctrl + V to paste the drawings.
5. Click "Get Lexi Info"
Here's 100 sample 6/39 drawings to copy/paste for a test run:
Mexico
Member #193,547
November 3, 2018
315 Posts
Offline
Quote: Originally posted by Mr-B 216 on Nov 10, 2023
I ported some code to this web app for you this afternoon. It will do in milliseconds what the Just Basic code did in 20 minutes.
1. Select your game's number pool (39)
2. Select how many numbers are drawn (6)
3. Copy your drawings (no dates, just drawing numbers) or use the sample drawings below
4. Click the text area then Ctrl + V to paste the drawings.
5. Click "Get Lexi Info"
Here's 100 sample 6/39 drawings to copy/paste for a test run: