Filters
Question type

Study Flashcards

How does the constant of proportionality for an algorithm differ from focusing on the dominant term in big-O analysis?


A) The constant of proportionality involves terms and coefficients that are usually ignored during big-O analysis.
B) The constant of proportionality attempts to calculate the computational cost of N = NP problems.
C) The constant of proportionality focuses on the dominant term's effects on other parts of the algorithm, rather than focusing solely on the dominant term.
D) The constant of proportionality involves the creation of a benchmark for items that contribute to the dominant term.

E) All of the above
F) A) and D)

Correct Answer

verifed

verified

When choosing an algorithm, faster run times can often be achieved at the expense of what other resource?


A) hard drive space
B) processing power
C) active memory
D) interrupt requests

E) None of the above
F) A) and C)

Correct Answer

verifed

verified

When performing a thorough analysis of an algorithm's complexity, what two cases are of the most concern in general? (Choose two.)


A) best case
B) worst case
C) average case
D) mediocre case

E) A) and C)
F) None of the above

Correct Answer

verifed

verified

Which of the following is an example of a quadratic algorithm?


A) An algorithm in which work grows as a square of the problem size.
B) An algorithm in which work grows as a power of three each time the problem size increases.
C) An algorithm in which work grows in direct proportion to the size of the problem.
D) An algorithm in which work grows at a rate of n^k, where k is a constant greater than 1.

E) A) and B)
F) All of the above

Correct Answer

verifed

verified

A

What would the constant k value in an O(k^n) algorithm be for the Fibonacci sequence?


A) 0.83
B) 1.63
C) 3.14
D) 5.24

E) C) and D)
F) B) and C)

Correct Answer

verifed

verified

B

What two terms are used to refer to a search in which each value in a sequence is examined until a target value is found or the end of the sequence is reached?


A) sequential search
B) modular search
C) linear search
D) binary search

E) A) and B)
F) B) and D)

Correct Answer

verifed

verified

Logarithmic complexity is better than constant but worse than linear complexity.

A) True
B) False

Correct Answer

verifed

verified

What statement accurately describes the strategy utilized by the quicksort algorithm?


A) The quicksort algorithm repeatedly swaps elements that are out of order in a list until they are completely sorted.
B) The quicksort algorithm repeatedly swaps the smallest element in an unsorted portion of a list with an element at the start of the unsorted portion.
C) The quicksort algorithm repeatedly inserts the i-th element into its proper place in the first i items in the list.
D) The quicksort algorithm partitions a list around a pivot item and sorts the resulting sublists.

E) B) and C)
F) None of the above

Correct Answer

verifed

verified

Although recursive Fibonacci is elegant in its design, there is a less beautiful but much faster version that uses a loop to run in linear time.

A) True
B) False

Correct Answer

verifed

verified

What does the "O" in big-O notation stand for?


A) The "O" stands for "on the order of," which is a reference to the order of complexity of the work of the algorithm.
B) The "O" stands for "Organization of," which is a reference to the organization of complex functions at work in the algorithm.
C) The "O" stands for "on the ontology of," which is a reference to the structure of the algorithm itself.
D) The "O" stands for "on the openness of," which is a reference to the ability to discern from code how the algorithm functions.

E) B) and C)
F) B) and D)

Correct Answer

verifed

verified

A

What type of analysis involves analyzing a polynomial wherein its value approaches or approximates that of its dominant term, as the size of the problem gets very large?


A) quadratic analysis
B) logarithmic analysis
C) asymptotic analysis
D) asynchronous analysis

E) A) and B)
F) None of the above

Correct Answer

verifed

verified

In terms of order of complexity, what is the best kind of performance to have?


A) linear
B) quadratic
C) constant
D) logarithmic

E) All of the above
F) A) and B)

Correct Answer

verifed

verified

An order of complexity that is worse than polynomial is called quadratic.

A) True
B) False

Correct Answer

verifed

verified

Python's minimum function returns the minimum or smallest item in a list.

A) True
B) False

Correct Answer

verifed

verified

The performance of some algorithms depends on the placement of the data that are processed.

A) True
B) False

Correct Answer

verifed

verified

In asymptotic analysis, the value of a polynomial asymptotically approaches or approximates the value of its largest term as n becomes very large.

A) True
B) False

Correct Answer

verifed

verified

What is the dominant term when evaluating the amount of work in an algorithm?


A) When expressed as time vs. work performed, the dominant term is the area where the least amount of time is expended.
B) When expressed as a matrix of related problems, the problem that is most significant becomes the dominant term.
C) When expressed as a quadratic function, the dominant term is the statement in the algorithm where the fastest work is performed.
D) When expressed as a polynomial, the dominant term of an algorithm is the area where the most work is performed.

E) A) and C)
F) A) and D)

Correct Answer

verifed

verified

As the problem size gets larger, the performance of an algorithm with the higher order of complexity becomes worse more quickly.

A) True
B) False

Correct Answer

verifed

verified

Which of the following is an example of a linear algorithm?


A) An algorithm in which work grows exponentially in relation to the size of the problem.
B) An algorithm in which work grows as a power of three each time the problem size increases.
C) An algorithm in which work grows in direct proportion to the size of the problem.
D) An algorithm in which work grows at a rate of n^k, where k is a constant greater than 1.

E) A) and B)
F) B) and C)

Correct Answer

verifed

verified

When using the counting instructions method of measuring efficiency, what are the two classes of instructions you must distinguish between? (Choose two.)


A) Instructions that perform assignment operations that can be combined.
B) Instructions that are repeated more than once in the course of the algorithm.
C) Instructions that execute the same number of times regardless of the problem size.
D) Instructions whose execution count varies with the problem size.

E) All of the above
F) C) and D)

Correct Answer

verifed

verified

Showing 1 - 20 of 51

Related Exams

Show Answer