I asked a question in a previous post about enumerating all possible k-ary bracelets with certain positions fixed to a specific bead/character. I asked a few mathematicians, and it seems its quite difficult to do so in a reasonable way.
However, it turns out that I am only looking for necklaces, not bracelets. Eg I only care about rotations, not reflections.
Hopefully its ok to ask the basically the same question again, Im thinking it might be more feasible to enumerate if you only have to factor in rotations.
To restate the question, say I have k possible integers to pick from, and my program randomly picks from the set of k when generating necklaces of length n, I know I can enumerate the maximum possible unique necklaces that could be generated for n/k using the equation listed here. This is great because now I have an upper bound on my programs duration and know when to stop running if I have already found all possible unique necklaces for a given n/k
However, my program also has the option to conserve, or fix, any particular value from the set of k, at any position in the necklace. It allows this to be done for as many positions of length n that you want.
For example, given n = 4, and k = [0, 1, 2, 3, 4, 5, 6], and considering the following necklaces equivalent:
[0,0,0,1] and [1,0,0,0]
I can use the formula as mentioned here to calculate easily how many unique necklaces I can possibly generate.
But if the user of my program specifies that they want the generated necklaces to always have the value 1 at position 1 and the value 2 at position 4, eg the random necklace generator will only create sequences such as:
[1,0,0,2] or [1,6,4,2] or [1,2,3,2]
The question is: given necklaces of length n containing any selection of characters from set k with f positions in n being fixed to c different values from k, is it possible to enumerate the total unique necklaces that could be made