I am trying to find a formulae that gives the number of unique permutations of an arbitrary number of items, constrained with the following pattern:
For every item X: X' must always appear at some point after X, and never before X
For example, for the following 4 items:
A, A', B, B'
The possible permutations are the following 6:
A, A', B, B'
A, B, A', B'
A, B, B', A
B, B', A, A'
B, A, A', B'
B, A, B', A'
Is there a specific formulae that can calculate this for arbitrary number of items?
Any help is really appreciated.
Thanks a lot.
If you have two items that must be in some order, exactly $\frac 12$ of the permutations satisfy that constraint. If you have two pairs that must each be in a given order ...