dimitri92 wrote:
I am sorry I don't have the OA. But I think it is solvable without the OA
What is the sum of all 4-digit numbers that can be formed using the digits 1,2,3,4 where repetition of digits is allowed?
As each digit of four digit number (abcd) can take 4 options (1, 2, 3, 4) total there can be 4^4 numbers.
Obviously each digit (a, b, c, and d) will take the value of 1, 2, 3, 4 equal number of times, so each digit will take the value of 1, 2, 3, 4 - \(\frac{4^4}{4}=4^3=64\) times: units digit will take the values of 1, 2, 3, 4 - 64 times and the same with tens, hundreds, thousands digits.
So the sum would be 64*(1+2+3+4)+64*10*(1+2+3+4)+64*100*(1+2+3+4)+64*1000*(1+2+3+4)=64*10*(1+10+100+1000)=711040.
Actually there is the direct formula for this kind of problems. Of course it's better to understand the concept, then to memorize the formula but in case someone is interested here it is:
1. Sum of all the numbers which can be formed by using the \(n\) digits
without repetition is:
(n-1)!*(sum of the digits)*(111…..n times).
2. Sum of all the numbers which can be formed by using the \(n\) digits (
repetition being allowed) is:
\(n^{n-1}\)*(sum of the digits)*(111…..n times).
Hope it helps.
Hi Bunuel, can you explain the logical way like you did for when the repetition is allowed for when the repetition is not allowed?
I am unable to figure it out. Just curious