Question: It is easy to write a sequential algorithm that sums up a 1 0 0 - element vector: Sum = a 1 + a 2

It is easy to write a sequential algorithm that
sums up a 100-element vector:
Sum =a1+a2+a3+dots+a100
It would look something like
Set i to 1
Set Sum to 0
While i101 do the following
SumS=um+ai
i=i+1
End of the loop
Write out the value of Sum
Stop
It is pretty obvious that this algorithm will take
about 100 units of time, where a unit of time is
equivalent to the time needed to execute one
iteration of the loop. However, it is less easy
to see how we might exploit the existence of
multiple processors to speed up the solution
to this problem.
Assume that instead of having only a
single processor, you have 100. Design a
parallel algorithm that utilizes these additional
resources to speed up the solution to the
previous computation. Exactly how much
faster would your parallel summation algorithm
execute than the sequential one? Did youn eed all 100 processors? Could you have used
more than 100?
please provide me the correct solution with step by step process. Thank you!
It is easy to write a sequential algorithm that

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!