Guidelines for presenting an algorithm as a solution to a problem

  • Brief, informal, intuitive description. A line or two of English.
  • Detailed description. Mostly English, but may include well-documented pseudocode and diagrams.
  • Proof of correctness - this means that for all inputs for which this program terminates, the algorithm gives the correct corresponding output. Sometimes this can be included in the detailed description if worded appropriately. Usually best to add separately. Mostly English, math and diagrams.
  • Proof of termination - this means that the algorithm will terminate on all inputs. Usually trivial, sometimes not. Make sure one way or the other.
  • Analysis of time and space complexity. Upper bound on the worst case is what we seek in general.
For particular questions, some of these may be expressly asked for and the others safely ignored. Some may be inappropriate. Some may be trivial. Consider them all.

-- tanyabw - 2017-08-27

This topic: CS401 > HowToHomework > Howtoalg
Topic revision: r1 - 2017-08-27 - 21:17:47 - Main.tanyabw
Copyright 2016 The Board of Trustees
of the University of
Helping Women Faculty Advance
Funded by NSF