EXAMPLE 1.5.4
The password for Gomer's e-mail account consists of 5 characters chosen
from the set {g, o, m, e, r} . How many arrangements are possible, if the password has no repeated characters?

SOLUTION

If the password contains no repeated characters, then forming a password involves nothing other than arranging the five characters of the set {g,o,m,e,r}. The number of ways to arrange 5 objects is 5!
5! = 120

There are 120 possible passwords.

 
How many 5-character passwords are possible if a password may have repeated characters?

SOLUTION

This is not a permutation (arrangement) problem, because it is possible to have repeated elements within one of these passwords. We can't use the permutation problem to solve this problem, so we will use the Fundamental Counting Principle.
In order to form a password, we need to make five decisions.

i. Choose first character: 5 options
ii. Choose second character: 5 options
iii. Choose third character: 5 options
iv. Choose fourth character: 5 options
v. Choose fifth character: 5 options
According to the Fundamental Counting Principle the number of outcomes is

(5)(5)(5)(5)(5) = 3125.

There are 3125 possible passwords, if a password may have repeated characters.