in Combinatory
1,350 views
4 votes
4 votes
Consider a set S={1000,1001,1002........,9999}. The numbers in set  S having atleast one digit as 2 and atleast one digit as 5 are?
in Combinatory
1.4k views

3 Comments

edited by
Is the answer 6580?
0
0
Nope!
0
0
Sorry I had mistaken the 'and' as or.Getting the answer as 1140 now.please verify
0
0

2 Answers

8 votes
8 votes
Best answer

Here, the Most Significant Digit has $9$ possibilities where as other digits have $10$. So, lets divide the cases

  1. MSD is either $2$ or $5$ $(2$ ways$)$ - We select one position for the other selection $(2$ or $5)$ in ${}^3C_1$ ways and the $2$ other positions can be filled in $10 \times 10 = 100$ ways. But here we will overcount. So, lets subdivide the cases
    1. One 5, One 2: $2 \times 3 \times 8 \times 8 = 384$
    2. One 5, Two 2s, 2 is MSD: $3 \times 2 \times 8 = 48$
    3. One 5, Two 2s, 5 is MSD: $3 \times 8 = 24$
    4. One 2, Two 5s: $48 + 24 = 72$ (Similar to One 5, Two 2s)
    5. Two 2s, Two 5s: $\frac{24}{2!2!} = 6$
    6. One 5, Three 2s, 5 is MSD: $1$
    7. One 5, Three 2s, 2 is MSD: $3$
    8. One 2, Three 5s: $4$ (Similar to One 5, Two 2s). So totally, $384 + 72 + 72 + 6 + 4 + 4= 542.$
  2. Otherwise - We select $2$ positions for $2$ and $5$ in ${}^3C_2 = 3$ ways and MSD can be filled in $7$ ways $($excluding $0,2,5)$ and the other remaining position in $10$ ways. So, totally $2! \times 3 \times 7 \times 10 = 420$ numbers. Again we overcount. So lets divide to subcases
    1. One 5 and One 2: $2 \times 3 \times 7 \times 8 = 336$
    2. One 5, Two 2: $3 \times  7 = 21$
    3. One 2, Two 5: $21.$ So, totally $336 + 21+21 = 378.$ 

Thus, total numbers $= 542 + 378 = 920.$


Better Way:

For the numbers in set  $S$ having at least one digit as $2$ AND one digit as $5$

Inclusion-Exclusion Principle:

$\mid 2 \cup 5 \mid = \mid 2 \mid + \mid 5\mid - \mid 2 \cap 5 \mid $

$\implies \mid 2 \cap 5 \mid = \mid 2 \mid + \mid 5\mid - \mid 2 \cup 5 \mid $

Here, $\mid 2\mid$ is the count of numbers having at least one digit as $2.$

$\mid 2 \mid = 9000 - $ count of numbers with none of the digits as $2.$
$\qquad = 9000 - 8 \times 9 \times 9 \times 9 = 9000-5832 = 3168.$

Similarly, $\mid 5 \mid = 3168.$

$\mid 2 \cup 5\mid = 9000 - $ count of numbers with no $2$ or $5$
$\qquad = 9000 - 7 \times 8 \times 8 \times 8 = 9000 - 3584 = 5416.$

So, $\mid 2 \cap 5 \mid = 3168 + 3168 - 5416 = 920.$

 

selected by
by

4 Comments

Thanks Arjun sir I am also getting 920 .made solution is wrong.
1
1
yes ,even am getting 920
0
0
Yes, 920 will be the answer.
0
0
0 votes
0 votes
The numbers in set  S having atleast one digit as 2 and atleast one digit as 5 are

Say, the $4$ digit number starts with $2$ and another one digit among four digits are $5$ is $=2$,__,__,__$=\binom{3}{1}\times 10\times 10=300$

The $4$ digit number starts with $5$ and another one digit among four digits are $2$ is $=5$,__,__,__$=\binom{3}{1}\times 10\times 10=300$

There is no $4$ digit number starts with $2$ and $5$, but contais atleast one $2$ and atleast one $5$ $=\binom{7}{1}\times \binom{3}{1}\times \binom{2}{1}\times 10=420$

Totally $300+300+420=920$

Related questions

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