Deck 3: The Efficiency of Algorithms

ملء الشاشة (f)
exit full mode
سؤال
With sequential search, the smaller the list of items, the less work must be done to search it. _________________________
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
A collection of nodes and connecting edges is called a(n)graph . _________________________
سؤال
Binary search is able to search any kind of list, regardless of whether or not it is sorted.
سؤال
____ 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
سؤال
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
سؤال
In the sequential search algorithm, the worst case occurs when the value being searched for is the first value in the list. _________________________
سؤال
Time algorithms taken across multiple machines is the best way for comparing two algorithms that do the same task.
سؤال
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.
سؤال
The selection sort algorithm can recognize whether or not the list is already sorted at the beginning.
سؤال
____ 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
سؤال
____ is the algorithmic equivalence of miles per gallon or use of space in cars.

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

A)design
B)efficiency
C)implementation
D)complexity
سؤال
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.
سؤال
____________________ problems are solvable, but the solution algorithms all require so much work as to be virtually useless.
سؤال
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
سؤال
An ____ algorithm is called an exponential algorithm.

A)Θ(lg n )
B)Θ( n )
C)Θ( n 2)
D)Θ(2 n )
سؤال
The converging-pointers algorithm is Θ( n )in the ____________________ case.
سؤال
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
سؤال
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.
سؤال
The shuffle-left algorithm is an ____ algorithm in the worst case.

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

A)best
B)worst
C)smallest
D)largest
سؤال
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
سؤال
A Hamiltonian circuit is a path through a graph that begins and ends at the same node and goes through all other nodes exactly ________.
سؤال
The copy-over algorithm is ____ in time efficiency in the worst case.

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

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

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

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

A)alternative
B)intractable
C)polynomial
D)approximation
سؤال
Θ(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
سؤال
Binary search does ____ comparisons in the worst case.

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

A)Θ(1)
B)Θ( n )
C)Θ(2 n )
D)Θ( n 2)
سؤال
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
سؤال
What is the logarithm of n to the base 2?
سؤال
Given the data cleanup problem described in the text, write the pseudocode for the converging-pointers algorithm for data cleanup.
سؤال
Explain the sentence: The selection sort algorithm not only does comparisons; it also does exchanges.
سؤال
Discuss at length the measurement of the time and space consumed by an algorithm in order to determine its efficiency.
سؤال
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.
سؤال
Discuss at length both the best and worst case of the pattern-matching algorithm.
سؤال
If an algorithm is more time efficient and less space efficient, what is this called?
سؤال
Explain the term "brute force" as it applies to algorithms.
سؤال
What is the definition of order of magnitude n?
سؤال
How do you approach problems for which no known polynomial solution algorithm exists?
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/50
auto play flashcards
العب
simple tutorial
ملء الشاشة (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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
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. _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
7
Time algorithms taken across multiple machines is the best way for comparing two algorithms that do the same task.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
9
The selection sort algorithm can recognize whether or not the list is already sorted at the beginning.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
13
The sequential search and selection sort algorithms are different methods to get the same thing done.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
14
Sequential search is an order- n algorithm in the average case.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
15
Binary search uses significantly more space than sequential search.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
16
First and foremost, we expect ease of understanding from our algorithms. _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
17
It is well known that solution algorithms that work in polynomial do exist.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
18
The shuffle-left algorithm is not space efficient. _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
19
The study of the _______ of algorithms is called the analysis of algorithms.

A)design
B)efficiency
C)implementation
D)complexity
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
21
____________________ problems are solvable, but the solution algorithms all require so much work as to be virtually useless.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
23
An ____ algorithm is called an exponential algorithm.

A)Θ(lg n )
B)Θ( n )
C)Θ( n 2)
D)Θ(2 n )
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
24
The converging-pointers algorithm is Θ( n )in the ____________________ case.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
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)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
28
The ____ case of an algorithm requires the least work.

A)best
B)worst
C)smallest
D)largest
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
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 ________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
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)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
33
_______ sort is an Θ( n 2)algorithm in all cases.

A)Selection
B)Shuffle
C)Sequential
D)Shuffle-left
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
35
____________________ is the term used to describe an algorithm's careful use of resources.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
38
Binary search does ____ comparisons in the worst case.

A)Θ(1)
B)Θ(lg n )
C)Θ( n )
D)Θ( n 2)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
39
Sequential search is an ____ algorithm in the worst case.

A)Θ(1)
B)Θ( n )
C)Θ(2 n )
D)Θ( n 2)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
41
What is the logarithm of n to the base 2?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
42
Given the data cleanup problem described in the text, write the pseudocode for the converging-pointers algorithm for data cleanup.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
43
Explain the sentence: The selection sort algorithm not only does comparisons; it also does exchanges.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
44
Discuss at length the measurement of the time and space consumed by an algorithm in order to determine its efficiency.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
46
Discuss at length both the best and worst case of the pattern-matching algorithm.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
47
If an algorithm is more time efficient and less space efficient, what is this called?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
48
Explain the term "brute force" as it applies to algorithms.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
49
What is the definition of order of magnitude n?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
50
How do you approach problems for which no known polynomial solution algorithm exists?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.