Introduction to Algorithms, Second Edition

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
The University of Texas at Austin Lecture 1 Department of Computer Sciences Professor Vijaya Ramachandran CS357: ALGORITHMS, Spring 2006 Algorithms An algorithm is a computational procedure that takes values as input and produces values as output. In the process it solves a computational problem. An instance of a problem is any specific input. We will specify our algorithms in pseudo-code using standard programming constructs such as for-rof , if-fi , while loop, repeat loop and function and procedure calls. We will not confine ourselves to any particular programming language; using English phrases is fine as long as they describe the algorithm unambiguously. (No type declarations, etc. necessary unless needed for clarity.) Your textbook uses indentation to demark the scope of while loops, etc. For your homeworks it is better to use begin-end or the constructs listed above, especially if your pseudo-code runs across more than one page. This is a theoretical class where we will study algorithms for important combinatorial problems, techniques for algorithm design, and methods of analyzing the performance of algorithms. Our primary measure for the quality of an algorithm is its worst-case running time . We will sometimes study ex- pected running time or ‘amortized’ running time, and sometime we will look at other resources such as space (i.e., memory) usage. Any algorithm you present in your homeworks, tests or exam must be accompanied by a proof of correctness. Correctness may proved using either equations or unambiguous English sentences, depending on which is more convenient.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Sorting G iv enana r ray A [1 ..n ] of elements from a totally ordered set, the output of the sorting problem is the same array
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 4

Lecture 1 - The University of Texas at Austin Department of...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online