112k views
1 vote
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.

User Chizou
by
3.8k points

2 Answers

5 votes

Answer / Explanation

(a) The three sets are mutually disjoint, so the total number of characters available to us is

|D ∪ L ∪ S|

= |D| + |L| + |S|

= 10 + 26 + 4

= 40

For further clarity, we can say that Each of the six characters in the string can be any of the 40 characters, therefore they are a total of 40⁶

in other word:

Total available characters: 10 + 26 + 4 = 40

Therefore: 40 * 40 * 40 * 40 * 40 * 40 = 40⁶

(b) it should be noted that there are 14 choices for the first character because there are 4 + 10 digits and special characters.

Therefore, there are 40 choices for each of the remaining characters. So, Putting the choices together by the product rule, the total number of strings of length j in which the first character is not a letter is:

14·40^ (j-1) 14·40^6 + 14·40^7 + 14·40^8

= 14 (40^6 + 40^7 + 40^8)

User Chris Bilson
by
4.2k points
3 votes

Answer:

a) Number of passwords: 2763633600

b) Number of passwords: 2487270240

Explanation:

We have:

10 digits,

26 letters, and

4 special characters.

We have to compute the number of passwords that satisfy the following conditions:

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

We can use the three types of characters, as long as they do not repeat.

We have a total of 10+26+4=40 characters.

This means we have 40 options for the first place, (40 - 1) for the second place (as the first place already use one of the options available), and so on up to 6 places.

We can write this as:


C=40*39*38*37*36*35=40!/34!=2763633600

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.

In this case we add a restriction: the first character can not be a special character.

Then, for the first place we have only 40-4=36 options (digits and letters).

For the second place we can use the 39 options available (digits, letters and special characters).

Then we have:


C=36*(39*38*37*36*35)=36*(39!/34!)=2487270240

User Groteworld
by
4.6k points