CMPT 120 Lecture 2: Algorithms

15 views2 pages
meghan78 and 39786 others unlocked
CMPT 120 Full Course Notes
29
CMPT 120 Full Course Notes
Verified Note
29 documents

Document Summary

An algorithm is a sequence of unambiguous instructions for solving a problem , i. e. , for obtaining a required output for any legitimate input in a finite amount of time . 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 a sequence of computational steps that transform the input into the output . Unambiguous : each step of an algorithm has to be precisely defined. After reading an algorithm, there should be no question about what to do. Specific problem : an algorithm should always present a solution to a particular problem, or group of problems. Legitimate input : an algorithm might need some kind of input to do its job. Finite amount of time : if started, an algorithm must end eventually. Clear i/o : inputs and outputs should be defined clearly.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents