HOME
Project and Midterm Grading Algorithms

Project 2 graded by Tazeen

Question 1
bullet (6) total.
Question 2
bullet (6) total.
Question 3
bullet (6) total
bullet (-1) if forgotten to submit y.output
Question 4
bullet (8) total
bullet (5) for handtrace : 3 for trace, 2 for identifying at least 2 conflicts correctly
bullet (3) for automatic trace: 1 for trace, 2 for identifying at least 2 conflicts correctly
Question 5
bullet (8) total.
bullet (6) grammar: -2 if not used operators provided by yacc to specify associativity and precedence
bullet (2) trace
Question 6
bullet (6) total.
Question 7
bullet (6) total.
bullet (-1) if not defined unary minus to be right associative
bullet (-1) if not defined precedence of unary minus to be higher than binary operators
Question 8
bullet (8) total.
bullet (6) grammar.
bullet (2) trace.
Question 9
bullet (6) total. 1 point per question
Question 10
bullet (10) total.
bullet (-10) if not stored value of assignment anywhere.
bullet (-5) for not reading multiple input.
bullet (-1) for assuming identifier is 1 character long.
Question 11
bullet (10) total.
bullet (-2) not assigned anything to $$ for true and false
bullet (-1) syntax of the grammar is different from the project specification
bullet (-2) combined boolean expressions and mathematical expressions into one grammar rule
bullet (-1) for not getting the stored value of the identifier when it is used in a boolean expression
bullet (-5) boolean expressions don't include comparison operators such as <, >, etc.
Question 12
bullet (10) total.
bullet (-2) combined expressions and if statement in one grammar rule
Question 13
bullet (10) total: 2 points for each question
bullet (-5) if not turned in anything

Midterm 2

Question 1 a - Graded by Tazeen
bullet (5) For saying Regular.
bullet (10) 0*10 U 0*10*1
bullet (-2) for 10 U 10*1, no leading zeros
bullet (-10) grammar is not regular and generates strings not in L
bullet (-10) (0U1)*
bullet (-8) L = odd binary numbers or L = 0*1+
bullet (-2) doesn't accept 10
bullet (-5) 10*(0U1)
Question 1 b - Graded by Tazeen
bullet (5) For saying CF, not Regular.
bullet (5) CF proof for L = {a^i b^j c^k : i != j V j!=k}
bullet (5) for not regular proof
bullet (-3) CF proof: only 1 c and i!=j is mostly right
bullet (2) not regular proof: w is in L and is in terms of N
bullet (3) not regular proof: pumping w correctly
bullet (-1) not regular proof: q is off by 1
bullet (-3) not regular proof: think L'=a^N b^N c^N
Question 1 c - Graded by Tazeen
bullet (5) For saying not CF.
bullet (3) w is in L, and in terms of M
bullet (2) for doing the (1, 1) case correctly
bullet (5) for doing the rest of the cases correctly
Question 1 d - Graded by Tazeen
bullet (5) For saying not CF.
bullet (3) w is in L and in terms of M
bullet (7) for showing all the cases correctly
bullet (5) if haven't said not CF, but said not regular and done a correct proof for not regular
bullet (2) not regular proof: w is in L and in terms of N
bullet (3) not regular proof: pumping w correctly
Question 2 - Graded by Dr. Rich
bullet (3 - 5) For having a few ideas right but an overall answer that wasn't a decision procedure (i.e., it wouldn't halt, the steps weren't operations, etc.).
bullet (15 minus the following) If the answer was an actual decision procedure
bullet (-8) if you tried to do it all with PDA's and it wasn't right
bullet (-4) if you just asserted that there exists a grammar for the intersection of the two languages without specifying a procedure for finding it.
bullet (-5) if everything was right but you didn't try enough strings in the final step.
Question 3 a - Graded by Atri
bullet (-6) Uses a rule like aNaNa expecting N to produce strings of the same length.
bullet (-4) If aa & bb are the only even length strings generated.
bullet (-1) if the grammar does not generate a & b.
Question 3 b - Graded by Atri
bullet (-8) Accepts strings not in the language.
bullet (-7) Accepts a (small) constant number of strings.
bullet (-4) Accepts (an infinite) subset of strings.
Question 3 c - Graded by Atri
bullet (-8) Incorrect choice of w.
bullet (-7) Correct choice of w but the proof assumes the length of y.
bullet (-6) Correct choice of w but incorrect argument.
bullet (-4) Half of the cases are not considered.
Question 4 a - Graded by Atri
bullet (-4) If the answer says that M(L) is the set of substrings of L.
bullet (-3) If the answer is a (strict) subset of (a U b)*
Question 4 b - Graded by Atri
bullet (-13) Mentions M(L) is subset of strings of strings in L but argument is wrong.
bullet (-10) Starts by converting the grammar of L to CNF but replacement rules are incorrect.
bullet (-8) If the state of the stack is not taken care of when epsilon transitions are introduced into the PDA for L.
bullet (-8) If using the CNF approach just adds epsilon transition for each non-terminal.
bullet (-6) Transitions in the modified PDA are incorrect.
bullet (-6) If the newly constructed PDA just accepts Prefix(L).
bullet (-4) If the newly constructed PDA just accepts Suffix(L).
Question 5 a - Graded by Atri
bullet (-4) L1 is not CF
bullet (-2) If L2 and L3 are correct and L1 is CF but the description of L1 is wrong.
Question 5 b - Graded by Atri
bullet (-6) L1 is not a subset of L2 but L1 is regular and L2 is CF.
bullet (-4) L1 is a superset of L2 (and the answer says so).
bullet (-4) Says L2= a^n b^m but no relations between n and m is given.
Question 6 a - Graded by Dr. Rich
bullet (1) for each of the three answers: 11, 121, 131
Question 6 b - Graded by Dr. Rich
bullet (2) for any correct answer
Question 6 c - Graded by Dr. Rich
bullet (15) total
bullet (5) for getting rid of epsilon productions
bullet (5) for getting rid of unit productions
bullet (3) for getting rid of terminals in right hand sides of length greater than 1
bullet (2) for getting rid of right hand sides of length greater than 2

