1. (10 points) The syntax for for loops (usually) describe how many times statements in its scope executes. An analysis
Posted: Wed May 04, 2022 1:45 pm
1. (10 points) The syntax for for loops (usually) describe how many times statements in its scope executes. An analysis skill is to be able to use summation notation to count the number of times instructions executes in a for loop. Here is an example from linear algebra: Given two vectors Ả = = (a₁, a2,..., an) andB = (b₁,b₂,..., bn) Their inner (some call it a dot) product is k=n (a/b) = Σak bk k=1 Write this sum as a for loop and state its big-O time complexity.