the bth consistent haplotype. We can now represent a possible haplotype as a vector of labels X = {X1, …, XL} where Xl denotes the label of the haplotype at the lth site in the Slth segment. The segmentation implies that the labels are identical within each segment so that we always have Xl = Xl–1 when Sl = Sl–1. We use X{s} to define the label of the haplotype across all sites residing in the sth segment. Moreover, we represent a pair of haplotypes as a pair of vectors of labels (X1, X2). An illustration of this graph representation of the possible haplotypes can be seen in Supplementary Figure 3a.