The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+2 votes
107 views
How many eight digit numbers are there, that contain a 5 and a 6____________? please explain!

Ans: 8486912
asked in Combinatory by Veteran (16.8k points)
retagged by | 107 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 (12.6k 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 (4.5k points)


Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

28,947 questions
36,793 answers
91,077 comments
34,690 users