In justifying our matrix multiplication algorithm (Section 2.5), we claimed the following block wise property: if X and Y are n×nn matrices, and

X=[ABCD],Y=[EFGH],

where A,B,C,D,E,F,G, and H are n/2×n/2 sub-matrices, then the product XY can be expressed in terms of these blocks:

XY=[ABCD][EFGH]=[AE+BGAF+BHCE+DGCF+DH]

Prove this property.

Short Answer

Expert verified

Justification of matrix multiplication

Step by step solution

01

Prove:

Environment multiplication

Allowing the following matrices:

X=ABCD and Y=EFGH

X and Y vectors are split into 4 size blocks. n2×n2. This combination between X or Y matrix (z) has the following i , j the elements because X and Y were n×nmatrices:

Zij=k=1XikYkj where 1i,jn

With each region of both the process of making the product, the specified property may be demonstrated (Z) .

For the sector in which i,jn2:

Zij=X,Yij=K=1nXikYkj=k=1nXikYkj+K=1nXikYkj=K=1n/2AikEkj+K=1n/2BikGkj=AE+BGij

For the sector in which in2and n2jn:

Zij=(XY)ij =K=1nXikYkj=K=1nXikYkj+nk=-+12nXikYkj=K=1n/2AikFkj+K=1n/2BikHkj=AF+BHij

For the sector in which n2inand jn2:

Zij=X,Yij=K=1nXikYkj=k=1nXikYkj+K=1nXikYkj=K=1n/2CikEkj+K=1n/2DikGkj=CE+DGij

For the sector in which n2i,jn :

Zij=X,Yij=K=1nXikYkj=k=1nXikYkj+K=1nXikYkj=K=1n/2CikFkj+K=1n/2DikHkj=CF+DHij

The product of X and Y can be expressed as follows:

Z=Zijwherei,jn2Zijwherein2andn2<jnZijwheren2<inandjn2Zijwheren2<i,jn

Z=AE+BGAF+BHCE+DGCF+DH

Therefore, the given property is proved.

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

This problem illustrates how to do the Fourier Transform (FT) in modular arithmetic, for example, modulo .(a) There is a number such that all the powers ω,ω2,...,ω6 are distinct (modulo ). Find this role="math" localid="1659339882657" ω, and show that ω+ω2+...+ω6=0. (Interestingly, for any prime modulus there is such a number.)

(b) Using the matrix form of the FT, produce the transform of the sequence (0,1,1,1,5,2) modulo 7; that is, multiply this vector by the matrix M6(ω), for the value of ωyou found earlier. In the matrix multiplication, all calculations should be performed modulo 7.

(c) Write down the matrix necessary to perform the inverse FT. Show that multiplying by this matrix returns the original sequence. (Again all arithmetic should be performed modulo 7.)

(d) Now show how to multiply the polynomials and using the FT modulo 7.

Practice with the fast Fourier transform.

(a) What is the FFT of (1,0,0,0)? What is the appropriate value of ωin this case? And of which sequence is (1,0,0,0)the FFT?

(b)Repeat for (1,0,1,-1).

A kway merge operation. Suppose you have ksorted arrays, each with nelements, and you want to combine them into a single sorted array ofkn elements.

(a)Here’s one strategy: Using the merge procedure from Section 2.3, merge the first two arrays, then merge in the third, then merge in the fourth, and so on. What is the time complexity of this algorithm, in terms of kand n?

(b) Give a more efficient solution to this problem, using divide-and-conquer.

Given a sorted array of distinct integersA[1,...,n] , you want to find out whether there is an indexi for which A[i]=i. Give a divide-and-conquer algorithm that runs in time O(logn).

The Hadamard matricesH0,H1,H2, are defined as follows:

  • H0 is the 1×1matrix[1]
  • For k>0,Hkisthe2k×2k matrix

localid="1658916810283" Hk=[Hk-1|Hk-1Hk-1|-Hk-1]

Show that if υ is a column vector of lengthlocalid="1658916598888" n=2k, then the matrix-vector product localid="1658916618774" Hkvcan be calculated using localid="1658916637767" O(nlogn) operations. Assume that all the numbers involved are small enough that basic arithmetic operations like addition and multiplication take unit time.

See all solutions

Recommended explanations on Computer Science Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free