[Math] Combinatorics: 7 character passwords

combinatorics

I am currently reviewing probability using Probability, Statistics, and Stochastic Processes by Peter Olofsson, and I have a dispute over the answer to problem #16 on page 67.

The question is as follows:

"You are asked to select a password for a Web site. It must consist of five lowercase letters and two digits in any order. How many possible such passwords are there if (a) repetitions are allowed, (b) repetitions are not allowed."

My reasoning and answer for the following question are as follows:

Since there must be $5$ lower case characters and $2$ digits the password is $7$ characters long:

X-X-X-X-X-X-X

For part (a) repetitions are allowed. Therefore there are $26^5$ lowercase characters that we can pick, $10^2$ digits that we may pic. Now because The digits can be placed in any order we may pick the positions of the lowercase characters or the digits. The $5$ lowercase characters may be placed in $5$ of the $7$ slots $7C5 = 21$ ways. We don't need to do the calculation for the digits into the two remaining slots because they will automatically fall into the two remaining places.

Meaning that there are $21 * 26^5 * 10^2 = 2.5 * 10^{10}$ passwords possible.

For (b) repetitions are not allowed. Therefore there are $26P5$ selection of lowercase characters, and $10*9$ possible digits possible. The way we pick our possible positions are still the same $7C5 = 21 ways$.

Meaning there are $21 * 26P5 * 10 * 9 = 1.49 * 10^{10}$.

According to the back of the book: The answer

For part (a) is $26^5 * 10^2 = 1.2 * 10^9$.
For part (b) is $26P5 * 10P2 = 7.1 * 10^8$.

Notice that their answer is much smaller than mine because they do not multiply by a binomial coefficient.

Either I am over-counting or they are under-counting.

Since the numbers can be placed in any order why is it that the positions have to be counted. Can anyone give me a good argument for or against my reasoning?

Best Answer

You're right! In fact, the author's website already acknowledges the problem: http://www.peterolofsson.com/Corrections.html

page 67, Problem 16: replace "any order" by "that order"