Partitions of an integer with polynomials

103 Views Asked by At

Determine the coefficients of the polynomial $$a_0 + _1_1 + _2_2 + _3_3 + ⋯ + __$$ that has the property that $~_ = ~$ . Where $p$ is the number of partitions of $n$ composed of two parts, $p_1$ and $p_2$, where $ 1 ≤ p_1 ≤ 100~$ and $~ 101 ≤ p_2 ≤ 200~$ for $~ 102 ≤ n≤ 300$. The answer is: $$a_r = 0~ (1≤r≤101)$$ $$a_r = 100 - |r - 201| (102≤r≤300)$$ Can anyone help me in interpreting this statement and in the resolution?

1

There are 1 best solutions below

1
On BEST ANSWER

The original conditions don't specify anything for $a_n$ where $n \le 101$. Thus, they could, in theory, be anything. However, I believe the answer sets them to $0$ (but doesn't explicitly specify $a_0$) as there are no partitions for $n \le 101$ using $p_1$ and $p_2$ as the minimum value of $p_1 + p_2$ is $102$.

As for the next part, for each $102 \le n \le 300$, $a_n$ is the number of $(p_1,p_2)$ which satisfy

$$p_1 + p_2 = n \tag{1}\label{eq1}$$

subject to the constraints of $1 \le p_1 \le 100$ and $101 \le p_2 \le 201$. I believe it's easiest to break this into $2$ parts. First, consider $102 \le n \le 201$. For $n = 102$, you only have $p_1 = 1, p_2 = 101$ for $1$ partition. For $n = 103$, you have $p_1 = 1, p_2 = 102$ and $p_1 = 2, p_2 = 101$ for $2$ partitions. In general, there's an increase by $1$ in the number of partitions for each increase in $n$ by $1$, i.e., for each $p_1 \le n - 101$, there's a $p_2 = n - p_1$ with $101 \le p_2$, for a total of $n - 101$ partitions, i.e.,

$$a_n = n - 101 \; \text{ for } \; 102 \le n \le 201 \tag{2}\label{eq2}$$

For $202 \le n \le 300$, note for each increase in $n$ there's a decrease by $1$ in the number of partitions due to one less value being available to be used in $p_1$ each time. For example, for $n = 202$, you have $2 \le p_1 \le 100$ for $99$ partitions being available. For $n = 203$, you have $3 \le p_1 \le 100$ for $98$ partitions. This continues until you get to $n = 300$ when there is only $n_1 = 100, p_2 = 200$ for $1$ partition. Since the value of the # of partitions is decreasing by $1$ for each $n$ increase, you can specify this by subtracting $n$ from $301$ for the values to match starting at $n = 202$. This can be expressed as

$$a_n = 301 - n \; \text{ for } \; 202 \le n \le 300 \tag{3}\label{eq3}$$

In \eqref{eq2}, $a_n$ increases from $1$ to $100$ at $n = 201$, then in \eqref{eq3} $a_n$ decreases to $1$ at $n = 300$. This is equivalent to $100$ minus the distance of $n$ from $201$, i.e.,

$$a_n = 100 - \left|201 - n\right| \; \text{ for } \; 102 \le n \le 300 \tag{4}\label{eq4}$$

Switching $n$ to $r$ and using $\left|201 - r\right| = \left|r - 201\right|$ gives the answer's equation of

$$a_r = 100 - \left|r - 201\right| \; \text{ for } \; 102 \le r \le 300 \tag{5}\label{eq5}$$

Note you can even combine both parts of the answer into just $1$ equation as

$$a_r = \max(0, 100 - \left|r - 201\right|) \; \text{ for } \; 0 \le r \le 300 \tag{6}\label{eq6}$$