That’s how I usually feel after an exam in any math subject, but particularly with our present algorithms (last term’s automata theory and logic) professor. That exam (algorithms) was today, and any illusions we may have had as a consequence of the rather limited amount of content presented in the lecture and our professor’s relaxed attitude in the practicum were rudely dashed, again, once we had the questions in front of us.

Though mind you, even *getting* to that point was already a minor challenge. The exam was supposed to be at 11 a.m., and since usually during the examination phase the classrooms are permanently open, most people were there half an hour early. This one, however, was locked, and remained so until 11:10 a.m., for the professor was late. So we had already 40 minutes of rather nervous and annoyed waiting in a ridiculously small anteroom (I will not call it a hallway) behind us when we could finally file into the room. And then the ritual of checking everyone’s identity and handing out the questions took another 25 minutes for a total of 70 people taking the exam. Finally, there was a reading phase of 10 minutes. So in the end the 90 minutes for the actual exam started 45 minutes late, at 11:45. By which time at least I was rather down with my nerves, overexited and exhausted at the same time, plus rather low on blood sugar, for naturally we had not had any lunch yet, expecting to take the exam at 11 and be done at half past 12. Instead, it took until 1:25 p.m., and even had we been willing to, nobody had any time to eat during the exam.

For the question were 16 pages long, admittedly including the space to write the answers in, but that space was rather limited. I think all in all there were 8 or 9 problems (or should we say, thematic sections?) broken down in 3 to 6 questions each. Like 30 plus questions or so? It’s hard to recall, but it did feel overwhelming again. Yes, the professor had again indicated that there were more questions than we could possibly hope to answer–or would have to answer for an A+. Still, 90 minutes were, as in his previous exam in automata theory, way to short to solve even the bulk of the problems, let alone be sure of the solutions. In fact, I have trouble even recalling most of the questions, for I rushed through them at a pace that makes it all appear as rather a blur of math in retrospect. All the studying, all the practice, all the times I had done the same kind of exercises, just to make sure I was certain of my replies *and* reasonably fast in the exam, and it felt like it had all been to no avail.The table to fill in where you had to say whether function f(n) was within big-O, big-Omega, or big-Theta of function g(n)–I had done so many of these, and still there were two out of five where I rather had to guess. The recurrence equation that you had to solve with the substitution method, prove your result by induction, then check it against the master theorem–I had practiced this ad nauseam, yet our professor had managed to find a recurrence that was like none I had seen before. I couldn’t get a result that made sense, and when I was done with this (the second) section, 30 minutes were already over. And what did I have to show for it?

An entire section on recursion in calculating Pascal’s triangle (under the rubrum of dynamic programming) I simple passed over because it read like a weekly practicum homework rather than an exam problem. Yes, I could reasonably well describe the loop invariant for Selection Sort, but the fact that there were four questions on this single item that all read more or less the same, but not quite, made me feel like I had somehow missed the point. There was a rather mixed section on balanced binary search trees that had three simple knowledge questions that I answered, but I ignored, for the moment, the problem where you had to complete pseudocode for calculating the average path length in a tree. I also skipped the Markov chain problem because it involved solving a linear equation system with fractions (remember the undead penguins?). I did the only really simple question (hashing with linked lists vs. with linear probing), and the conditional probability problem (glad to have reviewed the Bayes formula just in time yesterday), plus I skribbled a short reply to the suspiciously simple-looking last question on P vs. NP that oddly should be worth 5 points out of 115 (I probably misunderstood it).

At that point I think I had 25 minutes left. So I went back first to Markov, answering the three out of five questions I could, i.e. right up to and including setting up the linear equation system, then–believe it or not–I wrote “I am sorry, I can’t solve linear equation systems” as a reply to the remaining two questions and drew a sad smiley. Fact is, I know how it works, but my chance of getting it right is about one in five, and it takes me 10 minutes. Just not good enough, not for 3 points out of 115. Now there were 15 minutes left. I took 10 to sketch the pseudocode for the tree path length–that was surprisingly simple, and I even think there is a chance I got it right–and then I reviewed my Bayes, just to make sure (and the results were still solid). And then we got 10 minutes extra, so I briefly skribbled a few wild guesses in reply to the Pascal’s triangle problem (is this likely to grow exponentially if you don’t use dynamic programming?). It’s what I call the shotgun principle–a few grace points here and there add up.

We walked out of the room with the usual defeated look on our faces that comes with any math exam, particularly with the ones that are simply not doable within the available time. There was some consolation in learning that we all of us felt that the exam had been quite tough, much harder than we had expected. I had been half afraid that my programming partner and the other math genius in our group would say something like “oh, that was really not quite so bad”. Turns out nearly everyone thought it was. Oh well, maybe except the guy in our study group with the least expectations for a good grade. He had simply ignored the two biggest problems altogether, so he was never pressed for time, and will probably get a passing grade, or even a C, nonetheless. It worked for him last time. But for the rest of us a C would really be a bad bargain, after all the time and effort we invested into algorithms. For me, in fact, my studying time outside lectures for that course has just surpassed that for graph theory this week, for a total of 142 hours as opposed to 132 (though inevitably graph theory will get the lead back before that exam). To be honest though, my gut feeling is rather a B, depending on how generously the professor awards points and where he sets the grading ceiling. Still not quite what one would want to settle for, after 142 hours, and not being a complete idiot either.

Oh well. Battered and bruised, as I said, describes the feeling perfectly. Or let’s say, to use an even more martial metaphor, that my math skills this morning felt like a shining, well-balanced sword honed to a fine edge, full of potential and promise, and now after the violent clash with the enemy that every math exam, in the end, amounts to, that blade is blunted, nicked, and dented, and I have not a lot to show for it, save the knowledge that it’s over for good. A battle lost. An empty feeling. A deflated balloon. I could come up with any number of similes, but in the end it’s probably simply inevitable. Who has ever felt great after a math exam?