GATE CSE
First time here? Checkout the FAQ!
x
+1 vote
80 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.6k points)   | 80 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.3k points)  


Top Users Mar 2017
  1. rude

    5118 Points

  2. sh!va

    3054 Points

  3. Rahul Jain25

    2920 Points

  4. Kapil

    2730 Points

  5. Debashish Deka

    2602 Points

  6. 2018

    1574 Points

  7. Vignesh Sekar

    1422 Points

  8. Akriti sood

    1382 Points

  9. Bikram

    1350 Points

  10. Sanjay Sharma

    1128 Points

Monthly Topper: Rs. 500 gift card

21,531 questions
26,861 answers
61,191 comments
23,206 users