0

How many such numbers in 5-digit decimal expansion such that: (1) 3rd digit is 7 and digit 5 there is neither time or (2) there is no number more than once. My solution: Let a set $A$ is a set of numbers satisfying (1), Let a set $B$ is a set of numbers satisfying (2) Let's calculate $$| A | = 8 \cdot 9 \cdot 9 \cdot 9$$ And now: $$| B | = 9 \cdot 8 \cdot 7 \cdot 6 \cdot 5$$ Now, if these numbers in $A$ that satisfy $B$, de facto: $$| A \cap B | = 8 \cdot 8 \cdot 7 \cdot 6$$ Thus, in principle, inclusions and exclusions: $$| A \cup B | = 9 \cdot 8^3 + 9 \cdot 8 \cdot 7 \cdot 6 \cdot 5 -8 \cdot 8 \cdot 7 \cdot 6 = 17040$$ OK?

user180834
  • 1,453
  • 1
    Can the first digit be $0$? – bof Nov 18 '14 at 10:40
  • Please explain how you got $|B|=9\cdot8\cdot7\cdot6\cdot5$ instead of $9\cdot9\cdot8\cdot7\cdot6$. – bof Nov 18 '14 at 10:42
  • 1
    How did $8\cdot9\cdot9\cdot9$ turn into $9\cdot8^3$? – bof Nov 18 '14 at 10:45
  • The number must be 5-digit so 0 can't be the first. In case B you right, the: $|B| = 9\cdot9\cdot 8 \cdot 7\cdot 6 $

    "How did $ 8\cdot 9\cdot 9\cdot 9 $ turn into $ 9 \cdot 8^3 $"

    I made mistake, to correct is $9^3 \cdot 8 $

    And now is ok?

    – user180834 Nov 18 '14 at 11:07
  • 1
    In $A\cap B$ there are $7$ choices for the first digit, since it can't be 0, 5, or 7. Then there are $7$ choices for the second digit, since it can't be 5 or 7 or repeat the first digit. – bof Nov 18 '14 at 11:21
  • yes, you also alright. And now? :) $ | A \cap B | = 7 \cdot 7 \cdot 6 \cdot 5 $ – user180834 Nov 18 '14 at 11:25
  • 1
    I think you got it now. – bof Nov 18 '14 at 11:30

1 Answers1

0

Community wiki answer so the question can be marked as answered:

As noted in the comments, there are three errors in the calculation.

  1. For $|B|$, the choice of the non-zero first digit still leaves $9$ digits to choose from, so $|B|=9\cdot9\cdot8\cdot7\cdot6$.

  2. For $|A\cap B|$ we have to avoid both $5$ and $7$, and again $0$ in the first digit, which leaves $7\cdot7\cdot6\cdot5$ choices.

  3. In the last equation you wrote $9\cdot8^3$ instead of $8\cdot9^3$.

So the correct total is

$$ |A\cup B|=8\cdot9^3+9\cdot9\cdot8\cdot7\cdot6-7\cdot7\cdot6\cdot5=31578\;. $$

joriki
  • 238,052