Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started