# Compute the number of passwords that satisfy the given restraints?

I am having trouble with these two questions (a) and (b). I cannot figure out how to account for not allowing repeated characters in the password. Any help would be greatly appreciated.

Consider the following definitions for sets of characters:

• Digits = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }
• Letters = { a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z }
• Special characters = { *, &, \$, # }

Compute the number of passwords that satisfy the given constraints.

(a) Strings of length 6. Characters can be special characters, digits, or letters, with no repeated characters

(b) Strings of length 6. Characters can be special characters, digits, or letters, with no repeated characters. The first character can not be a special character.

• A hint to get you started on (a): How many ways can you choose the first character? Once that is done, how many ways can you choose the second character? – awkward Apr 24 '17 at 23:11
• Well since there is 40 characters to choose from wouldnt it be 40^6? – Gabriel_W Apr 24 '17 at 23:44
• Don't forget the requirement that a character cannot be repeated. – awkward Apr 26 '17 at 10:44