A polynomial case of the parsimony haplotyping problem