CS 473: Algorithms, Fall 2010
HW 3 (due Tuesday, September 21st)
This homework contains four problems.
Read the instructions for submitting homework on
the course webpage
. In particular,
make sure
that you write the solutions for the problems on
separate sheets of paper; the sheets for each problem should be stapled together. Write your name
and netid on each sheet.
Collaboration Policy:
For this home work, Problems 13 can be worked in groups of up to 3
students each.
Problem 0 should be answered in Compass as part of the assessment HW3Online and
should be done individually.
0. (25 pts) HW3Online.
1. (25 pts) Suppose we have a stack of
n
pancakes of different sizes. We want to sort the pancakes
so that the smaller pancakes are on top of the larger pancakes. The only operation we can
perform is a
flip
 insert a spatula under the top
k
pancakes, for some
k
between 1 and
n
,
and flip them all over.
Name:
CS 373 Midterm 1
4. Suppose we have a stack of
n
pancakes of different sizes. We want to sort the pancakes so
that smaller pancakes are on top of larger pancakes. The only operation we can perform is a
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.
 Fall '08
 Chekuri,C
 Algorithms, Divide and conquer algorithm, Search algorithm, pancakes

Click to edit the document details