An Efficient Algorithm for Haplotype Inference on Pedigrees with Recombinations and Mutations