Dynamic programming (DP) is a commonly used technique for solving a wide variety of discrete optimization problems such as scheduling  string-editing  packaging  and inventory management More recently  it has found applications in bioinformatics in matching sequences of amino-acids and nucleotides (the Smith-Waterman algorithm)