For a positive integer $n$, denote $p(n)$ to be the number of nonnegative integer tuples $(x,y,z,w)$ such that $x+y+2z+3w=n-1$. Also, denote $q(n)$ to be the number of nonnegative integer tuples $(a,b,c,d)$ such that (i). $a+b+c+d=n$. (ii). $a \ge b$, $c \ge d$, $a \ge d$. (iii). $b < c$. Prove that for all $n$, $p(n) = q(n)$.
Problem
Source: 2018 Korean Mathematical Olympiad Problem 2
Tags: combinatorics, counting
11.11.2018 07:37
Matching one by one kills it.
11.11.2018 10:03
Okay, here's a solution. We will induct on $n$ - then erase some variables to make some conditions easier to deal with - then use a bijection. It is easy to see that $p(1)=q(1) = 1$. We will now prove that $p(n)-p(n-1) = q(n)-q(n-1)$ for all $n$. Denote $P_n = \{(x,y,z,w)| x, y, z, w \in \mathbb{N} \cup \{0\}, x+y+2z+3w=n-1\}$. Denote $Q_n = \{(a,b,c,d)| a, b, c, d \in \mathbb{N} \cup \{0\}, a+b+c+d=n, a \ge b, c \ge d, a \ge d, b<c\}$. Consider a tuple $(x,y,z,w) \in P_{n-1}$. Then, $(x+1,y,z,w) \in P_n$. Since this is an injective transformation which "reaches" all tuples in $P_n$ except the ones with $x=0$, we see that $p(n)-p(n-1)$ is the number of solutions to $y+2z+3w=n-1$, where $y,z,w$ are nonnegative integers. We see that $p(n)-p(n-1)$ counts the number of partitions of $n-1$ using $1, 2, 3$. Consider a tuple $(a,b,c,d) \in Q_{n-1}$. Then, $(a+1,b,c,d) \in Q_n$. Since this is an injective transformation which "reaches" all tuples in $Q_n$ except the ones with $a=\text{max}(b,d)$, we see that $q(n)-q(n-1)$ is the number of solutions to $\text{max}(b,d)+b+c+d=n$, where $c \ge d$ and $c>b$. We will now divide cases on whether $b \ge d$ or $d>b$. If $b \ge d$, we have $a=b$, $c \ge b+1$, and $2b+c+d=n$. Using $c'=c-1$, we have $2b+c'+d=n-1$, where $d \le b \le c'$. If $d > b$, we have $a=d$, $c \ge d$, and $2d+b+c=n$. Using $d'=d-1$ and $c'=c-1$, we have $2d'+b+c'=n-3$, where $b \le d' \le c'$. Notice that all variables are currently nonnegative integers. Therefore, $q(n)-q(n-1)$ is the number of solutions to $2i+j+k=n-1$ or $2i+j+k=n-3$, where $j \le i \le k$. Note that $2i+j+k = (k-i) + 3(i-j) + 4j$, and notice that $k-i \ge 0$, $i-j \ge 0$, and $j \ge 0$. This implies that $q(n)-q(n-1)$ counts the number of partitions of $n-1$ and $n-3$ using $1, 3, 4$. Now we finish the problem. Take a partition of $n-1$ using $1, 2, 3$. If the number of $2$'s in the partition is even, pair them into $4$'s. This is a bijection to the partitions of $n-1$ using $1, 3, 4$. If the number of $2$'s in the partition is odd, pair them into $4$'s. This is a bijection to the partitions of $n-3$ using $1, 3, 4$, since there is a leftover $2$. This proves that $p(n)-p(n-1) = q(n)-q(n-1)$, and by induction, the problem is proved. $\blacksquare$.
22.11.2018 22:38
rkm0959 wrote: For a positive integer $n$, denote $p(n)$ to be the number of nonnegative integer tuples $(x,y,z,w)$ such that $x+y+2z+3w=n-1$. Also, denote $q(n)$ to be the number of nonnegative integer tuples $(a,b,c,d)$ such that (i). $a+b+c+d=n$. (ii). $a \ge b$, $c \ge d$, $a \ge d$. (iii). $b < c$. Prove that for all $n$, $p(n) = q(n)$. Solution. Let $P=\{(x,y,z,w)\mid x,y,z,w\in\mathbb N_0,~x+y+2z+3w=n-1\}$ and $Q=\{(a,b,c,d)\mid a,b,c,d\in\mathbb N_0,~a+b+c+d=n-1,a\geqslant b,~a\geqslant d,~ c\geqslant d,~b<c\}.$ Then $|P|=p(n)$ and $|Q|=q(n).$ Define the function $T:Q\rightarrow P$ such that \[T(a,b,c,d)=(a-b-d,c-b-1,d,b)\qquad\forall\quad(a,b,c,d)\in Q.\]Verify that $T$ is an injective function and $T(Q)\subseteq P.$ Therefore $p(n)\geqslant q(n).$ Again define a function $\Delta: P\rightarrow Q$ such that \[\Delta(x,y,z,w)=\begin{cases}(x+w+z,w,y+w+1,z) & \text{, if }y+w+1\geqslant z\\ (x+w+z,w,z,y+w+1) &,\text{ otherwise}\end{cases}.\]It is not hard to verify that $\Delta$ is injective and $\Delta(P)\subseteq Q.$ Therefore $q(n)\geqslant p(n).$ Thus $p(n)=q(n).$ And we are done. $\blacksquare$
17.12.2018 00:42
Let $P(n)=\{(x,y,z,w)\in\mathbb{N}^4_0 |x+y+2z+3w=n-1\}$ , $Q(n)=\{(x,y,z,w)\in\mathbb{N}^4_0 |x+y+z+w=n,x\ge y,z\ge w,x\ge w,y<z\}$ , $f(n)=\{(x,y,z,w)\in\mathbb{N}^4_0 |x+y+3z+4w=n-4\}$ , $g(n)=\{ (x,y,z)\in\mathbb{N}^3_0 |x+y+4z=n-1\}$ and $h(n)=\{ (x,y,z,w)\in\mathbb{N}^4_0 |x+y+3z+4w=n-3\} $ . We wish to prove that $|P(n)|=|Q(n)|$. Denote by $t_{s}(n)=\{(x,y,z,w)\text{ or }(x,y,z)\in t|x+y=s\}$, $t\in\{P,f,g,h\}$. Claim. $|Q(n)|=|f(n)|+|g(n)|+|h(n)|$. (actually $f(n)$, $g(n)$ and $h(n)$ partition $Q(n)$) Proof. We'll count the number quadruples in $Q(n)$ with the following property: 1) $b>d$. We have that $b=d+x+1$, $c=b+y+1$, $a=b+z$, where $x,y,z\in \mathbb{N}_0\Rightarrow 4d+3x+y+z=n-4$, therefore we have $|f(n)|$ quadruples in this case. 2) $b=d$. We have that $c=b+x+1$, $a=b+y$, where $x,y\in \mathbb{N}_0\Rightarrow 4b+x+y=n-1$, therefore we have $|g(n)|$ quadruples in this case. 3) $d>b$. We have that $d=b+x+1$, $c=d+y$, $a=d+z$, where $x,y,z\in \mathbb{N}^3_0\Rightarrow 4b+3x+y+z=n-3$, therefore we have $|h(n)|$ quadruples in this case.$\Box$ Now, it suffices to prove that $|P_s(n)|=|f_s(n)|+|g_s(n)|+|h_s(n)|$, for a random $s\in \mathbb{N}_0$. Consider the following $4$ cases: 1) $n-s=4k$. It's easy to check that $|P_s(n)|=\lfloor\frac{2k+1}{3}\rfloor$ , $|f_s(n)|=\lfloor\frac{k+2}{3}\rfloor$ , $|g_s(n)|=0$ and $|h_s(n)|=\lfloor\frac{k}{3}\rfloor$. 2) $n-s=4k+1$. It's easy to check that $|P_s(n)|=\lfloor\frac{2k+3}{3}\rfloor$ , $|f_s(n)|=\lfloor\frac{k}{3}\rfloor$, $|g_s(n)|=1$ and $|h_s(n)|=\lfloor\frac{k+1}{3}\rfloor$. 3) $n-s=4k+2$. It's easy to check that $|P_s(n)|=\lfloor\frac{2k+2}{3}\rfloor$ , $|f_s(n)|=\lfloor\frac{k+1}{3}\rfloor$ , $|g_s(n)|=0$ and $|h_s(n)|=\lfloor\frac{k+2}{3}\rfloor$. 4) $n-s=4k+3$. It's easy to check that $|P_s(n)|=\lfloor\frac{2k+4}{3}\rfloor$ , $|f_s(n)|=\lfloor\frac{k+2}{3}\rfloor$ , $|g_s(n)|=0$ and $|h_s(n)|=\lfloor\frac{k+3}{3}\rfloor$. By checking the remainder of $k$ when divided by $3$, we get that $$|P_s(n)|=|f_s(n)|+|g_s(n)|+|h_s(n)|\Rightarrow \boxed{p(n)=q(n)}$$.$\Box$