GATE CSE
First time here? Checkout the FAQ!
x
+2 votes
99 views
How many eight digit numbers are there, that contain a 5 and a 6____________? please explain!

Ans: 8486912
asked in Combinatory by Veteran (14.7k points)  
retagged by | 99 views

I suppose this should be the answer.

The negation of the statement:

Contains a 5 an a 6

is:

Thats includes following things:

1. Neither 5 nor 6

2. Contains only 5

3. Contains only 6

-------------------------------------------------------

1. Neither 5 nor 6 = 7 * 87 = 14680064

-------------------------------------------------------

2. Contains only 5(  but not 6 )

We use the methodology of contains atleast single 5.

So, Contains only 5 = 8 * 97 - 7 * 8= 23583688

-------------------------------------------------------

3. Contains only 6 (but not 5)

 = 23583688

-------------------------------------------------------

4. Now, total possible numbers without any restrictions = 9 * 107

 

Thus, answer = statement(4) - [statement(1) + statement(2) + statement(3)] = 28152560

2 Answers

+2 votes
number of numbers which contain a 5 and a 6
_ _ _ _ _ _ _ _
choose any two places from above 8 places ,arrange one 5 and one 6.  and each remaining 6 places have 10 possibilities (any of0...9 numbers can be present)
so 8C2 * 2!*10^6
but these arrangements also contain 0 in the first position. we need to subtract those numbers
0 _ _ _ _ _ _ _
7C2*2!*10^5 numbers contain 0 in the first position in 8C2 * 2!*10^6 arrangements
so subtract them
8C2*2!*10^6 - 7C2*2!*10^5 = 51800000 shud be the answer
answered by Veteran (11.5k points)  

Can you solve it again by conidering that it's given as exactl one 5 and exactly one 6?

is it
8C2*2!*8^6  -  7C2*2!*8^5 

yes.
0 votes
here i m taking two case to solve this question

case 1 :- when first digit to is filled by either 5 or 6

           2c1 (filling fist digit which would not make digit start from 0 will satisfy 8 digit no). * 7(to fill any digit  by 5 or 6 which is not filled at 1st) * 10^6(to fill all remaining by 6 place)=14000000

case 2;- when first digit is not filled by 5 or 6

      9(to fill place  other than  0 to make it 8 digit no  )* 7(to fill any 7 place by 5)*6(to fill any by 6 place by 6 )*10^5(to fill remaining ) = 37800000

total=14000000+37800000=51800000
answered by Loyal (3.4k points)  


Top Users Jul 2017
  1. Bikram

    3782 Points

  2. manu00x

    2464 Points

  3. Debashish Deka

    1832 Points

  4. joshi_nitish

    1494 Points

  5. Arnab Bhadra

    1096 Points

  6. Arjun

    1054 Points

  7. Hemant Parihar

    1050 Points

  8. Shubhanshu

    972 Points

  9. Ahwan

    876 Points

  10. akash.dinkar12

    642 Points


23,953 questions
30,895 answers
70,108 comments
29,273 users