This preview shows page 1. Sign up to view the full content.
Unformatted text preview: the algorithm is executed. Use bigoh notation for this number. Question 4. s=0 for i=1 to n for j=1 to i s = s + j * (ij+1) next j next i Compute the actual number of additions, subtractions and multiplications that must be performed when the algorithm is executed. Use bigoh notation for this number. Question 5. Assume that n is a positive integer and consider the following algorithm: for i = floor(n/2) to n a = ni next i Compute the actual number of subtractions that must be performed when the algorithm is executed. Use bigoh notation for this number. Page 1 Last updated May 11, 2011 by M. Bajger...
View Full
Document
 Spring '08
 WOUTERS
 Algebra

Click to edit the document details