Question 1 [20 = 4 + 2 + 9 + 5 marks] ========== You are marking for a convincing correct answer. The solutions we give are complete and would get full marks. Different but equivalent formulas are okay (e.g. using floor, ceiling, div, mod, etc), and they don't have to be simplified. The explanation a student gives should convince you and save you having to do any careful reasoning yourself. There are a number of places where off-by-one errors will be common: the explanation should convince you that the student wasn't just lucky. Guidelines for the marks, per `idea': A - [1] a^2 - a [1] a down to 0 by 2 [1] exact formula from explanation [1] add together B - [1] m1(a) [1] substituting a^2 C - [2] k loop [2] j loop [1] j + k loop [2] i loop [2] putting it together D - [2] j loop [3] i loop Question 2 [12 = 6 + (4 + 2) marks] ========== Part A ------ 6 marks for a correct answer. Our solutions contain an explanation of how we got the code, but that's not required for the students. There are of course a few correct variants (especially since i0, i1, i, t and length are related). Copying the rest of the 1st/2nd piece to the end of temp and then all of temp back is okay. Other errors likely show a major lack of understanding. They were supposed to trace it, and could also type it in and test it. Any reasonable amount of either tracing or testing would result in a complete understanding, so I don't see much room for part marks. Minor syntax errors are okay, even though they could have tested the code. Anything that's more obviously bad Java should lose a lot of marks: at least 3 marks per problem. If they don't know Java well (CSC 108 is a prerequisite for the course), they should have tested it. Part B ------ 4 marks for a good description of the number of iterations. There is a lot of room for part marks, e.g. -1 mark for unclear/wrong about = case. There are a few correct variants, due to things like: a number is less than some number in a nondecreasing sequence iff it's less than the last number DeMorgan's laws 2 marks for explanation that shows they understand why (use similar judgement as in Question 1). Our solutions contain more explanation than necessary. The first two lines of each case in the "It stops when" are about the right amount, though some of it might be implicit in the formula. Question 3 [12 marks] ========== This one should be treated as a deduction from 12. Roughly: -1 for smaller error/typo, -4 for more major errors. Examples: Setting q.q and q.q.q correctly but q.q.q.q incorrectly suggests a "typo". Drawing an arrow from c to q for the last diagram is a major error. A typo carried along to later diagrams should only be penalized once. A few major errors can result in 0, even though parts of the diagrams are correct.