Test answer rejected for saying more than asked for this is about a phenomenon often seen, but I came across a probably more prominent example recently, so I thought I'd ask for the community's opinion.

Here's the situation:
In the past semester's exams there was a question in computer architecture asking for X, and I, and many other students, answered Y, which contains X and is mostly revolving around X, thus successfully answering the question (in our opinion at least). The professor rejected the entire question (20% of the grade) and at any attempt to talk to him he directed us to the sample answer, stating that we "are wrong", we "answered another question, not the one asked", and so on. The question wasn't even given partial credit, and that happens systematically in his tests.

Another similar issue on the same test, was when a very few of us optimized a small bit of code in a way that would, industrially, be significant, and that part was rejected similarly, without any explanations, as "being entirely different". Explanations were also written on the test, so he cannot claim we did it without explaining.

This seems to be a general policy of the professor, as numerical errors are similarly crippling to grades, and in the sequel lesson, of an amphitheater of about or more than 80 people (and of course a lot more don't even attend classes as they are not obligatory, but I don't know if they're better or worse than those who attend), only 11 had succeeded the exam.

I would finally like to note that some of the stuff he rejects, he himself does in class, the most obvious being a computational error, and frustratingly he also did the optimization he rejected in the test.

So finally, the question:

I understand that professors have the right to grade based on their own criteria, but

Is it justifiable to reject an entire answer because more was said, without even partial credit?

Is it justifiable to reject an answer that gives something better than what is required, perfectly equivalent, even if relying on the student's intervention? (in this case, it would be a compiler optimization, thus not an entirely direct interpretation, but an elegant and industrially valuable workaround)

Is it acceptable to direct students to example answers and not allow them to explain why they think their answer is correct?

I'm also itching to see how we could deal with this, but that's not the main question so I leave that to your own discretion and benevolence to answer.
I know from personal experience that it's very frustrating not to get proper credit for knowledge that you think you demonstrated correctly, so let me start by saying I sympathize with your situation. Now let me address your questions:


  Is it justifiable to reject an entire answer because more was said,
  without even partial credit?


To give a literal, completely general answer: obviously yes. If the correct answer is, say, one sentence long, and your answer quotes the complete works of Shakespeare that happen to contain that sentence, I personally would not give you any points (but I would still be very impressed :-)). Of course, that is an absurd example, but it illustrates the point that what likely matters to your professor (or if not, certainly what should matter to a reasonable professor) is that your answer demonstrates an understanding of the topic the question asks about. It is certainly possible, and happens pretty frequently, that an answer Y contains the correct answer X but by adding more irrelevant things demonstrates a less good level of understanding than just the shorter answer X. The way this typically happens is that a student doesn't understand the material well and upon being asked about a certain topic, regurgitates everything they memorized about the topic, not knowing which part is relevant to the question. Clearly that does not leave a very good impression.

Now of course, the above does not address what happened in your specific situation. It is completely possible that your longer answer Y still demonstrated as good of an understanding of the material as the official answer X, and deserves to get partial or full credit; or not - you haven't given us enough information to say.


  Is it justifiable to reject an answer that gives something better than
  what is required, perfectly equivalent, even if relying on the
  student's intervention? (in this case, it would be a compiler
  optimization, thus not an entirely direct interpretation, but an
  elegant and industrially valuable workaround)


I think this question is too specific for anyone here to be able to answer without knowing more details. As I said above, the points you get for the answer should be correlated with the perceived mastery of the topic being asked about that your answer demonstrates. If including the optimization demonstrates that mastery, you should get the points. But I can imagine a situation where using the optimized method instead of the official method actually demonstrates less mastery, for example if it appears that you used the optimized method to avoid revealing that you don't know the simpler, less sophisticated method the question asked about. In that case, it may make sense for your answer to be rejected.


  Is it acceptable to direct students to example answers and not allow
  them to explain why they think their answer is correct?


I think it may be acceptable in certain cases. For example, if you have already asked many questions of the professor, argued with him in a way that he thought was unreasonable, overly argumentative, or delusional, and if the professor is very busy, for example is also teaching a class of 500 students in addition to the smaller class you're taking with him, at some point he may decide that spending more time discussing your exam with you can limit his ability to perform his other duties effectively, and be a disservice to the other students.



Summary. As you can see from my answers above, whether the professor's behavior is unreasonable depends on many details that you haven't provided. It's certainly possible that it is unreasonable, but it's also possible that it is less unreasonable than you may think. Statistically speaking, I've found that students often overestimate the extent to which they understand the material and the degree of correctness of their exam answers. That doesn't mean it's what happened in your case, but it's a possibility you should keep in mind as you consider your next steps. In any case, good luck! As for what steps you should take to address the situation, this answer is already quite long so I think it makes sense to save that for a follow-up question if you care to post one.