0
$\begingroup$

Using the digits $0$,$1$,$2$ and $4$, find the sum of all four-digit numbers that can be formed. Repetitions not allowed.

total number of $4$-digit numbers that can be formed $= 3 \cdot 3 \cdot 2 \cdot 1 = 18$ numbers.

Total number of times each digit appears$= 18/4=4.5=4$ times. But answer is wrong, although my approach of doing it isn't wrong I feel. What mistake am I doing in finding the number of times each digit appears?

$\endgroup$
  • $\begingroup$ Presumably $0$ never appears in the left-most place (otherwise you get a $3$-digit number. $\endgroup$ – paw88789 Aug 25 '17 at 18:45
  • $\begingroup$ neither I am taking 0 at the leftmost place @paw88789 $\endgroup$ – Sakuzi Markel Aug 25 '17 at 18:51
  • $\begingroup$ 1,2 and 4 can be in the thousand place, followed by 3! ways in hundred place as 0 can also come in hundred place now, followed by 2! ways in tens place, followed by 1! way in unit place. $\endgroup$ – Sakuzi Markel Aug 25 '17 at 19:00
2
$\begingroup$

There are $4!=24$ numbers using the digits $0$, $1$, $2$, $4$ without repetition. Each of these digits appears $6$ times at each of the four decimal places. The sum of these $24$ numbers therefore is $(0+1+2+4)\cdot6666=46\,662$. We now have to eliminate the $6$ numbers beginning with a $0$. In these $6$ numbers each of the digits $1$, $2$, $4$ appears two times at each of the three last decimal places. The sum of the $6$ forbidden numbers therefore is $7\cdot222=1554$. It follows that the sum of all allowed numbers in this game is $46\,662-1554=45\,108$.

$\endgroup$
  • $\begingroup$ 1,2 and 4 can be in the thousand place, followed by 3! ways in hundred place as 0 can also come in hundred place now, followed by 2! ways in tens place, followed by 1! way in unit place. Total ways are 18. How come 24? @ChristianBlatter $\endgroup$ – Sakuzi Markel Aug 27 '17 at 10:25
  • $\begingroup$ I suggest you read my answer carefully. I start with $24$ numbers, then eliminate the $6$ forbidden ones. In this way symmetry can be exploited more easily. $\endgroup$ – Christian Blatter Aug 27 '17 at 10:36
  • $\begingroup$ I read it. Can you please be more elaborate? How you came to the conclusion that there will be 24 ways? @ChristianBlatter $\endgroup$ – Sakuzi Markel Aug 27 '17 at 10:39
  • $\begingroup$ I am not getting 24 ways. I am getting 18 ways. And that is what I wanted to know. How did you get 24 ways? $\endgroup$ – Sakuzi Markel Aug 27 '17 at 11:12
  • $\begingroup$ @SakuziMarkel If we ignore the restriction that $0$ cannot be the leading digit, there are $4 \cdot 3 \cdot 2 \cdot 1$ ways to arrange the digits. Christian Blatter's elegant solution then eliminates the six cases in which the leading digit is $0$. $\endgroup$ – N. F. Taussig Aug 27 '17 at 11:14
0
$\begingroup$

Note that $1$s, $2$s and $4$s each occur $6$ times in thousands place.

In each of the other places, $0$ occurs $6$ times while each of the other digits occurs $4$ times.

$\endgroup$
  • $\begingroup$ How did you find that @paw88789 $\endgroup$ – Sakuzi Markel Aug 27 '17 at 10:25
  • $\begingroup$ 1,2 and 4 can be in the thousand place, followed by 3! ways in hundred place as 0 can also come in hundred place now, followed by 2! ways in tens place, followed by 1! way in unit place. Total ways are 18. How come 24? @paw88789 $\endgroup$ – Sakuzi Markel Aug 27 '17 at 10:26
  • $\begingroup$ One way: just write out the 18 numbers. Another way: temporarily include the numbers with a leading 0. Now each digit appears 6 times in each column. But then when you get rid of the 0-starting numbers, you get rid of each nonzero digit twice in each no leading place. $\endgroup$ – paw88789 Aug 27 '17 at 10:52

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.