Total number of unique alphanumeric passwords

134 Views Asked by At

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!

2

There are 2 best solutions below

0
On BEST ANSWER

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$$

0
On

HINT:

Think of $abc$ as one character lets call it $\omega$. Figure out how many different alphanumeric passwords you can make of length $3$. If you add $\omega$ to these $3$ letter long passwords you will get a password of length $6$ including $\omega$.

So

1) Figure out the number of $3$ letter passwords

2) Figure out in how many different ways can you add $\omega$

Hope this helped