Optimization Problems Concerning Tag Snp Selection, Haplotype Inference, And Detection Of Horizontal Gene Transfers