Question: In class, we saw Karatsuba s algorithm which was a way to speed up the computation of a b for two n - bit integers
In class, we saw Karatsubas algorithm which was a way to speed up the computation of a b
for two nbit integers a and b In this problem, we analyse an algorithm for multiplying two
CSCHY Last updated: July
uppertriangular matrices abbreviated UT matrices. See Algorithm The standard approach for
multiplying two matrices is shown below for two times matrices.
A B
a a
a a
b b
b b
ab ab ab ab
ab ab ab ab
For ease of explanation, if the inputs A and B to Algorithm Algorithm and Algorithm have
dimension n times n then let n be a power of two. In practice, we can always pad the matrix with
rows and columns of all zeros so that this is the case.
Note that the notation Ai : j : k represents the submatrix of A consisting of the rows i to j
inclusive and columns to k inclusive. For A and B let A A : n : n A A :
nn : n A An : n : n and A An : nn : n Bij
are defined similarly for i j in
The time it takes to multiple two constant dimension matrices is constant time.
Algorithm multiplyTTA : UT matrix, B : UT matrix UT matrix
Require: A and B are two uppertriangular matrices.
Ensure: Outputs A B
: if n then return A B
: end if
: M multiplyTTA B
: M multiplyTMA B multiplyMTA B
: M multiplyTTA B
: return
M M
M
Algorithm multiplyTMA : UT matrix, B : matrix matrix
Require: A is an uppertriangular matrix and B is a matrix.
Ensure: Outputs A B
: if n then return A B
: end if
: M multiplyTMA B multiplyA B
: M multiplyTMA B multiplyA B
: M multiplyTMA B
: M multiplyTMA B
: return
M M
M M
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
