So, when trying to find subwords from a bigger word:
$\binom{abracadabra}{ab} = 5$
with $ABracadabra$, $AbracadaBra$, $abrAcadaBra$, $abracAdaBra$, $abracadABra$.
I have noticed that it doesn't go back (like first $a$ then $b$ in $abracadaBrA$) and it looks like it iterates through all (factorial?).
I thought of cardinalitates $n\cdot a\cdot (m \cdot b - 1)$, where $n$ is the number of $a$'s and $m$ of $b$'s but it isn't that.
Also just for $\binom{a^n}{a^m}$ the binomial $\binom{n}{m}$ fits perfectly.
And what is the general formula about that one here?
$\binom{(ba)^n}{(ba)^m}$