generate all 7-letter formations, maximum 3 letters repeated.

piter

Active Member
Joined
Jul 22, 2011
Messages
316
Office Version
  1. 2016
Platform
  1. Windows
generate all 7-letter formations, maximum 3 letters repeated.
ex = aaabcde ... bbbcccd, etc.
we have 10 letters = abcdefghij to conbine the formations with 7 letters
please!
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
And what would you do with such a list? I've never heard a good reason for enumerating all of those formations.

Consider, starting with the following number of letters, you'd get this number of formations:

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]ab[/TD]
[TD]88[/TD]
[/TR]
[TR]
[TD]abc[/TD]
[TD]1,944[/TD]
[/TR]
[TR]
[TD]abcd[/TD]
[TD]15,552[/TD]
[/TR]
[TR]
[TD]abcde[/TD]
[TD]76,000[/TD]
[/TR]
[TR]
[TD]abcdef[/TD]
[TD]275,400[/TD]
[/TR]
[TR]
[TD]abcdefg[/TD]
[TD]814,968[/TD]
[/TR]
[TR]
[TD]abcdefgh[/TD]
[TD]2,082,304[/TD]
[/TR]
[TR]
[TD]abcdefghi[/TD]
[TD]~5,000,000[/TD]
[/TR]
[TR]
[TD]abcdefghij[/TD]
[TD]~10,000,000[/TD]
[/TR]
</tbody>[/TABLE]

I didn't actually calculate the last two, since it would probably take all day. And even if I did, how would you want them saved? 10 million cells in a worksheet? And if you had such a list, what would you do with it? How would you search it?
 
Upvote 0
hello, thank you,ERIC but we have a problem here, what you have to do, 7 letters in 10 letters, with a maximum of 3 repeated letters. this is not going to give many formations as suggested, should give at most, more than 1000 (thousand formations)
exe = aaabcde ...... bbbccde .... to fghijjj
your formulas are wrong
 
Upvote 0
you have to use the criterion of the repetition of a maximum of 3 letters per formation
example = in the first 7 letters of the 10 possible letters
abcdefgh = all 7 must have at least one training with
ex = aaa ... bbb ... cccc .... ddd .... eee .... fff .. ggg ... hhh ..
Of course there will be two 2 letters repeated,
ex = aabbcce
until the last is = abcdefgh
then the criterion is to have the maximum repetition, 3 letters, it will have to be two obligatorily.
there is! are only 7 letter formations
 
Upvote 0
hello, thank you,ERIC but we have a problem here, what you have to do, 7 letters in 10 letters, with a maximum of 3 repeated letters. this is not going to give many formations as suggested, should give at most, more than 1000 (thousand formations)
exe = aaabcde ...... bbbccde .... to fghijjj
your formulas are wrong
I think your math is way off. How do you get to somewhere around only 1000 formations?

Let's look at this simple analysis. Let's say that you cannot have ANY repetition (that is much more restrictive than your allowing up to 3 letter repetition, so this would return less possibilities than your conditions).
Choosing 7 characters from 10 possibilities yields 604,800 possible values (10*9*8*7*6*5*4)!
So the criteria that you laid out would have much more than that, as you allow limited repetition.
 
Upvote 0
look at another example where it was used 7 repetitions of the letters gave in 100% 36 formations
but my request is in 10 letters and 3 letter repeat
01 to 10 = A
11 to 20 = B
21 to 31 = C
aaaaaaa
aaaaaab
aaaaaac
aaaaabb
aaaaabc
aaaaacc
aaaabbb
aaaabbc
aaaabcc
aaaaccc
aaabbbb
aaabbbc
aaabbcc
aaabccc
aaacccc
aabbbbb
aabbbbc
aabbbcc
aabbccc
aabcccc
aaccccc
abbbbbb
abbbbbc
abbbbcc
abbbccc
abbcccc
abccccc
acccccc
bbbbbbb
bbbbbbc
bbbbbcc
bbbbccc
bbbcccc
bbccccc
bcccccc
ccccccc
 
