Skip to main content

Assignment 2: Algorithm analysis and algorithm exploration

Due: Wednesday, 6 September 2017 by 10:30pm

Summary: In this assignment, you will both explore some issues pertaining to algorithm analysis and further your skills at developing algorithms.

Purpose: To ground/refresh your understanding of complexity analysis. To encourage you to think more broadly about algorithm design.

Collaboration (written): You may discuss this assignment with anyone you like, provided you credit such discussion when you submit the assignment. You will find that you learn the material better more if you follow initial design discussions in a group with individual writing. Each person should write up his, her, zir, or their own work and submit it individually.

Submitting: Turn in your work under my office door. While I would prefer that you use LaTeX, you may certainly do your work by hand. Make sure to include your name, course information, and date at the top of the page. If you use paper torn from a loose-leaf notebook, make sure to remove or trim any lose edges.

Evaluation: We will primarily evaluate your work on its correctness (e.g., does it compute what it is supposed to; does it meet the requirements of the assignment); clarity (e.g., is it easy to read, is it well formatted and documented); and efficiency (e.g., does it achieve its goal quickly and with limited resources). These criteria will be modified, as appropriate, for written and coding assignments.

Warning: So that this assignment is a learning experience for everyone, we may spend class time publicly critiquing your work.

Part 1 - Exploring complexity

Do problems 2-1, 2-2, 2-3, 2-8, 2-13, 2-14, 2-15, 2-18, 2-23, 2-32, and 2-37 from Skiena.

Part 2 - Exploring algorithms

Pick two of the “Interview Problems” from Chapter 2 of Skiena (problems 2-43 to 2-52) and write up solutions. Your solutions should be in pseudocode; you need not implement them in a real programming language.