Algorithms and Complexity Flashcards

1
Q

A procedure for solving a problem that consists of input, output and a finite sequence of steps that converts the input to the output

A

Algorithm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

The average number of comparisons or arithmetic operations needed when a problem is solved using the algorithm

A

average case time complexity

of an algorithm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

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

A

big-O

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

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

A

big-theta

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

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

A

Binary Search

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

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

A

Bubble Sort

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

the amount of space and time needed to execute the algorithm

A

complexity of an algorithm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

time complexity of an algorithm is O(1)

A

constant time complexity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

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

A

Insert sort algorithm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

An algorithm that determines whether a specified number appears in a sequence by successively proceeding through the sequence term by term

A

Linear search algorithm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

the time complexity of the algorithm is O(n)

A

linear time complexity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

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

A

Merge sort algorithm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

time complexity of the algorithm is Q(f(n)) for some polynomial f(n)

A

Polynomial time complexity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

time complexity of the algorithm is O(n^2)

A

quadratic tie complexity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

the amount of space required by a given algorithm to solve a problem

A

time complexity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

the maximum number of comparisons or arithmetic operations that can occur when a problem is solved using the algorithm

A

worst case time complexity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

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

A

base b expansion

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

the expansion of an integer in base 2

A

binary expansion

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

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

A

Ceaser shift

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

an integer that divides both a and b

A

common divisor

of a and b

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

an integer that is multiple of a and b

A

common multiple

of a and b

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

an integer greater than 1 that is not prime

A

composite

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

a == b (mod n): n | (a-b)

A

congruence

a is congruent to b modulo n

24
Q

the study of sending and receiving secret messages

A

cryptography

25
the study of systems for secure communications
cryptology
26
systems for secure communications
cryptosystem
27
a function that is one-to-one and onto
bijective function
28
|A| = |B| | two sets A and B have the same cardinality
Cardinalities of two sets
29
the smallest integer greater than or equal to x
ceiling function
30
the set B where f is a function from A to B
codomain
31
a+bi for some real numbers a and b where I = sqrt(-1)
complex number
32
g of f: for functions f : A -> B and g: B-> C, the composition g of f: A-> C is the function defined by g(f(x)) for each x subset A
composition
33
a consequence of another result
corollary
34
a set A such that |A| = |N|
``` denumerable set (countably infinite set) ```
35
the set A where fi s a function from A to B
domain
36
the set of all elements in A that is related to a by R
``` equivalence class resulting from an equivalence relation R on A, |a| ```
37
a reflexive, symmetric, and transitive relation on a set
equivalence relation
38
the largest integer less than or equal to x
floor function
39
an assignment of a unique element of B to each element of A
``` function (from A to B) f: A -> B ```
40
the set of points (x,y) in the Cartesian plane for which x subset A, y subset B, and y = f(x)
graph
41
b is an image of a under f: b = f(a)
image
42
a function from A to B such that distinct elements of A have distinct images in B
injective function | one-to-one
43
a bijective function
one-to-one correspondence
44
a function from A to B such that distinct elements of A have distinct images in B
one-to-one function
45
a function from A to B such that every element of B is the image of some element of A
onto function
46
a bijective function from A to A
permutation | on a nonempty set A
47
the set of all images of f
range
48
a relation R on a set S is reflexive if (a, a) subset R for all a subset S
reflexive
49
a R b: a is related to b by the relation R if (a, b) subset R. a !R b: a is not related to b by the relation R if (a, b) !subset R
related to
50
a subset of A x B
relation (from set A to set B
51
a relation from S to S or a subset of S x S
relation (on a set S)
52
a function from A to B such that every element of B is the image of some element of A
surjective function | surjection
53
a relation R on a set S is symmetric if (a, b) subset R, | then (b, a) subset R for all a, b, subset S
symmetric
54
a relation R on set S is transitive if (a, b) subset R and (b, c) subset R, then (a, c) subset R for all a, b, c subset S
transitive
55
a set that is not countable
uncountable set