Elitmus
Exam
Numerical Ability
Probability
Q. A n-digit number is to be formed using the digits {1,2,3....upto m} such that the number contains atleast one "1" and one "m". How many such numbers are possible?
Ex - if n=4, m=6
1236,1634,5312 are amonsgt the desired numbers.repition is allowed
Read Solution (Total 11)
-
- Ans:- {nC2 * 2! * m^(n-2)}
Sol:- Placing one '1' and one 'm' in this 'n' digit number can be done in (nC2 * 2!) ways now after placing a '1' and a 'm' we are now left with (n-2) places on this 'n' digit number.So these (n-2) places now can be occupied in m^(n-2)ways.
So total such numbers possible are :- (nc2 * 2!)*(m^(n-2)) - 11 years agoHelpfull: Yes(30) No(0)
- Is 5312 also allowed for n=4, m=6 as given in example ?
I think it does not satisfy the condition that atlease one 'm' should be there . - 11 years agoHelpfull: Yes(12) No(1)
- such possible numbers are 2*(m^(n-2))
if n=4, m=6
no. of such possible numbers = 2*6^(4-2)=72 - 11 years agoHelpfull: Yes(2) No(2)
- m^(n-2)first check it for some numbers
- 11 years agoHelpfull: Yes(1) No(0)
- ya its 5316
- 11 years agoHelpfull: Yes(0) No(1)
- 2*9^m-2..
- 11 years agoHelpfull: Yes(0) No(1)
- 356 is the answer
remaining numbers 2,3,4,5=4 numbers.
case 1:when 1 and 6 are both 2 times
1166--->4!/2!
case 2:when 1 and 3 are both 3 times
1116--->4!/3!*2
case 3:when 1 and 3 are both 1 time and other digits appear only once
16_ _ ---->4c2*4!
case 4:when 1 and 3 are both 1 time and one digit appears two time
16_ _ ----->4c1*4!/2!
adding all the cases
we get 356 - 11 years agoHelpfull: Yes(0) No(1)
- @ashes wat if m=9 and a nine digit number ??...
- 11 years agoHelpfull: Yes(0) No(0)
- m-2Cn-2 (n-2)!+2
- 11 years agoHelpfull: Yes(0) No(0)
- I think it should be... [ n! * m^(n-2) ]
possibilities=> 1 m (m ways) (m ways) .... (m ways)
n digits => - - - - .... -
(nth digit)
total possibilities => 1*1*m*m*m ... upto n digits => m^(n-2)
and n-digits can be permuted as well.. so n!
total answer according to me.... n! * m^(n-2) - 10 years agoHelpfull: Yes(0) No(0)
- we form n digit number i.e 1...................n selecting two places and arranged is nP2 given 1 and m must be used so the remaining n-2 numbers can be select from m-2 numbers(1 and m is already taken) is (n-2)C(m-2) so ans is nP2*(n-2)C(m-2)*n!(and all numbers can be arranged in n! ways) nP2=n*n-1 nCr=n!/(n*(n-1))
- 10 years agoHelpfull: Yes(0) No(1)
Elitmus Other Question