what are the possible formations of 7 letters, being a maximum of 3 letters per colum

jack

Member
what are the possible formations of 7 letters, being a maximum of 3 letters per column, *
what are the possible formations of 7 letters, being a maximum of 3 letters per column,
* we have 10 columns in color and we have 10 letters
the number of letters is maximum 3 letters
* example = aaabcde
the formation is seven letters = xxxxxxx
http://www.mediafire.com/file/fcc5xmybrxcyx6l/3_letters_por_coluna.xlsx/file
 

Frank

Member
what are the possible formations of 7 letters, being a maximum of 3 letters per column, *
what are the possible formations of 7 letters, being a maximum of 3 letters per column,
* we have 10 columns in color and we have 10 letters
the number of letters is maximum 3 letters
* example = aaabcde
the formation is seven letters = xxxxxxx
http://www.mediafire.com/file/fcc5xmybrxcyx6l/3_letters_por_coluna.xlsx/file

Well this had me scratching my head to figure out the maths of the probabilities, given you could use UP TO any 7 zones from the 10 available and in those zones you could use UP to 3 numbers and possibly no numbers in any zone. It was easy to figure out that there were 120 possible configurations of 7 columns that may or may not all be used. That was =COMBIN(10,7).
The hard bit was filling up those columns according to your rules, I couldn't quite figure out the maths so I ended up using macros to get the configurations. It turns out there are 1128 ways of choosing from 7 columns and filling some or all of them with either 0,1,2 or 3 numbers from any column, and still having a total of 7 numbers in all.

This means that there are 120 x 1128 = 135,360 unique letter combinations. Whats the point of printing them all out ? You'll go cross eyed.

My spreadsheet meets you half way because if you choose a column configuration first (RIGHT hand side Sheet 1 using a spinner or type any number up to 120), it will generate the 1128 letter strings that match those columns. Change the configuration, it changes the strings to match. So you could see all of the 135,360 letter strings if you had the time to keep spinning the spinner one at a time.

http://www.mediafire.com/file/gef97lge723cfri/3_letters_por_coluna.xlsx/file
 

jack

Member
hello frank, perfect, conglatulations,
Last lottery draw was = 07 11 12 17 25 29 30, logo
then it would be in the lines = abbbccc / in the abdeggi columns (which lack to make these patterns)
each draw has the two patterns x lines carteziano type
 

jack

Member
ok frank I'm amazed at the reduction when you make the two letter patterns
by 3 rows and by 10 columns there is a reduction from 2,600,000 to 130,000
* almost 90% reduction very good, the formations of the columns position the formations of letters, Cartesian type, that is why it greatly reduces, now that we have all the formations we go to the filters inside
 

jack

Member
huum frank
135.300 is 9.240
Public MyDict

Sub GetCombs()

Set MyDict = CreateObject("Scripting.Dictionary")
Call Recur("abcdefghij", 0, "")

Range("A1").Resize(MyDict.Count) = WorksheetFunction.Transpose(MyDict.keys)

End Sub

Sub Recur(chars, depth, sofar)
Dim i As Long

If depth = 7 Then
MyDict.Add sofar, 1
Exit Sub
End If

For i = InStr(chars, Right(sofar, 1)) To Len(chars)
If Right(sofar, 3) <> String(3, Mid(chars, i, 1)) Then
Call Recur(chars, depth + 1, sofar & Mid(chars, i, 1))
End If
Next i

End Sub
 

Frank

Member
huum frank
135.300 is 9.240
Public MyDict

Sub GetCombs()

Set MyDict = CreateObject("Scripting.Dictionary")
Call Recur("abcdefghij", 0, "")

Range("A1").Resize(MyDict.Count) = WorksheetFunction.Transpose(MyDict.keys)

End Sub

Sub Recur(chars, depth, sofar)
Dim i As Long

If depth = 7 Then
MyDict.Add sofar, 1
Exit Sub
End If

