A process or set of clearly defined rules followed to support calculations or problem solving.
Finiteness - Finite number of steps
Unambiguous - Steps must be clear and lead to one meaning
- Clearly defined inputs and outputs
- Logical sequencing of steps
- Iteration - repetition of steps until results achieved
- Selection - input leading to choice of step
- Structured English
When can this be used?
- Automate calculations to improve efficiency of a process
- Design a step by step solution to solve a problem
- Supports machine learning for data analysis
Algorithms can come in different forms. For example, a flow chart can be one way of displaying an algorithm
Flow chart symbols:
A basic example of a flow cart for making tea is: