0

Here is a small example. The aim is to draw a sequence of length N (even), which contains equally many 1s and 2s, and find the formula for the number of unique sequences. Here is the example for N=4:

1212, 2121, 1122, 2211, 2112, 1221

Six possibilities.

From a small numerical simulation, I also know there are 26 possibilities, if the length of the sequence is intended to be 10.

What is the exact mathematical logical formula for calculating this?

Nij
  • 2,991

1 Answers1

1

The map $\{\text{your }2k\text{-tuples}\}\to \{S\subseteq\{1,\cdots,2k\}\,:\, \lvert S\rvert=k\}$ sending $x\mapsto\{i\in\{1,\cdots,2k\}\,:\, x_i=1\}$ is a bijection. Therefore the number of those $n$-tuples is $$H_n=\begin{cases}0&\text{if }n\text{ odd}\\ \binom{n}{n/2}&\text{if }n\text{ even}\end{cases}$$

It's unclear to me where your claim that $H_{10}=26$ instead of $252$ is supposed to come from.