Friday, December 5, 2008
Finale
Well, the course is drawing to a close, and on the whole it's been one of the more educational and enriching ones I've ever taken. I never realized until now what a powerful tool induction is, and I think I'll be leaving this course with a good grasp on logical proofs, more so than just on the structure (which is the feeling I got after CSC165). The relatively brief coverage of FSAs has given me a taste for them, and I'm quite looking forward to CSC363. Now just to put up with one week of hellish studying and a lousy exam schedule, and then time for next semester's load-out of all-CSC courses, including CSC300. Thanks Professor Heap for a great course!
Sunday, November 30, 2008
A3 and Week 12
Oh well.
As an addendum, the pumping lemma is pretty neat, and I suppose it's necessary to have some sort of handle on non-regular languages.
Saturday, November 22, 2008
More on FSAs
The Cartesian product is a pretty neat device, and the functionality of combining machines that perform individual tasks is awesome, since as far as I can tell using it one can make an FSA for more or less anything at all.
That said, I'm sort of having trouble dealing with them when it comes to actually designing an automaton that uses them. Visualizing a machine that's a combination of two of them is tricky, but I'm sure with a lot of course note reading and looking at Q4 of A3 I'll be fine.
Incidentally, this is the first time I've found the course notes to really be the best resource available.
Sunday, November 16, 2008
With respect to regexes...
After A2 of CSC207, I've taken a liking to regexes, and the idea of treating them as string-generators rather than string-finders is pretty neat. Languages are an interesting idea, though, and the idea of performing operations on regexes is novel and interesting.
DFSAs are way cooler though!
Making completely arbitrary machines that can perform pretty much any conceivable task on a binary number is awesome, and I've been doing some reading up on them and Turing machines and this is where it seems the really hardcore theory starts.
Friday, November 7, 2008
Thoughts on Term Test Two (And the aggressive application of alliteration)
All in all, it didn't go too badly. I'm unforunately pretty sure I messed up the first question involving recursion - I just wasn't quite thinking clearly and have the sinking feeling that I pulled some "Assume A therefore A" stuff back there, seeing as I never actually used the definition properly... I think. In any case, the question about proving the correctness of that function with integer division was fine, and I'm quite sure I got that one right (I've got a handle on proving correctness in general now, I think. Iterative functions at least). Though I think I might not have explicitly stated any invariant, everything's there (maybe a bit buried in that wall of text). The string reversal one seemed alright too, so all in all a test that didn't go too badly.
That's another story from all this business with the OLM not supporting Unicode text. I messaged Prof. Heap about it and I hope it won't be a problem turning it in now, since getting a zero on something as big as an assignment would be pretty harsh.
Sunday, November 2, 2008
On A2
Well, assignment two was due last week, and for a change I worked in a group. I found that that made things a LOT easier - not particularly by divvying up work or anything, but by having people to bounce your ideas off and vice versa. "Hey dude, skim this and tell me if it makes sense" are some of the best words to say and hear, because it's easy to fall into a pit of desperation and just write some pseudo-logic bull as the deadline draws closer. The first question was a real doozy, and I'm glad I went to both Prof. Heap's office hours and the T.A. office hours later in the day. Prof. Heap's explanation of considering it a sort of two-dimensional sum REALLY broke the ice for that question, and while finding and testing a formula took a while (and boy was it an ugly one, with those two sums and like three variables), I'm confident it was correct. Cue two hours of trying to figure out how in God's name to prove that hideous thing, before stopping by the T.A. (whose name I never got, seeing as we went there for one quick question). Apparently, proving it more with an essay showing the process of the derivation of the formula (which was fundamentally recursive/inductive) was most of the proof, which got us going on the road before writing out a proper proof by complete induction. What a question! Question two was kind of rough, but comparatively a breeze. Three wasn't anything to worry about, really, and while four was fairly lengthy it was quite similar to other proofs we'd seen before so it wasn't really a stretch. That's all of assignment two then; all in all a busy, long process but a rewarding one.
Other than that, my mind now turns to the upcoming midterm, considering that Profs. Clarke and Gries have shown mercy and extended the 207 A2 to next Monday, it's my exclusive focus for this week. If the first one and the CSC165 midterms are any indicator, they shouldn't be too rough so long as you do the assignments and problem sets correctly and carefully. Regardless, time to bust out the book during the remainder of this Sunday and the coming week.
Saturday, October 25, 2008
Concerning Correctness
Sunday, October 19, 2008
Considering Complexity
Friday, October 10, 2008
Midterm Madness
Well, the midterm was this morning, and it didn't go too badly I think. The first question about the Fibonacci sequence was a breeze, almost suspiciously so, but unless I've really gotten bad at reading trick questions then that was fine. The second question, I realized 15 minutes after the test, I pulled some real bull algebra on, so I know I screwed that up, but at least the structure is there, so here's hoping for part marks.
The third question about sets was something more interesting! I stared at it for a good 15 minutes or so, having gotten as far as writing down that all sets have 2^n subsets and that each following set's subsets were those of the previous + subsets containing the element n. With two minutes left on the clock, I had a revelation (though it might have been wrong, I felt pretty good writing it down and remain confident it was a valid proof). By complete induction and partitioning S into S_1 and S_2, where S_1 is S less all the subsets containing {n}, and S_2 is S less all the subsets without {n}, you get two subsets of equal size, and better yet, you know S_1 is just the set of subsets of S:{1,..,n-1} and thus by the I.H. has 3 * 2^n-3 subsets. S_2 being the same size means it will have the same number of valid subsets, so the total will end up being 3*2^n-3 + 3*2^n-3 = 3*(2^n-3 + 2^n-3) = 3*(2^n-2)
Exactly what was needed. That was a fun proof.
I still feel pretty stupid about the algebra in question 2 though, because for some idiotic reason I wrote down 3^n+1 = 3^n + 3^n instead of 3^n + 3^n + 3^n or 3*3^n. Hopefully there'll be some mercy, because I think I did end up pseudo-legitimately showing that 3^n + 3^n > 2*(n+1)^3, so it follows 3^n + 3^n + 3^n could only be larger as well. Oh well, all in all it could've definitely gone a lot worse.
Now with that midterm out of the way and nothing due immediately after the weekend, time to enjoy the long weekend and go party before thanksgiving.
Friday, October 3, 2008
Regarding Recursion

I've always found recursion to be my favourite subject, and this has yet to change. Recursive functions always seem to end up more efficient than the vanilla / iterative alternative, and most of all just seem incredibly elegant to me. Proving recursive functions seems to have a natural flow to it similar to the functions themselves.
Whoever originally came up with the idea of automatically reducing a problem down to near-nothingness to solve the most complicated of things must have been a real genius.
Tuesday, September 30, 2008
A1
Well, A1 was due last night -and in retrospect it wasn't THAT bad.
The first question was a breeze, and everything to do with phi made sense after a couple of hours spent sitting and thinking, so no worries. But that lunch menu thing killed me. I ended up writing more of an essay than a proof.
Oh well, at least everything else seemed in order and correct. And, worst comes to worst, it could only be worth 6%.
That said, at least I get the feeling I'm starting to have more of a grasp on the material than CSC165, where at the end of the day, the symbology could still be a problem. Knowing how to go about a proof one way or another from start to finish seems to be getting that much easier, which I guess could just be from time spent exposed to the material but in any case it feels like real progress.
Onwards now to correctness and next Friday's test!
I think I may have to stop by Prof. Heap's office at some point for a break-down of the proper proof for #2, I must have botched that.