Problem
Source: IMO ShortList 2001, combinatorics problem 5
Tags: combinatorics, counting, Integer sequence, IMO Shortlist
30.09.2004 20:30
Please post your solutions. This is just a solution template to write up your solutions in a nice way and formatted in LaTeX. But maybe your solution is so well written that this is not required finally. For more information and instructions regarding the ISL/ILL problems please look here: introduction for the IMO ShortList/LongList project and regardingsolutions
08.02.2009 09:15
23.01.2011 23:18
there must be something wrong with your solution, i haven't read it completely but i have found a counter-example. Consider this for n = 6 3,2,1,1,0,0,0. This clearly works, and n is bigger than 3. So I think you MIGHT have a slight mistake somewhere.
24.01.2011 00:44
Probably you should reread the solution given -- $m$ and $n$ are different letters
16.05.2016 07:35
Note that \[ x_0+x_1+x_2+\cdots = 0\cdot x_0 + 1\cdot x_1 + 2\cdot x_2 + \cdots \]so \[ x_0=x_2+2x_3+3x_4+\cdots \]Now we do casework on $x_0$. If $x_0=0$, then there is a $0$, so $x_0\ge 1$, a contradiction. If $x_0=1$, then it's easy to see that the equation is satisfied only if $x_2=1$ and $x_3=x_4=\cdots = 0$. There must be at least one $2$, which means $x_1=2$. There is one $0$, so $n=3$, and $(1,2,1,0)$ is a valid sequence. If $x_0=2$, then either $x_2=2$ and $x_3=x_4=\cdots = 0$, or $x_3=1$ and $x_2=x_4=x_5=\cdots = 0$. In the first case, since $x_3=x_4=\cdots = 0$ and there are two $2$s already, $x_1\ge 2$ is impossible. $x_1=0$ and $x_1=1$ yield the valid sequences $(2,0,2,0)$ and $(2,1,2,0,0)$. The second case is impossible Finally, suppose $x_0=a$ with $a\ge 3$. This implies $x_a\ge 1$, and in fact $x_a=1$ since if $x_a \ge 2$, we get a contradiction in the equation. This implies the equation can only hold if $x_2=1$ and $x_3=\cdots = x_{a-1}=a_{a+1}=\cdots = 0$. Now since $x_2=1$, we need a $2$ somewhere, which can only come from $x_1=2$. Adjusting the length of the sequence with the correct number of $0$s yields the sequence $(a,2,1,0,0,\cdots 0,1,0,0,0)$ with $a$ total $0$s for each $a\ge 3$.
16.05.2016 07:39
Solution First Simple Key Observation See that \[ \sum_{i = 0}^n x_i = n+1\]This is because every number in the sequence is from {$0,1,..,n$} as each represent number of occurances of a particular $0<=j<=n$ in the sequence so each $x_i<=n+1$ and if one $x_i=n+1$ this can't hold(as there are only n remaining places to fill and $i$ can't be $n+1$). So every number in the sequence is either $0$,$1$ , ..., or $n$. And thus \[ \sum_{i = 0}^n x_i = n+1\]as $n+1$ is the total number of numbers in the sequence. Second Simple Key Observation Let $x_0=k$. Observe that $x_0>0$ as if $x_0=0$ implies $0$ is not present in the sequence and simultaneously it is present once (a contradiction). Main pivotal reasoning Let $x_0=k$ [$k>0$]. Now leaving $x_0$ and the $k$ other $x_i$ which have value $0$ there are $(n+1)-(k+1)=n-k$ other terms of the sequence whose sum is $n+1-k=(n-k)+1$. Each of these takes values $>=1$(else that contradicts definition of $k$). After giving each of them a $1$ there is still a $1$ left which must go with one of them making that a $2$.(argument similar to proving Pigeon-Hole-Principle if you notice ) So exactly $n-k-1$ values among them are $1$ and only $1$ of them takes value $2$.($(n-k+1)=(n-k-1)*1+1*2$. "So we see that there are always i> $n-k-1$ entries of value $1$ ii> $1$ entry of value $2$ iii> $1$ entry of value $k$ iv> $k$ entries of value $0$". (Statement I) Next we consider 3 cases : Case 1 : $k>=3$ Case 2 : $k=2$ Case 3 : $k=1$ Case 1 : $k>=3$ The whole sequence is filled with $0,1,2$ and $k$. So for only these "$i$"s $x_i$ is non-zero. We know there is exactly one $2$, exactly one $k$. So $x_2=1$ and $x_k=1$ and $x_0=k>2$. We know there is a $2$ somewhere and thus $x_1$ must be $2$. This in turn suggests $n-k-1=2$ or , $k=n-3$. As we assumed $k>=3$ so here $n>=6$. Thus for every $n>=6$ there is exactly one sequence $(n-3,2,1,0,...,1,0,0,0)$.$\blacksquare$ Case 2 : $k=2$ As $k=2$ put that in the Statement I we get that there will be exactly $2$ "$2$"s in the sequence, exactly $n-2-1=n-3$ "$1$"s and $2$ zeroes. Again as the sequence is filled with only $0$,$1$ and $2$ only $x_0,x_1$ and $x_2$ can be non-zero and $x_0=x_2=2$. What remains is only $x_1$. $x_1$ can't be $2$ (then $x_2=3$ which is not). So $x_1=0$ or $x_1=1$. If $x_1=0$ $n-3=0$ or, $n=3$ and the sequence is $(2,0,2,0)$. $\blacksquare$ If $x_1=1$ $n=4$ and the sequence is $(2,1,2,0,0)$. $\blacksquare$ Case 3 : $k=1$ Again put $k=1$ in Statement I and we get that there are exactly $1$ "$2$", exactly $1$ "$0$" and exactly $n-1-1+1=n-1$ "$1$"s in the sequence. As there is one $2$ somewhere in the sequence and except $x_0,x_1$ and $x_2$ all other $x_i=0$ and $x_0=x_2=1<2$ so $x_1$ must be that $2$. This in turn gives $n=3$ and our solution is $(1,2,1,0)$. $\blacksquare$ $\blacksquare$ $\blacksquare$
19.01.2020 01:54
We claim the sequences that work are $(1,2,1,0)$, $(2,0,2,0)$, $(2,2,0,1,0)$, and $(n-3,2,1,0,\ldots,0,1,0,0,0)$ for any $n\ge 6$. It is easy to see that these work, so we now show that they are the only ones. Note that $0\le x_k\le n+1$ as $x_k$ is the size of some subset of $\{0,1,\ldots,n\}$. Furthermore, if $x_k=n+1$, then all the $x_i$s are $k$, so the sequence is $(n+1,\ldots,n+1)$, which doesn't work. Therefore, $0\le x_k\le n$ for all $k$. We have the following key claim. Claim: We have \[n+1=x_0+\cdots+x_n=x_1+2x_2+\cdots+(n-1)x_{n-1}+nx_n.\] Proof: Note that $x_0+\cdots+x_n$ is the sum of the number of times $k$ appears in the sequence over all $k$. Since each term of the sequence is between $0$ and $n$, this means that $x_0+\cdots+x_n$ is counting the number of terms in the sequence, which is $n+1$, so \[x_0+\cdots+x_n=n+1.\]Furthermore, $x_0+\cdots+x_n$ is the sum of the terms of the sequence, which is \[\sum_{k=0}^n k\cdot(\text{number of times }k\text{ appears})=\sum_{k=0}^n kx_k,\]which proves the claim. $\blacksquare$ In particular, we have \[\boxed{x_0=x_2+2x_3+\cdots+(n-1)x_n}.\]We now split into cases based on the value of $x_0$. Case 1: Suppose $x_0=0$. However this can't happen, as the sequence then has at least one $0$, so $x_0\ge 1$. Case 2: Suppose $x_0=1$. Thus, \[1=x_2+2x_3+\cdots+(n-1)x_n,\]so $x_2=1$ and $x_3=\cdots=x_n=0$. But we have exactly one $0$, so we must have $n\le 3$. Now, \[x_1=(n+1)-(x_0+x_2+\cdots+x_n)=(n+1)-(1+1)=n-1,\]so the sequence is $(1,n-1,1,0)$ or $(1,n-1,1)$. The first gives to $(1,2,1,0)$ and the second gives $(1,1,1)$. We see that $(1,1,1)$ doesn't work, so the only solution from this case is $\boxed{(1,2,1,0)}$. Case 3: Suppose $x_0=2$. Thus, we have \[2=x_2+2x_3+3x_4+\cdots+(n-1)x_n,\]so $x_4=\cdots=x_n=0$. We have two subcases. Case 3.1: Suppose $x_2=2$ and $x_3=0$. Then, $x_3=\cdots=x_n=0$, so $n\le 4$ as $x_0=2$. Now, \[x_1=(n+1)-(x_0+x_2+\cdots+x_n)=(n+1)-(2+2)=n-3,\]so the sequence is $\boxed{(2,0,2,0)}$ or $\boxed{(2,1,2,0,0)}$. Case 3.2: Suppose $x_2=0$ and $x_3=1$. Then, $x_2=x_4=\cdots=x_n=0$, so $n\le 4$ as $x_0=2$. Now, \[x_1=(n+1)-(x_0+x_2+\cdots+x_n)=(n+1)-(2+1)=n-2.\]Since $x_3=1$, we have $x_1\ge 1$, so $n=3,4$. These give $(2,1,0,1)$ and $(2,2,0,1,0)$. Neither of these work, so no solutions here. Case 4: Suppose $x_0\ge 3$. Let $a=x_0$. Then, we have $x_a\ge 1$, and we have \[a=x_2+2x_3+\cdots+(n-1)x_n\ge (a-1)x_a.\]If $x_a\ge 2$, then we have $a\ge 2(a-1)$, or $a\le 2$, which isn't the case. Therefore, $x_a=1$, so \[\sum_{\substack{k=2\\ k\ne a}}^n (k-1)x_k=1.\]This means $x_2=1$ and $x_k=0$ for $k\in\{3,\ldots,n\}\setminus\{a\}$. Now, $a\ge 3$, so the sequence has exactly two $1$s except for possibly $x_1$. This means that $x_1=2$. But we have \[x_0+\cdots+x_n=n+1,\]so \[a+2+1+1=n+1,\]so $a=n-3$. This gives the sequence $\boxed{(n-3,2,1,0,\ldots,0,1,0,0,0)}$ for any $n\ge 6$ (as $a=n-3\ge 3$). This completes the proof.
28.04.2020 16:52
We claim that the only sequences are $(1,2,1,0)$, $(2,0,2,0)$, $(2,1,2,0,0)$, and $(n-3,2,1,0,\ldots,0,1,0,0,0)$ for all $n\ge 6$. First, note that $x_0+\ldots+x_n=n+1$. As there are $x_0$ $0$s, there are $n-x_0$ positive numbers with positive index. However, they sum to $n+1-x_0$, so they must be comprised of all 1s and a single 2. This means that the only positive numbers in our sequence have indices a subset of $\{0,1,2,x_0\}$. Now, we break into cases based on the value of $x_0$. If $x_0=1$, note that we only have one $2$, so $x_2=1$. Now, we must have $x_1=2$. No other numbers can be positive, so this only yields $(1,2,1,0)$. If $x_0=2$, our sequence now has two $2$s, so $x_2=2$. Now, we can have $x_1=0,1$, leading to the solutions $(2,0,2,0)$ and $(2,1,2,0,0)$. Finally, if $x_0\ge 3$, we must have $x_2=1$ and $x_{x_0}=1$, so $x_1=2$. This yields the aforementioned infinite class of solutions.
09.05.2020 12:04
Nice problem! Here's my solution: The only possible sequences are $$(2,1,2,0,0),(1,2,1,0),(2,0,2,0) \text{ and } (n-3,2,1,\underbrace{0,0, \dots ,0}_{(n-6) \text{ times}},1,0,0,0) \quad \forall n>5$$ Notice that the sequence consists of only $0,1, \dots ,n$. Consider the sets $A$ and $B$ given by $$A=\{i \text{ such that }\exists k \text{ with } x_k=i\} \text{ and } B=\{i \text{ such that } x_i \neq 0\}$$Note that the given condition implies that $A=B$. Now, we have $x_0+x_1+ \dots +x_n=n+1$ as the LHS simply represents the total number of times each number $0,1, \dots ,n$ is present in the sequence. Also, $x_1+2x_2+\dots +nx_n$ is the sum of the elements of the sequence. Thus, we get $$x_0+x_1+ \dots+x_n=x_1+2x_2+ \dots +nx_n=n+1$$$$\Rightarrow x_0=x_2+2x_3+ \dots +(n-1)x_n$$If there exist $3$ numbers more than $1$ in set $B$, then let $i>j>k \geq 2$ be the three maximal integers in $B$. This gives $$x_0 \geq (i-1)x_i+(j-1)x_j+(k-1)x_k \geq i+j+k-3 \geq i+3+2-3=i+2$$But then, since $x_0$ lies in set $A$, so $x_0 \in B$ as well, which contradicts the fact that $i$ is the maximal element in $B$. So there are at most $2$ elements in $B$ which are more than $1$. If there are exactly $2$ such elements, then let $i>j \geq 2$ be these numbers. Then $$x_0=(i-1)x_i+(j-1)x_j \geq i+j-2 \geq i$$As shown above, $x_0 \in B$, which means that we must have $x_0 \leq i$ as well. Thus, equality must hold everywhere, which gives $x_0=i,$ $x_i=x_j=1$ and $j=2$. Then there are $2$ ones in the sequence, and so $x_1=2$. Since $x_0+x_1+x_i+x_j=n+1$, so this gives $x_0=n-3$, and hence $i=n-3$. As $i>2$, so we must also have $n-3>2$, i.e. $n>5$. This gives the infinite class of sequences mentioned in the beginning. Now $B$ must have atleast one element more than $1$, since otherwise $x_0=0$ (which is not possible as this means that $0 \in A$ but $0 \not \in B$). So suppose $B$ has exactly $1$ element more than $1$, and let this element be $i$. Then $x_0=(i-1)x_i$. If $i>3$, then $x_0 \in B$ gives that some multiple of $i-1$ also lies in $B$, which is contrary to the fact that $i$ is the only element more than $1$ in set $B$. So we have $i=2$, and $x_0=x_2$. Then we get $2x_0+x_1=n+1$. But $x_3,x_4, \dots ,x_n$ are all zeros, and so $x_0 \geq n-2$. Also, $x_2 \leq 2$ since it represents the number of times $2$ appears in the sequence, and we cannot have $x_0=x_1=x_2=2$. Then, as $x_0=x_2$, so we get $2 \leq x_0 \leq n-2$, which gives $n \leq 4$. A simple case bash then yield the remaining answers (in particular, remember that $1 \leq x_0 \leq 2$). $\blacksquare$
11.08.2022 06:33
Let $S$ be the sum $x_0+x_1+\dots+x_n.$ While $S$ is that, $S$ is also zero times the number of times zero appears in the sequence, plus one times the number of times one appears in the sequence, and so on adding to $x_1+2x_2+3x_3+\dots+9x_9.$ Where $x_i=0$ if $x_i$ does not ever happen in the sequence. $~$ Note that $x_{10}=x_{11}=\dots=0$ because numbers $\ge 10$ aren't digits. We have $9\ge x_0=x_2+2x_3+\dots+8x_9.$ When $x_0=0$ this is impossible. When $x_0=1$, then $x_2=1$ and that's it for index greater than one. Thus, $(1,2,1,0)$ $~$ Note that $x_0=2$ implies that $(x_2,x_3)=(2,0)$ or $(0,1).$ This gives $(2,0,2,0)$ or $(2,1,2,0,0)$ and none for $(0,1)$ because there's a two. $~$ For $x_0\ge 3$, note that $(x_0-1)x_{x_0}\ge x_0-1$ so there is one other two and that's it. This gives $(x_0,2,1,0,\dots,0,1,0,0,0).$
21.12.2022 17:54
The only solutions are $\boxed{(1,2,1,0), (2,0,2,0), (2,1,2,0,0), (x-3,2,1,0,0,\ldots, 0,1,0,0,0)}$ for any $x\ge 6$ (where the entries in $\ldots$ are zero). We can check that these all work. Notice that \[x_0 + x_1 + \cdots + x_n = 0\cdot x_0 + 1\cdot x_1 + \cdots + n \cdot x_n,\]so \[x_0 = x_2 + 2x_3 + 3x_4 + \cdots + (n-1)x_n\] Clearly $x_0>0$. Case 1: $x_0 = 1$. Then we must obviously have $x_2 = 1$ and $x_3 = x_4 \cdots = x_n = 0$. Since there is only one zero in the sequence, we have $n=3$. Since $x_0 = x_2 = 1$, we have $x_1 = 2$. This gives $(1,2,1,0)$. Case 2: $x_0 = 2$. Then we must have $x_4 = x_5 = \cdots = x_n = 0$ and either $x_3 = 1, x_2 = 0$ or $x_2 = 2, x_3 = 0$. If $x_3 = 1, x_2 = 0$, then we must have $x_i = 3$ for some $i$, which means $x_1 = 3$, but this is obviously impossible. Thus, $x_2 = 2, x_3 = x_4 = \cdots = x_n = 0$. Notice that $x_i\ne 1\forall i\ne 1$, so $x_1\in \{0,1\}$. We must have exactly two zeroes, so $x_1 = 0$ implies $n=3$ and $x_1 = 1$ implies $n=4$. This gives $(2,0,2,0)$ and $(2,1,2,0,0)$. Case 3: $x_0 > 2$. Let $x_0 = k$. Since $k\le n$, we have $(k-1)x_k \le x_0 = k$, so $x_k$ is at most $1$. Since $x_0 = k$, we have $x_k\ge 1$, so $x_k = 1$. Now, $(k-1)x_k = k-1$, so \[\sum_{i=2, i\ne k}^n (i-1)x_i = 1,\]so we must have $x_2 = 1$ and $x_3 = \cdots = x_{k-1} = x_{k+1} = \cdots = x_n = 0$. Then $x_1\ne 0$, so there are exactly $n-3$ zeroes in the sequence, which means $x_0 = n-3$ and $n>5$. Now $x_2 = x_k = 1$, so $x_1 = 2$ must hold. This gives $(n-3,2,1,0,0,\ldots, 0, 1,0,0,0)$, as desired.