Design and Analysis of Algorithms - Unit-1
ANumber of operations executed
BAmount of memory used
CNumber of lines of code
DInput size
Correct Answer
Number of operations executed
AThe amount of time an algorithm takes to run
BThe amount of memory an algorithm requires to execute
CThe number of inputs an algorithm can handle
DThe number of times an algorithm loops
Correct Answer
The amount of memory an algorithm requires to execute
AO(1)
BO(n)
CO(log n)
DO(n^2)
Correct Answer
O(n)
AO(1)
BO(n)
CO(log n)
DO(n^2)
Correct Answer
O(log n)
ATo precisely measure the exact number of operations in an algorithm
BTo provide a rough estimate of algorithmic performance
CTo compare algorithms based on their exact execution times
DTo simplify the comparison of algorithms based on their growth rates
Correct Answer
To simplify the comparison of algorithms based on their growth rates
AΘ(n)
BO(n)
CΩ(n)
DAll of the above
Correct Answer
O(n)
AO(n)
BΩ(n)
CΘ(n)
DAll of the above
Correct Answer
Ω(n)
ABest-case time complexity
BAverage-case time complexity
CTight bound on the time complexity
DWorst-case time complexity
Correct Answer
Tight bound on the time complexity
AO(n) is always greater than Ω(n)
BΩ(n) is always greater than O(n)
CO(n) and Ω(n) are equal
DThere's no relationship between O(n) and Ω(n)
Correct Answer
There's no relationship between O(n) and Ω(n)
AO(1)
BO(n)
CO(log n)
DO(n^2)
Correct Answer
O(1)
AA relation between two variables that recurs infinitely
BA relation between two functions that recurs infinitely
CA mathematical expression that defines a function in terms of its value at smaller inputs
DA mathematical expression that defines a function in terms of its value at larger inputs
Correct Answer
A mathematical expression that defines a function in terms of its value at smaller inputs
AR(n) = R(n-1) + R(n-2)
BF(n) = F(n+1) - F(n-1)
CP(n) = P(n^2)
DQ(n) = 2 * Q(n/2)
Correct Answer
R(n) = R(n-1) + R(n-2)
AThe case where the recurrence relation is true for all values of n
BThe case where the recurrence relation is true for some specific value of n
CThe smallest input value(s) for which the recurrence relation is defined directly
DThe largest input value(s) for which the recurrence relation is defined directly
Correct Answer
The smallest input value(s) for which the recurrence relation is defined directly
AIterative method
BDynamic programming
CMaster theorem
DAll of the above
Correct Answer
All of the above
AO(n)
BO(n log n)
CO(n^2)
DO(2^n)
Correct Answer
O(n log n)
AThe number of subproblems
BThe ratio of subproblem size to original problem size
CThe coefficient of the leading term in the recurrence relation
DThe base case value
Correct Answer
The number of subproblems
ACase 1
BCase 2
CCase 3
DNone of the above
Correct Answer
Case 2
AO(n)
BO(n log n)
CO(n^2)
DO(n^3)
Correct Answer
O(n log n)
ASolving differential equations
BSolving recurrence relations
CAnalyzing algorithmic time complexity
DFinding prime numbers
Correct Answer
Analyzing algorithmic time complexity
ADivide and conquer strategy
BDynamic programming
CLinear algebra
DGraph theory
Correct Answer
Divide and conquer strategy
AO(n)
BO(n log n)
CO(n^2)
DO(n^2 log n)
Correct Answer
O(n^2)
AThe number of subproblems and the size of each subproblem
BThe size of the original problem and the size of the subproblems
CThe number of recursive calls and the base case value
DThe coefficients of the leading terms in the recurrence relation
Correct Answer
The size of the original problem and the size of the subproblems
ACase 1
BCase 2
CCase 3
DNone of the above
Correct Answer
Case 1
AO(1)
BO(log n)
CO(n)
DO(n^2)
Correct Answer
O(log n)
ADynamic programming
BGreedy approach
CDivide and conquer
DBacktracking
Correct Answer
Divide and conquer
AO(n)
BO(n log n)
CO(n^2)
DO(log n)
Correct Answer
O(n^2)
AO(n)
BO(n log n)
CO(n^2)
DO(log n)
Correct Answer
O(n log n)
ABrute force
BGreedy approach
CDynamic programming
DDivide and conquer
Correct Answer
Divide and conquer
AO(n)
BO(n log n)
CO(n^2)
DO(n^log7)
Correct Answer
O(n^log7)