Deck 3: The Efficiency of Algorithms

Full screen (f)
exit full mode
Question
With sequential search, the smaller the list of items, the less work must be done to search it. _________________________
Use Space or
up arrow
down arrow
to flip the card.
Question
A collection of nodes and connecting edges is called a(n)graph . _________________________
Question
Binary search is able to search any kind of list, regardless of whether or not it is sorted.
Question
____ are useful for rating one machine against another and for rating how sensitive a particular algorithm is with respect to variations in input on one particular machine.

A)Time trials
B)Benchmarks
C)Comparison times
D)Intensive tests
Question
In the sequential search algorithm, the minimum amount of work is done if the value being searched for is the ____ value in the list.

A)first
B)second
C)middle
D)last
Question
In the sequential search algorithm, the worst case occurs when the value being searched for is the first value in the list. _________________________
Question
Time algorithms taken across multiple machines is the best way for comparing two algorithms that do the same task.
Question
If we were to run the sequential search algorithm many times, with random input values occurring at various places in the list, we would find the average number of comparisons done to be approximately n /2.
Question
The selection sort algorithm can recognize whether or not the list is already sorted at the beginning.
Question
____ involves the fixing of errors that are uncovered through repeated usage with different input values.

A)Program maintenance
B)Recycling
C)Data cleanup
D)Garbage collection
Question
____ is the algorithmic equivalence of miles per gallon or use of space in cars.

A)Efficiency
B)Elegance
C)Aesthetics
D)Complexity
Question
The things we look for in a new car are similar to the things we look for in a good algorithm.
Question
The sequential search and selection sort algorithms are different methods to get the same thing done.
Question
Sequential search is an order- n algorithm in the average case.
Question
Binary search uses significantly more space than sequential search.
Question
First and foremost, we expect ease of understanding from our algorithms. _________________________
Question
It is well known that solution algorithms that work in polynomial do exist.
Question
The shuffle-left algorithm is not space efficient. _________________________
Question
The study of the _______ of algorithms is called the analysis of algorithms.

A)design
B)efficiency
C)implementation
D)complexity
Question
If an Θ(n2)algorithm and an Θ(n)algorithm exist for the same task, then for large enough n, the Θ(n2)algorithm does more work and takes longer to execute, regardless of the constant factors for peripheral work.
Question
____________________ problems are solvable, but the solution algorithms all require so much work as to be virtually useless.
Question
The selection sort algorithm performs the task of sorting a list by growing a sorted subsection of the list from the _____ to the _____.

A)front / back
B)top / bottom
C)back / front
D)lowest / highest
Question
An ____ algorithm is called an exponential algorithm.

A)Θ(lg n )
B)Θ( n )
C)Θ( n 2)
D)Θ(2 n )
Question
The converging-pointers algorithm is Θ( n )in the ____________________ case.
Question
Part of the job of program ____ is to make clear any assumptions or restrictions about the input size the program was designed to handle.

A)design
B)implementation
C)documentation
D)maintenance
Question
The number of comparisons done by the selection sort algorithm does not grow at the same rate as the problem size n , instead it grows at approximately the ____________________ of that rate.
Question
The shuffle-left algorithm is an ____ algorithm in the worst case.

A)Θ(1)
B)Θ( n )
C)Θ(2 n )
D)Θ( n 2)
Question
The ____ case of an algorithm requires the least work.

A)best
B)worst
C)smallest
D)largest
Question
The worst case in binary search occurs ____.

A)when the object to be searched is in the middle of the list
B)when the object to be searched is at the end of the list
C)when the object to be searched is at the beginning of the list
D)when the object to be searched is not in the list
Question
A Hamiltonian circuit is a path through a graph that begins and ends at the same node and goes through all other nodes exactly ________.
Question
The copy-over algorithm is ____ in time efficiency in the worst case.

A)Θ(1)
B)Θ( n )
C)Θ(2 n )
D)Θ( n 2)
Question
A surprising number of problems fall into the "____" category.

