# Algorithm

• Mar 9th 2009, 02:45 PM
epi1988
Algorithm
Need some help..

Recall an algorithm for computing the inner product of two vectors represented as one dimensional arrays.Suppose that this algorithm is implemented as a function that input arrays V1,V2 and their dimension k, and outputs their inner product. Write a pseudocode of an algorithm that input two matrices A[1..n,1..m] and B[1..m;1..p] and outputs their product. Your algorithm should call the function for computing the inner product.
• Mar 9th 2009, 10:06 PM
CaptainBlack
Quote:

Originally Posted by epi1988
Need some help..

Recall an algorithm for computing the inner product of two vectors represented as one dimensional arrays.Suppose that this algorithm is implemented as a function that input arrays V1,V2 and their dimension k, and outputs their inner product. Write a pseudocode of an algorithm that input two matrices A[1..n,1..m] and B[1..m;1..p] and outputs their product. Your algorithm should call the function for computing the inner product.

You should know that the i,j-th element of a matrix product is the inner product of the i-th row of the first matrix with the j-th column of the second.

CB
• Mar 10th 2009, 03:25 AM
epi1988
Algorithm
I think I know what do you mean.

Thanks a lot.(Wink)