Combinatorics of possible vectors with length 3 without duplicates Suppose I have a vector with a length of 3.
I have 6 choices. They are: 1a, 2a, 2b, 3a, 3b, 4a.
Choices with the same beginning number cannot be on the same vector.
For example, a vector with [ 1a, 2a, 2b] cannot occur.
The possible vectors are:


*

*[1a, 2a, 3a]

*[1a, 2a, 3b]

*[1a, 2a, 4a]

*[1a, 2b, 3a]

*[1a, 2b, 3b]

*[1a, 2b, 4a]

*[1a, 3a, 4a]

*[1a, 3b, 4a]

*[2a, 3a, 4a]

*[2a, 3b, 4a]

*[2b, 3a, 4a]

*[2b, 3b, 4a]
There are 12 total. But I'm having trouble trying to figure out a mathematical formula for any # of choices.
The method that I'm trying to work with is starting with 6C3 then subtract the impossible combinations.
Can anyone share some insight?
Thanks!
 A: Say, you have $m$ numbers with options $a$ and $b$ attached (like 2 and 3 in your example) and $n$ numbers with only one  option (like 1 and 4). You are to choose a set of $N$ elements according to the above rules. 


*

*Choose $k$ numbers with options, there are $\binom{m}{k}$ ways to do so.

*Assign options a or b to each, there are $2^k$ ways to do so.

*Choose $N-k$ numbers without options,  there are $\binom{n}{N-k}$ ways to do so. 

*Multiply the number of choices in 1,2,3 and sum these products over all possible $k$.


Total number:
$$\sum_{k=0}^{m} 2^k \binom{m}{k} \binom{n}{N-k}$$
with the understanding that   binomial coefficients are $0$ when the top number is smaller. Check on your example: $N=3$, $m=k=2$. The sum is
$$ 2^0 \binom{2}{0} \binom{2}{3}+ 2^1 \binom{2}{1} \binom{2}{2}+2^2 \binom{2}{2} \binom{2}{1} =0+4+8=12$$

Things will get more complicated if you also plan to have some numbers with options a,b,c and so on. But it is not clear to me how general you want this to be. 
