GATE CSE
First time here? Checkout the FAQ!
x
+1 vote
96 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)   | 96 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 May 2017
  1. akash.dinkar12

    3338 Points

  2. pawan kumarln

    2066 Points

  3. Bikram

    1922 Points

  4. sh!va

    1672 Points

  5. Arjun

    1614 Points

  6. Devshree Dubey

    1272 Points

  7. Debashish Deka

    1174 Points

  8. Angkit

    1056 Points

  9. LeenSharma

    1018 Points

  10. Arunav Khare

    758 Points

Monthly Topper: Rs. 500 gift card
Top Users 2017 May 22 - 28
  1. Bikram

    1008 Points

  2. pawan kumarln

    692 Points

  3. Arnab Bhadra

    632 Points

  4. Arjun

    342 Points

  5. bharti

    328 Points


22,888 questions
29,193 answers
65,292 comments
27,691 users