Upvote 0
[TABLE="width: 494"]
<colgroup><col span="10"><col><col></colgroup><tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD="colspan: 4"]we have 10 columns[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]7 letters[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]ex[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H [/TD]
[TD]I [/TD]
[TD]J[/TD]
[TD][/TD]
[TD]aaabdfj[/TD]
[/TR]
[TR]
[TD="align: right"]01[/TD]
[TD="align: right"]02[/TD]
[TD="align: right"]03[/TD]
[TD="align: right"]04[/TD]
[TD="align: right"]05[/TD]
[TD="align: right"]06[/TD]
[TD="align: right"]07[/TD]
[TD="align: right"]08[/TD]
[TD="align: right"]09[/TD]
[TD="align: right"]10[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]11[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]13[/TD]
[TD="align: right"]14[/TD]
[TD="align: right"]15[/TD]
[TD="align: right"]16[/TD]
[TD="align: right"]17[/TD]
[TD="align: right"]18[/TD]
[TD="align: right"]19[/TD]
[TD="align: right"]20[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]21[/TD]
[TD="align: right"]22[/TD]
[TD="align: right"]23[/TD]
[TD="align: right"]24[/TD]
[TD="align: right"]25[/TD]
[TD="align: right"]26[/TD]
[TD="align: right"]27[/TD]
[TD="align: right"]28[/TD]
[TD="align: right"]29[/TD]
[TD="align: right"]30 [/TD]
[TD][/TD]
[TD][TABLE="width: 494"]
<colgroup><col span="10"><col><col></colgroup><tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD="colspan: 4"]we have 10 columns[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]7 letters[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]ex[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H [/TD]
[TD]I [/TD]
[TD]J[/TD]
[TD][/TD]
[TD]aaabdfj[/TD]
[/TR]
[TR]
[TD="align: right"]01[/TD]
[TD="align: right"]02[/TD]
[TD="align: right"]03[/TD]
[TD="align: right"]04[/TD]
[TD="align: right"]05[/TD]
[TD="align: right"]06[/TD]
[TD="align: right"]07[/TD]
[TD="align: right"]08[/TD]
[TD="align: right"]09[/TD]
[TD="align: right"]10[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]11[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]13[/TD]
[TD="align: right"]14[/TD]
[TD="align: right"]15[/TD]
[TD="align: right"]16[/TD]
[TD="align: right"]17[/TD]
[TD="align: right"]18[/TD]
[TD="align: right"]19[/TD]
[TD="align: right"]20[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]21[/TD]
[TD="align: right"]22[/TD]
[TD="align: right"]23[/TD]
[TD="align: right"]24[/TD]
[TD="align: right"]25[/TD]
[TD="align: right"]26[/TD]
[TD="align: right"]27[/TD]
[TD="align: right"]28[/TD]
[TD="align: right"]29[/TD]
[TD="align: right"]30[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
see, 10 letters combined by 7 is 120, with letters not repeated
but I want the maximum repetition of three per column
There is something wrong with your formula.
 
Upvote 0
It's clear that we're not understanding what you consider a valid combination. Even after looking at your posts 6 and 7, the logic eludes me. 6 in particular is puzzling. You say that you don't want letters repeated more than 3 times, but almost every item in that list has letters repeated more than that. And it excludes many others, like abcabca.

But even supposing you can explain in a method we can understand, my original question stands: what would you do with such a list? Even if there's only 1000 results, that's still a lot to look through. If you're looking to validate that a combination is valid by checking it against the list, it would be far easier to check the combination against your set of rules.
 
Last edited:
Upvote 0
we have in the matrix of 30 numbers 10 columns with 3 numbers each
the criterion is that the maximum repetition of each letter is 3
I need to please this standards, because I will cross with the standards by line,
so I'll have the defaults per line are 36 and the defaults per columns (which I still have to do)
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,170
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top