CSCI 255 Fall 2014
Introduction to Algorithms and Discrete Structures
Archived Class
Charles Cusack
Computer Science
Hope College
Main
Schedule
Grading
Gradebook
Homework

Policies
Advice
College
    Policies

Notes
Programs
Tutorials

CSCI 125
CSCI 255
Others

Admin

Homework 15

General Comments

  • Most problems are found in one of the following:
    1. IDAA: Introduction to the Design and Analysis of Algorithms
    2. AIDMA: An Active Introduction to Discrete Mathematics and Algorithms
  • For full credit, provide context for each problem, show all calculations, and justify all answers by providing enough comments to explain your reasoning.
  • You will lose a significant amount of credit if you do not provide context, calculations, and justifications for a problem.
  • Numbers and/or algebra by themselves are not enough. A correct answer with no justification will be worth no more than half credit, and sometimes much less than that.
  • Precision is very important. You cannot skip steps, make guesses, or use flawed logic. Any of these things can lead to incorrect answers.
  • Homework assignments must be very neatly written or typeset (e.g. using Word or OpenOffice).
  • You must indicate any assistance/collaboration you had on an assignment as specified on the Policies page.
  • If a problem asks for an algorithm, you should give the most efficient algorithm you can find to ensure full credit. You should also specify the complexity of the algorithm with justification, whether or not the problem asks for it.

Details

  1. IDAA 4.1 #5 (page 137).
  2. IDAA 4.2 #1 (page 142). Make sure you show all of the necessary work and don't forget to give the topological sort in each case.
  3. IDAA 4.4 #2 (page 156).
  4. IDAA 4.4 #4 (page 156). Make sure you clearly explain your calculation(s). Your final answer should be something like "binary search is X times faster than sequential search", NOT something like "it takes X more steps". If you don't understand the difference between these statement, please ask me for clarification.
  5. IDAA 4.5 #13 (page 167).
Important Reminders:
  • Give a clear description of your algorithms. You may give code/pseudocode, but you must also include a short description of the algorithm since it is usually very difficult to determine what an algorithm is doing from code alone.
  • Don't forget to give and justify the complexity of your algorithms.
  • Remember to give the most efficient algorithm possible—if there is a more efficient algorithm, you will likely lose some points.
Tip: Always make sure you test your algorithms on several reasonable inputs to convince yourself they are correct.