This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Assignment 4: Algorithms, Counting, Complexity, and Interfaces ANSWER KEY CSci 1001, Spring 2010 7 April 2010 1 General Comments Who Graded What: If you have questions on any of the solutions here, or general grading questions, feel free to see any of the course teachers or TAs. If you think we missed something and that the grading is incorrect, please ask the grader for a regrade within a week of the day the homework is returned . Heres who graded what on this assignment: Problem 1: Jonathan Lawson Problem 2: Faraz Mohammad-Mirzaei Problem 3: Katie Panciera Problem 4: Tyler Smith A few general comments: If you didnt do well (or didnt do as well as you had hoped) on this assignment, please (i) look over this key, and try to understand well what you did wrong, (ii) look over the file, on the course web page, of tips for doing well in this class, (iii) make use of office hours. Please read the problems carefully and make sure you understand what they are asking. Some people lost points because they answered the wrong question. If you have any question about what a problem is asking for, please ask about it. Please staple your pages together and write the problems in order to make sure that we dont miss any problems. 1 By showing your work, you are more likely to get partial credit. Since we specified in the directions that you had to show your work, not showing your work often lost you points. We tried to only deduct points once for a prior problem. So if you made a mistake in part b and part c depended on part b, as long as your part c used part b correctly you got full credit. Note that this does not mean that part c was correct, simply that we didnt want you to be penalized multiple times for early mistakes. 2 Writing Good Algorithms Problem 1.1 [5 points] No, the algorithm is not correct. Instead of adding up 5 + 10 + 15 + ...+ 100, you get 1 + 6 + 11 + ...+ 96. So depending how you think about it, it doesnt do whats intended OR it doesnt do whats intended correctly. To fix it, we can change the beginning value of x from 1 to 5 or 0....
View Full Document
This note was uploaded on 10/28/2010 for the course CSCI 1001 taught by Professor Staff during the Spring '08 term at Minnesota.
- Spring '08