1 - Fundamentals of Algorithms Flashcards
What is an algorithm?
e.g. directions
An algorithm is a sequence of steps that can be followed to complete a task. A computer program is an implementation of an algorithm and an algorithm is not a computer program
What is decomposition?
e.g. recipe
Decomposition is breaking a problem into a number of sub-problems, so that each sub-problem achieves an identifiable task, which might itself be further subdivided
What is abstraction?
e.g. London tube map
Abstraction is the process of removing unnecessary detail from a problem
What is a model for how a computer operates?
The input-process-output model helps to show how a computer operates.
What is the input stage in a computer, and where does it take place in the algorithm?
The input stage is the flow of data into the process from outside the system. It takes place at the start of the algorithm
What is the process stage in a computer, and where does it take place in the algorithm?
The process stage includes all the tasks required to affect a transformation of the inputs. It takes place in-between the input and output stage
What is the output stage in a computer, and where does it take place in the algorithm?
The output stage is where the data and information flow out of the transformation process, and it takes place at the end of the algorithm
What are flowcharts?
Flowcharts are diagrams that represent an algorithm
What does the flow line mean?
The flow line shows the sequence of operations. These must go in through one box and out of the other.
What does a terminal symbol mean?
The terminal symbol denotes the start or end of the algorithm
What does the processing symbol mean?
The processing symbol denotes a process to be carried out
What does a decision symbol mean?
A decision symbol is used to represent the operation in which there are 2 alternatives
What structures can be used for flowcharts?
Sequence, Selection and Iteration structures
What is pseudocode?
Pseudocode is a way of developing an algorithm, which consists of natural language-like statements that precisely describe the steps required
What are assignment operators?
Operators that set the value of the variable in pseudocode