Algorithms and Complexity Flashcards
A procedure for solving a problem that consists of input, output and a finite sequence of steps that converts the input to the output
Algorithm
The average number of comparisons or arithmetic operations needed when a problem is solved using the algorithm
average case time complexity
of an algorithm
f = O(g); there exists a positive constant C and a positive integer k such that f(n) <= Cg(n) for every integer n >= k
big-O
f=Q(g): there exists a positive constant C and a positive integer k such that f(n) <= Cg(n) for every integer n>= k
big-theta
an algorithm that determines whether a specified number is one of the numbers in a sequence of distinct numbers by successfully dividing the sequence in half
Binary Search
an algorithm that sorts the terms in a sequence of numbers listed in a column, so that the largest numbers successively flow to the bottom, resulting in a nondecreasing sequence
Bubble Sort
the amount of space and time needed to execute the algorithm
complexity of an algorithm
time complexity of an algorithm is O(1)
constant time complexity
an algorithm that sorts the terms in a sequence of numbers so that the terms are successfully inserted in a place in the sequence until a nondecreasing sequence results
Insert sort algorithm
An algorithm that determines whether a specified number appears in a sequence by successively proceeding through the sequence term by term
Linear search algorithm
the time complexity of the algorithm is O(n)
linear time complexity
An algorithm that sorts the terms in a sequence of numbers by successively dividing the sequence and the resulting subsequences in half and them merging the sorted subsequences until a nondecreasing sequence results
Merge sort algorithm
time complexity of the algorithm is Q(f(n)) for some polynomial f(n)
Polynomial time complexity
time complexity of the algorithm is O(n^2)
quadratic tie complexity
the amount of space required by a given algorithm to solve a problem
time complexity
the maximum number of comparisons or arithmetic operations that can occur when a problem is solved using the algorithm
worst case time complexity
the expansion of a positive integer n in base b, where b >= 2 and n = a_k * b^k + a_k-1 * b^k+1 + . . . + a_1 * b + a_0 * b^0
base b expansion
the expansion of an integer in base 2
binary expansion
a decryption technique in which each letter in the plaintext is replaced by a letter obtained by rotating the letter a fixed number of positions
Ceaser shift
an integer that divides both a and b
common divisor
of a and b
an integer that is multiple of a and b
common multiple
of a and b
an integer greater than 1 that is not prime
composite