2
$\begingroup$

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.

$\endgroup$
  • 1
    $\begingroup$ 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? $\endgroup$ – awkward Apr 24 '17 at 23:11
  • $\begingroup$ Well since there is 40 characters to choose from wouldnt it be 40^6? $\endgroup$ – Gabriel_W Apr 24 '17 at 23:44
  • $\begingroup$ Don't forget the requirement that a character cannot be repeated. $\endgroup$ – awkward Apr 26 '17 at 10:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.