A
LGORITHMS
 CSE 101
Homework 2
Due Thursday, January 21st, 8:00 AM. No exceptions!
Turn in solutions to problems 2.22 (page 75), 2.25 (page 76), and 2.30 (page 77).
Each problem is worth 10 points. We suggest the following steps in writing up your solutions, when they are
aplicable:
1. Understand the problem. Take a small numeric example and work it out manually to get a clear idea
about the problem. Do not hesitate to contact us if you do not understand what you are supposed to do.
2. Give an informal description (at most 10 lines of english text) of your solution. The informal description
should highlight the
key ideas
of your solution. Your solution may just be graded by the quality of this
informal description.
3. Write up your design; Use the pseudo programming languge from the book to write your algorithms.
Write your algorithms modularly. Provide sufficient detail as warranted by the problem.
4. Analyze the time complexity.
5. Argue that your algorithm is correct.
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.
 Winter '08
 staff
 Prime number, Nontotient

Click to edit the document details