Let $n$ be a positive integer. Find the greatest possible integer $m$, in terms of $n$, with the following property: a table with $m$ rows and $n$ columns can be filled with real numbers in such a manner that for any two different rows $\left[ {{a_1},{a_2},\ldots,{a_n}}\right]$ and $\left[ {{b_1},{b_2},\ldots,{b_n}} \right]$ the following holds: \[\max\left( {\left| {{a_1} - {b_1}} \right|,\left| {{a_2} - {b_2}} \right|,...,\left| {{a_n} - {b_n}} \right|} \right) = 1\] Poland (Tomasz Kobos)
Problem
Source: 2012 European Girls’ Mathematical Olympiad P2
Tags: combinatorics, EGMO, EGMO 2012, Combinatorial Number Theory, number theory
13.04.2012 08:13
It's a trivial problem. The answer is $m=2^n$
13.04.2012 15:05
Suppose the table is $S = {\left( {{a_{ij}}} \right)_{m \times n}}$. Step 1, for any column $j$, let $\min \left\{ {{a_{ij}}\left| {1 \leqslant i \leqslant m} \right.} \right\} = {m_j}$, we can change ${a_{ij}} \to \left( {{a_{ij}} - {m_j}} \right)$ for $i = 1,2,...,m$. So next we can suppose $0 \leqslant {a_{ij}} \leqslant 1$ for any $1 \leqslant i \leqslant m,1 \leqslant j \leqslant n$. Step 2, for any $0 < {a_{ij}} < 1$, we can ${a_{ij}} \to 0$. Now any row is a $n$-dimension $0 - 1$ vector, because there are ${2^n}$ such vector, so $m \leqslant {2^n}$. On the other hand, we can fill the table with all $n$-dimension $0 - 1$ vector to get $m = {2^n}$. So the greatest possible integer is $m = {2^n}$.
20.04.2018 07:17
16.05.2018 20:05
The answer is $m(n) = 2^n$ achieved by taking a table with all $2^n$ binary vectors. To see it is optimal, we will proceed by induction on $n$, with the base case $n=1$ being immediate. Take the first column, and assume the entries lie in some interval $I = [r, r+1]$. Then the rows with first entry equal to $r$ form an $(n-1)$-table, hence at most $m(n-1)$ of them. The rows with first entry not equal to $r$ also form an $(n-1)$-table, hence at most $m(n-1)$ of them. So \[ m(n) \le \underbrace{m(n-1)}_{\text{first entry $r$}} + \underbrace{m(n-1)}_{\text{first entry not $r$}} = 2m(n-1) \]and we're done by induction.
18.07.2020 09:01
16.12.2020 10:35
Redacted Thanks @below!
16.12.2020 14:48
How from $a < b < c$ you get $(c-a)\ge 2$ for real numbers $a, b, c$?
19.05.2021 05:40
The answer is $2^n$. This is easily achievable by using all the possible binary strings of length $n$(of which there are $2^n$). We now prove this is maximum. Notice that the first row $a_1, a_2,\cdots, a_n$ and the condition given in the problem imply that in any column containing the number $a_k,$ once you use a number different from $a_k$ in the column, which must be either $a_k+1$ or $a_k-1$, the rest of the numbers in the column can only either be $a_k$ and that number, or else the max difference would have to be at least $2$. Therefore, if we ever use an element different from $a_k$ in the $k$th column, we really only have two choices for that number for all of the rows in the tables. Obviously, never using a different element in any row is non-optimal, as then there would be at most $2^{n-1}$ answers, assuming the best case scenario that all the other rows contain exactly 2 distinct elements. Therefore, to be optimal, we try to use distinct numbers in each column, and this gives a bound of $\leq 2^n,$ as desired. The proof I wrote above seems a little bit sketchy even to me and very different from the other solutions. Could someone confirm if this proof is rigorous enough, or if it is not, how can I make it rigorous?
27.11.2021 17:12
Pick a particular column. Note that there cannot be two pairs $a,a+1$ and $b,b+1$ such that $a \neq b$, because then (WLOG $b \ge a$) $b+1-a > 1$, which is bad. So only the pairs containing $a,a+1$ matter and the others are irrelevant, so assume they're $a,a+1$ too, also shift to assume $a = 0$. So now every row contains a binary string of length $n$. Since there can be at most $2^n$ of these, it follows that $m \le 2^n$. It's achieved by just picking every $n$ digit binary string. $\blacksquare$
03.04.2022 21:06
Let a table satisfying the condition in the problem statement be $\emph{good}$. We claim the answer is $2^n$. As a construction, let the $2^n$ rows of the table be all $2^n$ strings of 1s and 0s of length $n$. For the bound, we proceed with mathematical induction. The base case $n = 1$ is trivial. Induction step: suppose for some $k\ge 1$ that the maximum number of rows in a good table with $k$ columns is $2^k$. Assume FTSOC that there exists a good table with $k+1$ columns and at least $2^{k+1} + 1$ rows. Consider the graph where each vertex corresponds to a cell in the leftmost column and two vertices are connected by an edge if and only if the numbers in their corresponding cells differ by exactly $1$. Then this graph contains no odd cycles, so it is bipartite. In particular, we can choose a set of $a\ge 2^k + 1$ vertices, no two of which are connected by an edge. But then the $a\times k$ table formed by the intersection of these $a$ rows with the rightmost $k$ columns must be good, contradicting the inductive hypothesis.
17.09.2022 04:10
We claim the maximum number of possible rows with $n$ columns are $2^n$. Construction: We can construct it by entering the binary expansion of the numbers from $0$ to $2^n-1$ into the rows, each number exactly once. Now, we will prove that maximum number of possible rows with $n$ columns are $2^n$, by induction on $n$. The base case $n=1$ is trivial. Assume that the fact holds true for some value of $n=k$. We create another $2^k$ new rows in the table by copying the initial entries in the table, each row exactly once. We append a $0$ to each of the old rows and append a $1$ to each of the new rows. Hence, we have $2^k+2^k = 2^{k+1}$ rows with $n+1$ columns satisfying the condition. This completes our induction. We are done!
10.10.2022 22:13
The answer is $2^n$. This can be achieved by writing $0,1,\ldots 2^n-1$ in binary form and putting each digit in one cell in each row. To see that $m>2^n$ is impossible, note that when trying to add another row to any working combination of rows, in the new $2^n+1$-th row can be only put one of two numbers in each cell, so there are only $2^n$ possibilities for the $2^n+1$-th row. But as there are $2^n$ rows already, two of them must be identical to each other, which violates the given condition.
14.01.2023 21:17
This is actually very obvious even without induction. The answer is $m = 2^n$. Notice that for each column, its entries must be in the range $[x_k, x_k+1]$ for some real number $x_k$. Color the square in that column red if the real number it contains is equal to $x_k+1$, and color it blue if it is not. Assume for the sake of contradiction that $M>2^n$ works. Then, there must exist two rows with identical coloring. But, if two squares in a column are identically colored, they cannot differ by exactly 1, so no two of the corresponding entries differ by 1, contradiction. For a construction, color the blue squares in each row as some distinct subset of $[n]$, and assign the value $x_k$ to all red squares.
23.11.2023 18:53
trivial since we have $2^n$ distinct rows of 0 and 1
25.11.2023 09:05
The answer is $m = \boxed{2^n}$ achieved by taking a table with all $2^n$ binary vectors. If $m>2^n$, note that in the extra row, at most two numbers can go in each cell, so an extra row would violate the given conditions by being identical to another row.
27.11.2023 11:46
@all what is binary vectors
31.12.2023 20:50
04.01.2024 18:37
Observe that the absolute difference between any two entries in a column is at most $1$, hence we can shift the contents of every column by a value forcing them to be in the interval $[0, 1]$. Now for any entry $x$, replace it with $0$ if $0 \le x < 1$ and $1$ if $x = 1$. We preserve the condition of the problem, while converting the grid to a binary grid, with every row containing a distinct $n$-element binary string. Clearly the maximum number of strings we can fit is at $m = 2^n$, which is achievable by using every possible string as a row. Our proof is complete.
14.01.2024 19:57
We claim that the answer is $m = 2^n$. A simple construction for $m = 2^n$ is making each row a distinct binary string($0$'s and $1$'s) of length $n$. $\newline$ We will prove that it is impossible for $m > 2^n$. For some column $x$, let \[\min\left( {a_x, b_x, \ldots, n_x} \right) = \ell_x. \] $\newline$ Then it follows that column $x$ can be rewritten as \[(a_x - \ell_x), (b_x - \ell_x), \ldots, (x_n - \ell_x)\]$\newline$ Which is a binary string(since the positive different between numbers in the same row must be $0$ or $1$.) And we can rewrite all columns similarly. $\newline$ Now, each row is also a binary string. We claim that if two rows are identical, then our condition does not hold. This is because the pairwise difference of corresponding numbers in the rows are $0$, so the maximum different is not $1$. $\newline$ This implies that the maximum value of $m$ is $2^n$, since there are only $2^n$ possible distinct binary strings of length $n$, so if $m > 2^n$ there will be repeat binary strings, contradiction. $\blacksquare$ Wait this solution is basically identical to the others but is just longer
26.05.2024 20:33
We will show that the answer is $m = 2^n$. First we can show a construction that works with $2^n$ rows: the rows are numbered $0, 1, \cdots 2^n - 1$ and in each row it is written the number of it, in binary form, where each digit is in its own square. So this works since the largest difference is exactly 1. Now we need to show why m can't be larger than $2^n$. First of all, by the statement in each column the numbers should be in the range $[x_i, x_i+1]$ for random $x_i$. Now lets color the table in yellow and purple. We color a square in purple if the value of the square is exactly $x_i+1$. We color a square in yellow if the value of the square is smaller than $x_i+1$. Now lets assume $m \geq 2^n+1$. Since there are 2 colors in which we can color the squares, there are exactly $2^n$ combinations for the colorings of a row $\Rightarrow$ by Dirichlet since there are at least $2^n+1$ rows, there exist two rows with the exact same colorings. So if in the first row there is a yellow square in column A, there is a yellow square in column A in the second row too. But since the values in the yellow squares are in the range $[x_i, x_i+1)$ this means there $\not\exists$ a difference which is exactly 1. Also if in the first row there is a purple square in column B, there is a purple square in column B in the second row too, but all purple squares have the value $x_i+1$ $\Rightarrow$ there can't be a difference of exactly 1 here either. This means that these two rows which have identical coloring don't satisfy the condition in the problem - contradiction $\Rightarrow$ $m < 2^n+1$ and since we showed there is a configuration for $m = 2^n$, which works then we are ready and the answer is $m = 2^n$.
04.10.2024 01:27
I feel like a lot of the solutions in this thread are fakesolving by assuming that there are only 2 numbers used .. is there a way that we can prove this?
31.12.2024 21:14
@above, I agree. Hopefully my solution works through this. We claim the answer is $2^n$ and we will show this by induction. A valid construction is where the $m$th row is $m-1$ in binary. The base case, $n=1$, is clear. Assume, for our hypothesis, it holds for $n=k-1$. We show that for $n=k$, $2^{k}$ is the largest. Note that all elements in each column have a range of $1$, otherwise, the max surpasses $1$ for a pair of rows. For each column, let this range be $[x_1,x_1+1], [x_2,x_2+1], \dots, [x_n,x_n+1]$, respectively. The max between any two rows is $1$ iff one row has $x_m$ and the other has $x_m+1$ for at least one $m$. Call an entry viable if it equals $x_m$ or $x_m+1$, else it is non-viable. We claim a construction with $2^k$ rows is possible using only viable entries. FTSOC, assume not. If a row with $k$ elements has a non-viable entry (say its $m$th entry), then it has a maximum of $k-1$ viable entries, meaning it has $2^{k-1}-1$ ways or orderings (for entries $1$ to $k$ excluding $m$) to achieve a max of $1$ with other rows. If $2$ rows were to share an ordering, their $m$th entries must be $x_m$ and $x_m+1$ in some order. More than $2$ rows is not possible, then. This makes the maximum row total $1+2(2^{k-1}-1)=2^k-1$. So, the claim is true. Using that there are $2$ viable options for each entry, we obtain the maximum number of rows, $2^k$.