I saw many questions about anagrams here, but neither one fits my needs.
Let's say we have the word MISSISSIPPI. I need to find the count for those anagrams that meet the criterias as follows:
- Unique anagrams, of course;
- No substring of 3 letters from the word MISSISSIPPI are allowed in the count for "accepted" anagrams, regardless of their position;
Explanation of statement #2: In the result set are not allowed words containing the following substrings of 3 letters: [MIS], [ISS], [SSI], [SIS], [ISS], [SSI], [SIP], [IPP], [PPI].
As we see, there are two identical substrings 2x[ISS] and 2x[SSI].
So if I have the following anagram xMISxxxxxxx - it does not count as accepted anagram, neither does SIPxxxxxxxx, and so on.
Is there a way to find the correct answer with pure combinatorics?