Please help with questions 2 and 3 Matrix transposition is an operation which fl
ID: 3881782 • Letter: P
Question
Please help with questions 2 and 3
Matrix transposition is an operation which flips a matrix over its diagonal, i.e. it switches the row and column indices of the matrix by producing another matrix denoted as A^T (see https: /len.wikipedia.org/wiki/Transpose) Consider the following parallel implementation of the matrix transposition operation: A is nxn matrix parfor i = 2 to n for j = 1 to i-1 swap A_ij and A_ij What is the running time, work, span and parallelism of this algorithm? Explain your answer Design a parallel algorithm for the following problem: input: array A Find: smallest element of n What is your algorithm's running time, work, span and parallelism? Explain your answerExplanation / Answer
Problem-2
RunningTime - is O(n^2)
Reason :
=================================================================================
Problem 3
Algorithm:
Time complexity: O(n)
Reason:As we are looping through the array till n times to check small value of array..as n elements were available.