Amount of permutations with condition

52 Views Asked by At

I want to calculate the amount of permutations of 4 numbers between the first 12 natural numbers, whose sum is 26. I first thought using $${}^{12}\!P_{4}=\frac{12!}{(12-4)!}=11880$$ but it also counts the permutations that don't add up to 26. How can I do that?

Edit:

As said in the comments, I want to calculate the amount of possible values of $A$, $B$, $C$ and $D$ in this system:

$$A+B+C+D=26$$$$\{A,B,C,D\}\in\mathbb{N}$$$$A< B< C< D\leq12$$

2

There are 2 best solutions below

2
On BEST ANSWER

We want to construct the number 26 in exactly 4 ways using ONLY the numbers from 1 to 12. This is called a Restricted 4-Composition of 26, with the restriction that the 4 numbers must be from 1 to 12. In general we can find any sequence of natural numbers from a to b, upto n such that we make n with any combination and length k.

Since you want permutations, we want all the ordered partitions. So using the closed form formula for C(n,k,1,b) where $n=26$, $k=4$ and $b=12$, we find:

$$C(n,k,1,b)=\sum_{j=0}^{\lfloor \frac {n-k}{b}\rfloor}(-1)^j{k \choose j}{n-bj-1 \choose k-1}$$

$$=\sum_{j=0}^{\lfloor \frac {26-4}{12}\rfloor=1}(-1)^j{4 \choose j}{26-12j-1 \choose 4-1}=(-1)^0{4 \choose 0}{26-1 \choose 3}+(-1)^1{4 \choose 1}{26-12-1 \choose 3}$$

$$={4 \choose 0}{25 \choose 3}-{4 \choose 1}{13 \choose 3}=1156$$

So there are 1156 ordered ways of creating the number 26 in exactly 4 summands with the numbers 1 to 12.

The formula I used comes from formula (E): https://www.fq.math.ca/Scanned/14-5/abramson.pdf. It relies on inclusion-exclusion principles.

Please let me know if I can clarify!

0
On

As the question was edited, the answer should be 33.
Since the four integers need be ordered and strictly positive, we can subtract {4,3,2,1} from {D,C,B,A} to get the integer partitions of (26-10)=16 into up to 4 parts not greater than (12-4)=8.
I know of no closed form expression for restricted partitions. It can be done by hand on the back of an envelope:
{12,11,2,1},{12,10,3,1},{12,9,4,1},{12,9,3,2},
{12,8,5,1},{12,8,4,2},{12,7,6,1},{12,7,5,2},
{12,7,4,3},{12,6,5,3},{11,10,4,1},{11,10,3,2},
{11,9,5,1},{11,9,4,2},{11,8,6,1},{11,8,5,2},
{11,8,4,3},{11,7,6,2},{11,7,5,3},{11,6,5,4},
{10,9,6,1},{10,9,5,2},{10,9,4,3},{10,8,7,1},
{10,8,6,2},{10,8,5,3},{10,7,6,3},{10,7,5,4},
{9,8,7,2},{9,8,6,3},{9,8,5,4},{9,7,6,4},{8,7,6,5}