General Comments about Homework 3 Problem 1 Some people set the output to 0 when the flag was not set for a particular element of the input vector. If the flag is not set, don't add that value, but leave everything else alone. In principle, each node could set the flag of vector element i to a different value. v[i] should then be the sum of all the nodes where the flag was set. Some people collapsed the vector; i.e. returned a single number (in the first element of the vector). That is not correct. Simple add the individual vector elements (if the flag is set). Problem 2 Wasn't a difficult problem for most people. Problem 3a: The program Some people let the C compiler allocated the matrix on the stack by reading N from the command line and declaring int matrix[N][N]; This causes segmentation faults for large matrices. Large structures like that need to be allocated using malloc() in C. In the problem statement where I said \[ \sum_{j=0}^n \sum_{i=0}^n a_{ij} \] I.e., you are adding all the values in row $i$, before adding the values in row $i+1$. I had it wrong. That's column-major order, since we are going through all elements of a column before adding the next column. Most students ignore my mistake and got it right. The elements of a 2-D array in C can be accessed using A[row][column]. Incrementing the column inside the inner loop, and the row in the outer loop produces best access performance since we are accessing adjacent locations in memory. That is called row-major access. (Some people called it column-major access. Column-major access is worse than row-major access. Problem 3b: The description Mostly OK. Problem 3c: The plot Some students did not see a big difference on hammer. Hammer seems to have a large cache and students did not let their matrix size grow large enough to really see the effect.