2.2- Asymptotic Notation/ Basic Efficiency Classes Flashcards

1
Q

To compare and rank such orders
of growth, computer scientists use three notations:

A

O (big oh), (big omega), and (big theta).

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

Class: 1
Constant

A

Short of best-case efficiencies, very few reasonable
examples can be given since an algorithm’s running
time typically goes to infinity when its input size grows
infinitely large.

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

Class: log n
logarithmic

A

Typically, a result of cutting a problem’s size by a
constant factor on each iteration of the algorithm (see
Section 4.4). Note that a logarithmic algorithm cannot
take into account all its input or even a fixed fraction
of it: any algorithm that does so will have at least linear
running time.

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

Class: n
linear

A

Algorithms that scan a list of size n (e.g., sequential
search) belong to this class.

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

Class: n log n
linearithmic

A

Many divide-and-conquer algorithms (see Chapter 5),
including mergesort and quicksort in the average case,
fall into this category

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

Class: n^2
quadratic

A

Typically, characterizes efficiency of algorithms with
two embedded loops (see the next section). Elementary sorting algorithms and certain operations on n × n matrices are standard examples.

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

Class: n^3
cubic

A

Typically, characterizes efficiency of algorithms with
three embedded loops (see the next section). Several
nontrivial algorithms from linear algebra fall into this
class.

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

Class: 2^n
exponential

A

Typical for algorithms that generate all subsets of an
n-element set. Often, the term “exponential” is used
in a broader sense to include this and larger orders of
growth as well.

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

Class: n!
factorial

A

Typical for algorithms that generate all permutations
of an n-element set.

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