2
$\begingroup$

First off, I'm not quite sure what this question is asking (there are a lot of very vague questions in the textbook I'm using and it's caused me some frustration), and I'm assuming one interpretation of the wording.

This is the question:

How many integers between 1,000 and 10,000 are there with distinct digits and at least one of 2 and 4 must appear?

I'm taking it to mean at least one 2 AND at least one 4 must appear. It can also be interpreted as at least one of either 2 or 4, such that a number containing one two and no fours is valid. If there is a specific reason why one interpretation is better than the other, please let me know.

Assuming the first interpretation:

Since 10,000 does not include 2 nor 4, it can be ignored and the question boils down to what I put as the title. To figure out the rest of the question, I scribbled this down (not anything formal):

Let A be a digit whose value is either 2 or 4.
Let B be a digit whose value is neither 2 nor 4.

The different combinations of four digit numbers with distinct digits and at
least one 2 and at least one 4 are represented by the sequences:

BBAA, BABA, BAAB, ABBA, ABAB, AABB

This gives me: $$(7 * 7 * 2 * 1) + (7 * 2 * 7 * 1) + (7 * 2 * 1 * 7) +$$ $$(2 * 8 * 7 * 1) + (2 * 8 * 1 * 7) + (2 * 1 * 8 * 7) = 630$$

The second interpretation doesn't really change the method much, it just results in this instead (10,000 is also ignored here):

Let A be a digit whose value is either 2 or 4.
Let B be a digit whose value is not that of A.

BBBA, BBAB, BABB, ABBB

Which gives me:

$$(8 * 8 * 7 * 2) + (8 * 8 * 2 * 7) + (8 * 2 * 8 * 7) + (2 * 9 * 8 * 7) = 3696$$

Are these answers, and by extension my method of obtaining them, correct?

$\endgroup$
4
  • $\begingroup$ My favoured interpretation would be that there is a $2$, or a $4$, or both. $\endgroup$ Commented Mar 26, 2014 at 3:16
  • $\begingroup$ @AndréNicolas 'at least one 2 and one 4' quite unambiguously means there must be both. $\endgroup$
    – Frank
    Commented Mar 26, 2014 at 3:18
  • $\begingroup$ But it doesn't say that, it says at least one of $2$ and $4$. At least one of Alicia and Beti will be at the meeting. $\endgroup$ Commented Mar 26, 2014 at 3:26
  • $\begingroup$ Oh, I see the problem, the title and body say different things. $\endgroup$ Commented Mar 26, 2014 at 3:36

3 Answers 3

1
$\begingroup$

My interpretation of the text in the body of the post is that the only bad numbers are those that miss both $2$ and $4$. We calculate the number of good numbers, so that you can compare with your second calculation.

First forget about the $2$, $4$ stuff. If we have no restriction, then the number of numbers with distinct digits, from $1000$ to $9999$, is $(9)(9)(8)(7)$.

The number of bad numbers with distinct digits (so missing both $2$ and $4$) is $(7)(7)(6)(5)$.

Subtract.

$\endgroup$
2
  • $\begingroup$ Interesting that with the same interpretation, my answer is 630 more than yours (3066 vs 3696), which is the result from the other interpretation. I can't really think of a reason for this off the top of my head since those 630 numbers are included in that 3066... $\endgroup$
    – NmdMystery
    Commented Mar 26, 2014 at 3:39
  • $\begingroup$ Either double-counting the both $2$ and $4$ cases, or failing to count them. $\endgroup$ Commented Mar 26, 2014 at 5:59
1
$\begingroup$

There are $8 \cdot 7 = 56$ ways of choosing the other two digits. The way of arranging four distinct digits is $4! = 24$. So the answer is $56 \cdot 24 = 1344$.

EDIT To clarify your confusion, the question is asking: how many ways are there are arranging the digits 0,1,...,9 given the restriction that no two digits can appear more than once; and that 2 and 4 must appear (precisely once).

EDIT If we don't allow leading zeros the question is a bit more complicated.

First, calculuate the number when we exclude zero altogether: $7 \cdot 6 \cdot 24$.

Next, suppose we have a 0,2 and 4 and have freedom only for the final choice. This gives 7 choices for the final digit. There are 24 possible arrangements, but 6 have a zero in the leading position. So there are 18 allowed arrangements. Giving a further $7 \cdot 18$ possible arrangements.

Now $7 \cdot 6 \cdot 24 + 7 \cdot 18 = 1134.$

$\endgroup$
11
  • $\begingroup$ Okay so there's three interpretations now :P EDIT: Or wait, this is the same as mine. I think. $\endgroup$
    – NmdMystery
    Commented Mar 26, 2014 at 3:21
  • $\begingroup$ I think the wording is totally unambiguous, and that we are both reading it in the correct way. $\endgroup$
    – Frank
    Commented Mar 26, 2014 at 3:24
  • $\begingroup$ Does this solution keep in mind that leading zeros aren't permitted (sorry, the question wasn't exactly what was in the title, I should fix that)? The choice of non-two/four digits is 7 * 7 in three cases of my solution, not always 8 * 7. $\endgroup$
    – NmdMystery
    Commented Mar 26, 2014 at 3:32
  • $\begingroup$ I have calculated the value according to this interpretation. I can't see an error in my method but it doesn't agree with Andre's $\endgroup$
    – Frank
    Commented Mar 26, 2014 at 3:41
  • $\begingroup$ That's because Andre's is the other interpretation. $\endgroup$
    – NmdMystery
    Commented Mar 26, 2014 at 3:42
1
$\begingroup$

Let us start like this. Suppose 2 and 4 are the first 2 digits. Then we have the number 2 4 _ _. Now, we can do 8*7 to find the other 2 numbers. But we can reaarange these number 4!=24 ways. So the answer is 24*56=1344.

Edit: misread sorry

Edit 2: Sorry, I realized my mistake after reading your solution, I did not mean to try to copy your solution in any way.

Edit 3: since 0 can't be the first digit, doesn't this factor out some cases?

Edit 4: Leading zeroes cannot be permitted, there is no ambuiguity in that matter.

$\endgroup$
1
  • $\begingroup$ Your third edit is correct, no leading zeros. $\endgroup$
    – NmdMystery
    Commented Mar 26, 2014 at 3:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .