CS 473
Homework 2 (due February 9, 2010)
Spring 2010
CS 473: Undergraduate Algorithms, Spring 2010
Homework 2
Written solutions due Tuesday, February 9, 2010 at noon
•
Roughly 1
/
3 of the students will give oral presentations of their solutions to the TAs.
You should
have received an email telling you whether you are expected to present this homework.
Please
see the course web page for further details.
•
Groups of up to three students may submit a common solution. Please clearly write every group
member’s name and NetID on every page of your submission. Please start your solution to each
numbered problem on a new sheet of paper. Please
don’t
staple solutions for different problems
together.
1.
A
palindrome
is a string that reads the same forwards and backwards, like
x
,
pop
,
noon
,
redivider
,
or
"sator arepo tenet opera rotas"
, Describe and analyze an algorithm to find the length of the
longest subsequence of a given string that is also a palindrome. For example, the longest palin
drome subsequence of
M
A
H
D
Y
NA
M
ICP
RO
G
R
AMZLET
M
ESHOW
Y
OUT
H
E
M
is
MHYMRORMYHM
, so
given that string as input, your algorithm should output the number 11.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '08
 Chekuri,C
 Logic, Algorithms, Boolean Algebra, Boolean function, his/her direct supervisor

Click to edit the document details