Sorting Algorithms Consider Matrix Multiplication Computation Program C B D B C D Nxn Two Q37151363

Sorting Algorithms

  1. Consider a matrix multiplication computation program C = B*(A+D) where A, B, C, and D are (nxn) two-dimensional matrices.

Ans => Time complexity ofmatrix addition A + D = O(n2)

Time complexity of matrix multiplication B*(A + D) =O(n3)

So, total complexity ofoperation C = B*(A + D) is

= O(n2) +O(n3)

=O(n3)

  1. The program is executed on a computer with the followingcharacteristics:
    1. CPU time for one multiplication is 100 microseconds
    2. CPU time for one addition is 5 microseconds
    3. The memory reference time for either read or write is 200microseconds
  2. Let n=1000, what is the total time required to perform themultiplication. Assume that
    OR
    OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.