'Generating base set of unique 6-character combos (dup combos can exist) that total 100 combos, & all 600 chars follow a specific distribution
I began dipping my toes in Python last October, so I'm still veeeeeery new, naive, and eager to learn. My end goal is to have 100ish, 6 character combinations (characters = letters A-Z and a 0 representing blanks), with the following criteria:
1.) No duplicate characters are allowed within a single combination (Ex: 'abcdee' is NOT allowed)
2.) The order of the combinations does not matter, therefor 'fedcba' is the same combination as 'abcdef'.
3.) I'm looking to identify a base set of the minimum number of unique combinations (preferably under 10, but in the end, it shouldn't matter to me), with each combination in the base set having various copies. In total, the count of all combinations combinations should be close to 100 (100 would be pretty, but if a solution does not exist to allow this, I'll take what I can get).
**Example Format/ Example End Result ** (Base set is composed of Combos#1-6 in ex below) Combo #1: 'ABCDE' | 23 copies Combo #2: 'FGHIJK' | 17 copies Combo #3: 'LMNOPQ' | 20 copies Combo #4 'RSTUVW' | 18 copies Combo #5 'XYZ0AE' | 12 copies Combo #6 'IOURS' | 10 copies
4.) There are 600ish total characters that make up the 100ish combinations (again, the ish depends on the exact solution). Below is a representation of how many times each letter occurs across all 6-character combinations:
char_dist = {E: 66A: 52I: 46R: 45O: 41L: 35S: 35T: 37N: 36C: 23U: 24H: 16D: 20M: 19P: 19K: 9G: 16B: 14Y: 14V: 6W: 7F: 10X: 2J: 2Z: 2Q: 20: 2}
5.) Attached is the char_combos.csv I generated using itertools. I've tried to wrap my head around this every which way but loose, but despite my seemingly infinite number of attempts to google every possible way I can think of asking this question, I've came up short. Any suggestions folks?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
