Computers and Technology
Computers and Technology, 19.09.2019 01:30, elias1019

4. (25 points) consider the following procedure that performs multiplication of two upper triangular matrices a[1: : n][1: : n] and b[1: : n][1: : n]. matrix multiply(a[1: : n][1: : n], b[1: : n][1: : n]) cost times 1. for i 1 to n c1 2. for j i to n c2 3. ci j 0 c3 4. for k i to j c4 5. ci j ci j +aik bk j c5 6. return c c6 as the product c[1: : n][1: : n] is also upper triangular, we assume that we do not have to be concerned with the strictly lower triangular entries of the matrix. (a) fill in for each line of instruction, the number of times the instruction is executed. (b) derive the expression for the running time of matrix multiply in terms of n and ci. what is the complexity of the algorithm using the big-o notation?

answer
Answers: 2

Similar questions

Do you know the correct answer?
4. (25 points) consider the following procedure that performs multiplication of two upper triangular...

Questions in other subjects: