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!
Tuesday, November 18, 2008
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.
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.
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.
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.
Saturday, October 11, 2008
Test 1 Thoughts
Some quick thoughts on Test #1: 3 questions, 8 marks each. The first one was a binomial expression which I attempted to solve via simple induction. I'm fairly sure this is the right flavour to use for this question; except I got stuck on the induction step and couldn't figure out how to show P(n) --> P(n+1). I probably spent a little too much time on this question.
Question 2, with the Fibonacci sequence. I used complete induction. I don't totally remember the question. In my head I think i'm getting it confused with #1 and mixing the problems. I think it was F(n)^2 > 2n? Or something of that nature. Using complete induction, my proof went something like this; I showed the F(n) is the sum of F(n-1) and F(n-2) [by definition], which are both greater than 2(n-1) and 2(n-2) respectively [by IH]. Since F(n)'s predecors were both greater than 2n it should follow F(n) also.
Question 3, I'm drawing a blank on what the question was. I do remember running out of time since I spent a little much time thinking about #1's induction step. I think I started out using simple induction and then realized I should've used complete induction. I ran out of time to fix this and to finish the proof, but I had a structure of a proof and I put down some ideas of how to solve it.
Overall I felt prepared for the test, I just ran into a the problem of not being able to see the induction step for #1 which cost me some time. I always feel a little rushed when writting a 50min test. But I can't complain, everyone else is in the same boat and a few people seemed to have finished and left the room with some time to spare.
Question 2, with the Fibonacci sequence. I used complete induction. I don't totally remember the question. In my head I think i'm getting it confused with #1 and mixing the problems. I think it was F(n)^2 > 2n? Or something of that nature. Using complete induction, my proof went something like this; I showed the F(n) is the sum of F(n-1) and F(n-2) [by definition], which are both greater than 2(n-1) and 2(n-2) respectively [by IH]. Since F(n)'s predecors were both greater than 2n it should follow F(n) also.
Question 3, I'm drawing a blank on what the question was. I do remember running out of time since I spent a little much time thinking about #1's induction step. I think I started out using simple induction and then realized I should've used complete induction. I ran out of time to fix this and to finish the proof, but I had a structure of a proof and I put down some ideas of how to solve it.
Overall I felt prepared for the test, I just ran into a the problem of not being able to see the induction step for #1 which cost me some time. I always feel a little rushed when writting a 50min test. But I can't complain, everyone else is in the same boat and a few people seemed to have finished and left the room with some time to spare.
Wednesday, October 8, 2008
Assignment 1 Marks and Test Prep
Just got back the marks and feedback for A1. I was fairly pleased with my marks. Only question I really lost a lot of marks was 3b, since I wasn't too sure which part from 3a to use. But all in all I'm pleased with how things went.
Seems like A1 was due yesterday and now midterms are coming for all my courses. I'm not too worried for Friday. I've been keeping up with all the readings and lecture material so I should be fine. Just going to go over some exercises and through the slides. Time for some reading!
Seems like A1 was due yesterday and now midterms are coming for all my courses. I'm not too worried for Friday. I've been keeping up with all the readings and lecture material so I should be fine. Just going to go over some exercises and through the slides. Time for some reading!
Monday, September 29, 2008
PSet 2 and Assignment 1
Just finished a really busy weekend, had to finish writing up the problem set for Friday. The problem set wasn't bad. Took a little bit of scratch work to come up with k for the postage stamps. Followed by a proof using complete induction.
For part b) to prove that k is an impossible postage to create with 5-cent and 11-cent stamps was fairly simple too. The question gave a little hint that induction wasn't the way to go so I used a proof by contradiction. It seems the sample solution was a lot less formal in proving this but none the less arrives at the same conclusion.
Assignment 1 was definitely more challenging than the problem sets. I found myself thinking about the problems a lot more than for the problem sets. Number 3; the golden ratio definitely had me scratching my head for a big. Even after reading up on it a bit, I was still pretty stumped. I came up with a solution that associated the principle of well ordering but I'm not sure if I was 'hitting the nail on the head'. As for part 3b, I was just as baffled but of course took a shot as trying to prove it while using part a. I guess I will just have to wait until the sample solution comes out or when I get some feedback on my submission.
Oh and I mistakenly hand-wrote my assignment instead of typing it. I felt a bit dumb not knowing that it had to be typed; while everyone else in the lecture seemed to have typed theirs. In my defense no where on the assignment does it say that it must be typed. Only by looking at a specific post on the bulletin board by Prof. Heap does it say it must typed. Luckily the assignment wasn't due for another 11 hours and I had plenty of time to go type up my answers since all the hard work was already done.
For part b) to prove that k is an impossible postage to create with 5-cent and 11-cent stamps was fairly simple too. The question gave a little hint that induction wasn't the way to go so I used a proof by contradiction. It seems the sample solution was a lot less formal in proving this but none the less arrives at the same conclusion.
Assignment 1 was definitely more challenging than the problem sets. I found myself thinking about the problems a lot more than for the problem sets. Number 3; the golden ratio definitely had me scratching my head for a big. Even after reading up on it a bit, I was still pretty stumped. I came up with a solution that associated the principle of well ordering but I'm not sure if I was 'hitting the nail on the head'. As for part 3b, I was just as baffled but of course took a shot as trying to prove it while using part a. I guess I will just have to wait until the sample solution comes out or when I get some feedback on my submission.
Oh and I mistakenly hand-wrote my assignment instead of typing it. I felt a bit dumb not knowing that it had to be typed; while everyone else in the lecture seemed to have typed theirs. In my defense no where on the assignment does it say that it must be typed. Only by looking at a specific post on the bulletin board by Prof. Heap does it say it must typed. Luckily the assignment wasn't due for another 11 hours and I had plenty of time to go type up my answers since all the hard work was already done.
Subscribe to:
Posts (Atom)