Page 1 of 1

Sequence count

Posted: Sun Dec 28, 2014 8:47 pm
by SANZEED
Find the number of possible sequences $(a_1,a_2,...,a_n)$ in terms of $n$, with the following conditions:
(i)$a_1=a_2=0$
(ii)$a_1\leq a_2\leq ...\leq a_n$
(iii)$a_i\leq (i-2)$

Re: Sequence count

Posted: Sat Jan 03, 2015 11:33 am
by Phlembac Adib Hasan
Start the sequence from $a_0$ and toss out the first term. So the third condition turns into $a_i\leq i-1$. Now consider the following bijection: take any $A$ dominated sequence of length $n$ and set $a_i$ as the number of $B$'s preceding $i$-th $A$. Since the sequence is $A$ dominating, there will be at most $i-1$ $B$'s before $i$-th $A$. And obviously the derived sequence will be non-decreasing.
Also, from a given sequence of $a_i$s, it is possible to reverse this move and make an $A$ dominated sequence. Thus the number of sequences is $C_n=\frac{1}{n+1}\binom {2n}{n}$

And here are two examples of the bijection, for clarification:
$AABABB\to 0,0,1$
$AABBAB\to 0,0,2$

Re: Sequence count

Posted: Sun Jan 04, 2015 7:00 pm
by asif e elahi
We consider a $n\times n$ board and color the upper $a_{i}$ cells black of column $i-1$ for $i=2,3......n$. Now the board is divided into $2$ parts. This makes a path from the upper left vertex to the lower right vertex of length $2n-2$.The $3rd$ condition implies that the black squares don't intersect the main diagonal containing the upper left vertex. It's easy to see that this is a catalan path.(Just rotate the board $45^{\circ}$ in counterclockwise direction). Again any such catalan path indicates a sequence of length $n-1$. So we have got a bijection between the sequences and the catalan paths of length $2n-2$.
The number of sequences= number of catalan paths of length $2n-2$ = $\dfrac{1}{n}\binom{2n-2}{n-1}$.