Given $n$ objects split into $K$ groups with respective sizes $h_k = \{h_1, h_2, \dots , h_K\}$, where $\sum h_k = n $, and given $\beta$ boundary points:
How many ways are there of organising the objects and boundary points in a line, such that between boundary points there are only objects of the same group, and adjacent segments cannot contain the same group?
Supplementary information: There must be at least one object between boundary points. There are always 2 extra implied boundary points at the start and end of the sequence. Objects in the same group are indistinguishable.
For example, if we have $ n = 10, K = 3, h_K = \{3, 2, 5\}, \beta = 3$ : Allowed sequences include: AABBCCCCCA and CCCBBAAACC Where A, B, C represent the 3 groups.
For the case where $\beta = K - 1 $, the number of combinations can be expressed as $K!$
For the case where $\beta = n - 1 $, the number of combinations can be expressed using Smirnov Words as in this answer.
I need a closed expression that can count the number of combinations given any $K$, sizes $h_k$, and $\beta$. The expression should be able to handle large $n$ and large $K$.