M HYPE SPLASH
// news

Subtraction principle

By Emily Wilson
$\begingroup$

How many positive integers less than 10000 are there which contain a digit 2 or 3?

Is this the right derivation? $$9\times9\times9\times8=5832$$ $$5832-2=5830$$ $$9998-5830=4168$$

$\endgroup$ 5

2 Answers

$\begingroup$

Count the complement set: the number of numbers from 0000 to 9999 with no 2 or 3. For each of the four places (units, tens, hundreds, thousands) there are 8 possibilities for this, so the complement number is $8^4=4096$. Subtract this from 10000 to get the answer: $10000-4096=5904$.

$\endgroup$ 1 $\begingroup$

Count the number of naturals with at least one 2, then count the number with at least one 3 and subtract the number with boh 2 and 3

$\endgroup$

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy