Let $N \geq 2$ be an integer, and let $\mathbf a$ $= (a_1, \ldots, a_N)$ and $\mathbf b$ $= (b_1, \ldots b_N)$ be sequences of non-negative integers. For each integer $i \not \in \{1, \ldots, N\}$, let $a_i = a_k$ and $b_i = b_k$, where $k \in \{1, \ldots, N\}$ is the integer such that $i-k$ is divisible by $n$. We say $\mathbf a$ is $\mathbf b$-harmonic if each $a_i$ equals the following arithmetic mean: \[a_i = \frac{1}{2b_i+1} \sum_{s=-b_i}^{b_i} a_{i+s}.\]Suppose that neither $\mathbf a $ nor $\mathbf b$ is a constant sequence, and that both $\mathbf a$ is $\mathbf b$-harmonic and $\mathbf b$ is $\mathbf a$-harmonic. Prove that at least $N+1$ of the numbers $a_1, \ldots, a_N,b_1, \ldots, b_N$ are zero.
Problem
Source: Romanian Masters in Mathematics 2020, Problem 2
Tags: RMM, RMM 2020, algebra
01.03.2020 13:05
The pith is this claim: Claim: For all $i$, we have $0\in\{a_i,b_i\}$. Proof. Assume for contradiction this does not hold. Say $i$ is a candidate if $a_i$ is maximal over all $j$ with $0\notin\{a_j,b_j\}$, and select a candidate $i$ such that $i-1$ is not a candidate. Assume without loss of generality $a_i\ge b_j$ for all $j$ with $0\notin\{a_j,b_j\}$. Since $\mathbf a$ is $\mathbf b$-harmonic, there is an $s$ with $|s|\le b_i$ such that $a_{i+s}>a_i$ (the inequality is strict since $a_{i-1}<a_i$). By assumption that $a_i$ is maximal, we know $b_{i+s}=0$. Since $\mathbf b$ is $\mathbf a$-harmonic, $b_{i+s}=0$ is the average of $b_{i+s+t}$ over all $t$ with $|t|\le a_{i+s}$; thus all $b_{i+s+t}$ are zero. However $a_{i+s}>a_i\ge b_i\ge |s|$, so $b_i=0$, contradiction. $\blacksquare$ To finish, there must exist $i$ with $a_i=0$ but $a_{i-1}\ne0$. Then $a_{i+s}=0$ for all $|s|\le b_i$, so $b_i=0$. Thus if $k$ elements of $\mathbf a$ are nonzero, then at least $k+1$ elements of $\mathbf b$ are zero, so the number of zeros among $a_1$, $\ldots$, $a_N$, $b_1$, $\ldots$, $b_N$ is at least $(N-k)+(k+1)=N+1$ @3below thanks, fixed
01.03.2020 13:22
(soln with Anant) Call $i$ cute iff $a_i = 0$ or $b_i = 0$ $\textbf{Claim:}$ At least $1$ cute number $\textbf{Proof:}$ Not hard to see; Take largest number out of all $a_i$ and look at $b_i$ $\textbf{Claim:}$ All $i$ are cute $\textbf{Proof:}$ Assume false FTSOC. Take $a_i$ maximum from all non-cute $i$. Wlog $a_i \ge b_j$ for all non-cute $b_j$. Also, if $a_i$ is part of a block of non-cute indexed numbers, all of them equal to $a_i$, then instead of $a_i$, pick an endpoint of this block. [eg, if $a_{i-1} = a_i = a_{i+1} = a_{i+2}$ and $\{ i-1, i, i+1, i+2 \}$ all cute, pick $a_{i+2}$ There is a $j$ such that $a_j \ge a_i$ and $b_i \ge |j-i|$. Then observe that such a cute $j$ exists. If not, we'd have that $a_i$ isn't the endpoint of the block. We get $b_j = 0$. $b_j$ must be the average of stuff that is $0$. For all $|k| \le a_j, b_{j-k} = 0$. In particular, $b_i = 0$, contradiction Thus all numbers are cute. We trivially get that at least $N$ numbers are $0$. To improve this bound, observe that if $a_{i-1} \neq 0, a_i = 0$, we have $b_i = 0$. $\textbf{Remark:}$ We can easily improve the bound of $N+1$ to $N+2$. $N+2$ is achieved for all $N>3$
01.03.2020 19:16
For convenience, let us write the numbers in a $2 \times N$ table. Say a $2\times k$ board with nonnegative integers $(a_{ij})$ satisfactory if $a_1$ is $a_2$-harmonic, and $a_2$ is $a_1$-harmonic where $a_1=(a_{11}, a_{12}, \cdots, a_{1n})$ and $a_2=(a_{22}, \cdots, a_{2n})$. We will do all the work there. Now, consider the following algorithm: Choose the biggest element on the current table.(if there are lot of those, then choose all of them) for each chosen element, delete the column containing it (and put the remaining boards together) Repeat the above steps while the table is nonempty. Let us call the first two steps a deletion of the table. We can make some observations here: Lemma. Suppose that we deleted $k$ columns by performing a deletion. Then we have eliminated at least $k$ zeros, and the remaining board is also satisfactory. Proof. If we chose $0$ as the biggest element, then we have deleted exactly $2k$ elements, so we are done. Now suppose that we have chose some $m>0$ as our biggest element. Now look at the first row, and consider a maximal block of $m$'s are on columns from $i$ to $j$. Then unless all elements of the first row equals $m$, if $a_{2i}\neq 0$, by the "biggest element" property we have $a_{1(i-1)} =m$, which contradicts the maximal assumption. Thus in this case we have $a_{2i}=0$, and applying the condition on $a_{2i}$, we have $a_{2k}=0$ for $i-m \le k \le j+m$. Now delete the block. For indices $k \in [i-N, j+N]$ on the original table, the satisfactory condition on the new table is $a_{1k}=a_{1k}$, and $a_{2k}=\frac{1}{2a_{1k}+1} \sum_{s=-a_{1k}}^{a_{1k}} 0$, which is clearly true. For the other indices, since $a_{ij} \le m$ for such indices, thus the condition is same with the table before. Thus the new table is satisfactory too. Now we can repeat these steps to perform a deletion, so the new table is still satisfactory and we have deleted $k$ zeros during the process. However, the bad case is that all elements of some row is $m$, thus the elements of each rows are identical. WLOG let us proceed by deleting the maximal blocks as above, and if such cases arise, then there exist a table such that by deleting the maximal block of it, the elements remaining in each row are identical. But, in such case, it is easy to verify that the table before deleting have same elements, thus contradicting our assumption. Hence we are done. $\square$ Now let us get back to the main problem: we have deleted at least $N$ zeros during the procedure. Hence we need to seek the equality case, which is that the table is decomposed into blocks having a row with nonzero identical elements, and the other row being the zero vector. Thus every column contains exactly one nonzero element. However, if we deleted columns $i, \cdots, j$ at the first block deletion(WLOG let the first row contain nonzero element of the block), then $a_{2i}=\cdots= a_{2j}=0$, and if we choose the first index $k>j$ with $a_{2k}>0$, then we have $a_{2(k-1)}=a_{1(k-1)}=0$ by the condition again. Hence the equality case never occurs, thus we have at least $N+1$ zeros in all cases.
01.03.2020 19:45
@TheUltimate123 This is how I thought I proved it in contest, but I don't think "$a_t$ is the average of a subsequence of $(a_i,\ldots, a_j)$" is correct... what can't $b_t$ be large enough for $a_t$ to be the average of, say, $(a_{i-1}, \ldots, a_{j+1})$?
01.03.2020 21:55
Here is an outline of my solution: $\textbf{Lemma 1}$: If $a_i = \max \{a_1,a_2,\dots,a_N\}$ then $b_i = 0.$ Proof by considering any counterexample and doing casework on if $a_i = a_{i-1}.$ $\textbf{Lemma 2}$: $a_{i+s} = a_i$ for all $-b_i \le s \le b_i$ and vice versa. Proof is by looking at largest counterexample across all $a_i$ and $b_i$ (WLOG it is $a_k$ for some $k$) then showing that $b_k \le a_k$ and there exists an $s$ such that $|s| \le b_k$ such that and $a_{k+s} > a_k$ and then applying maximality to find a contradiction. $\textbf{Lemma 3}$: $a_i*b_i = 0$ for all $i$ Use $\textbf{Lemma 2}$ to find contradicton if we assume otherwise. $\textbf{Conclusion}$ Show that if $a_i = 0$ and $a_{i+1} \ne 0$ then $b_i = b_{i+1} = 0$ so there must exist an index $i$ with $a_i = b_i = 0$ so at least $N+1$ of $a_1, a_2, \dots, a_N, b_1, b_2, \dots, b_N$ are $0$. $\Box$
02.03.2020 00:19
If there are no $0$ terms among $a_1, \dots, a_N$, then we obtain a contradiction upon considering the maximal $b_i$: the condition on averages ensures that all the $b_i$s are equal to this maximum. So, there must be a $0$ term in $(a_1, \dots, a_N)$.. By the same reasoning, there is also a $0$ term in $(b_1, \dots, b_N)$. Say $i$ is sunny if $a_i, b_i \ge 1$. Also, assign each $i$ an $f(i)$ such that $b_{f(i)}=0$ and $|f(i)-i|$ is minimized. Lemma: There are no sunny indices. Proof. Suppose that some sunny index exists, and choose a sunny $i$ such that $a_i=M$ is maximized; among multiple such sunny $i$, choose an $i$ such that $f(i)$ is minimized. We claim that $a_k = M$ for all $k \in [i-b_i, i+b_i]$. If not, the condition on averages implies that there is a $k$ in that range such that $a_k > M$, which forces $b_k=0$ by maximality of $M$. Then the condition implies that the $a_k$ neighbors to the left and right of $b_k$ must all be $0$, meaning $b_i=0$, contradiction. Next we claim that $|f(i)-i| > 1$. Indeed, if $f(i) \in \{i-1, i+1\}$, then $a_{f(i)}=M$ and thus the $M$ neighbors to the left and right of $b_{f(i)}=0$ must all be $0$, too. In particular, $b_i=0$, contradiction. So, our claims imply that $i-1, i+1$ are both sunny indices with $a_{i-1}=a_{i}=a_{i+1}=M$. But now this contradicts our choice of $i$ because one of $f(i+1), f(i-1)$ is smaller than $f(i)$. The lemma is proven. $\Box$ The lemma implies that, for each $i$, either $a_i=0$ or $b_i=0$. This already yields us $N$ zeroes; we wish to find one more. This is easy: since $(a_1, \dots, a_N)$ is nonconstant, we can find an $i$ with $a_i=0$ and $a_{i+1} > 0$. Since $a_i$ has a non-zero neighbor, we must have $b_i=0$, and we are done.
03.03.2020 23:18
Nice! Note that problem condition says $a_i$ is average of the $b_i$ terms in front of and behind it. Let these $2b_i$ terms form the 'neighborhood' of $a_i$. $a_i$ and $a_{i+1}$ are said to be adjacent to each other.Similar stuff for $b_i$. Call $a_i$ and $b_i$ partners of each other. Note that a $0$'s neighborhood consists only of zeroes. $(1)$ We claim that each non-zero term has $0$ as its partner, and no term is part of the neighborhood of a term which is smaller than it in value. We prove this by strong induction down from the largest number to occur in either of the sequences, covering only numbers that occur in at least one of the sequences. For the base case, let the largest number be $k$. Note that a $k$'s neighborhood must consist only of $k$s, as it can't consist of any number larger than $k$. Consider a contiguous sub-sequence of $k$s with numbers other than $k$ being adjacent to the endpoints of the sub-sequence (which is surely the case due to non-constantness of the sequences). Then note that the endpoints must have $0$s as partners. Then note that all numbers within distance $k$ of the sub-sequence and in the sub-sequence itself must have $0$s as partners (due to $(1)$). So $k$ can't be part of the neighborhood of a number smaller than it in value, as if the number is non-zero, then its partner must be a number smaller than $k$. For the induction step, consider a non-zero $l$ such that the claim has already been proven for all numbers larger than $l$. The proof for $l$ is the same as the proof for $k$ with $k$ replaced by $l$ in each statement. Now, consider any $0$ which is adjacent to a non-zero number (one surely exists due to non-constantness of the sequences). Then its partner is $0$. So at least one of $a_i$ and $b_i$ is $0$, and at least one pair exists with both $a_i$ and $b_i$ being $0$. So we're done.
10.03.2020 23:40
Either $a_i$ or $b_i$ is $0$. Consider the set of bad indices $i$ such that $a_i,b_i\ge 1$(suppose it's nonempty) and among these the maximal $a_i$ or $b_i$ WLOG let this be $b_0$ in addition suppose that if $1$ is bad then $b_0>b_1$. We are given that $$b_0=\frac{b_{-a_0}+...+b_{a_0}}{2a_0+1}(\star)$$For every $j\in [-a_0,a_0]$ either : -$j$ is bad and $b_0\ge b_j$ or -$j$ isn't bad , then we will show that $b_0>b_j$ Suppose that $b_j\ge b_0$ then $a_j=0$ and we get that $a_{j-b_j},...,a_{j+b_j}$ are all equal to $0$. Since $a_0>0$ we get that $a_0\ge| j|> b_j\ge b_0$. a contradiction. Either way we have that $b_0>b_1$ and $b_0\ge b_j$ for the rest $j\in [-a_0,a_0]$ which contradicts $(\star)$. There is at least one $j$ such that both $a_j,b_j $are $0$. Observe that the last $a_i$ in a contiguous block of $0$'s the corresponding $b_i$ should also be $0$ and conclude that there are at least $n+1$ $0$'s among $a_0,...,a_{n-1},b_0,...,b_{n-1}$.
11.03.2020 01:35
mela_20-15 wrote: Either $a_i$ or $b_i$ is $0$. Consider the set of bad indices $i$ such that $a_i,b_i\ge 1$(suppose it's nonempty) and among these the maximal $a_i$ or $b_i$ WLOG let this be $b_0$ in addition suppose that if $1$ is bad then $b_0>b_1$. We are given that $$b_0=\frac{b_{-a_0}+...+b_{a_0}}{2a_0+1}(\star)$$For every $j\in [-a_0,a_0]$ either : -$j$ is bad and $b_0\ge b_j$ or -$j$ isn't bad , then we will show that $b_0>b_j$ Suppose that $b_j\ge b_0$ then $a_j=0$ and we get that $a_{j-b_j},...,a_{j+b_j}$ are all equal to $0$. Since $a_0>0$ we get that $a_0\ge| j|> b_j\ge b_0$. a contradiction. Either way we have that $b_0>b_1$ and $b_0\ge b_j$ for the rest $j\in [-a_0,a_0]$ which contradicts $(\star)$. There is at least one $j$ such that both $a_j,b_j $are $0$. Observe that the last $a_i$ in a contiguous block of $0$'s the corresponding $b_i$ should also be $0$ and conclude that there are at least $n+1$ $0$'s among $a_0,...,a_{n-1},b_0,...,b_{n-1}$. Why is $|j|>b_j$?
17.04.2020 21:25
Claim 1: If $b(k)=0$ for all $k \in [i, j]$ and $b(i-1)\neq 0$ and $b(j+1)\neq 0$, then $a(k)\leqslant \min (k-i, j-k)$. Proof: We have $0=2a(k)b(k)=b(k-a(k))+\ldots+b(k-1)+b(k+1)+\ldots+b(k+a(k))$, and if $a(k)>k-i$ or $j-k$, then either $b(i-1)$ or $b(j+1)$ is in the right hand side sum, which is impossible. (Of course, the same claim holds with $a$ and $b$ swapped.) Now let $S$ denote the set of all indices $i$ such that $a(i)b(i)>0$. If $S$ is empty, since $a$ and $b$ are non-constant, we must have an index $i$ such that $a(i)=0$ and $a(i+1)\neq 0$, but then $b(i)=0$ (this follows from claim 1, $i$ is the rightmost point of some segment of zeroes of $a$), and then we have at least $N+1$ zeroes ($N-1$ from $a(j)b(j)=0$ for $j\neq i$, and two for $j=i$), and we're done. If $S$ isn't empty, let $Z=\{a_i | i \in S \} \cup \{b_i | i \in S \}$. Now consider $i\in S$ such that $a_i$ is the maximum from $Z$ (if such $i$ doesn't exist, we can swap the roles of $a$ and $b$), and such that, among those indices, $i$ is the closest possible (*) to a number which is not from $S$. Note that then either $a(i-1)<a(i)$ or $a(i+1)<a(i)$, since otherwise $i$ wouldn't be the closest possible to a number which is not from $S$. (If $i-1$ isn't from $S$, then $a(i-1)=0$ since $b(i)\neq 0$. If $i-1$ is from $S$ and $a(i-1)=a(i)$, and $i+1$ is from $S$ and $a(i+1)=a(i)$, then either $a(i+1)$ or $a(i-1)$ is 'closer' than $a(i)$.) Then, we have $$2b(i)a(i)=a(i-b(i))+\ldots+a(i-1)+a(i+1)+\ldots+a(i+b(i)),$$and then either $a(i-t)>a(i)$ or $a(i+t)>a(i)$ for some $t\leqslant b(i) \leqslant a(i)$. Without loss of generality, let $a(i+t)>a(i)$. Then $i+t$ is not from $S$, which implies $b(i+t)=0$. Let $[u, v]$ be the maximal segment containing $i+t$ such that $b$ is zero on such a segment. Then by claim 1, $a(i+t)\leqslant i+t-u$, and since $b(i)\neq 0$, we have $u>i$, and therefore $a(i+t)<t$, but $t\leqslant a(i)$, which is a contradiction. (*) 'The closest possible' in this context means that the smallest integer $k$ such that either $i-k$ or $i+k$ is not in $S$ is minimised for $i$. Note: the indices in this solution are taken modulo $n$.
09.09.2020 17:53
This is combo . Call an index $i$ good if $a_ib_i=0$, and bad otherwise. Claim: There exists at least one good index. Proof: Consider $M=\max\mathbf a$. Take $i$ such that $a_i=M$, but $a_{i+1}<M$ (if there are none, then the sequence is constant). If $b_i>0$, then the average of $2b_i+1$ numbers around $a_i$ is strictly smaller than $M$, contradiction. Thus, this $i$ is good. $\blacksquare$ Claim: All indices $i$ are good. Proof: Assume not: take a counter example $i$ such that $\max\{a_i,b_i\}$ is minimal. If there are many, take the one which $i+1$ is not a bad index with the same maximum value. (If there are none, then it contradicts the first claim.) WLOG, assume that $a_i\leq b_i$. We split into two cases. Case 1: there exists $j\in [i-a_i, i+a_i]$ such that $b_j > b_i$. Then, $b_j$ is good due to maximality. Thus, $a_j=0$, which implies that $a_k=0$ for all $k\in [j-b_j, j+b_j]$. Since $b_j>b_i$, we must have $i\in [j-b_j, j+b_j]$ or $a_i=0$, contradiction. Case 2: $b_j=b_i$ for all $j\in [i-a_i, i+a_i]$. In particular, $b_{i+1}=b_i$. We split into three more subcases. If $a_{i+1} > b_{i+1}$, then $i+1$ is a bad index with higher maximum. If $0<a_{i+1}\leq b_{i+1}=b_i$, then $i+1$ is a bad index with the same maximum. But this contradicts the tiebreaking method we had mentioned at the beginning. Thus, $a_{i+1}=0$. But applying the condition at $a_{i+1}$ forces $a_i$ to be zero. $\blacksquare$ All that remains is to show that there are at least one $i$ which $a_i=b_i=0$. To do so, take $i$ such that $a_i=0$ but $a_{i+1}>0$. Applying the condition at $b_{i+1}$ forces $b_i$ to be zero.
01.07.2021 05:08
Consider all indices modulo $N$. We define a block to be $(a_i,a_{i+1},...,a_j)$ or $(b_i,b_{i+1},...,b_j)$. For $(a_i,a_{i+1},...,a_j)$, we define its corresponding block to be $(b_i,b_{i+1},...,b_j)$, and vice versa. We define a zero block to be a block whose elements are all zero. Claim 1. Suppose $a_n=\max_{1\leq j\leq N}a_j$, and $a_i,...,a_j$ is the largest block containing $a_n$. Then the corresponding block of $a_{i-a_n-1},a_{i-a_n},...,a_{j+a_n},a_{j+a_n+1}$ must be a zero block. Proof. Indeed, we must have $b_i=0$, otherwise since $a_{i-1}<a_i$, $$\frac{1}{2b_i+1}\sum_{s=-b_i}^{b_i}a_{i+s}<a_i$$contradiction. By symmetry $b_j=0$. Therefore, $a_n$ elements to the left of $b_j$ and the $a_n$ elements to the right of $b_j$ must be zero, and the $a_n$ elements to the left of $b_{j-a_n}$ must be zero. By easy induction we proves Claim 1. $\blacksquare$ In particular, this implies $a_n<N$ and $b_n<N$. Claim 2. Let $a_i,...,a_j$ be a maximal nonzero block, i.e. $a_i,...,a_j>0$ but $a_{i-1}=a_{j+1}=0$, then (i)$b_{i-1}=0=b_{j+1}$ (ii)its corresponding block is either (A) all nonzero or (B) all zero. Proof. (i) is easy. Indeed, if $b_{i-1}\neq 0$ then notice that $$\frac{1}{2b_{i-1}+1}\sum_{s=-b_{i-1}}^{b_i}a_{i+s}>0=a_{i-1}$$contradiction. By symmetry $b_{j+1}=0$. For (ii), notice that if $b_k\neq 0$ and $b_{k+1}=0$ for some $i\leq k\leq j-1$, then $$\frac{1}{2a_{k}+1}\sum_{s=-a_k}^{a_k}b_{i+s}>0=a_{i-1}$$contradiction, similarly if $b_k=0$ and $b_{k+1}\neq 0$ we can derive a similar contradiction. $\blacksquare$ Now we called the two types in Claim 2(ii) type A and type B. Then the sequence is divided into type A and type B blocks. If all blocks are type $B$ then we are done. Otherwise, suppose there exists a type A block, then we take the maximal number among all numbers in all the type A blocks, in particular, if there are more than one of them we pick one such that at least one of its neighbors is less than it. Denote this number by $a_i$ and suppose $a_{i-1}<a_i$. Then notice that by definition $b_{i}>0$, therefore, in order for $$a_i=\frac{1}{2b_i+1}\sum_{s=-b_i}^{b_i}a_{i+s}$$to hold we must have $a_{i+s}>a_i\geq b_i$ for some $-b_i<s<b_i$. By definition, $a_{i+s}$ must be in a type B block, hence $b_{i+s}=0$. However, this implies $b_{i+s+k}=0$ for all $0\leq k\leq a_{i+s}$. In particular, we have $b_i=0$ since $s<a_{i+s}$, contradiction. This completes the proof.
11.01.2022 08:43
Write the numbers $a_i, b_i$ on two rows of a $2 \times n$ rectangle. First, let $a_k = M$ be the maximum element of the $a_i$'s. If $b_k \neq 0$, then we have that things with distance at most $b_k$ from $M$ are also $M$. Keep repeating this to eventually get a column that says $(M,0)$, otherwise $a_i$ is just constant. So there is at least one zero. Suppose $a_i = 0$ and $b_i \neq 0$, then since the sequence has only nonnegative integers, we have that all things with distance at most $b_i$ from $0$ are also $0$. We repeat this until we get a chain of some consecutive zeroes, which have a $(0,0)$ on the end-columns. Call such a thing a fortress and the end-columns are its walls. Note that a number inside the fortress with distance at most $z$ from the wall can be at most $z$, itself, otherwise the column after the wall would also have a zero and the fortress may be extended. Assume ftsoc that fortresses do not cover the entire rectangle, or that there is some index $i$ such that $a_i, b_i \neq 0$, let $s$ be the index such that $a_s, b_s \neq 0$ and $a_s$ is maximal, if there are many such things, choose the $s$ with $b_s$ maximal too (Swap the rows if the max such $b_i$ exceeds the max such $a_i$). Since $a_s$ is the average of some terms around it, this range of numbers must contain a number bigger than it, but since $a_s$ was maximal, this bigger number(say $M$) is in a fortress. Say the big number has distance $x$ from the wall, and $s$ has a distance of $y$ from the wall. We have that $b_s \ge x+y+1$ because this range must reach until there. But also, since the big number must be at most its distance from the wall, we have $b_s \ge x+y+1 > x \ge M \ge a_s$, contradicting the fact that $a_s$ was maximal. Therefore, every number is in a fortress. Note that if the fortress had only one wall, it would cause one of the sequences to be constant, therefore, there are at least $2$ walls so there are in fact at least $N+2$ zeroes among the numbers. As noted in post 3, this is in fact achievable for all $N \ge 4$ by taking two fortresses with opposite "orientation". An example for $N = 7$ would be $a_n = 2,1,0,0,0,1,2$ and $b_n = 0,0,0,1,0,0,0$. Anyway, the problem wanted only at least $N+1$, so we're done. $\blacksquare$
06.02.2022 03:06
Nothing new, found the problem quite funny hence this post.
18.01.2023 04:37
Call a pair $(a_i, b_i)$ sobad if $a_i>0$ and $b_i>0$. Claim: There are no sobad pairs. Proof: Suppose FTSOC there existed a sobad pair. WLOG the highest entry over all sobad pairs was $a_n$ for some $n$. Since $(a_i)$ is nonconstant, we may assume that $a_{n-1}< a_n$, where indices are taken mod $N$. By the problem condition, we get that there is some $s$ such that $|s|\le b_n$ and $a_{n+s} > a_n$. This implies $b_{n+s} = 0$, so $b_{n+s+x} = 0$ for all $x$ such that $|x|\le a_{n+s}$. Clearly $|-s| = |s| \le b_n < a_{n+s}$, so we may set $x = -s$ and get $b_n = 0$, contradiction. So there exist no sobad pairs. $\square$ Now WLOG that there exists an $m$ such that $a_m = 0$. Claim: There exists a $i$ such that $a_i = b_i = 0$. Proof: Suppose not. Then since $(a_i)$ is nonconstant, there exists $n$ with $a_n = 0$ and $a_{n-1}> 0$. This implies that $b_n = 0$, contradiction.$\square$ Now we may conclude that at least $n+1$ of the numbers $a_1$, \dots, $a_N$, $b_1$, \dots, $b_N$ are zero.
28.02.2023 02:19
Consider $i$ such that $a_i,b_i \neq 0$, and call such $i$ special. WLOG assume that the maximum of $a_i$ over special $i$ is at least the maximum of $b_i$. Pick some "leftmost" special $i$ with $a_i$ maximal, such that $a_{i-1}$ is not special unless $a_{i-1}<a_i$ (obviously if every $i$ is special with $a_i$ maximal then $\mathbf{a}$ is constant). If $a_{i-1}\geq a_i$, then because $a_{i-1}$ is not special, we must have $b_{i-1}=0$. But $a_{i-1}>0$ as well, so $b_i>0$ is included in the nonnegative numbers which should average out to $b_{i-1}=0$: contradiction. Thus $a_{i-1}<a_i$ unconditionally. Therefore, there exists some $j$ such that $a_j>a_i$ and $|j-i|\leq b_i$. Because $a_i$ is maximal, $b_j=0$, but because we assumed $a_i$ is at least the maximum of $b_k$ over special $k$, we have $a_j>a_i\geq b_i$, so $a_i>0$ should be included in the nonnegative numbers averaging to $b_j=0$: also absurd. Hence special $i$ do not exist, so for all $i$ we have $0 \in \{a_i,b_i\}$. To finish, suppose that there are exactly $N$ numbers which are $0$ (we know there at least $N$ by the above result), so for all $i$ exactly one of $a_i$ and $b_i$ is zero. On the other hand, if $a_i>0$ and $b_i=0$, then $b_{i-1}=b_{i+1}=0$ (and the symmetrical result for $b_i>0$ is true too), so if this assumption holds then one of $\mathbf{a}$ and $\mathbf{b}$ is filled with zero elements, contradicting the nonconstant requirement. This implies the desired result. $\blacksquare$
25.12.2023 19:08
We will show that $a_ib_i = 0$ for every $i$ and that there exists a $j$ with $a_j = b_j = 0$, which is enough to imply the result. First, we make a claim about the structure of the sequence $\{a_i\}$: Claim. If $a_i = 0$ and $b_i \neq 0$ for some $i$, then there exists $c \geq a_i$ such that all of $a_{i-c}, \dots, a_{i+c} =0$, and $b_{i-c} = b_{i+c} = 0$. Proof. The first part of the conclusion is evident by looking at the given condition on $a_i$. For the second part, we may look at the given condition on $a_{i+c}$ and $a_{i-c}$ which forces the result as $a_{i+c+1}$ and $a_{i-c-1}$ are not zero. $\blacksquare$ For the main proof, assume that $a_i = m_0$ and $b_i = n_0$ for some $m, n > 0$, and assume WLOG that $m_0 \geq n_0$. Claim. [Housekeeping] We can pick $i$ such that not all of $a_{i-n_0}, \cdots, a_{i+n_0}$ are equal to $m_0$. Proof. If our $i$ indeed satisfies this condition, then let $r$ be the smallest integer such that $a_{i-r} \neq m_0$ and consider the pair $(a_{i-r}, b_{i-r})$ instead. If $b_{i-r} = 0$, as $b_i \neq 0$, there exists $c \leq r$ such that $b_{i-c} = a_{i-c} = 0$. This is obviously impossible, implying $b_{i-r}$ is nonzero and we can set $i' = i-r$ instead. $\blacksquare$ It follows by the given that there exists an $r \leq n_0$ such that $a_{i+r} = m_1 > m_0$. WLOG assume $r > 0$. Claim. $b_{i+r} = n_1 \neq 0$. Proof. If $b_{i+r} = 0$, then all terms within $m_1 > m_0$ of $b_{i+r}$ are equal to zero. As $m_1 > m_0 \geq r$, this also implies $b_i = 0$, which is impossible. $\blacksquare$ Now, we have found an index $i+r$ such that $\text{max}(a_{i+r}, b_{i+r}) > \text{max}(a_i, b_i)$ and $a_{i+r}, b_{i+r} \neq 0$. But because $\text{max}_{i=1}^N(\text{max}(a_i, b_i))$ is bounded above, this eventually leads to a contradiction. Thus $a_ib_i = 0$ for every $i$, and by the first claim, it follows there exists the claimed $j = i \pm c$. This finishes the proof.
21.08.2024 21:02
Let pair $(a_i,b_i)$ be called good if one of $a_i$ or $b_i$ is equal to $0$ or both of them. Claim: We have at least one good pair. Let $a_M$ denote the maximum $a_i$, then we must have that $b_M=0$ due to size reasons. $\blacksquare$ Now we show the main claim to this problem. Claim: We have that $(a_i,b_i)$ is good for any integer $i$. Assume FTSOC that we have a pair $(a_i,b_i)$ which are not good, such that $a_i$ is maximum from all not good $a_j$. We get that all $a_{i+s}=a_i$ where $-b_i \leq s \leq b_i$, if not, then we have that there exists a$k$ such that $a_k > a_i$, implying that $b_k=0$ due to the maximality of $a_i$. This implies that neighbors of $b_k$ are equal to $0$, hence $b_i=0$ a contradiction. Hence we get that all $a_{i+s}=a_i$ where $-b_i \leq s \leq b_i$. This will give us a contradiction directly as we can take a $j$ such that $a_j<a_i$ as the sequence $(a_i)$ is not constant. $\blacksquare$ Now by our previous claim, we get $N$ zeros in our two sequences, to get the last zero choose an $i$ such that $a_i=0$, but $a_{i+1} \neq 0$ forcing $b_i=0$, hence we are done.
21.11.2024 06:35
Claim: There exists $i$ such that $a_i=b_i=0$. Proof: Note that since $a$ is not constant, there exists $i$ such that $a_{i-1} > a_i = \min\{ a_1,\cdots,a_N\}$. This implies that $b_i = 0$. Analogously, $ \min\{ a_1,\cdots,a_N\} = 0$, so $a_i=b_i=0$. Key claim: For all $i$, either $a_i=0$ or $b_i=0$. Proof: Assume not. We define $M := \max\{ a_k, b_k \mid a_kb_k > 0\}$. One can show that given $i$ such that $a_i,b_i > 0$, there exists $j$ such that $a_{i+l}b_{i+l} > 0$ for $l=1,\cdots,j-1$, and $a_{i+j}=b_{i+j}=0$. WLOG the max is attained by the sequence $a$, and choose $k$ such that $M = a_k > a_{k+1} $, and $b_{k} > 0$. Since $a_{k} = \frac{1}{2b_{k}+1} \sum_{j=-b_{k}}^{b_{k}} a_{k+j}$ there must exist some $t'\le b_{k}$ such that $a_{k+t'} > a_{k}$, and by the maximality of $M$ we have $b_{k+t'} = 0$. Since $0 = b_{k+t'} = \frac{1}{2a_{k+t'}+1} \sum_{l=-a_{k+t'}}^{a_{k+t'}} b_{k+t'+l}$, this implies that $b_{k+t' - l} = 0$ for all $l=1,\cdots,a_{k+t'}$. In particular, note $a_{k+t'} > M \ge b_k \ge t'$, so $b_{k+t'-t'} = b_k = 0$, contradicting $b_k > 0$. These two claims clearly imply there are at least $N+1$ zeros among $a_1,\cdots,a_N,b_1,\cdots,b_N$.