A)suspected intractable
B)approximation algorithm
C)bin-packing
D)declared intractable
Question
_______ sort is an Θ( n 2)algorithm in all cases.

A)Selection
B)Shuffle
C)Sequential
D)Shuffle-left
Question
Placing a list of items into alphabetical or numerical order is called ____.

A)simplifying
B)searching
C)sorting
D)pattern matching
Question
____________________ is the term used to describe an algorithm's careful use of resources.
Question
Problems for which no known polynomial solution algorithm exists are sometimes approached via ____ algorithms.

A)alternative
B)intractable
C)polynomial
D)approximation
Question
Θ(lg n ), Θ( n ), and Θ( n 2)are ____ in the amount of work they do as n increases.

A)restricted
B)useful
C)polynomially bounded
D)exponential
Question
Binary search does ____ comparisons in the worst case.

A)Θ(1)
B)Θ(lg n )
C)Θ( n )
D)Θ( n 2)
Question
Sequential search is an ____ algorithm in the worst case.

A)Θ(1)
B)Θ( n )
C)Θ(2 n )
D)Θ( n 2)
Question
In the _______ search algorithm, the worst case occurs when the value being searched for is the last value in the list.

A)binary
B)bubble
C)shuffle
D)sequential
Question
What is the logarithm of n to the base 2?
Question
Given the data cleanup problem described in the text, write the pseudocode for the converging-pointers algorithm for data cleanup.
Question
Explain the sentence: The selection sort algorithm not only does comparisons; it also does exchanges.
Question
Discuss at length the measurement of the time and space consumed by an algorithm in order to determine its efficiency.
Question
Discuss at length the "people aspect" of the practical considerations for the development of algorithms. Include the concepts of program maintenance and ease of understanding in your response.
Question
Discuss at length both the best and worst case of the pattern-matching algorithm.
Question
If an algorithm is more time efficient and less space efficient, what is this called?
Question
Explain the term "brute force" as it applies to algorithms.
Question
What is the definition of order of magnitude n?
Question
How do you approach problems for which no known polynomial solution algorithm exists?
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/50
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 3: The Efficiency of Algorithms
1
With sequential search, the smaller the list of items, the less work must be done to search it. _________________________
True
2
A collection of nodes and connecting edges is called a(n)graph . _________________________
True
3
Binary search is able to search any kind of list, regardless of whether or not it is sorted.
False
4
____ are useful for rating one machine against another and for rating how sensitive a particular algorithm is with respect to variations in input on one particular machine.

A)Time trials
B)Benchmarks
C)Comparison times
D)Intensive tests
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
5
In the sequential search algorithm, the minimum amount of work is done if the value being searched for is the ____ value in the list.

A)first
B)second
C)middle
D)last
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
6
In the sequential search algorithm, the worst case occurs when the value being searched for is the first value in the list. _________________________
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
7
Time algorithms taken across multiple machines is the best way for comparing two algorithms that do the same task.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
8
If we were to run the sequential search algorithm many times, with random input values occurring at various places in the list, we would find the average number of comparisons done to be approximately n /2.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
9
The selection sort algorithm can recognize whether or not the list is already sorted at the beginning.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
10
____ involves the fixing of errors that are uncovered through repeated usage with different input values.

A)Program maintenance
B)Recycling
C)Data cleanup
D)Garbage collection
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
11
____ is the algorithmic equivalence of miles per gallon or use of space in cars.

A)Efficiency
B)Elegance
C)Aesthetics
D)Complexity
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
12
The things we look for in a new car are similar to the things we look for in a good algorithm.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
13
The sequential search and selection sort algorithms are different methods to get the same thing done.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
14
Sequential search is an order- n algorithm in the average case.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
15
Binary search uses significantly more space than sequential search.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
16
First and foremost, we expect ease of understanding from our algorithms. _________________________
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
17
It is well known that solution algorithms that work in polynomial do exist.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
18
The shuffle-left algorithm is not space efficient. _________________________
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
19
The study of the _______ of algorithms is called the analysis of algorithms.

