Showing posts with label Problem Sets. Show all posts
Showing posts with label Problem Sets. Show all posts

Week 11

Well, answering my last question, we looked at how to prove a DFSA this week. It was a lot more straightforward than I thought. Everything was pretty much definition based, for which I am glad. Then things started getting a bit weirder. We began looking at NFSA's and how every regular expression has an FSA. And then how every NFSA can be rewritten as a DFSA. I could follow the pictures Prof. Heap drew, but I had a hard time trying to picture how to apply it to concrete examples. And then finally we learned the cartesian product so that we can build DFSAs for accepting strings with two different properties. Working through the last example at the end of Wednesday's lecture helped reinforce how it worked. I went home and filled in what we started in class. Building a machine that was a union of two different machines was surprisingly a lot easier than I had imagined.


On Friday, we looked at how to take an FSA to get a regular expression. It took me a little bit of time to spot everything I needed to restore when RIPping out a state, so I tried out a couple more of FSA -> regex problems when I got home. The resulting regular expression always seem to be really long and ugly, especially when the machine you start with has a lot of states. Can it be simplified?

The last problem set was also due this week. It gave us some more practice with equivalent languages. I think I'm still having a bit of trouble with the proof, especially going from a language described by words to a language denoted by a regular expression. I need more practice (as always) >_<

Week 7

Unfortunately, I missed the Monday lecture with the guest lecturer because I was frantically studying for another midterm. Anyway, we looked at program correctness this week. I think compared to the material we were covering the last couple of weeks, I find this a lot easier to take in and understand. There is something about time complexity that I just despise. Program correctness, on the other hand, feels more straightforward. I just need to follow the code and check if the postcondition is satisfied or not given the precondition. 


Thus, I found the problem set for this week pretty easy. I think problem sets are normally quite easy though. Assignment questions, however, are much harder. I also think weekly problem sets are a great way to force lazy people (like myself) to practice and do problems related to the course material recently taught. It makes me feel less behind than I would've been :P

x_x

It has been a very stressful and busy midterm period. Although it's still not quite over yet for me, I am going to take some time and try to catch up on my slogging.

As I've mentioned before, I missed Week 5's lectures, and I am still having trouble understanding how to deal with closed form expressions. I had no trouble with Problem Set 3, but the notes on developing a closed form expression for the Fibonacci function haven't exactly 'clicked' for me. Perhaps the midterm stress is the cause, but I do have to admit that I haven't really sat down and investigated it thoroughly.

We looked at the complexity of merge-sort and the Mast Theorem last week. I really need to print out the slides and write on them instead. There were many slides of just text last week, and I tried to write them all down. In the end, I had "see slides online" written after trying to copy everything down, and I didn't get to hear anything Prof. Heap said as I was too busy writing. It's probably better that I print the notes, read them before lecture, and then just follow along the lecture. It's so simple, yet I feel that I need to continue writing up my notes since that is how all my notes for this class have been so far. Anyway, we proved that the time complexity of merge-sort was nlogn. We actually took the code and came up with a time complexity of which we proved by building on several smaller proofs. Or.. I think that's what we did. To be honest, I am somewhat lost at the moment in the course. As things die down, I think I will be able to make sense of everything again. Hopefully.

Well, besides catching up on the course, there's also another problem set and assignment due next Monday. I've looked at the problem set, and it should be somewhat similar to what we did in Wednesday's lecture. I'm having a bit of trouble wording what I want to say though. In fact, throughout this course, I seem to have some problems with the way I present anything. I'm going to have to work on that. The assignment.. won't be too bad, I hope.

I'm still working on the assignment.. so I'm going to have to keep this entry short. 


Firstly, problem set 2 was nice and simple, in my opinion. The first part was very similar to what we had done in class. Compared to the simple induction method we saw last year in 165, this one was very different, yet it still made so much sense. I would have never thought up this sort of solution on my own though. I just used logic to explain the second part. Hopefully what I did was alright.

We looked at how the Principle of Well-ordering and the two different types of induction were equivalent this week. I understand some parts, but not all of it yet. The example in the book didn't seem to help me either. I'll take a look at it after the assignment. We also dealt with simple induction with bases that were larger than 0 and examples of improper proofs. I had no trouble with bases greater than 0, but I did have a little bit of trouble spotting some of the errors in the proofs we looked at on Friday, particularly the hexagon one.

In any case, I was more comfortable with this week's material than the last. I guess I'm still a bit edgy with complete induction. I'll do more practice after the assignment, which I am quite a bit behind on at the moment. Sorry for any incoherences as I am rushing through this entry so I can continue working on A1.

Post numero 2!

So, the third week of classes are beginning already, yet I still feel an extreme lack of motivation and concentration. I know I should start focussing before I fall behind, but I'm constantly feeling tired from my super spread out schedule, 3 night classes, cooking, cleaning, and my part-time job. I need to work out some sort of schedule to be better organized :S


I started and finished my first problem set on thursday. Luckily, it wasn't difficult. The first problem was very similar to what we had done in class. The second one required more thinking, but was just as straightforward. The solution I wrote up seemed like a "dumbed down" version of the solution posted today. The one posted seemed much more mathematical and precise than my own. I hope we aren't graded too roughly on how we decide to present our solutions. Like, would it make any difference if I were to say "1 is either 1, 2, or 3" rather than "1 is in the set {1, 2, 3}?

Anyway, so we looked at another flavor of induction last week: complete induction. I don't really like complete induction. Sometimes it just takes me a while to work out what I need to do in order to complete my proof, and that's really frustrating. For example, the examples we did in class - although I saw what the patterns were or what the recursive factor was, I just couldn't put it into words. When Prof. Heap asked the class to scribble down ideas, I just didn't know what to write down sometimes. Perhaps I'm just one of those people that need more time to think about something. Whatever it is, it was still pretty frustrating. I still haven't found time to read the course notes yet. I read on someone's blog that after reading the book, induction made more sense to them? I don't know if it will help me solve more problems, but I should read up in any case. 

On a completely different note, I really like how Prof. Heap is using his tablet PC to present his lectures with, but there are a couple of concerns I'd like to address. Firstly, I don't print the blank slides (perhaps I should), and I find that sometimes, usually at the end of a slide, the slides change too quickly and I don't catch what was written last. Luckily, the slides are posted online, so I can find what I had missed. Secondly, sometimes when the Prof is trying to emphasize a point, he scrolls his cursor around the word or point. The cursor is actually kind of hard to notice because it's a tiny green dot that sometimes blends with the words themselves. Usually, I am able to catch it while it's making its loops, but I'd just like to point out that its not always easy to see. 

That's enough blogging for me tonight, I think. I've got a looooong day ahead of me tomorrow.