How many (positive) seven digit integers are there that have a digit sum equal to 1 0 and that are formed using only the digits 1 , 2 and 3 ?
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.
There are 2 only combination of digit sum to make 10 from the request. It is 1111123 and 1111222 hence from 1111123 we got combination of 42 and from 1111222 we got combination of 35 so there are 77 combination.
I still not understood
What i feel is, if we could get a combination by adding the numbers, we can use permutations for those different combinations to get the answer
This problem is identical to the problem of dividing 10 identical balls into 7 urns where each urn contains at least 1 ball, and at most 3. We can preplace 1 ball in each urn, and are left with dividing 3 balls over 7 urns, where we can place at most 2 balls in one urn. With stars and bars we have ( 3 3 + 7 − 1 ) = 8 4 of such distributions, where we need to subtract distributions in which we put 3 in one urn. There are 7 of these. In total we have 8 4 − 7 = 7 7 distrubutions.
It is a problem of combinations!
There are only two ways of forming an seven digit positive integer whose sum is equal to 10 and using digits 1,2 and 3
They are : (i)five 1's, one 2, one 3 (ii)four 1's, three 2's
Now the combinations for (i) will be "(7C5)x2" and for (ii) will be "(7C4)x1" Adding you will get 35+42=77!
just coded.. and have got the answer... :P
In question it was asked no. Of integers so integers can be negative also.. So ans must be twice
How mukit plz tell
Whether 123 must be there in the combination? Still not clear cut question. It should be seven digit then why it is 77..is it true for other no. If six digit no. Is 66? Wrong question
Amongst the solutions of the Diophantine equation a+2b+3c=10 we seek those where a+b+c=7, then the sum of 7!/a!b!c! for each solution.
In Python:
>>> from sympy.solvers.diophantine import diophantine
>>> from sympy import *
>>> a,b,c=symbols('a b c ')
>>> diophantine(a+2 b+3 c-10)
set([(-3 c + 2 t + 10, -t, c)])
>>> for C in [0,1]:
... for B in range(-5,2):
... A=-3 C+2 B+10
... if A-B+C == 7 :
... A,-B,C, A+2 (-B)+3 C, factorial(7)/(factorial(A) factorial(-B) factorial(C))
...
(4, 3, 0, 10, 35)
(5, 1, 1, 10, 42)
>>> 35+42
77
Problem Loading...
Note Loading...
Set Loading...
We have that x+2y+3z=10 and x+y+z=7, where x y z are the number of "1", "2" and "3" respectively. Then x=4+z and y=3-2z where the only meaningful solutions are (4,3,0) and (5,1,1). For z=0 (ex. 1111222) we have 7!/(4!3!) diferent ways of sorting the digits and for z=1 (ex. 1111123) we have 7!/5! different combinations. Then we have a total of 77 different numbers that fulfill the given conditions