This was the question in one of the online test I was giving for preparation of an exam. I was not convinced by the final answer so I wanted to discuss it.
Consider a set S = {1000, 1001, 1002, ........ 9999}. The numbers in set āSā that have atleast one digit as 2 and atleast one digit as 5 are ________.
I solved it using complimentary counting.
Final answer will be
All total numbers from 1000 to 9999 both inclusive - All such numbers that do not have either a 2 or a 5.
Now Let A:All 4 digit numbers do not having 2 B : All 4 digit numbers do not having 5
$|A|=8*9*9*9=|B|$
$|A \cap B |=7*8*8*8$
$|A \cup B|=|A|+|B|-|A \cap B|=2(8*9*9*9)-(7*8*8*8)=8080$
So my answer will be $9000-8080=920$
But in solution they have given answer to be 2752. Which one is correct?