Data Structures & Algorithms Multiple Choice Questions on “Strassen’s Algorithm”.
1. Strassen’s algorithm is a/an_____________ algorithm. Answer: b 2. What is the running time of Strassen’s algorithm for matrix multiplication? Answer: a 3. What is the running time of naïve matrix multiplication algorithm? Answer: d 4. Strassen’s matrix multiplication algorithm follows ___________ technique. Answer: c 5. The number of scalar additions and subtractions used in Strassen’s matrix multiplication algorithm is ________ Answer: b 6. Running time of Strassen’s algorithm is better than the naïve Theta(n3) method. Answer: a 7. Given the program of naïve method. Fill in the blanks with appropriate formula Answer: a 8. Who demonstrated the difference in numerical stability? Answer: d 9. What is the recurrence relation used in Strassen’s algorithm? Answer: a 10. Who discussed techniques for reducing the memory requirements for Strassen’s algorithm? 11. What is the formula to calculate the element present in second row, first column of the product matrix? Answer: d 12. Strassen’s Matrix Algorithm was proposed by _____________ Answer: a 13. How many iterating statements are involved in the naïve method of matrix multiplication? Answer: c 14. Strassen’s algorithm is quite numerically stable as the naïve method. Answer: b 15. Compute the product matrix using Strassen’s matrix multiplication algorithm.
a) Non- recursive
b) Recursive
c) Approximation
d) Accurate
Clarification: Strassen’s Algorithm for matrix multiplication is a recursive algorithm since the present output depends on previous outputs and inputs.
a) O(n2.81)
b) O(n3)
c) O(n1.8)
d) O(n2)
Clarification: Strassen’s matrix algorithm requires only 7 recursive multiplications of n/2 x n/2 matrix and Theta(n2) scalar additions and subtractions yielding the running time as O(n2.81).
a) O(n2.81)
b) O(n4)
c) O(n)
d) O(n3)
View Answer
Clarification: The traditional matrix multiplication algorithm takes O(n3) time. The number of recursive multiplications involved in this algorithm is 8.
a) Greedy technique
b) Dynamic Programming
c) Divide and Conquer
d) Backtracking
Clarification: Strassen’s matrix multiplication algorithm follows divide and conquer technique. In this algorithm the input matrices are divided into n/2 x n/2 sub matrices and then the recurrence relation is applied.
a) O(n2.81)
b) Theta(n2)
c) Theta(n)
d) O(n3)
Clarification: Using Theta(n2) scalar additions and subtractions, 14 matrices are computed each of which is n/2 x n/2. Then seven matrix products are computed recursively.
a) True
b) False
Clarification: Strassen’s Algorithm requires only 7 recursive multiplications when compared with the naïve Theta(n3) method which reuires 9 recursive multiplications to compute the product.for i=1 to n do
for j=1 to n do
Z[i][j]=0;
for k=1 to n do
___________________________
a) Z[i][j] = Z[i][j] + X[i][k]*Y[k][j]
b) Z[i][j] = Z[i][j] + X[i][k] + Y[k][j]
c) Z[i][j] = Z[i][j] * X[i][k]*Y[k][j]
d) Z[i][j] = Z[i][j] * X[i][k] + Y[k][j]
Clarification: In the naïve method of matrix multiplication the number of iterating statements involved are 3, because of the presence of rows and columns. The element in each row of one matrix is multiplied with each element in the column of the second matrix. The computed value is placed in the new matrix Z[i][j].
a) Strassen
b) Bailey
c) Lederman
d) Higham
Clarification: The difference in the numerical stability was demonstrated by Higham. He overemphasized that Strassen’s algorithm is numericaly unstable for some applications.
a) 7T(n/2) + Theta(n2)
b) 8T(n/2) + Theta(n2)
c) 7T(n/2) + O(n2)
d) 8T(n/2) + O(n2)
Clarification: The recurrence relation used in Strassen’s algorithm is 7T(n/2) + Theta(n2) since there are only 7 recursive multiplications and Theta(n2) scalar additions and subtractions involved for computing the product.
a) Strassen
b) Lederman
c) Bailey
d) Higham
Answer: c
Clarification: The submatrices formed at the levels of recursion consume space. Hence in order to overcome that Bailey discussed techniques for reducing the memory required.
a) M1+M7
b) M1+M3
c) M2+M4 – M5 + M7
d) M2+M4
Clarification: The element at second row, first column can be found by the formula M2 + M4, where M2 and M4 can be calculated by
M2= (A(2,1) + A(2,2)) B(1,1)
M4=A(2,2)(B(1,2) – B(1,1)).
a) Volker Strassen
b) Andrew Strassen
c) Victor Jan
d) Virginia Williams
Clarification: Strassen’s matrix multiplication algorithm was first published by Volker Strassen in the year 1969 and proved that the n3 general matrix multiplication algorithm wasn’t optimal.
a) 1
b) 2
c) 3
d) 4
Clarification: In the naïve method of matrix multiplication the number of iterating statements involved are 3, because of the presence of rows and columns in a matrix. The element in each row of the first matrix is multiplied with each element in the column of the second matrix.
a) True
b) False
Clarification: Strassen’s algorithm is too numerically unstable for some applications. The computed result C=AB satisfies the inequality with a unit roundoff error which corresponds to strong stability inequality(obtained by replacing matrix norms with absolute values of the matrix elements).
Given a11=1; a12=3;a21=5;a22=7
b11=8;b12=4;b21=6;b22=2
a) c11=20;c12=12;c21=100;c22=15
b) c11=22;c12=8;c21=90;c22=32
c) c11=15;c12=7;c21=80;c22=34
d) c11=26;c12=10;c21=82;c22=34
Answer: d
Clarification: The solution can be obtained by
C11=1*8 + 3*6 =8+18=26
C12=1*4 + 3*2 =4+6=10
C21=5*8 + 7*6 =40+42=82
C22= 5*4 + 7*2=20+14=34.