Midterm 1

Question 1 a - Graded by Atri
bullet -2: If the expression generates epsilon.
bullet -1: If some other alphabet is used.
Question 1 b - Graded by Atri
bullet 3: for saying Yes.
bullet 7: for the proof.
Question 2 a - Graded by Tazeen
bullet -2: For assuming that the first character has to be a.
bullet -1: If the answer is b*( abb U epsilon) (aUb)* or if it is b*(abb)(aUb)*
bullet -2: If the answer is b* (a U epsilon) bb (aUb)*.
bullet -3: If the answer is b*abb U (aUb)*.
Question 2 b - Graded by Tazeen
bullet -2: If assumed that the first character has to be a.
bullet -1: For each missing or incorrect equivalence class. There are five classes altogether.
Question 2 c - Graded by Tazeen
bullet -2: For assuming that the first character has to be a.
bullet -2: Accepts aa, aba
Question 2 d - Graded by Tazeen
bullet -2: For assuming that the first character has to be a.
bullet -1: More than one terminal on the right hand side.
bullet -4: More than one non-terminal on the right hand side.
bullet 1: For getting b*
bullet 1: For getting b* before the rest of the string.
bullet 1: For getting b* abb
bullet 1: For getting b* abb (aUb)*
Question 3 a - Graded by Atri
bullet 5: For saying Not regular
bullet 10: For the proof.
bullet -3: If complement of L ={x*y=z: x,y,z \in {0,1}+, when viewed asbinary numbers, z=x*y}
bullet -9: If a particular form of y is assumed in the pumping lemma proof.
bullet -10: If pumping lemma proves takes a w not in the language.
Question 3 b - Graded by Atri
bullet 5: For saying Regular
bullet 10: For the DFA/regular expression.
bullet -5: Accepts a "big enough" subset of L.
bullet -8: Accepts a "small" (but still infinite) subset of L.
Question 3 c - Graded by Tazeen
bullet 7: For saying Regular
bullet -4: For saying L = b*aa
bullet -2: For saying L = b*aa U ab
Question 3 d - Graded by Tazeen
bullet 7: For saying Not regular
bullet 3: w is an element of L, in terms of N, the pumping constant.
bullet 2: For giving the correct y.
bullet 3: Rest of the proof.
bullet -1: Pumping up and down.
bullet -3: Proof for y in regions that it can't be in.
bullet -2: Picking w = 0^N 1^N-3. This assumes that N is at least greater than or equal to 3.
bullet -1: For saying that after pumping, the length of the string increases by q*|y|. It should be (q-1)*|y|.
Question 4 a - Graded by Atri
bullet -4: If the Splitable condition fails for "many" strings.
bullet -2: If the Splitable condition fails for constant number of strings.
Question 4 b - Graded by Atri
bullet 2: For saying no.
bullet 6: For proof.
Question 4 c - Graded by Atri
bullet 2: For saying yes.
bullet 6: For proof.
bullet -6: If L = {a^n b^n: n is even}
bullet -2: If the splitable condition fails for a constant number of strings.
Question 5 - Graded by Dr. Rich
bullet -5: if mistakes in using the E(q) function.
bullet -2: if took the complement of the resulting machine.
Question 6 - Graded by Dr. Rich
bullet 3: points for saying that the first step is to convert the regular expressions to machines, even if nothing else was right.
bullet -4: if basically correct but forgot to consider only even length strings.
bullet -3: if check strings of length up to N but not 2N (since this could miss some)


Project 1

bullet 15 points for each of Elaine's test cases.
(+) -5 if one input string has the wrong result.
(+) For machine 3 & 4 (-5) is no error/warning message is flashed but underlying assumption is mentioned in the user doc.
bullet 25 points for user documentation.
(+) 10 points for input and output formats.
(+) 5 points for epsilon handling.
(+) 5 points for algorithm used.
(+) 5 points for the data structures used.