Deck 3: The Efficiency of Algorithms

ملء الشاشة (f)
exit full mode
سؤال
The selection sort algorithm can recognize whether or not the list is already sorted at the beginning.
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
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 that the loop is executed approximately n times.
سؤال
The time an algorithm takes on a particular machine is important for comparing two algorithms that do the same task.
سؤال
If an Q (n2) algorithm and an Q (n) algorithm exist for the same task, then for large enough n, the Q (n2) algorithm does more work and takes longer to execute, regardless of the constant factors for peripheral work.
سؤال
The shuffle-left algorithm is not space-efficient.
سؤال
Of all the desirable properties for algorithms, efficiency is the most easily quantifiable.
سؤال
Ease of understanding, elegance, efficiency, and correctness are all characteristics of a good algorithm.
سؤال
With sequential search, the bigger the list of items, the more work that must be done to search it.
سؤال
A computer program is often written to be used only once to solve a single instance of a problem.
سؤال
The brute-force bin-packing algorithm is very useful.
سؤال
The sequential search and selection sort algorithms are different methods to get the same thing done.
سؤال
Binary search uses significantly more space than sequential search.
سؤال
In the sequential search algorithm, the worst case occurs when the value being searched for is the first value in the list.
سؤال
Anything that varies as a constant times n is said to be of order of magnitude n.
سؤال
The time/space tradeoff is the choice between algorithms where you gain something while giving up something else.
سؤال
It is sufficient for an algorithm to provide correct results for only the input values that we expect are the most likely to occur.
سؤال
The selection sort algorithm does exchanges, in addition to comparisons.
سؤال
Given a sorted list, the sequential search algorithm is more efficient than the binary search.
سؤال
Sequential search is an order-n algorithm in the average case.
سؤال
Elegance is the first and foremost expectation of a proper algorithm.
سؤال
The shuffle-left algorithm is a(n) ____ algorithm in the best case.

A) 1
B) Q (n)
C) Q (2n)
D) Q (n2)
سؤال
Some algorithms must do work that is not polynomially bounded.
سؤال
The properties that make better algorithms are very similar to the properties we look for when purchasing a car.
سؤال
An ____ algorithm is called an exponential algorithm.

A) Q (lg n)
B) Q (n)
C) Q (n2)
D) Q (2n)
سؤال
The Hamiltonian problem is suspected to be intractable.
سؤال
The binary search algorithm is ____ in the worst case.

A) 1
B) Q (lg n)
C) Q (n)
D) Q (n2)
سؤال
A collection of sets and vectors is called a graph.
سؤال
The ____ case of an algorithm requires the minimum amount of work.

A) best
B) worst
C) smallest
D) largest
سؤال
____ is the term to describe an algorithm's careful use of resources.

A) Resourcefulness
B) Time-Space Tradeoff
C) Effectiveness
D) Efficiency
سؤال
The converging-pointers algorithm is ____ in the best case.

A) 1
B) Q (n)
C) Q (2n)
D) Q (n2)
سؤال
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
سؤال
Sequential search is a(n) ____ algorithm in the worst case.

A) 1
B) Q (n)
C) Q (2n)
D) Q (n2)
سؤال
____ is the algorithmic equivalence of style.

A) Efficiency
B) Elegance
C) Aesthetics
D) Complexity
سؤال
Selection sort is a(n) ____ algorithm in all cases.

A) 1
B) Q (n)
C) Q (2n)
D) Q (n2)
سؤال
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
سؤال
The study of the efficiency of various algorithms is called the ____ of algorithms.

A) design
B) analysis
C) implementation
D) testing
سؤال
The copy-over algorithm is ____ in time efficiency in the worst case.

A) 1
B) Q (n)
C) Q (2n)
D) Q (n2)
سؤال
The number of times a number n can be divided by 2 and not go below 1 is called the logarithm of n to the base 3.
سؤال
In the sequential search algorithm, the worst case occurs when the value being searched for is the ____ value in the list.

A) first
B) second
C) middle
D) last
سؤال
____ is the fixing of errors uncovered through repeated use of an algorithm.

A) Program maintenance
B) Recycling
C) Data cleanup
D) Garbage collection
سؤال
____ algorithms are an alternative approach for problems which no known polynomial solution algorithm exists.

A) Alternative
B) Intractable
C) Polynomial
D) Approximation
سؤال
The ____ sort algorithm performs the task of sorting a list by growing a sorted subsection of the list from the back to the front.

A) selection
B) sequential
C) shuffle-left
D) binary
سؤال
A ____ is a path through a graph that begins and ends on the same node and goes through every node exactly once.

A) Newtonian loop
B) McCarthian path
C) Hamiltonian circuit
D) complete trip
سؤال
When does the worst case in binary search occur?

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
سؤال
The process of timing an algorithm using the same machine but searching for different items is called ____.

A) time trials
B) benchmarking
C) comparison timing
D) intensive testing
سؤال
What is the unit of work in the data cleanup algorithm?

A) comparisons and exchanges
B) comparisons only
C) examinations and copies
D) character comparisons
سؤال
Why would an exponential algorithm be useless with a large input, n?

A) It would take too long to compute
B) It would take too much space
C) It would not be correct
D) It would not be elegant
سؤال
The problem of placing objects in alphabetical or numerical order is called ____.

A) simplifying
B) searching
C) sorting
D) pattern matching
سؤال
An algorithm with order of magnitude Q (n2) grows at the ____ of the rate of the problem size n.

