1
$\begingroup$

I want to master my skills in elementary combinatorics so trying to solve the following problem: Calculate sum of all $10$-digit numbers obtained from all possible permutations of $\{4,5,5,6,6,6,7,7,7,7\}$.

Please check my solution.

How many times does each number from the list appears in every digit? (English is not my native language so I'm afraid of using wrong terminology, by digits here I mean units, dozens, hundreds, thousands and so on in decimal representation) For $4$ it $9!$ times since when we fix it somewhere we are free to vary all other positions and there are $9!$ such possibilities. Similarly for $5$ we have $2\cdot9!$ because of there are two $5$'s in our list, for $6$ there are $3\cdot9!$ and $7$ appears $4\cdot9!$ times in each digit.

What is the sum of all such numbers restricted to particular digit? It is $4\cdot1\cdot9! + 5\cdot2\cdot9! + 6\cdot3\cdot9! + 7\cdot4\cdot9! = 21772800$.

Now we are ready to calculate the final answer by sum in all digits: $\sum\limits_{i=0}^{9} 21772800\cdot 10^i = 24191999997580800$.

Am I right or are there any mistakes?

$\endgroup$
1
$\begingroup$

The answer is correct!

Another way to obtain it is to simply note that the average of the $10$ digits $\{4,5,5,6,6,6,7,7,7,7\}$ is $6$, and $6 666 666 666$ ($10$ digits all equal to $6$) times $10!$ (the number of possible permutations) equals $24191999997580800$.

$\endgroup$
  • $\begingroup$ Good, this is really another possible way how to solve this. $\endgroup$ – Hasek Feb 24 '17 at 14:43
  • $\begingroup$ I realized that we both gave wrong solutions since there are only four unique digits in the list, so different permutations may correspond to the same numbers. Just to be more precise, the true answer is $6666666666\cdot\frac{10!}{2!3!4!} = 83999999991600$. $\endgroup$ – Hasek Feb 27 '17 at 15:34
  • 1
    $\begingroup$ @Hasek No, the way the question is phrased one is really supposed to "count twice" a number that can be obtained by two distinct permutations. So our original answers are correct (albeit they may not answer the question you had in mind)! $\endgroup$ – Anonymous Feb 27 '17 at 15:37

Your Answer

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

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