An algorithm is a finite sequence of instructions used to perform a computation. It's safe to say that you have designed many algorithms already. An algorithm usually solves some computational problem, and for us, this computational problem usually has something to do with the user interface, measurement, or feedback control. For instance, in the first few lab exercises, each of the functions that we write for user interface is an instance or instantiation of an algorithm. In this sense, an algorithm is more abstract than a program or function.
In general, we say that an algorithm is correct and solves a problem if, for every valid input, it yields the correct output in some finite number of steps. However, for general computing and even more so for real-time computing, many correct algorithms will not satisfy …
This is a preview. Read the full book in print or ebook — get it from MIT Press (ISBN 9780262548762).
Instructor with access? Instructor login.