Let's say I need a $6$ character, case insensitive alphanumeric password. The password must contain the character chain $"abc"$. How many unique passwords will I get?
I am not sure of how to tackle cases where the same characters are permutated. e.g. $"abceef"$
Thanks!
Let $X$ be any alphanumeric character.
Case 1: $abcXXX$ can be formed in $36^3$ ways.
Case 2: $XabcXX$ can be formed in $36^3$ ways.
Case 3: $XXabcX$ can be formed in $36^3$ ways.
Case 4: $XXXabc$ can be formed in $36^3$ ways.
$abcabc$ is in both case 1 and case 4. So, if we add up the number of formations of strings from each case, we have double-counted that one string.
Total number of outcomes:
$$36^3+36^3+36^3+36^3-1$$