A) square
B) cube
C) logarithm
D) fraction
سؤال
Q (n) and Q (n2) are ____ in the amount of work they do as n increases.

A) restricted
B) useful
C) polynomially bounded
D) exponential
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/50
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 3: The Efficiency of Algorithms
1
The selection sort algorithm can recognize whether or not the list is already sorted at the beginning.
False
2
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 that the loop is executed approximately n times.
False
3
The time an algorithm takes on a particular machine is important for comparing two algorithms that do the same task.
False
4
If an Q (n2) algorithm and an Q (n) algorithm exist for the same task, then for large enough n, the Q (n2) algorithm does more work and takes longer to execute, regardless of the constant factors for peripheral work.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
5
The shuffle-left algorithm is not space-efficient.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
6
Of all the desirable properties for algorithms, efficiency is the most easily quantifiable.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
7
Ease of understanding, elegance, efficiency, and correctness are all characteristics of a good algorithm.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
8
With sequential search, the bigger the list of items, the more work that must be done to search it.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
9
A computer program is often written to be used only once to solve a single instance of a problem.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
10
The brute-force bin-packing algorithm is very useful.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
11
The sequential search and selection sort algorithms are different methods to get the same thing done.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
12
Binary search uses significantly more space than sequential search.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
13
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
14
Anything that varies as a constant times n is said to be of order of magnitude n.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
15
The time/space tradeoff is the choice between algorithms where you gain something while giving up something else.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
16
It is sufficient for an algorithm to provide correct results for only the input values that we expect are the most likely to occur.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
17
The selection sort algorithm does exchanges, in addition to comparisons.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
18
Given a sorted list, the sequential search algorithm is more efficient than the binary search.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
19
Sequential search is an order-n algorithm in the average case.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
20
Elegance is the first and foremost expectation of a proper algorithm.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
21
The shuffle-left algorithm is a(n) ____ algorithm in the best case.

A) 1
B) Q (n)
C) Q (2n)
D) Q (n2)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
22
Some algorithms must do work that is not polynomially bounded.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
23
The properties that make better algorithms are very similar to the properties we look for when purchasing a car.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
24
An ____ algorithm is called an exponential algorithm.

A) Q (lg n)
B) Q (n)
C) Q (n2)
D) Q (2n)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
25
The Hamiltonian problem is suspected to be intractable.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
26
The binary search algorithm is ____ in the worst case.

A) 1
B) Q (lg n)
C) Q (n)
D) Q (n2)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
27
A collection of sets and vectors is called a graph.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
28
The ____ case of an algorithm requires the minimum amount of work.

A) best
B) worst
C) smallest
D) largest
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
29
____ is the term to describe an algorithm's careful use of resources.

A) Resourcefulness
B) Time-Space Tradeoff
C) Effectiveness
D) Efficiency
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
30
The converging-pointers algorithm is ____ in the best case.

A) 1
B) Q (n)
C) Q (2n)
D) Q (n2)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
31
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
32
Sequential search is a(n) ____ algorithm in the worst case.

A) 1
B) Q (n)
C) Q (2n)
D) Q (n2)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
33
____ is the algorithmic equivalence of style.

A) Efficiency
B) Elegance
C) Aesthetics
D) Complexity
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
34
Selection sort is a(n) ____ algorithm in all cases.

A) 1
B) Q (n)
C) Q (2n)
D) Q (n2)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
35
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
36
The study of the efficiency of various algorithms is called the ____ of algorithms.

A) design
B) analysis
C) implementation
D) testing
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
37
The copy-over algorithm is ____ in time efficiency in the worst case.

A) 1
B) Q (n)
C) Q (2n)
D) Q (n2)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
38
The number of times a number n can be divided by 2 and not go below 1 is called the logarithm of n to the base 3.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
39
In the sequential search algorithm, the worst case occurs when the value being searched for is the ____ value in the list.

A) first
B) second
C) middle
D) last
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
40
____ is the fixing of errors uncovered through repeated use of an algorithm.

A) Program maintenance
B) Recycling
C) Data cleanup
D) Garbage collection
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
41
____ algorithms are an alternative approach for problems which no known polynomial solution algorithm exists.

A) Alternative
B) Intractable
C) Polynomial
D) Approximation
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
42
The ____ sort algorithm performs the task of sorting a list by growing a sorted subsection of the list from the back to the front.

A) selection
B) sequential
C) shuffle-left
D) binary
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
43
A ____ is a path through a graph that begins and ends on the same node and goes through every node exactly once.

A) Newtonian loop
B) McCarthian path
C) Hamiltonian circuit
D) complete trip
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
44
When does the worst case in binary search occur?

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
45
The process of timing an algorithm using the same machine but searching for different items is called ____.

A) time trials
B) benchmarking
C) comparison timing
D) intensive testing
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
46
What is the unit of work in the data cleanup algorithm?

A) comparisons and exchanges
B) comparisons only
C) examinations and copies
D) character comparisons
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
47
Why would an exponential algorithm be useless with a large input, n?

A) It would take too long to compute
B) It would take too much space
C) It would not be correct
D) It would not be elegant
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
48
The problem of placing objects in alphabetical or numerical order is called ____.

A) simplifying
B) searching
C) sorting
D) pattern matching
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
49
An algorithm with order of magnitude Q (n2) grows at the ____ of the rate of the problem size n.

A) square
B) cube
C) logarithm
D) fraction
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
50
Q (n) and Q (n2) are ____ in the amount of work they do as n increases.

A) restricted
B) useful
C) polynomially bounded
D) exponential
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.