To find the total number of 6-digit numbers in which only and all the digits 1, 2, 3, and 4 appear, we can break down the problem into manageable steps.
### Step 1: Understanding the Problem
We need to form a 6-digit number using the digits 1, 2, 3, and 4, ensuring that all four digits are included at least once.
### Step 2: Determine the Distribution of Digits
Since we have 6 positions to fill and we need to use all four digits, we can have two scenarios for the distribution of the digits:
1. Two digits appear twice (e.g., 1, 1, 2, 2, 3, 4)
2. One digit appears three times and the other digits appear once (e.g., 1, 1, 1, 2, 3, 4)
### Step 3: Case 1 - Two Digits Appear Twice
We need to choose 2 digits from the 4 digits (1, 2, 3, 4) to appear twice.
- The number of ways to choose 2 digits from 4 is given by \( \binom{4}{2} \).
- After choosing the digits, we can arrange them in the 6-digit number. The arrangement will be \( \frac{6!}{2! \times 2!} \) because we have two digits appearing twice.
Thus, the total for this case is:
\[
\text{Case 1 Total} = \binom{4}{2} \times \frac{6!}{2! \times 2!}
\]
### Step 4: Case 2 - One Digit Appears Three Times
We need to choose 1 digit from the 4 digits to appear three times, and the other three digits will appear once.
- The number of ways to choose 1 digit from 4 is \( \binom{4}{1} \).
- The arrangement will be \( \frac{6!}{3! \times 1! \times 1!} \) because we have one digit appearing three times and three other digits appearing once.
Thus, the total for this case is:
\[
\text{Case 2 Total} = \binom{4}{1} \times \frac{6!}{3! \times 1! \times 1!}
\]
### Step 5: Combine Both Cases
Now we can combine the totals from both cases to find the overall total number of valid 6-digit numbers:
\[
\text{Total} = \text{Case 1 Total} + \text{Case 2 Total}
\]
### Step 6: Calculate the Values
1. For Case 1:
\[
\binom{4}{2} = 6
\]
\[
\frac{6!}{2! \times 2!} = \frac{720}{2 \times 2} = 180
\]
\[
\text{Case 1 Total} = 6 \times 180 = 1080
\]
2. For Case 2:
\[
\binom{4}{1} = 4
\]
\[
\frac{6!}{3! \times 1! \times 1!} = \frac{720}{6} = 120
\]
\[
\text{Case 2 Total} = 4 \times 120 = 480
\]
### Step 7: Final Calculation
\[
\text{Total} = 1080 + 480 = 1560
\]
### Conclusion
The total number of 6-digit numbers in which only and all the digits 1, 2, 3, and 4 appear is **1560**.