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 answerPlease acceleration with questions 2 and 3

**Problem-2**

**RunningTime** – is O(n^2)

*Reason :*

- 1st restraint loop executes upto n ages.
- Restraint full i 2nd loop achieve executes (i-1) ages.i.e
- When i=3 the loop achieve be performed (i-1)..i.e 2 ages => i (O(1)) + j(O(1)+….upto(i-1))
- So restraint full ‘i’ 2nd loop achieve be performed ..When i=n the no of executions of 2nd loop achieve be 1(when i=3)+2(when i=4),..+n-2(when i=n)..the consolidate achieve be regular enjoy 1+2+3+–+n=[n(n+1)/2](If u retain the restraintmula of consolidate of n collection).

- Threre restrainte the floating age is O(n^2)

=================================================================================

Problem 3

**Algorithm:**

- Read an invest ‘n’ which is of lenght n
- intiate insignificant= n[0] //initating a inconstant denominated insignificant with primitive component of invest ‘n’.
- restraint (i=0;i<n.length;i++) //restraint each component of n
- if(n[i] < insignificant) //if prize at abjuration ‘i’ is close then insignificant inconstant
- small=n[i] //store that abjuration prize into insignificant inconstant

- if(n[i] < insignificant) //if prize at abjuration ‘i’ is close then insignificant inconstant
- object restraint
- print insignificant
- =====================================================================
- At the object of restraint loop u achieve procure the insignificant prize of invest.

**Age complexity: O(n)**

*Reason:*As we are looping through the invest plow n ages to inhibit insignificant prize of invest..as n components were profitable.