/*! This file is auto-generated */ .wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none} Q11E In justifying our matrix multipl... [FREE SOLUTION] | 91影视

91影视

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

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

where A,B,C,D,E,F,G, and H are n/2n/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. n2n2. This combination between X or Y matrix (z) has the following i , j the elements because X and Y were nnmatrices:

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 91影视!

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.

Question: You are given an infinite array A[]in which the first n cells contain integers in sorted order and the rest of the cells are filled with . You are not given the value of n. Describe an algorithm that takes an integer x as input and finds a position in the array containing x, if such a position exists, in O(log n) time. (If you are disturbed by the fact that the array A has infinite length, assume instead that it is of length n, but that you don鈥檛 know this length, and that the implementation of the array data type in your programming language returns the error message whenever elements A[i]withi>n are accessed.)

A binary tree is full if all of its vertices have either zero or two children. Let Bndenote the number of full binary trees with n vertices. (a)By drawing out all full binary trees with 3, 5, or 7 vertices, determine the exact values of B3, B5, and B7. Why have we left out even numbers of vertices, like B4?

(b) For general n, derive a recurrence relation for Bn.

(c) Show by induction that Bnis (2n).

Thesquare of a matrix A is its product with itself, AA.

(a) Show that five multiplications are sufficient to compute the square of a 2 x 2 matrix.

(b) What is wrong with the following algorithm for computing the square of an n x n matrix?

鈥淯se a divide-and-conquer approach as in Strassen鈥檚 algorithm, except that instead of getting 7 subproblems of size n2, we now get 5 subproblems of size n2 thanks to part (a). Using the same analysis as in Strassen鈥檚 algorithm, we can conclude that the algorithm runs in time O (nc) .鈥

(c) In fact, squaring matrices is no easier than matrix multiplication. In this part, you will show that if n x n matrices can be squared in time S(n) = O(nc), then any two n x n matrices can be multiplied in time O(nc) .

  1. Given two n x n matrices A and B, show that the matrix AB + BA can be computed in time 3S(n) + O(n2 ) .
  2. Given two n x n matrices X and Y, define the 2n x 2n matrices A and B,L as follows:
    A=X000andB=0Y00
    What is AB + BA, in terms of X and Y?
  3. Using (i) and (ii), argue that the product XY can be computed in time 3S(2n) + O(n2 ). Conclude that matrix multiplication takes time O(nc ).

Show that for any positive integers n and any base b , there must some power of b lying in the range [b,bn].

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.