PS2 Questions

Add your answers to this file in plain text after each question. Leave a blank line between the text of the question and the text of your answer and at least two lines between your answer and the next question.

Inner Product

  1. How would you use dot to implement two_norm?

Tensors

  1. What is the formula that we would use for indexing if we wanted “slab-major” ordering? Hint: What is the size of a slab? It might be helpful to draw a picture of the data in 3D and see what the size is of a slab.

  2. (Extra credit.) I claim that there are six distinct indexing formulas. Show that this claim is correct or that it is incorrect.