Monday, November 17, 2008

End of the term and courses...

So it's hardly believable that with November coming to a close, the fall semester is almost at its end. Things are getting busy again, what with our final assignments and tests coming our way, and then the dreaded finals before we're off for Christmas break. Looking back, this course seemed way more intimidating than I'd expected it to be back in September. Looking at things like studying induction (always frightened me), program correctness (had no clue how you can mathematically prove a program is correct), formal languages and context free grammar didn't exactly seem all that easy to understand. So to be really frank, it really isn't that bad. Not to mention, it's also pretty interesting stuff.

I'm glad that I'm able to understand some of the theory behind computation and programming. Formal languages gave me a new perspective on looking at language altogether - who knew you could apply set theory to language?? I never thought of that; but after having studied it, it makes perfect sense.

For the final test and problem set, hoping to do well and end the course on a good note. It's been a good experience so far, and I'd like to see it through to the end that way.

Monday, November 10, 2008

Learning New Things...

As we studied program correctness last week, I learned quite a few new things. Amongst that was the fact that you can actually mathematically verify how smart a program is. Along with checking time complexity, through program correctness one can study loop invariants, come up with closed forms of recursion - all of this is applicable to regular programming concepts like binary sort or merge sort. Who knew!

We also began learning about formal languages. Now we are comparing the structure of language, the sets of alphabet. And the neat thing is being able to tie that in to programming: (from the lecture slides)
If x and y are strings, then we can talk about:
{ The length of x, jxj. So jj = 0
{ The concatenation of the characters of x and y, xy
{ The reversal of the characters of x, (x)R, so (string)R = gnirts
{ The kth power of string x:

Who knew?? This continues to teach me new things as I'd never in a million years imagined being able to analyze recursion or iterative loops in mathematical program correctness. Now I'm even more amazed at being able to analyze a set of letters! Who'd have known the alphabet could be mathematically studied?? It is taking a simple group of letters and applying set theory just as we study it mathematically. Neat. can't wait to learn more.