Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

The problem is,

Let $S$ be the set of five-digit numbers formed by the digits $1, 2, 3, 4$ and $5$, using each digit exactly once such that exactly two odd positions are occupied by odd digits. What is the sum of the digits in the rightmost position of the numbers in S?

I am looking for some approach for solving this problem.

share|improve this question
Suppose $X_1X_2X_3X_4X_5$ is the 5-digit number. Then if we pick the number at random from $S$, then $X_1X_3X_5$ is uniformly distributed in $132, 134, 352, 354, 512, 514$ and all their permutations (e.g.: $132, 123, 213, 231, 312, 321$, and so on). Then, $E[X_1+X_3+X_5] = \frac{1}{6}(6+8+10+12+8+10) = 9$. Finally, note that the distributions of $X_1$, $X_3$, and $X_5$ are identical; so $E[X_5]=3$. Hence, the required answer is $3|S|$. –  Srivatsan Aug 13 '11 at 15:52

3 Answers 3

The number in the rightmost position is either 1, 3, or 5. In how many cases does a 1 appear there?

The answer for 3 should be that same number.

And yet again for 5.

$$ \underbrace{1+ \cdots + 1}_{n\text{ terms}} + \underbrace{3 + \cdots + 3}_{n\text{ terms}} + \underbrace{5 + \cdots + 5}_{n\text{ terms}} = n + 3n + 5n = 9n. $$

All you need to do now is find $n$.

share|improve this answer
-1: your first sentence is incorrect. –  user17762 Aug 13 '11 at 15:30
Oh, I see: it said exactly two odd positions are occupied by odd digits, not that odd positions are occupied by odd digits. –  Michael Hardy Aug 13 '11 at 16:18

If the last digit is even,

2 odd numbers out of 3 can be arranged in 3P2=3! ways,the two even numbers can be arranged in 2! ways

There sum = $$(3! * 2) * (2+4) = 72$$

If the last digit is odd, i.e either 1,3,5

an odd number can only occupy an odd position, so 2C1 = 2 Either one of the two odd digits of the 5 digit number can be selected in 2C1 = 2 Now, the other remaining odd number will have only 2 places left.

The even numbers can be arranged in $$2!$$ ways.

So $$(2 * 2 * 2 * 2) * (1 + 3 + 5) = 144$$

Total sum of right most digits =$$72 + 144 = 216$$

share|improve this answer

A more probabilistic version of the idea used below, indeed essentially a full solution, was given in a comment by @Srivatsan Narayanan.

Conveniently, the odd digits have mean $3$, and so do the even digits.
So we only need to count the number of allowed permutations, and multiply by $3$. It is somewhat easier, or at least safer, to count the complement.

There are $(3!)(2)$, that is, $12$ permutations with all the odd digits in odd positions.

Next we count the permutations with exactly one odd digit in an odd position. That digit can be chosen in $3$ ways. For each choice, its position can be chosen in $3$ ways. Once we have done that, the remaining odd digits can be placed in $2$ ways, and then the even digits can be placed in $2$ ways, for a total of $(3)(3)(2)(2)$, that is, $36$.

So there are $48$ forbidden permutations, leaving $5!-48=72$ allowed permutations.

The required total is therefore $(3)(72)$, which is $216$.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.