For i = InStr(chars, Right(sofar, 1)) To Len(chars)
If Right(sofar, 3) <> String(3, Mid(chars, i, 1)) Then
Call Recur(chars, depth + 1, sofar & Mid(chars, i, 1))
End If
Next i

End Sub

Well it does seem according to the macro that there are in fact 9240 unique combinations.
Further investigation of my method shows that it does produce duplicates of the same sequence of 7 letters, so I've obviously overlooked something. I did say that I had a problem with the mathematics behind this so was unable to verify my method.

Your suddenly pulling this macro out of your sleeve does create some serious questions doesn't it ?

a) Who wrote the macro. congratulations to whoever it was, since I cannot use the dictionary, its a step beyond my programming capabilities.

b) If you knew the answer to the question ( BEFORE you asked it, or had the capablity of obtaining the answer so promptly. WHY did you ask it ?

Are you aware that people devote TIME to helping you, and could well spend it elsewhere doing something more useful, and if you are happy to waste peoples time solving problems you have already found the answer to, then that help will come to an abrupt end.

Please explain what just happenned.
 

jack

Member
ok frank, sorry, did not know the answer, about who made the macro? well, it was in another forum,
* because I like having two medical appointments, I was intrigued by the 135 thousand thought there were many! because it wanted to cross, those of the lines and now of the Cartesian type columns
* yes, it should be unique to every training., but the friend who did also made the first macro wrong until hit the code, but frank, numca left me in the hand, always responds and help from excel, had other issues that only Frank made the right help !!,
* thank you frank
 

jack

Member
hello frank, I have friends who play on the euro million, they asked me to do
* (adapt) the above code to 4 letters in the columns and 5 letters.
* example = aaaab .... ..... ijjjj, goal is to use for euro million,
* you can help me using the code above you have permission to adapt to the euro
* please
 

Frank

Member
ok frank, sorry, did not know the answer, about who made the macro? well, it was in another forum,
* because I like having two medical appointments, I was intrigued by the 135 thousand thought there were many! because it wanted to cross, those of the lines and now of the Cartesian type columns
* yes, it should be unique to every training., but the friend who did also made the first macro wrong until hit the code, but frank, numca left me in the hand, always responds and help from excel, had other issues that only Frank made the right help !!,
* thank you frank

Well I think something got lost in translation there. I don't think you intended to mention medical appointments, unless they were for therapy about your selfishness, thoughtlessness and impatience.
the rest of what you wrote was utter nonsense.

I think you intended to say that you like to have many people working on the same thing at the same time, which proves my point. You dont care whos time you waste as long as YOU get your answer within 24 hours. Someone who had respect for others time and effort would ask in one forum, then wait a respectable length of time to find out whether there is any interest BEFORE reposting it elsewhere. You are not going to die if you dont get an answer within 7 days!


hello frank, I have friends who play on the euro million, they asked me to do
* (adapt) the above code to 4 letters in the columns and 5 letters.
* example = aaaab .... ..... ijjjj, goal is to use for euro million,
* you can help me using the code above you have permission to adapt to the euro
* please

I think you have some bloody cheek! Can't the person who wrote the macro modify his own macro ??

Public MyDict

Sub GetCombs()

Set MyDict = CreateObject("Scripting.Dictionary")
Call Recur("abcdefghij", 0, "")

Range("A1").Resize(MyDict.Count) = WorksheetFunction.Transpose(MyDict.keys)

End Sub

Sub Recur(chars, depth, sofar)
Dim i As Long

If depth = 5 Then
MyDict.Add sofar, 1
Exit Sub
End If

For i = InStr(chars, Right(sofar, 1)) To Len(chars)
If Right(sofar, 4) <> String(4, Mid(chars, i, 1)) Then
Call Recur(chars, depth + 1, sofar & Mid(chars, i, 1))
End If
Next i

End Sub


1992 combinations.
 

jack

Member
hello frank sorry, the other friend, replied that he got sick, can not do
thanks frank for doing the macro is working very well, when you win some prize will be rewarded, thank you frank
 

Sidebar

Top