Efficient Haplotype Block Partitioning and Tag SNP Selection Algorithms under Various Constraints