hope everything is going well.
I took a look at this and believe I have found a general formula. I also wrote some Python code (at the end) that can find the answers for particular sequences. I am working on a combinatorial explanation, so keep posted.
Given a set $S = \{\{a_1, a_2, \dotsc, a_n\}, \{b_1, b_2, \dotsc, b_m\}, \dotsc, \{c_1, c_2, \dotsc, c_k\} \}$ the number of chromozones (without repetition, i.e. $\{a_1, a_2, \dotsc, a_n\} \cap \{b_1, b_2, \dotsc, b_m\} \cap \dotsc \cap \{c_1, c_2, \dotsc, c_k\} = \emptyset$) formed from these sets in $S$ is equal to
$$\frac{(\sum_{s\in S} |s|)!}{\prod_{s\in S}|s|!}$$
where $|s|$ denotes the cardinality of the subset $s$.
Now onto the code. Here is the output for some examples
\begin{align}
&\text{# Chromozones for } \{\{1\}, \{2\}, \{3\}, \{4\}\} = 24\\
&\text{# Chromozones for } \{\{a,b,c\}, \{A,B,C\}\} = 20\\
&\text{# Chromozones for } \{\{a,b,c\}, \{1,2\}, \{3,4\}\} = 210\\
&\text{# Chromozones for } \{\{a,b,c\}, \{1\}, \{3,4\}\} = 60\\
&\text{# Chromozones for } \{\{a,b,c\}, \{1\}, \{3\}\} = 20\\
&\text{# Chromozones for } \{\{a,b\}, \{1\}, \{3\}\} = 12\\
&\text{# Chromozones for } \{\{a,b\}, \{1\}\} = 3\\
\end{align}
For your example in particular, the output is:
Invalid and Valid Permutations = 720
('A', 'B', 'C', 'a', 'b', 'c')
('A', 'B', 'a', 'C', 'b', 'c')
('A', 'B', 'a', 'b', 'C', 'c')
('A', 'B', 'a', 'b', 'c', 'C')
('A', 'a', 'B', 'C', 'b', 'c')
('A', 'a', 'B', 'b', 'C', 'c')
('A', 'a', 'B', 'b', 'c', 'C')
('A', 'a', 'b', 'B', 'C', 'c')
('A', 'a', 'b', 'B', 'c', 'C')
('A', 'a', 'b', 'c', 'B', 'C')
('a', 'A', 'B', 'C', 'b', 'c')
('a', 'A', 'B', 'b', 'C', 'c')
('a', 'A', 'B', 'b', 'c', 'C')
('a', 'A', 'b', 'B', 'C', 'c')
('a', 'A', 'b', 'B', 'c', 'C')
('a', 'A', 'b', 'c', 'B', 'C')
('a', 'b', 'A', 'B', 'C', 'c')
('a', 'b', 'A', 'B', 'c', 'C')
('a', 'b', 'A', 'c', 'B', 'C')
('a', 'b', 'c', 'A', 'B', 'C')
# Valid Permutations = 20
Use this code for a particular sequence you are going to have to edit the seq, S, and total variables.
import itertools as it
seq1 = ['A','B']
seq2 = ['a']
seq3 = ['1']
#seq4 = ['5']
S = [seq1, seq2,seq3]
total = seq1+seq2+seq3
total_perms = list(it.permutations(total))
print('Invalid and Valid Permutations =',len(total_perms))
def bad_perms(perm):
for index, seq in enumerate(S):
S_rest = [elt for elt in S if elt != seq]
S_rest = [sub_elt for elt in S_rest for sub_elt in elt]
perm_minus = [elt for elt in perm if elt not in S_rest]
if perm_minus != seq:
return True
return False
g_perm = 0
b_perm = 0
for perm in total_perms:
if bad_perms(perm) == True:
b_perm += 1
#total_perms.remove(perm)
else:
print(perm)
g_perm += 1
print('# Valid Permutations =', g_perm)