Question

In: Physics

Consider passwords of length 8 using symbols from the set of lower case letters: {a, b,...

Consider passwords of length 8 using symbols from the set of lower case letters: {a, b, c, ..., z}.

(a) How many such passwords use the letter p exactly two times and the letter q exactly two times? To illustrate, both akpqbqop and quaqpoop satisfy this condition. Include a brief indication of your strategy.

(b) How many such passwords use the letter p exactly once and the letter q exactly once and also have letters arranged so the p is not next to the q? To illustrate, we want to count passwords like amkquoop but not moopguzz or whaqpodo since these have the symbol p next to the q. Include a brief indication of your strategy.

Solutions

Expert Solution

a) For a password that contains 'p' exactly 2 times and q exactly 2 times, this means that the other 4 letters of the password are made of the 24 other letters (i.e the alphabet not including p and q).

How many 4 letter passwords can we make with 24 letters?

This is given by because there are 24 choices for each of the four places in the password.

Now, how can we add the p's and q's into each of these choices

Now, let us place the two letter 'p's into the password. There are 5 locations we can place the first 'p' in- before the first letter of our earlier 4 letter password, between the first and second, between second and third, b/w third and fourth and after the fourth letter. Now that we have a five-letter password, the second 'p' has 6 locations where it can be placed in. Does this mean that that for each of our earlier 4 letter passwords, there are 5*6=30 ways we can add the two p's? Remember that while doing so, we would be counting each password twice because the two p's are indistinguishable. Therefore, there are 30/2=15 unique six letter passwords that we can make from each 4 letter password.

Similarly, we can now add the q's.  There are 7 places to add the first q into the six letter password and 8 places to add the second after adding the first.So. there are 7*8/2=28 unique 8 letter passwords we can make from the six letter password.

This means that the total number of 8 letter passwords containing 2 p's and 2 q's is:

b) We want a password with exactly one p and one q. So, there are six letters in the password that is not p or q.

The number of ways to get such a six letter password are because there are 24 choices for each of the six places in the password.

Now, there are seven locations in this six letter password where we can add additional letters - before the first letter, b/w the first and second and so on.

We are stipulated that the p and q must not be adjacent. So, if we choose one of these seven locations to place the p, we must place the q in one of the other six locations.

Hence, the number of ways we can add exactly one p and exactly one q to the six letter password to make an eight letter password where the p and q are not adjacent is given by 7*6=42.

Therefore, the total number of passwords satisfying the conditions is:


Related Solutions

Same topic: 1. Consider all passwords of length 10 made up of numbers, lower-case letters, and...
Same topic: 1. Consider all passwords of length 10 made up of numbers, lower-case letters, and upper-case letters (from the English alphabet). a) If you pick such a password at random, what is the likelihood that it contains exactly 5 lower-case letters? b) If you pick such a password at random, what is the likelihood that it contains at most 9 lower-case letters? 2. Suppose you’re an ornithologist who specializes in American crows (Corvus brachyrhynchos), and you’ve collected data on...
Passwords of length 10 are formed using the character set S = {a, b, c, …,...
Passwords of length 10 are formed using the character set S = {a, b, c, …, z, A, B, …, Z, 0, 1, 2, .., 9}. Thus the set S consists of 62 different characters. For each part below, you must include a few words that describe your counting strategy. (a) How many passwords of length 10 use the character Q exactly two times? (b) How many passwords of length 10 use at most one of the “upper case” letters...
6. Passwords are composed from lower- and uppercase letters of the English alphabet,digits and 34 special...
6. Passwords are composed from lower- and uppercase letters of the English alphabet,digits and 34 special characters. What is the exponential generating function of the sequence an=number of passwords with at least one capital letter, one number and one special character.
In a c programming Write a program that converts upper case letters to lower case letters...
In a c programming Write a program that converts upper case letters to lower case letters or vice versa: Enter a sentence: What a GREAT movie is! Converted sentence: wHAT_A_great_MOVIE_IS_ Convert all non-alphabetical letters to ‘_’
At a certain company, passwords must be from 3–5 symbols long and composed from the 26...
At a certain company, passwords must be from 3–5 symbols long and composed from the 26 uppercase letters of the Roman alphabet, the ten digits 0–9, and the 14 symbols !, @, #, $, %, ^, &, *, (, ), 2, 1, {, and }. c. How many passwords have at least one repeated symbol? d. What is the probability that a password chosen at random has at least one repeated symbol?
Students in a college are allowed to chose their own passwords consisting of three (3) lower-case...
Students in a college are allowed to chose their own passwords consisting of three (3) lower-case letters, in that order. How many different passwords are possible if a. repetitions allowed? b. repetitions are not allowed? c. The first character cannot be 0, with no repetitions are not allowed?
[02] For n ≥ 1, how many strings of length n using letters a,b,c are there...
[02] For n ≥ 1, how many strings of length n using letters a,b,c are there if the letter a must occur an even number of times?
Suppose we continue to randomly select letters with replacement from the set {A, B, C, D,...
Suppose we continue to randomly select letters with replacement from the set {A, B, C, D, E, F}. Let T = be the number of letters we need to collect in order to have both letter E and letter F at least once. For example, suppose we have a sequence of letters CAEEBDF EA · · · . Then T = 7 in the above sequence. (a) Find the pgf of T. (b) Use the pgf of T in (a)...
For the following exercises, find the number of subsets in each given set. A set containing 5 distinct numbers, 4 distinct letters, and 3 distinct symbols
For the following exercises, find the number of subsets in each given set.A set containing 5 distinct numbers, 4 distinct letters, and 3 distinct symbols
(a) How many passwords can you make with 8 characters using Uppercase, Lowercase, digits using at...
(a) How many passwords can you make with 8 characters using Uppercase, Lowercase, digits using at least one Uppercase, at least one Lowercase and at least one digit? (b) How many numbers between 1 and 1,000,000 (inclusive) are divisible by at least one of 3,4 and 5? (c) How many numbers between 1 and 1,000,000 (inclusive) are divisible by at least one of 12, 14, 15?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT