Let $n$ be a nonnegative integer. Determine the number of ways that one can choose $(n+1)^2$ sets $S_{i,j}\subseteq\{1,2,\ldots,2n\}$, for integers $i,j$ with $0\leq i,j\leq n$, such that: for all $0\leq i,j\leq n$, the set $S_{i,j}$ has $i+j$ elements; and $S_{i,j}\subseteq S_{k,l}$ whenever $0\leq i\leq k\leq n$ and $0\leq j\leq l\leq n$. Proposed by Ricky Liu
Problem
Source: 2019 USAMO Problem 4/USAJMO Problem 5
Tags: AMC, USA(J)MO, USAMO, Olympiad Combinatorics, recursion, 2019 USAJMO, 2019 USAMO
19.04.2019 02:01
I got recursion but NO CLOSED FORM!! how many points would I get
19.04.2019 02:01
@jj_ca888 what recursion did you get? There is a simple closed form
19.04.2019 02:02
yeah it's simple
19.04.2019 02:02
yes mathfun5
19.04.2019 02:03
Recursion got me $A_n=A_{n-1}*\binom{2n}{2}*4^n$
19.04.2019 02:03
got $2^{n^2} \cdot (2n)!$ using the recursion $a_{n+1} = 2^{2n+1} \cdot (2n+2)(2n+1) \cdot a_n$.
19.04.2019 02:04
jeffisepic wrote: Recursion got me $A_n=A_{n-1}*\binom{2n}{n}*4^n$ are you sure? my recirsion had $\binom{2n}{2}$
19.04.2019 02:04
I wrote down $n!(2n-1)!!\cdot2^{n^2+2n-1}$ which I think is off by a power of 2...
19.04.2019 02:05
I also got $2^{n^2}(2n)!.$
19.04.2019 02:06
S00, S10, S20,.., Sn0, Sn1,... Snn be done in 2n! Ways each of the other n² have two ways Seemed too trivial for #5
19.04.2019 02:07
fine Let \(A_{m,n}\) be the problem for \(0\le i\le m\), \(0\le j\le n\). Specficially, the problem asks for \(A_{n,n}\) in terms of \(n\). I claim we can write \(A_{m,n}=2^{n}(m+n)A_{m-1,n}\). The proof is as follows. We can fix \(S_{1,0}\) in \(m+n\) ways, and there are \(A_{m-1,n}\) ways to finish everything that is not \(S_{0,i}\). Then, \(S_{0,0}=\varnothing\) and given \(S_{0,i}\), we can show that there are two ways to select \(S_{0,i+1}\) (pick one of the two elements in \(S_{1,i+1}\) but not \(S_{0,i}\)), yielding the result as there are \(n\) sets \(S_{0,i}\) such that \(1\le i\le n\). Now, this means that \(A_{n,n}=2^{2n-1}(2n)(2n-1)A_{n-1,n-1}\). We can easily see \(A_{0,0}=1\). We finally prove by induction that \(A_{n,n}=\boxed{2^{n^2}(2n)!}\), our answer.
19.04.2019 02:10
19.04.2019 02:12
My solution:
19.04.2019 02:12
Recursion: Let the sets be in an $n$ by $n$ array with $S_{i,j}$ in row $i$ and column $j$ (0-indexed). Then there are $\binom{2n}{2}$ ways to select the values in the upper left $n-1$ by $n-1$ sub-array. There are 2 ways to select each of the sets along the bottom and right side of the array (not including $S_{n,n}$). $2n$ total sets to determine so $2^{2n}$ possibilities. This means $f(n) = \binom{2n}{2}\cdot f(n-1)\cdot 4^n$.
19.04.2019 02:15
Charmander3333 wrote: jeffisepic wrote: Recursion got me $A_n=A_{n-1}*\binom{2n}{n}*4^n$ are you sure? my recirsion had $\binom{2n}{2}$ yeah I typoed.
19.04.2019 02:15
The answer is $(2n)!\cdot 2^{n^2}$. Let $a_n$ denote the answer at $n$. Claim: For $n\ge1$, \[a_n=\binom{2n}22^{2n}\cdot a_{n-1}.\] Proof. Place the sets in an $n\times n$ grid, with the coordinate $(i,j)$ referring to the set $S_{i,j}$. First select $S_{n-1,n-1}$ in $\tbinom{2n}2$ ways, and then the bottom-left $(n-1)\times(n-1)$ square in $a_{n-1}$ ways. It suffices to determine $S_{i,j}$ when $n\in\{i,j\}$. Pictorially, we have yet to determine the blue cells below: \[ \begin{bmatrix} {\color{blue}1357}&{\color{blue}12357}&{\color{blue}123457}&{\color{blue}1234578}&{\color{blue}12345678}\\ 135&1345&13457&134578&{\color{blue}1345678}\\ 13&135&1357&13578&{\color{blue}135678}\\ 1&15&157&1578&{\color{blue}15678}\\ \varnothing&5&57&578&{\color{blue}5678} \end{bmatrix} \]It suffices to show they may be chosen in $2^{2n}$ ways. Clearly $S_{n,n}=\{1,\ldots,2n\}$ is fixed. I will show that each $S_{i,n}$ admits two possibilities given $S_{i,n-1}$ and $S_{i+1,n}$. Iterating $i=n-1,\ldots,0$ will give $2^n$ choices for the top row, and symmetrically the right column admits $2^n$ choices, so the claim will follow. Indeed, $S_{i,n-1}\subset S_{i,n}\subset S_{i+1,n}$; we know $S_{i,n}\setminus S_{i,n-1}$ is a single-element subset of $S_{i+1,n}\setminus S_{i,n-1}$, which has cardinality $2$, so there are $2$ choices. Furthermore, each set of choices results in a valid configuration, since the condition ``for all $i$, $j$, we have $S_{i,j}\subset S_{i,j+1}$ and $S_{i,j}\subset S_{i+1,j}$'' is equivalent to the given one. $\blacksquare$ Finally, we note $a_0=1$, and from there, \[a_n=\prod_{k=1}^n\binom{2k}k2^{2k}=(2n)!\cdot2^{n^2},\]end proof.
19.04.2019 02:17
also @above you forgot to change some i's at the end to n's
19.04.2019 02:26
For this I tried making a recursion or bijection for 3+ hours.
25.03.2021 04:23
Indeed, approaching this problem with the "grid" idea is a natural and easy way for the solution.
09.04.2021 23:59
Could someone please check the following solution?:
.
25.04.2021 15:39
My solution is very simiar to post #18. The answer is $(2n)! * 2^{n^2}$ Let $a_n$ denote the number of ways to select the sets. Plot each $S_{i, j}$ on the coordinate plane, with $S_{i, j}$ having coordinates $(i, j)$. Notice that there are $\binom{2n}{2}$ ways to choose the elements $\in S_{n, n}$ that aren't in $S_{n - 1, n - 1}$. Note that this defines all elements used in the bottom left $n^2$ coordinates, so there are $a_{n - 1}$ ways to plot the bottom $n^2$ coordinates. Now notice that for each of $S_{n - 1, n}$ and $S_{n, n - 1}$ there exist 2 possible elements that $\in S_{n, n}$ but not in that set. Similarly, sets $S_{n - k, n}$ and $S_{n, n - k}$ for $1 \le k \le n$ can be defined in 2 ways, yielding that $a_n = (2n)(2n - 1) * 2^{2n - 1}$. Since $a_0 = 1$, we have $$a_n = 2^{\sum_{j = 1}^{n} 2j - 1} * (2n)! = 2^{n^2} * (2n)!$$which finishes the problem.
25.06.2021 22:49
07.07.2021 06:39
Start with plotting $S_{i,j}$ on the coordinate plane where each $S_{i,j}$ lies on $(i,j)$. Focus on the square with vertices $(0,0),(0,n),(n,0),(n,n)$. Denote $P_{i,j}$ as the number of ways you could construct the set $S_{i,j}$. Claim: $\prod_{j=0}^{n} P_{0,j}\prod_{i=1}^{n} P_{i,n} = (2n)!$ Proof: This is pretty easy to see. We start at the bottom left corner, move up, and then to the right. We get $P_{0,1}=2n$, $P_{0,2}=2n-1$, $P_{0,3}=2n-2$ and so on until $P_{n,n}=1$. Now we are left with a square with $n^2$ points in the bottom right of our original square. I claim that for any point $(x,y)$ in the remaining points, $P_{x,y} = 2$. To show this, consider $S_{x,y+1} - S_{x-1,y}$. There are two elements in this set, denote each as their own sets $u$ and $v$. We then must have that $(S_{x-1,y+1},S_{x,y}) = (S_{x-1,y} \cup u, S_{x-1,y} \cup v)$ or $(S_{x-1,y+1},S_{x,y}) = (S_{x-1,y} \cup v, S_{x-1,y} \cup u)$, so $P_{x,y} = 2$ as desired. Combining our two claims it follows that $P_{n,n}=\boxed{(2n)!2^{n^2}}$.
03.09.2021 02:10
I always find the worst possible solution... . The answer is $(2n)! \cdot 2^{n^2}$. Let $G_n$ denote the number of ways to choose $(n+1)^2$ satisfactory sets. We proceed by finding a recursive formula for $G_{n+1}$ in terms of $G_n$. By symmetry, there's $\binom{2n+2}{2n} \cdot G_n$ ways to form all sets $S_{(p, q)}$ where $0 \le p, q \le n$. WLOG, assume the $2n$ integers used to complete these $(n+1)^2$ sets are $\{1, 2, \ldots, 2n\}$. Let $T_d$ be the element such that $T_d \not\in S_{(n, d-1)}$, but $T_d \in S_{(n, d)}$, where $1 \le d \le n$. Similarly, we define $W_d$ as the element such that $W_d \not\in S_{(n+1, d-1)}$, but $W_d \in S_{(n+1, d)}$, where $1 \le d \le n$. By the subset condition, we know all pairwise $T_d$ and all pairwise $W_d$ are distinct. Lastly, we let $C_{n+1}$ denote the element such that $C_{n+1} \not\in S_{(n, 0)}$, but $C_{n+1} \in S_{(n+1, 0)}$. Let $Z_{n+1}$ denote the number of ways to choose $n+1$ distinct integers as $C_{n+1}, W_1, W_2, \ldots, W_n$, where all sets $S_{(p, q)}$ where $0 \le p, q \le n$ are fixed. Now, we perform casework on the value of $C_{n+1}$. If $C_{n+1} = T_d$, then we know $$W_1 = T_1, W_2 = T_2, \ldots, W_{d-1} = T_{d-1}$$is fixed. Now, we claim the number of ways to pick $W_d, W_{d+1}, \ldots, W_n$ for this case is equivalent to $Z_{(n+1) - ((d-1)+1)} = Z_{(n+1) - d}$. It easy to see $S_{(n+1, d-1)} = S_{(n, d)}$, as both sets contain $S_{(n, d-1)}$ and $T_d$. Hence, $S_{(n+1, d)}$ will contain $S_{(n, d)}$ and one of $$\{T_{d+1}, T_{d+2}, \ldots, T_n, 2n+1, 2n+2\}.$$If we shift the indices of $$\{T_{d+1}, T_{d+2}, \ldots, T_n\}$$down by $d$, however, we see these conditions are equivalent to picking integers for $$C_{n+1-d}, W_1, W_2, \ldots, W_{n-d}$$(in the context of forming sets while counting $G_{n-d+1}$ in terms of $G_{n-d}$). Hence, there's $Z_{n+1-d}$ to choose satisfactory integers, as desired. If $C_{n+1} = 2n+1$ or $2n+2$, then $W_d = S_d$ holds for all $1 \le d \le n$. Hence, there's $2$ possibilities for this case. As a result, we know $$Z_{n+1} = (\sum_{d = 1}^{n} Z_{(n+1) - d}) + 2 = Z_n + Z_{n-1} + \ldots + Z_1 + 2.$$By symmetry, there's also $Z_{n+1}$ ways to complete the sets $$S_{(0, n+1)}, S_{(1, n+1)}, \ldots, S_{(n, n+1)}.$$Since $S_{(n+1, n+1)} = \{1, 2, \ldots, 2n+2\}$ is fixed, we conclude $$G_{n+1} = \binom{2n+2}{2n} \cdot G_n \cdot (Z_{n+1})^2.$$ Claim: $Z_{n} = 2^{n}$. Proof. We proceed with strong induction. Trivially, our base case, $n = 1$, results in $Z_1 = 2^1 = 2$. Now, assume $Z_b = 2^{b}$ for all $b \ge 1$. Then, $$Z_{b+1} = \left( \sum_{a = 1}^{b} Z_a \right) + 2 = (\sum_{a=1}^{b} 2^a) + 2 = (2^{b+1} - 2) + 2 = 2^{b+1}$$as desired. $\square$ Now, we proceed with induction to show $G_n = (2n)! \cdot 2^{n^2}$. Base Case: By inspection, it's easy to see $$G_1 = 4 = 2! \cdot 2^1 = (2 \cdot 1)! \cdot 2^{1^2}.$$Inductive Hypothesis: For $n = b$, assume $G_b = (2b)! \cdot 2^{b^2}$. We will show $G_{b+1} = (2b+2)! \cdot 2^{(b+1)^2}$. Induction Step: Notice $$G_{b+1} = \binom{2b+2}{2b} \cdot G_b \cdot (Z_{b+1})^2 = \frac{(2b+2)!}{(2b)! \cdot 2!} \cdot \left((2b)! \cdot 2^{b^2} \right) 2^{2(b+1)}$$$$= (2b+2)! \cdot 2^{b^2 + (2b + 2) - 1} = (2b+2)! \cdot 2^{b^2 + 2b + 1} = (2b+2)! \cdot 2^{(b+1)^2}$$as desired. $\blacksquare$
24.11.2021 17:23
Let the answer for $n$ be $a_n$. We imagine the indices of the sets on the coordinate plane from $(0,0)$ to $(n,n)$. So the bottom left $(n-1)$ by $(n-1)$ square has $a_{n-1}\cdot \dbinom{2n}{2}$ ways as we also have to choose which elements we leave out from $(n,n)$. Now, for the rest of them. We note that for the $(n,n-1)$, there are two elements that are in $(n,n)$ and are not in $(n-1,n-1)$, which means we have to multiply by $2$. Now, for $(n,n-2), (n,n-3),\ldots, (n,0)$, we proceed similarly by shifting everything down (for example, for $(n,n-2)$, there are two things that are in $(n,n-1)$ and not in $(n-1,n-2)$) and find that there are $2$ ways for each of these, which gives a total of $2^n$. For $(n-1,n), (n-2,n), \ldots, (0,n)$, we do the same thing which also gives a total of $2^n$. So the recursion is $a_n=a_{n-1}\cdot\dbinom{2n}{2}\cdot4^n=a_{n-1}\cdot(2n)(2n-1)\cdot2^{2n-1}$ with $a_0=1$. We can find that the closed form is $\boxed{a_n=(2n)!\cdot2^{n^2}}$. I will show that this works. We proceed by induction. Suppose $a_{n-1}=(2n-2)!\cdot 2^{n^2-2n+1}$. Then \[a_n=(2n-2)!\cdot (2n)(2n-1)\cdot 2^{2n-1}=(2n)!\cdot2^{n^2},\]as desired.
30.03.2022 18:18
I don't understand the problem when $n=0$ (specifically the $S_{i,j}\subseteq\{1,2,\ldots,2n\}$ part) so I'll leave that out as a triviality. Strengthen the problem slightly to: Rephrased problem wrote: Let $n$ be a positive integer and $X$ any $2n$-element set. Determine the number of ways that one can choose $(n+1)^2$ sets $S_{i,j}\subseteq X$, for integers $i,j$ with $0\leq i,j\leq n$, such that: for all $0\leq i,j\leq n$, the set $S_{i,j}$ has $i+j$ elements; and $S_{i,j}\subseteq S_{k,l}$ whenever $0\leq i\leq k\leq n$ and $0\leq j\leq l\leq n$. Let the answer be $a_n$ (it's clear that the answer is independent of the choice of $X$). Claim: the values $S_{i-1,j}$ and $S_{i,j+1}$ determine $S_{i,j}$ up to two possibilities. Also, knowing $S_{i,j-1}$ and $S_{i+1,j}$ narrows $S_{i,j}$ down to two values. If we know $S_{i-1,j}$ and $S_{i,j+1}$, then $S_{i,j+1}\setminus S_{i-1,j}=\{a,b\}$ and so there are only two possible choices for $S_{i,j}$: either $S_{i-1,j}\cup\{a\}$ or $S_{i-1,j}\cup\{b\}$. The second part follows since everything is symmetric in $i$ and $j$. Now induct on $n$. Suppose that we know what $a_{n-1}$ is and we want to find $a_n$. We count the number of possibilities for each $S_{i,j}$: $S_{n,n}$ must be exactly $X$. There are $\binom{2n}{2n-2}=\binom{2n}2$ ways to select $S_{n-1,n-1}$, since we're choosing which two elements to exclude from $S_{n,n}$. There are collectively $a_{n-1}$ possible choices for $0\le i,j<n$ and $(i,j)\ne(n-1,n-1)$ once we know $S_{n-1,n-1}$. Here, we use the induction hypothesis with $X=S_{n-1,n-1}$. Once we've fixed the above values, we can determine $S_{n-1,n}$ (since we know $S_{n,n}$ and $S_{n-1,n-1}$) and then $S_{n-2,n}$ (since we know $S_{n-1,n}$ and $S_{n-2,n-1}$) etc. to $S_{0,n}$, with two choices for each. This multiplies $2^n$ possibilties. Similarly, we have $2^n$ possibilities for the sets $S_{n,0},S_{n,1},\ldots,S_{n,n-1}$. All in all, we obtained: $$a_n=1\cdot\binom{2n}2\cdot a_{n-1}\cdot2^n\cdot2^n=2^{2n}\binom{2n}2a_{n-1}.$$ Then, since $a_1=4$ (all the subsets of $\{1,2\}$) we have: \begin{align*} a_n&=\prod_{i=1}^n\left(2^{2i}\binom{2i}2\right) &=\prod_{i=1}^n\left(2^{2i-1}\cdot2i(2i-1)\right) &=\prod_{i=1}^n\left(2^{2i-1}\right)\cdot\prod_{i=1}^n(2i)\cdot\prod_{i=1}^n(2i-1) &=2^{\sum_{i=1}^n(2i-1)}\cdot(2n)! &=2^{n^2}\cdot(2n)! \end{align*}
12.10.2022 01:39
Uhm, I guess this works? Show the sets as cells in $2n+1 \cdot 2n+1$ matrix in an obvious way.If sets $S_{i-1,j},S_{i,j-1}$ are distinct, then $S_{i,j} = S_{i-1,j} \cup S_{i,j-1}$, otherwise there are $2n-i-j$ ways to pick $S_{i,j}$.We start from $S_{0,1}$, choose $S_{1,0}$, check are they distinct or not, select $S_{1,1}$ if they are not distinct, repeat. This distinct sets criteria corresponds to the a $2$ cell length diagonal (clockwise) of our matrix, since there are total $n^2$ such diagonals in our $2n+1 \cdot 2n+1$ matrix, and $\prod 2n-i-j= (2n)!$, multiplying gives $2^{n^2} (2n)!$ Our prosses is: Choose $S_{0,1}$. If $S_{1,0}=S_{0,1}$, then $S_{1,1}= (2n-1)$, otherwise $S_{1,0}=(2n-1)$. After pick $S_{0,2}$. Check all $2$ cell length diagonals as the same way, all the diagonals will give $2$ ways and we will use $(2n),(2n-1),...,2,1$ in our prosses, hence our answer.
26.11.2022 04:15
We claim the answer is $2^{n^2}(2n!).$ Arrange the sets in a grid with $S_{i,j}$ being in the $i$th column and $j$th row, with both the rows are columns being labeled as $0,1,2\dots,n.$ We color the diagonal from $S_{0,0}$ to $S_{n,n}$ first and then the rest of the grid. For the diagonal, there are \[\binom{2n}{2n}\cdot \binom{2n}{2n-2}\binom{2n-2}{2n-4}\dots\binom{4}{2}\binom{2}{0}=\frac{(2n)!}{2^n}\]ways to choose the subsets as we need to choose $2i$ elements of the $2i+2$ elements of $S_{i+1,i+1}$ for $S_{i,i}.$ Consider $S_{x,y}$ below the diagonal. Then, if $S_{x,y-1}$ and $S_{x+1,y}$ are determined, we need $S_{x,y}$ such that $S_{x,y-1}\subseteq S_{x,y}\subseteq S_{x+1,y}.$ Since $S_{x,y-1}\subseteq S_{x+1,y}$ and \[|S_{x,y-1}|+2=|S_{x,y}|+1=|S_{x+1,y}|,\]there are two ways to choose $S,$ since we need all the element of $S_{x,y-1}$ in $S_{x,y}$ and there are two ways to choose one of the two elements in $S_{x+1,y}\setminus S_{x,y-1}.$ Call the the set of cells directly below the diagonal $Q_1,$ the cells two below the diagonal $Q_2,$ and so on. For example, in when $n=3,$ the diagram is shown below: [asy][asy] for (int n = 0; n <= 4; ++n) { draw((0,n)--(4,n)); } for (int m = 0; m <= 4; ++m) { draw((m,0)--(m,4)); } for (int i = 0; i <= 3; ++i) { fill((0+i,0+3-i)--(1+i,0+3-i)--(1+i,1+3-i)--(0+i,1+3-i)--cycle,red+white); } for (int i = 0; i <= 2; ++i) { fill((0+i,0+2-i)--(1+i,0+2-i)--(1+i,1+2-i)--(0+i,1+2-i)--cycle,orange+white); } for (int i = 0; i <= 1; ++i) { fill((0+i,0+1-i)--(1+i,0+1-i)--(1+i,1+1-i)--(0+i,1+1-i)--cycle,pink+white); } fill((0,0)--(1,0)--(1,1)--(0,1)--cycle, yellow+white); label((0.5,4.5),"0"); label((1.5,4.5),"1"); label((2.5,4.5),"2"); label((3.5,4.5),"3"); label((-0.5,3.5),"0"); label((-0.5,2.5),"1"); label((-0.5,1.5),"2"); label((-0.5,0.5),"3"); [/asy][/asy] The red squares the diagonal, the orange $Q_1,$ the pink $Q_2,$ and the yellow $Q_3.$ We can determine all of $Q_1$ using the diagonal cells using the process above, then we can determine the cells in $Q_2$ by using $Q_1$ and the process above. Continuing on this fashion, we see that all the rest of the cells have exactly two ways to be determined. Similarly doing this for cells above the diagonal, there are $2^{(n+1)^2-(n+1)}$ ways to choose the non-diagonal cells. Therefore, there are \[\frac{(2n)!}{2^n}\cdot 2^{n^2+n}=2^{n^2}(2n!)\]ways to choose the subsets. $\square$
19.12.2022 03:31
Let $a_n$ be the number of ways to choose these subsets for some general $n$. Notice that if we remove the two numbers in $S_{1, 1}$ from all the sets and consider only $S_{ij}$ for $i, j \geq 2$, we obtain a valid family of sets for the $n-1$ case. Therefore, $a_n = ka_{n-1}$, where the constant $k$ (which depends on $n$) comes from choosing the extra elements in $S_{ij}$ for $1 \in \{i, j\}$ and the two elements in $S_{1, 1}$. Notice that there are ${2n \choose 2}$ ways to choose these latter two elements, and $2$ ways to choose which extra element $S_{1, 2}$ contains, and similarly for $S_{1, 3}$ and so on; this means that there are $2^{n-1}$ ways to choose the sets for $i=1$ and $j \geq 2$, and similarly $2^{n-1}$ ways to choose the sets for $j=1$ and $i \geq 2$. Therefore, $k = {2n \choose 2}2^{2n-2}$. Thus inductively we can show that $a_n = (2n)!2^{n^2}$.
09.03.2023 23:16
We claim the answer is $2n! \cdot 2^{n^2}$. Note that $\emptyset = S_{0,0} \subseteq S_{1,0}\subseteq\cdots \subseteq S_{n,0} \subseteq S_{n,1}\subseteq S_{n,2}\subseteq \cdots \subseteq S_{n,n} = \{1,2,\ldots, 2n\}$. Since the size increases by one each time, any sequences of these $2n+1$ sets correspond to the order in which elements are added, which is a permutation of $2n$ and thus has exactly $2n!$ different ways of being selected. After this note that in general, if we know $S_{x,y}$ and $S_{x+1,y+1}$, then each of $S_{x,y+1}$ and $S_{x+1,y}$ clearly only have two options. With this structure, we may slowly "fold in" the remaining $n^2$ values from our initial chain. This is because at any point, the unmarked $S_{a,b}$ with the largest value of $a-b$ (and smallest $a+b$ value in the event of ties) can use the fact that $S_{a+1,b}$ and $S_{a,b-1}$ have both been marked since $(a+1)-b = (a) - (b-1) = a-b+1 > a-b$. Each of these $n^2$ additions has 2 options, for an additional factor of $2^{n^2}$ and a total of $(2n)! \cdot 2^{n^2}$. $\blacksquare$.
14.03.2023 02:51
Let the answer be $f(n)$. The key claim is the following. Claim: $f(n+1) = 2^{2n+2}\tbinom{2n+ 2}{2}f(n)$ Proof: We will compute $f(n+1)$. Note that there are $\tbinom{2n + 2}{2n}$ ways to pick the subset $S_{n,n}$, and then the subsets $S_{i,j}$ for $0\le i,j\le n$ can be picked in $f(n)$ ways. Now, note that $S_{n + 1, n + 1} = [2n + 2]$. It is easy to see that there are $2$ ways to pick each of $S_{n+1,n}$ and $S_{n,n+1}$. Continuing, it is easy to see that we have $2$ choices for what element of $S_{n +1, i+1}$ to remove when constructing $S_{n+1, i}$; namely one of the two elements of $S_{n+1, i+1} - S_{n, i}$. Hence, there are $2^{n+1}$ ways total to decide the $S_{n+1, i}$'s. Similarly, there are $2^{n+1}$ ways to decide the $S_{i,n+1}$'s. Hence, we have \[ f(n+1) = 2^{n+1}\cdot 2^{n+1}\cdot \binom{2n + 2}{2}\cdot f(n),\]as desired $\square$ Now, noting that $f(0) = 1$, we will show via induction that $f(n) = \boxed{(2n)!\cdot 2^{n^2}}$ in general. Indeed, treating $n = 0$ as the base case, suppose the assertion holds for some fixed $n\ge 0$. Then, \[ f(n +1) = 2^{2n + 2}\binom{2n + 2}{2}\cdot (2n)!\cdot 2^{n^2} = (2n + 2) (2n + 1)(2n)!\cdot 2^{n^2 + 2n + 1},\]\[ f(n+1) = (2n + 2)!\cdot 2^{(n+1)^2},\]which completes the induction.
07.04.2023 09:01
We proceed using recursion. $a_n$ denote the number of ways to do the task. Clearly $a_1=4$. Now we draw a grid in the following manner. Note that the second condition is equivalent to that for every set, say $S_{ij}$, all the sets that are to the right of $S_{ij}$ or below it will be a superset of $S_{ij}$. Now we have 2 elements in $S_{11}$ both of which are present in all $S_{ij}$ for $1\le i\le n+1$ and $1\le j\le n+1$. We remove these two elements from all these sets. So we now have a similar pattern to the construction for $a_n$ for this part of the grid. There are $\binom{2n+2}{2}$ ways to choose the elements of $S_{11}$ and there are $a_n$ ways to fill the mentioned cells. Now for the remaining cells, note that we have two choices for $S_{01}$ from the elements of $S_{11}$. After having used one of them, we similarly have two choices for $S_{02}$ (one from the remaining element of $S_{11}$ and another one that we added to $S_{11}$ to get to $S_{12}$). Thus we can continue doing these for the rest of $S_{0i}$ and all the $S_{i0}$ too. So we finally have that $a_{n+1}=\binom{2n+2}{2}\cdot a_n\cdot 2^{n+1}\cdot 2^{n+1}$ which upon solving gives $a_n=(2n)!\cdot 2^{n^2}$.
25.08.2024 00:03
We will show that the answer is $(2n)! \cdot 2^{n^2}$ using induction: base case $n = 0$ is trivial since there is only $1$ way (let $S_{00} = \{\}$). Now, let $a_n$ be the number of ways for $n;$ we will find a recurrence for $a_n$ and show that the above answer satisfies the recurrence, which finishes. Suppose we have a working example for $n-1.$ Then we can add two elements to each set, and this will give us $S_{11}$ through $S_{nn}.$ All that's left is to resolve $S_{k0}$ and $S_{0k}$ for $1 \le k \le n$ ($k = 0$ is not necessary since then $S_{00} = \{\}$). First, $S_{11}$ has two elements, so we can assign $S_{01}$ a set in two different ways (just pick one element). Next, $S_{12}$ has three elements, one of which is the one in $S_{01},$ so there are $2$ ways to choose the remaining element of $S_{02}.$ We can continue going up like this, where in general, $S_{1k}$ has $k + 1$ elements, $k-1$ of which are in $S_{0(k-1)}$, so there are two ways to choose the remaining element of $S_{0k}.$ This gives a multiplier of $2^n$. We also go the other direction, which gives another multiplier of $2^n$. Finally, we need to choose the elements in $S_{11}$ in $\binom{2n}{2}$ ways and then assign a valid arrangement for $n-1$ in one of $a_{n-1}$ ways. This gives a valid arrangement since $S_{0k} \subset S_{1k}$ and $S_{k0} \subset S_{k1}$ (and $S_{k1}$ and $S_{1k}$ satisfy the condition by hypothesis). Therefore, $$\boxed{a_n = a_{n-1} \cdot \binom{2n}{2} \cdot 2^{2n}},$$and plugging in our claimed answer shows this works, so we are done.