Introduction to Algorithms, Second Edition

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
The University of Texas at Austin Lecture 8 Department of Computer Sciences Professor Vijaya Ramachandran Dynamic Programming CS357: ALGORITHMS, Spring 2006 1 Dynamic Programming In this lecture we will study an algorithmic technique called ‘dynamic programming’. Dynamic programming and the greedy strategy that we will study later solve ‘optimization’ problems. An optimization problem is one for which an input has a collection of feasible solutions, each with an associated cost, and we need to find a feasible solution that optimizes the cost; here ‘optimizes’ would mean either minimizes or maximizes , depending on the nature of the problem. Such a solution is called an optimal solution. We will now study a dynamic programming algorithm for the Longest Common Subsequence (LCS) problem. 1.1 Longest Common Subsequence Problem A sequence Z = <z 1 , ··· ,z k > is a subsequence of another sequence X = <x 1 , ··· ,x m > if there exists a strictly increasing sequence of indices 1 i 1 <i 2 ··· <i k m such that x i j = z j ,1 j k . Given sequences
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/30/2008 for the course CS 357 taught by Professor Ramachandran during the Spring '06 term at University of Texas at Austin.

Page1 / 3

Lecture 8 - The University of Texas at Austin Department of...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online