Design and Analysis of Algorithms MCQs with Answers
Practice important Design and Analysis of Algorithms MCQs with answers and explanations.
Multiple Choice Questions
Q151: If a cell E[i,j] has a down arrow from E[i-1,j], what does it signify?
- A: The minimum was found using E[i-1,j]
- B: The minimum was found using E[i,j-1]
- C: The minimum was found using E[i-1,j-1]
- D: The cell is empty
View Answer
A
Q152: An edit script can be extracted by following a unique path from which cells?
- A: E[0,0] to E[m,n]
- B: E[0,0] to E[0,n]
- C: E[i,j] to E[m,n]
- D: None of the above
View Answer
A
Q153: How many entries are in the E matrix for the edit distance problem?
- A: Θ(n)
- B: Θ(n^2)
- C: Θ(log n)
- D: Θ(n^3)
View Answer
B
Q154: Matrix multiplication is:
- A: Associative but not commutative
- B: Commutative but not associative
- C: Neither associative nor commutative
- D: Both associative and commutative
View Answer
A
Q155: In the example with matrices A1, A2, and A3, which multiplication order is more efficient?
- A: ((A1A2)A3)
- B: A1(A2A3)
- C: Both orders are equally efficient
- D: Neither order is efficient
View Answer
B
Q156: What does the result of multiplying a p × q matrix with a q × r matrix yield?
- A: A p × r matrix
- B: A q × r matrix
- C: A p × q matrix
- D: A r × p matrix
View Answer
A
Q157: The number of different ways of parenthesizing n items is related to which mathematical concept?
- A: Catalan numbers
- B: Fibonacci numbers
- C: Factorials
- D: Prime numbers
View Answer
A
Q158: The total number of multiplications for multiplying matrices A1 (5×4), A2 (4×6), and A3 (6×2) in the order ((A1A2)A3) is:
- A: 180
- B: 88
- C: 120
- D: 72
View Answer
A
Q159: Dynamic programming can solve problems that involve:
- A: Overlapping subproblems
- B: Linear relationships
- C: Static data
- D: None of the above
View Answer
A
Q160: When applying dynamic programming, what does Θ(n^2) imply about time complexity?
- A: Quadratic time complexity
- B: Linear time complexity
- C: Logarithmic time complexity
- D: Constant time complexity
View Answer
A