Answer:
To change the pair-wise summation computation provided to find a maximum element of an array we; Take two elements to check max element from that and add to the T ARRAY, the same process is then repeated for the next two elements, again we repeat the same process for the next two elements from T array until we get the max element process going on pair-wise computation
Explanation:
Code written using pair-wise computation to describe how to change the given pair-wise summation computation provided to find the maximum element of an array
The given array element ; (x[0], x[1], x[2], x[3], x[4], x[5], x[6])
IF X[0] > X[1]
T[0]=X[0];
ELSE
T[0]=X[1]
IF X[2] > X[3]
T[1]=X[2];
ELSE
T[1]=X[3];
IF X[4] > X[5]
T[2]=X[4];
ELSE
T[2]=X[5];
T[3]=X[6];
IF T[0] > T[1]
T[4]=T[0];
ELSE
T[4]=T[1]
IF T[2] >T[3]
T[5]=T[2];
ELSE
T[5]=T[3];
IF T[4] > T[5]
MAX=T[4];
ELSE
MAX=T[5]