GATE CSE
First time here? Checkout the FAQ!
x
+1 vote
74 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.4k points)   | 74 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.4k 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 Feb 2017
  1. Arjun

    5396 Points

  2. Bikram

    4230 Points

  3. Habibkhan

    3952 Points

  4. Aboveallplayer

    3086 Points

  5. Debashish Deka

    2564 Points

  6. sriv_shubham

    2318 Points

  7. Smriti012

    2240 Points

  8. Arnabi

    2008 Points

  9. mcjoshi

    1696 Points

  10. sh!va

    1684 Points

Monthly Topper: Rs. 500 gift card

20,863 questions
26,023 answers
59,698 comments
22,136 users