Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

pper - triangular 1 matrices abbreviated UT matrices. See Algorithm 2 . The standard approach for multiplying two matrices is shown below for two 2

pper-triangular 1 matrices abbreviated UT matrices. See Algorithm 2. The standard approach for
multiplying two matrices is shown below for two 2\times 2 matrices.
A B =
a1,1 a1,2
a2,1 a2,2
b1,1 b1,2
b2,1 b2,2
=
a1,1b1,1+ a1,2b2,1 a1,1b1,2+ a1,2b2,2
a2,1b1,1+ a2,2b2,1 a2,1b1,2+ a2,2b2,2
For ease of explanation, if the inputs A and B to Algorithm 2, Algorithm 3, and Algorithm 4 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 A[i : 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 A11= A[1 : n/2,1 : n/2], A12= A[1 :
n/2,(n/2+1) : n], A21= A[(n/2+1) : n,1 : n/2], and A22= A[(n/2+1) : n,(n/2+1) : n]. Bij
are defined similarly for i, j in [2].
The time it takes to multiple two constant dimension matrices is constant time.
Algorithm 2 multiplyTT(A : UT matrix, B : UT matrix)-> UT matrix
Require: A and B are two upper-triangular matrices.
Ensure: Outputs A B.
1: if n =1 then return A B
2: end if
3: M1 multiplyTT(A11, B11)
4: M2 multiplyTM(A11, B12)+ multiplyMT(A12, B22)
5: M3 multiplyTT(A22, B22)
6: return
M1 M2
0 M3
Algorithm 3 multiplyTM(A : UT matrix, B : matrix)-> matrix
Require: A is an upper-triangular matrix and B is a matrix.
Ensure: Outputs A B.
1: if n =1 then return A B
2: end if
3: M1 multiplyTM(A11, B11)+ multiply(A12, B21)
4: M2 multiplyTM(A11, B12)+ multiply(A12, B22)
5: M3 multiplyTM(A22, B21)
6: M4 multiplyTM(A22, B22)
7: return
M1 M2
M3 M4
a. Suppose that the time it takes to multiply two numbers or add two numbers is O(1). What
1A square matrix A is upper-triangular if all entries ai,j are equal to zero for i > j (the top left entry of A is a1,1
the bottom right entry is an,n). Here are some upper-triangular matrices:
A1=5 A2=
51
02
A3=
031
040
000
.
3

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Formal SQL Tuning For Oracle Databases Practical Efficiency Efficient Practice

Authors: Leonid Nossov ,Hanno Ernst ,Victor Chupis

1st Edition

3662570564, 978-3662570562

More Books

Students also viewed these Databases questions