Massachusetts Institute of Technology
Dept. of Electrical Engineering and Computer Science
Spring Semester, 2008
6.01: Introduction to EECS I
Comments on Assignment/PS 3
The assignment was graded out of 40 points. (We will normalize
the grades for the problem sets at the end.) There was only a software lab this week.
Questions 1-10: 2 pts.
Questions 11-16: n pts, n-1 for code, 1 for testing and explanation.
- State Machines = 20 points
- Question 1 (Counter) = 2 points
- Question 2 (Mod 4) = 2 points
- Question 3 (Mod n) = 2 points
A common error was using the input as the modulus instead of using n.
- Question 4 (transduce) = 2 points
transduce needs to return a list of the outputs generated by the state machine as it steps through its states.
- Question 5 (delay state machine) = 2 points
- Question 6 (make delay SM procedure) = 2 points
- Question 7 (make double delay SM) = 2 points
- Question 8 (Average SM) = 2 points
- Average all the inputs seen
- Check for divide-by-zero on the first output
- The first output should be zero (since the initial state is zero)
- Don't store every value ever seen.
- Question 9 (SR Flip-Flop) = 2 points
Make sure to test the flip-flop with all possible values.
- Question 10 (Fibonacci) = 2 points
The output sequence starts 1, 1, 2...
- Polynomial Class = 20 points
- Question 11 (Init and str) = 2 points
- Question 12 (Add) = 5 points
- A common error was to modify one or both of the original polynomials (it's still possible to do this even if you return a new polynomial).
- add needs to return a Polynomial object.
- It's necessary to deal with the case where the polynomials are not of the same order (by padding or something similar).
- Question 13 (Overloading +) = 1 points
- Question 14 (Val) = 3 points
- Question 15 (Multiply) = 6 points
- Again, a common error was to modify one or both of the original polynomials.
- multiply needs to return a Polynomial object.
- Question 16 (Root finding) = 3 points
- The root finder needs to deal with polynomials of degree greater than 3. Some people only dealt with linear, quadratic, and cubic polynomials.
- When you return complex roots, you need to actually return a number. Concatenating a "j" (like this: (str(a) + "+" + str(b) + "j") ) does not make a number complex.