Surprisingly I can't find one in our text. (It might be there, but ...)
From CLRS "an algorithm is any well-defined computational procedure that takes some value, or set of values, as input and produces some value, or set of values, as output. An algorithm is thus a sequence of computational steps that transforms the input into the output."
According to this definition, is a program an algorithm?
Is an algorithm a program?
How is this different from our definition in intro to programming?
In this class we will study
Some classical algorithms
Sorting
Searching
Dijkstra's algorithm
And others.
How to determine efficiency (or complexity) of an algorithm
How to discuss (or prove) an algorithm is correct
Some techniques for creating algorithms
Why do this?
Algorithms form the basis of computer science, and understanding how to work with algorithms is a fundamental skill.
Working with algorithms is an important skill for a designer/programmer/software architect.
The ability to work with, analyze and argue correctness of an algorithm is an important coding interview skill.
You are expected to have a working knowledge of some classical algorithms.
In general, as we work our way through this, I expect when given an algorithm, you will be able to :
Describe the algorithm at a high level
Don't read "code", but explain what the algorithm does.
Discuss the performance of the algorithm
Define the measure of the input
Discuss best, worst, average, performance
For both space and time.
Argue that the algorithm works correctly
An example:
FIND-ME(A,key)
Input: A: an array of elements, numbered 0 through n-1
key: an item of the type contained in the array
Output: The location of key in A or n if not found.