We develop a dynamic programming algorithm for haplotype block partitioning to minimize the number of representative single nucleotide polymorphisms (SNPs) required to account for most of the haplotype quality in each block. The block quality is a function of the haplotypes defined by the SNPs in the block. Any measure of haplotype quality can be used in the algorithm and of course the measure should depend on the specific application. The dynamic programming algorithm is applied to analyze the haplotype data on chromosome 21 of the recent paper of Patil et al. Using the same criteria as in Patil et al., we identify a total of 3,582 representative SNPs and 2,575 blocks which are 21.5\% and 37.7\%, respectively, smaller than those identified using a greedy algorithm of Patil et al.