Find the sum of all 5 digited numbers formed using the digits,
Note :
Each digit must be used as many times as it's provided.
You may use a calculator for the last part.
Bonus :
Find a generalised solution to the problem.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Let us first define some terms,
Sum of given n digits = S n
R n = n times 1 1 1 … 1
Case 1 : Given digits do not include 0.
Suppose we are given n digits, not necessarily unique. Let the number of times a particular digit is repeated be a,b,c,d... and so on.
The total numbers formed using the digits = a ! b ! c ! d ! … n !
Out of the n given digits, each digit occurs a ! b ! c ! d ! … ( n ) ! n 1 = a ! b ! c ! d ! … ( n − 1 ) ! in the units place, tens place, hundreds place and so on.
The contribution of the one particular digit = ( 1 0 n − 1 + 1 0 n − 2 … 1 0 0 + 1 0 + 1 ) × a ! b ! c ! d ! … ( n − 1 ) ! × (Value of the digit) = R n a ! b ! c ! d ! … ( n − 1 ) ! × (Value of the digit )
Therefore sum of all the numbers formed = ( Sum of all digits ) × R n a ! b ! c ! d ! … ( n − 1 ) ! = S n × R n a ! b ! c ! d ! … ( n − 1 ) !
Case 2 : Out of n digits, m of them are 0.
Sum of all numbers including those with 0 s at front = S n × R n m ! a ! b ! c ! d ! … ( n − 1 ) ! … ( 1 )
Sum of numbers all numbers formed with 0 at front = S n × R n − 1 ( m − 1 ) ! a ! b ! c ! d ! … ( n − 2 ) ! … ( 2 )
Required sum = ( 1 ) − ( 2 )
∴ Required sum = a ! b ! c ! d ! … S n × ( m ! R n ( n − 1 ) ! − ( m − 1 ) ! R n − 1 ( n − 2 ) ! )
For the given question
n = 5 , m = 2 S n = 9
∴ Sum of all numbers formed = 9 × ( 2 ! R 5 ⋅ 4 ! − 1 ! R 4 ⋅ 3 ! ) = 9 × ( 1 1 1 1 1 ⋅ 1 2 − 1 1 1 1 ⋅ 6 ) = 9 × 1 2 6 6 6 6 = 1 1 3 9 9 9 4