A)design
B)efficiency
C)implementation
D)complexity
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
20
If an Θ(n2)algorithm and an Θ(n)algorithm exist for the same task, then for large enough n, the Θ(n2)algorithm does more work and takes longer to execute, regardless of the constant factors for peripheral work.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
21
____________________ problems are solvable, but the solution algorithms all require so much work as to be virtually useless.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
22
The selection sort algorithm performs the task of sorting a list by growing a sorted subsection of the list from the _____ to the _____.

A)front / back
B)top / bottom
C)back / front
D)lowest / highest
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
23
An ____ algorithm is called an exponential algorithm.

A)Θ(lg n )
B)Θ( n )
C)Θ( n 2)
D)Θ(2 n )
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
24
The converging-pointers algorithm is Θ( n )in the ____________________ case.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
25
Part of the job of program ____ is to make clear any assumptions or restrictions about the input size the program was designed to handle.

A)design
B)implementation
C)documentation
D)maintenance
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
26
The number of comparisons done by the selection sort algorithm does not grow at the same rate as the problem size n , instead it grows at approximately the ____________________ of that rate.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
27
The shuffle-left algorithm is an ____ algorithm in the worst case.

A)Θ(1)
B)Θ( n )
C)Θ(2 n )
D)Θ( n 2)
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
28
The ____ case of an algorithm requires the least work.

A)best
B)worst
C)smallest
D)largest
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
29
The worst case in binary search occurs ____.

A)when the object to be searched is in the middle of the list
B)when the object to be searched is at the end of the list
C)when the object to be searched is at the beginning of the list
D)when the object to be searched is not in the list
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
30
A Hamiltonian circuit is a path through a graph that begins and ends at the same node and goes through all other nodes exactly ________.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
31
The copy-over algorithm is ____ in time efficiency in the worst case.

A)Θ(1)
B)Θ( n )
C)Θ(2 n )
D)Θ( n 2)
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
32
A surprising number of problems fall into the "____" category.

A)suspected intractable
B)approximation algorithm
C)bin-packing
D)declared intractable
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
33
_______ sort is an Θ( n 2)algorithm in all cases.

A)Selection
B)Shuffle
C)Sequential
D)Shuffle-left
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
34
Placing a list of items into alphabetical or numerical order is called ____.

A)simplifying
B)searching
C)sorting
D)pattern matching
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
35
____________________ is the term used to describe an algorithm's careful use of resources.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
36
Problems for which no known polynomial solution algorithm exists are sometimes approached via ____ algorithms.

A)alternative
B)intractable
C)polynomial
D)approximation
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
37
Θ(lg n ), Θ( n ), and Θ( n 2)are ____ in the amount of work they do as n increases.

A)restricted
B)useful
C)polynomially bounded
D)exponential
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
38
Binary search does ____ comparisons in the worst case.

A)Θ(1)
B)Θ(lg n )
C)Θ( n )
D)Θ( n 2)
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
39
Sequential search is an ____ algorithm in the worst case.

A)Θ(1)
B)Θ( n )
C)Θ(2 n )
D)Θ( n 2)
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
40
In the _______ search algorithm, the worst case occurs when the value being searched for is the last value in the list.

A)binary
B)bubble
C)shuffle
D)sequential
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
41
What is the logarithm of n to the base 2?
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
42
Given the data cleanup problem described in the text, write the pseudocode for the converging-pointers algorithm for data cleanup.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
43
Explain the sentence: The selection sort algorithm not only does comparisons; it also does exchanges.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
44
Discuss at length the measurement of the time and space consumed by an algorithm in order to determine its efficiency.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
45
Discuss at length the "people aspect" of the practical considerations for the development of algorithms. Include the concepts of program maintenance and ease of understanding in your response.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
46
Discuss at length both the best and worst case of the pattern-matching algorithm.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
47
If an algorithm is more time efficient and less space efficient, what is this called?
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
48
Explain the term "brute force" as it applies to algorithms.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
49
What is the definition of order of magnitude n?
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
50
How do you approach problems for which no known polynomial solution algorithm exists?
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 50 flashcards in this deck.