Let $n$ be a positive integer. Find the number of sequences $x_{1},x_{2},\ldots x_{2n-1},x_{2n}$, where $x_{i}\in\{-1,1\}$ for each $i$, satisfying the following condition: for any integer $k$ and $m$ such that $1\le k\le m\le n$ then the following inequality holds \[\left|\sum_{i=2k-1}^{2m}x_{i}\right|\le\ 2\]
Problem
Source: 2010 HongKong mathematic Olympiad
Tags: inequalities, combinatorics proposed, combinatorics
09.08.2012 20:10
horizon wrote: Let $n$ be a positive integer. Find the number of sequences $x_{1},x_{2},\ldots x_{2n-1},x_{2n}$, where $x_{i}\in\{-1,1\}$ for each $i$, satisfying the following condition: for any integer $k$ and $m$ such that $1\le k\le m\le n$ then the following inequality holds \[\left|\sum_{i=2k-1}^{2m}x_{i}\right|\le\ 2\] We can consider the $2n$ numbers as being $n$ couples $(x_i,x_{i+1})$ with $i$ odd. Let $S_i=x_i+x_{i+1}$; then $S_i$ is $2$, $-2$ or $0$. If $S_i=2$ or $S_i=-2$, we have one way to choose $x_i,x_{i+1}$, while if $S_i=0$, we have two ways. We can see that the form of the $n$ couples is $0,0,\ldots,0,2,0,\ldots,0,-2,0,\ldots,0,2,\ldots$. Then we will choose $k$ positions for which $S_i =0$; there are $\binom {n} {k}2^k$ ways, and we have two ways to define the other $n-k$ sums, $2,-2,2,-2,\ldots$ or $-2,2,-2,2,\ldots$. Thus the total number of sequences is $2\sum_{k=0}^{n-1} \binom {n}{k} 2^k + 2^n = 2\cdot 3^n-2^n$.
29.10.2014 11:24
If we let $X={(-1) }$Or${ X=1} $ s.t.$ S_i=X_{2k-1}+X_{2m} $ Then$ S_i={(-2) }$Or$ S_i=2 $Or${ S_i=0}$ Then we will choose k position $s_i isn't 0$, there are way, we have two way to define k number: $2,-2,2,-2,...$ or$ -2,2,-2,2,....$ Thus total number of sequences is:$2,0,(-2)$