order of the coalescent events $3$ and $6$ which are inverted. [**g**]{} and [**g**]{}’ share the common allocation ${\textbf{a}}_1=(V_2,V_5,V_1,V_5,V_0,V_1,V_0,V_0,V_0)$; however, [**g**]{} has a second possible allocation ${\textbf{a}}_2=(V_5,V_2,V_5,V_1,V_1,V_0,V_0,V_0,V_0)$ that it is not compatible with ${\textbf{g}}{}$’. This difference is due to the fact that $V_5$ has three descendants belonging to sampling group $s_1$, while [**g**]{} has two subtrees with $3$ leaves sampled at $s_1$, and [**g**]{}’ has only one. We note that singleton nodes also need to be allocated, both in ${\textbf{a}}_1$ and ${\textbf{a}}_2$. We will elaborate on this point in the next subsection.

### Likelihood Calculations {#fastlik}

To calculate the likelihood, we assume the ISM of mutations and that mutations occur according to a Poisson point process with rate $\mu$ on the branches of [**g**]{}, where $\mu$ is the total mutation rate. To compute the likelihood we need to map mutations in [**T**]{} to branches of [**g**]{} and this is done for each mapping ${\textbf{a}}_{i}$ of non-singleton nodes of [**T**]{} to subtrees of [**g**]{} . For every $V$ in [**T**]{} such that $|V|>1$, we define ${\textbf{E}}_{V}$ as the set formed by the edges in ${\textbf{T}}$ that subtend singleton children of $V$ and, with the exception of $V=V_{0}$, ${\textbf{E}}_{V}$ in addition includes 