Friday, December 5, 2008

Test 3 and Final Thoughts

Today was the last day of the semester as well as test 3. It wasn't too bad; possibly Prof. Heap was taking it a bit easy on us since the final is only a week away. I spent a lot of time studying last night for it since I didn't get enough review earlier in the week since I was still finishing up projects and tests for other classes. I was glad to see no questions with the pumping lemma on it. Although I understand the idea behind it, I think I'd be shaky if I had to do a proof of it on my own.

I'm sure I've mentioned it in a previous post, but I think that this class was overly packed with tests, assignments and problem sets. Three tests was probably a bit much, but I guess it got people to attend class all the way till the last day.

Overall though I was happy with this course. Going in at the beginning I was definitely not too excited about it since I didn't enjoy CSC165. But I must admit that I enjoyed many aspect of the class and some of the material. So as the semester comes to a close, so does this blog. On to the final exam.

Week 11 and 12

Weeks 11 and 12 I'm sure were busy for everyone. As the semester draws to a close, students have assignments, essays and tests to do, and professors and TA's have stuff to mark.

Week 11 we saw a lot of NFSAs and equivalence. There was some tricky stuff to learn regarding the state invariants, and transition functions. We talked a lot about epsilon transitions, subset construction and equivalence. It was interesting to see the equivalence of the regular expressions and FSA.

Week 12 we looked at the pumping lemma. It became a useful tool to use to show that a language isn't regular. We used it in some examples; one which showed that the language of binary strings with equal number of 0's and 1's.

And finally we started to talk about the final exam and completed TA evaluations.

Problem Set 6 - Problem Solving

Prove that L, the set of binary strings of odd length, equals L(((0+1)(0+1))*(0+1)).

So I started this problem by reading and understanding the problem, simple enough step. I analyzed the regular expression in my head and jotted down some binary strings which were in the language L and compared them to the claim.

Since my test cases held, I began to try to think of some cases where a string in the language L didn't hold, but couldn't find any counter-examples. Next I began to think of ways in which I could prove this. I reread through some notes and figured that proof by cases would be best here. I then divided it up into two cases; Case 1: the string has length equal to 1 and Case 2: the string has length greater than 1.

I then went on to prove these two cases separately. At the end I reanalyzed my cases, wrote out a final copy and was done!

Tuesday, November 18, 2008

Quick Thoughts on Test 2 and FSA

Got back test 2 and the recent problem set. I was generally happy with the marks which was good. As the semester is coming to an end it seems like all the work is starting to pile up.

This week we've continued to look at regular expressions and finite stat automata. The idea is that we can use regular expressions as a way to express a language. We can design our own language to with different alphabets. We looked at some examples looking at binary numbers containing even or odd number of zeros. The language can further be manipulated by applying principles such as commutativity or distributivity to the regular expression to create another regular expression.

We looked at some DFSAs where we created a machine which would take in a string and would be able to tell us whether it was a valid string by traverserving between the states. We say an example where we created a machine that accepted a binary string and would enter an accepting state for an even number of 0's. It seems the hard part is how to construct a machine for a particular collection of strings; all won't be as obvious as the binary number example we looked at. We need to make sure it can correctly judge all strings of that language and properly determine which are valid and which aren't. It seems to that we need to derive some state invariants and transition functions to create a correct machine.

Also a quick thought; I've went to the TA general help hours a couple of times and I've found them pretty helpful. I think going to them helped my understanding a lot for assignment 2 as well as test 2. I would suggest going to any students needing a bit of help!

Monday, November 10, 2008

Test 2 Thoughts and Formal Language/Regular Expressions

I was pretty happy with Test 2. So hopefully that feeling stays once I get the mark back as well. I'm just a bit worried about question 3. I'm not sure my loop invariant was correct; and didn't really use it as part of my proof like I probably should have.

Today we continued working with Formal Languages and Regular Expressions. So far things have been fairly simple; regarding the operations and definitions. Just the klene star (*) has been a tad confusing so far. We also saw an interesting example of the regular expressions in the form of a finite state machine.

Sunday, November 2, 2008

Assignment 2 and Test 2

Last week was the due date for assignment 2. I thought that assignment 2 was significantly harder than the first. I had a lot of trouble with a couple of the questions particularly the Ternary Tree one which was carried over from the first assignment. I spent a lot of time drawing up trees and trying to push out a formula with not a lot of success. Monday before the due date I went to the TA help. They helped push me in the right direction, but I'm not too confident in my answer. I'm interested in seeing the solution for it.

This coming Friday is the 2nd test for this class. I'm hoping it isn't too hard/different from the examples seen in class and in the notes. It seems like every week there is something for this class. I do like the fact that the final is worth just 35%, but I think that 3 assignments, 6 problem sets, and 3 tests is a lot of work for a half-credit course.

Saturday, October 25, 2008

Midterms/Program Correctness

Finally just finished up all my midterms; was quite the busy week since I had a number of assignments thrown in there as well. And the cycles of tests and assignments begins again before finals.

Just finished week 7. We looked at program correctness; preconditions/post-conditions. Monday we had a guest lecturer. Nick from UTSC. I thought he was great. He was very friendly, funny and knowledgeable. I actually felt bad for him, he was up making some jokes, trying to engage the class but few people seemed impressed. Monday mornings perhaps?

The rest of the week we worked through some binary search examples and greatest common divisors; which were more proofs by induction!

Problem Set 4 and Assignment 2 are due Monday. Still have to finish up both of them. I started assignment 2 earlier this week; but still have to do a bulk of the work. I mostly read through the questions and jotted down some thoughts mostly to get my thinking process going.