Analyzing the Setup
We define our variables as x, y, and z, representing the frequency of the digits 1, 2, and 3, respectively. We are constrained by two fundamental equations.
First, the total number of digits is 7:
Second, the sum of these digits must be 11:
By subtracting the first equation from the second, we derive the master key for our system:
Since x, y, and z must be non-negative integers, we can now systematically explore the possible scenarios for these variables.
The Three Possible Worlds
We test the possible values of z (the number of 3s) to determine the corresponding values for y (the number of 2s) and x (the number of 1s).
Case 1: The World of 1s and 3s (z=2)
If z=2, then y+2(2)=4, which implies y=0. Substituting these into our total count, we find x+0+2=7, so x=5.
The multiset is {1,1,1,1,1,3,3}. The number of distinct arrangements is given by the multinomial coefficient:
Case 2: The World of 1s, 2s, and 3s (z=1)
If z=1, then y+2(1)=4, which implies y=2. Substituting these into our total count, we find x+2+1=7, so x=4.
The multiset is {1,1,1,1,2,2,3}. The number of distinct arrangements is:
Ways=4!2!1!7!=27×6×5=105
Case 3: The World of 1s and 2s (z=0)
If z=0, then y=4. Substituting these into our total count, we find x+4+0=7, so x=3.
The multiset is {1,1,1,2,2,2,2}. The number of distinct arrangements is:
Ways=3!4!7!=3×2×17×6×5=35
Final Calculation
Because these cases are mutually exclusive, we sum the results from each scenario to find the total number of valid seven-digit numbers.
The total number of such seven-digit numbers is 161.