Lecture 1

Introduction to Algorithms, Second Edition

• Notes
• davidvictor
• 4

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

The University of Texas at Austin Lecture 1 Department of Computer Sciences Professor Vijaya Ramachandran Merge-sort; algorithm analysis; divide & conquer 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.

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

Sorting Given an array A [1 ..n ] of elements from a totally ordered set, the output of the sorting problem
This is the end of the preview. Sign up to access the rest of the document.
• Spring '06
• Ramachandran
• Algorithms, Sort, Array, Analysis of algorithms, sorted order, Professor Vijaya Ramachandran

{[ snackBarMessage ]}

What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern