Algorithms, integers, matrices Flashcards
finite set of precise instructions for performing a computation or solving a problem, can be described using computer language
algorithm
an algorithm has input values from a specified set
input
from each set of input values, an algorithm produces output values from a specified set
output
the steps of an algoirthm must be defined precisely
definitness
an algorithm should produce the correct output values for each set of input values
corectness
an algorithm should produce the desired output after a finite number of steps for any input in the set
finiteness
it must be possible to perform each step of an algorithm exactly and in a finite amount of time
effectiveness
the prcedure should be applicable for all problems of the desired form, not just a particular set of input values
generality
written using pascal programming language
pseudocode
a high level language that is more or less independent of a particular type of computer
pascal
provides an intermediate step between an english language description of an algorithm and an implementation of the algorithm in a programming language
pseudocode
this algorithm can be used when the list has terms occurring in increasing size
binary search
the process of arranging elements in order
sorting
this algorithm puts a list in increasing order by successively comparing adjacent elements, interchanging them if the are in the wrong order
bubble sort
always begins with the second element. the second element will be compared with the first and so on
insertion sort