I need to show the number of ways in which a specific pattern of 1s and 0s can occur. An important factor is that they always have to be paired. For example,
with n=2 there are 2 combinations: 10, 01
with n=4 there are 4: 1010,1001,0101,0110
with n=6 there are 8: 101010,101001,100110,100101,010101,011010,010110,011001
with n=8 there are 16 and so on...
What the correct way of writing this? Is it simply $2^{n/2}$ or something like $2 \choose 1$$^{n/2}$?
EDIT: I need a 1 AND a 0 in every 2 numbers but the order in which they arrive doesn't matter.
Seems like $2^{{n}/{2}}$ from the given examples.
Edit: With the clarification, it seems like every 2 bits (you chop the bitstring into 2 bits pieces) need to have a $0$ and $1$. This means that the choice is separate for every 2 bits. So you get $2$ possibilities per every $2$ bits ($10$ and $01$), since those are picked independently from each other, and you have $\frac{n}{2}$ two-bits pieces, so you get $2^{n/2}$ possibilities. It's the same as the number of ways of picking a vector of the form $\{0,1\}^{n/2}$. This means that you can actually save your state as a $n/2$ long bitstring, where $0$ can be expanded to $01$ and $1$ to $10$. For example you could encode $011010$ as $011$, effectively halving the necessary space.
Edit 2: Note that this also means that you can easily generate all such vectors by simply iterating from $0$ to $2^{n/2}-1$ (a for loop) and expanding each digit (in binary) into two: $0\rightarrow 01$ and $1\rightarrow 10$.