# How many $4$-digit even numbers can be formed from a certain set?

Let's imagine a set with $6$ numbers, of which $3$ are even (including $0$) and $3$ are odd. How many $4$-digit even numbers can be formed? Digits cannot be repeated.

Zero is present: $5 \cdot 4 \cdot 3 \cdot 1$

Zero is not present: $4 \cdot 3 \cdot 2 \cdot 2$

Summing both outputs gives $108$ cases, but it is not correct.

• that outputs 180 cases, and its not correct @ntntnt Oct 1, 2017 at 15:15
• It matters whether $0$ is one of the even digits. Without that knowledge, we cannot answer the question. Oct 1, 2017 at 15:23
• i obtained: 4*3*2*2+5*4*3*1, but its still not correct(after acknowledging the existence of 0) @N.F.Taussig Oct 1, 2017 at 15:28

How many even $4$-digit numbers can be formed from a set with three even digits, one of which is $0$, and three odd digits?

The leading digit is odd: There are three ways to fill the units digit with an even number, three ways to fill the thousands digit with an odd number, four ways to fill the hundreds digit with a digit that has not been used in the thousands place or units place, and three ways to fill the tens digit with a digit that has not been used in the thousands place, hundreds place, or units place. Hence, there are $$3 \cdot 4 \cdot 3 \cdot 3 = 108$$ such numbers.

The leading digit is even: There are two ways to fill the thousands place with an even number other than $0$, two ways to fill the units place with an even digit other than the one used in the thousands place, four ways to fill the hundreds digit with a digit other than the ones used in the thousands place or units place, and three ways to fill the tens digit with a digit other than those used in the thousands place, hundreds place, or units place. Hence, there are $$2 \cdot 4 \cdot 3 \cdot 2 = 48$$ such numbers.

Total: Since the two cases above are mutually exclusive and exhaustive, there are a total of $108 + 48 = 156$ admissible numbers.

Everything can be separated into two scenarios: the last digit is $0$, and the last digit is nonzero.

For $0$; The first three can be chosen in 5P3 ways.

For nonzero; The thousands digit has only 4 choices left(cannot be zero), the hundreds also 4(including zero), the tens 3 choices, and the units digit has 2 choices(one of the nonzero even numbers).

Summing the two scenarios together,

$$5P3 + 4\cdot4\cdot3\cdot2=60+96=156(ways)$$

We have $4$ positions, $p_{1},p_{2},p_{3},p_{4}$.

1. We can put $0$ in $p_{4}$. In this case, we have $P(5,3)$ for remaining digits.
2. We can put $0$ in $p_{2}$ or $p_{3}$. In this case, $2$ even digits remains and we must put one of them in $p_{4}$.Thus, $C(2,1) \times C(2,1) \times P(4,2)$.
3. We can have a number without $0$. In this case, $C(2,1)\times P(4,3)$.

Therefore, the result is $$P(5,3) + C(2,1) \times C(2,1) \times P(4,2) + C(2,1)\times P(4,3)$$

• Thats what i tought at first, but its not correct. Oct 1, 2017 at 15:19
• @DavidSousa Why it is wrong? Oct 1, 2017 at 15:21
• The solutions have 156 cases, but i just cant see where they got that. Oct 1, 2017 at 15:22
• Have you considered there being a 0 Oct 1, 2017 at 15:28
• i forgot to add that, my bad @V.Chen Oct 1, 2017 at 15:30

Question:

Let's imagine a set with 6 numbers, of which 3 are even (including 0) and 3 are odd. How many 4-digit even numbers can be formed? Digits cannot be repeated.

Zero is present: 5⋅4⋅3⋅1 Zero is not present: 4⋅3⋅2⋅2 Summing both outputs gives 108 cases, but it is not correct.

Let's assume the set of numbers are {$$0,1,2,3,4,5$$}

Even numbers with $$0$$ on the right:

Zero is the right-most number, so there is only one way to select that number. Beginning from the left, the first number can now be chosen in five different ways, the second number in four different ways, and the third number in three different ways. The number of ways that a 4-digit number can be made from the above set with zero being on the right is

$$5 \times 4 \times 3 \times 1 = 60$$

Even numbers without the $$0$$ on the right:

In this case, we have two choices for the right-most number (2 or 4). Beginning from the left, the first digit can be chosen from four numbers, because it cannot be the number chosen on the right, neither can it be the $$0$$. However, you still have four choices for the second digit because $$0$$ can now be selected. The third digit will have three choices. The number of even numbers that can be formed without a zero on the right is

$$4 \times 4 \times 3 \times 2 = 96$$

Summing these two scenarios, the total number of even numbers that can be formed is $$60 + 96 = 156$$