Using the letters A & B only to make two strings of 7 letters each, how many combinations are possible based on the following criteria?
Criteria 1: There must be at least 2 B's in each string.
Criteria 2: A can be on top or below A and B but B cannot be above or below another B.
Examples:
AAABBAA
BBBAAAB
ABABAAB
AABABAA
BAAABBB
ABBBAAA
BAAAAAB
ABAAABA
I think I understand how to calculate the number of combinations of the top string but I can't figure out how to link that to the bottom string.
Any help is greatly appreciated!
My solution for the top string combinations:
$\sum_{i=1}^{4} \binom{7}{2}\binom{5}{5-i}$
Where $\binom{7}{2}$ is the required 2 B's, and the $\binom{5}{5-i}$ is the other choices for the remaining letters.
Since no $B$ can be in the same column as another $B$ and there must be at least two $B$s in each row, there are at least four columns that contain a $B$. If there are exactly $k$ columns in which a $B$ occurs, there are $\binom{7}{k}$ ways of choosing which columns contain a $B$ and $2$ ways of choosing in which row that $B$ appears. From these, we must subtract those arrangements in which there are fewer than two $B$s in one the rows. Hence, the number of admissible arrangements is $$\sum_{k = 4}^{7} \binom{7}{k}\left[2^k - \binom{2}{1}\binom{k}{k} - \binom{2}{1}\binom{k}{k - 1}\right]$$ where the term $\binom{2}{1}\binom{k}{k}$ represents the number of ways we could place all $k$ $B$s in the same row and the term $\binom{2}{1}\binom{k}{k - 1}$ represents the number of ways we could place all but one of the $B$s in the same row.