Friday, December 5, 2008

Test 3/End of Semester

So today was the last test. I think it went fairly well despite a rocky start (Q1 typos) and a lack of studying.

My answer to Q2 was fairly horrible but Q1 and Q3 were fine so we'll see if it evens out.

Overall, I think the course has been pretty good.

The content was pretty interesting and it was a good combination of older stuff (induction) and newer stuff (languages).

I liked the format of the course in that there was something almost every week (and I was forced to stay up to date) and assignments/problem sets were usually posted weeks before they were due.

My only complaint is the Monday deadlines for the assignments. If they were due on Friday we'd have more time between the preceding problem set and the assignment (since the assignments are time consuming). While we would have less time between the assignment and test, we'd still have a week and most people probably don't spend as much time studying for the tests as they do working on the assignment (since at least I find the assignments are good preparation for the tests anyway). And the people who do start studying ridiculously early also probably start the assignments ridiculously early and can have them done by Monday and start studying as early as usual.

Oh, I also did not enjoy 10am class. I complained last year about 11am class and how it was far too early and I still feel the same. 10am is brutal. Classes should not start before 2pm. Anything else is far too early.

My list of things I should have done is:

1. Go to lecture. Danny's explanations are generally far better than the text so it saves time not having to learn by myself out of the text (not that the text is particularly bad -- it's just long and tedious).
2. If I sleep through lecture, go to evening lecture.
3. Take advantage of office hours.
4. Work ahead (even just working on that ternary trees question after A1 was due would have helped immensely).
5. Study for tests (at least for a few hours).

Ah well, there's always next semester.

Saturday, November 29, 2008

Last Week of Class

So next week is the last week of class and I have a lot of catching up to do. I pretty much missed all last week (of every class) because I was sick and then came home because getting a doctor's appointment in Toronto seems to take months.

At least I submitted A3 early when I could still remember as I wound up spending all of Monday either sleeping in my bed or trying to sleep in the emergency ward. Otherwise, I probably would've forgot about it or just slept through it like I did with my stats test.

However, even before last week, I'm pretty sure I just wound up sleeping in and missing almost every lecture for this class. So now it's time to do catch up except I have a anthropological linguistics essay due on Tuesday as well as a test and then the CSC207 project due on Friday: the same day as Term Test 3.

And then a week of exams.

So my new plan is:

Today: finish essay, read over 236 lecture slides.

Sunday: start reviewing stats as my exam counts as my final mark, final edit essay, 207 project.

Monday: more stats, catch up on anthro-linguistics readings.

Tuesday: study for anthro-linguistics test, 207 project.

Wednesday: 207 project, stats.

Thursday: study for 236 test, 207 project, stats.

Friday: stats, catch up on 207 (design patterns, reflection).

Then weekend and next week is all studying for exams...

Now if only I can stop procrastinating and stick to this plan...

Friday, November 21, 2008

How I learned to stop worrying and love the Kleene Star...

I finished A3 today which makes me very proud.

I managed to work on it consistently throughout the week while studying for stats and working on the project for 207. Anthro and calc need some attention still, but I've been working fairly diligently. :)

I went to office hours today which I think helped a lot for Q3 because I felt like I had the right idea but didn't know how to structure it properly. So now while I might revise it a little more before Monday I'm fairly content with my work and hopefully will do well this time.

I also managed to get some solid work done on 207 and on stats which means I shall reward myself by taking the rest of the night off to watch Fringe and then go to bed an hour or two early...

Monday, November 17, 2008

Waffle cookies are pretty much all that's keeping me from going insane.

Achk. So I got back test two and it's been my worse mark so far in the course which is rather disappointing. I'd say it's time to make it up on A3 but I really doubt that's going to happen.

A3 doesn't look too bad and I've already made considerable progress (draft solutions of questions 2, 3 and 4 in one sitting) but it feels like I'm missing something.

In particular, I read far too much of the textbook on my own to try to make up for not going to class and learn what's necessary for A3 and I drew a little picture for Q4 and was amazed at how nicely it works but I have no idea how to present it without my pretty picture. I was going to go to office hours today and see if I could get help but then I went home and slept instead.

Ah well, today's lecture was really helpful and I think I can turn my diagram into a proper response now. Hopefully I can get everything done by Sunday at the latest and take it into office hours on Monday and see what needs last minute changes. Or if I'm feeling particularly ambitious, finish things and take it on Thursday...

I need to put more effort into this class but I have a STA257 test I'm nowhere near ready for and phase III of the horrendous group project for CSC207 due the same day and then a rather horrible looking MAT235 problem set due next week as well so I have far too little time to do anything.

Anyway, it's time to go back to "real" work.

Goals for tonight:
PS #6, Draft solution for A3 Q1, "Nice" solution for A3 Q2, STA257 Homework Chapter 5

Wednesday, November 12, 2008

Week Ten

Well, so far there really isn't much to say about week ten since I managed to sleep in both today and Monday and miss class.

Test was last week and went reasonably well. Questions 1 and 2 were really easy so I just rushed into question 3 without really thinking ahead and I'm horrible at coming up with loop invariants so it really didn't go so well. But in the end, I think I finally got there, my answer was just so messy and disorganized if I was a TA I would just give me a zero instead of trying to read through it.

I feel rather behind as both 207 and this class are kinda syncing up and I haven't been to either this week.

I was gonna try to go to the evening lectures but I'm so behind in stats I don't know if I have time.

I managed to do both the exercise for 207 and the problem set for this class though so I think I'm managing to (barely) stay afloat. I'm gonna have to read the text about this DFSA stuff but hopefully I can fit that in tomorrow and I'll be able to follow Friday's lecture alright.

Plan for improvement:

1. Stop missing class.

2. Set aside time to do weekly homework the week its assigned so I don't get behind or have to spend as much time cramming for tests.

3. Start early: I have a STA257 Term Test, MAT235 Problem Set, A3 and CSC207 Final Project all due in the same week which also happens to be the week I wanted to go home for Black Friday (although perhaps it sounds better if I say to celebrate some good ol' genocide with my family instead). Only way I'm gonna get anything done is to work ahead. I already started by getting this week's problem sets and exercises for my classes done early and I'll do the same with next week's. Then I can start my problem set and A3 on the weekend and perhaps find someone to work with (maybe not for A3 but for my problem set) and work on stats daily since it's a lot of stuff to remember and as I discovered last time cramming doesn't work.

4. Work regularly: So instead of trying to do like 10 hours of work all on one day and then nothing the next day I should try and come up with a system so I work a set amount of hours each day. Right now my plan is that since if I wasn't here I'd be working at least 8 hours a day, my combined class and homework/study time should add up to at least 8 hours a day. And then maybe an hour or two of some sort of either mindless activity or preferably exercise to balance things out. So if I have 3 hours of class today I should be able to work 5 hours which seems like a lot but in the summer I spent a month and a half working 2 jobs and would often work doubles or over 16 hours a day not including commuting time so really, 5 hours doing homework isn't -that- bad. Besides, even stats is better than having to teach an old lady how to attach a picture to an email when 1. she doesn't know how to connect to the internet and 2. she didn't know (after having her computer for two years nonetheless) that you can move windows around on the screen.

Now to stop procrastinating and finally start tackling stats...

Wednesday, November 5, 2008

Week 9

So, A2 marks are out and I'm a little disappointed (not the kind of heart wrenching disappointment I feel when Starbucks has no more soy milk or when Giant Tiger runs out of Arizona's ice tea, but disappointment nonetheless). I did really good on it and I certainly don't want my mark lowered, but it's kinda frustrating when I get 15% higher on A2 than on A1 considering I found A2 infinitely harder and put far less effort into it.

I finished A1 almost a week before the due date and worked on it consistently from the time it was posted to when I finally finished and then reviewed it again the day it was due.

A2 I did mostly late at night on little sleep and with barely any nourishment. I left it to the last minute and after I submitted it all I could think of was what I could have done better.

I was expecting to do -very- poorly on A2 because of my poor work habits and instead did better than the assignment I worked diligently and responsibly on.

While its a relief to know not only do I have a better shot at a 4.0 in this class now, I'm actually closer to achieving it, it's kinda frustrating when I'm seemingly rewarded for having bad work habits.

Ah well, I'm sure when I get my math mark back, I'll be forced to learn my lesson (that's right, I passed MAT137 with a mediocre but still above average mark and I still do not know how to integrate).


Anyway, week 9 is a bit of an abrupt change of direction, but I think studying language is more interesting than calculating time complexity or proving program correctness (maybe it's because I'm a horrible programmer, but there is nothing that some subpar test cases and a lot of print statements can't do).

It seems like 207 and this course don't match up as well as they should. We're starting to work with regular expressions and have an assignment involving it due on Monday (that was supposed to be due on Friday) and we've barely done anything on it in either course. Maybe if we started this unit a bit earlier we'd be slightly better prepared but I guess that would result in the material being too disjointed and since 207 and 236 aren't coreqs there shouldn't be a need to coordinate material...

Ah well, it's time to read ahead and learn on my own instead of being spoonfed.

Sunday, November 2, 2008

Problem Solving with Polya

Well, since A2 was due about a week ago and last year I lost a lot of marks for not doing this, it's time to document an attempt at problem solving using Polya's method.

Since I am a horrible person, I've never actually used Polya's method for anything, but maybe if I did I'd be doing better in this course.

The problem in question is number 3 from Assignment 2 or...

Consider a grasshopper that can hop up the stairs either 1 or 3 steps at a time. Let G(n) be the number of ways it can perform the climb when there are n stairs. Prove that for n >= 1, G(n) <= F(n), the nth Fibonacci number.

1. UNDERSTANDING THE PROBLEM
In order to understand the problem, you need to know what the Fibonacci numbers are and how to find them: F(n) and a formula for how many ways a grasshopper can climb n steps in either 1 or 3 step increments: G(n).

F(n) is widely known to be:
F(n) = 1, if n = 1, 2 (or if n = 0, 1 but both work for this problem)
= F(n - 1) + F(n - 2), if n > 2

However G(n) is unique to this problem and will need to be solved somehow before it's possible to prove G(n) <= F(n) for all n > 0

2. DEVISING A PLAN
Well, it's obviously going to be necessary to solve for G(n) at some point.

When I originally did this problem, I remembered that whenever we did questions in the past with Fibonacci we used induction and said that F(n) = F(n - 1) + F(n - 2) and then used our induction hypothesis so if we assumed F(n) >= G(n) then F(n - 1) + F(n - 2) >= G(n - 1) + G(n - 2).

Unfortunately at this point it was 4am and I didn't stop and think that whenever we did problems like this whatever we were comparing F(n) to was also a recursive formula.
Had I done this I would have not wasted a large amount of my time.

I also thought that after I had a formula for G(n), proving it was less than or equal to F(n) would be so easy that finding a formula for G(n) must be the hard part.

3. CARRYING OUT THE PLAN
I then, eager to put my stats knowledge and ternary trees mode of thinking to good use, came up with an overly complicated sum of multiple summations formula for G(n) with multiple factorials thrown in haphazardly.

I then tried to prove this was less than F(n) for a few hours without thinking about restating things or finding an alternate formula for G(n) or even thinking more about related questions as recommended by Polya. I tried checking each step and each time caught several horrible fallacies but my proof was still not within grasp.

Around 6am, I gave up and crawled to bed and then woke up about 3 hours later and attempted other questions while trying to forget about how much that grasshopper was annoying me.

Around noon, I did an important thing Polya never mentioned in his method: I harassed Daniyar in the dining hall and asked how he did it. He seemed surprised and stated that the question was easy just comparing two recursive formulas. At this point, I loudly swore and realised my mistake and brooded over my failure while eating fruit loops and cereal which at least allowed me to also brood over what a horrible person I was for eating refined sugar instead of simply contemplating switching into something useless and boring like a double major in Anthropology and Women's Studies.

I then ran up to my room and attempted to look for a recursive formula for G(n) and REVISE my plan.

After I saw the simple formula G(n) = G(n - 1) + G(n - 3), I resisted the urge to bang my head on my desk and typed up a blurb to convince myself and whoever marks my assignment on why this is the correct formula.

Essentially, the grasshopper can only reach the nth step by jumping one step from n - 1 steps or 3 steps from n - 3 steps.

I then carried out the second part of my original plan and realised how much easier it was.

Assume G(n) <= F(n) for all n <= k - 1

F(k) = F(k - 1) + F(k - 2) # def of F(n)
>= G(k - 1) + G(k - 2) # inductive hypothesis
= G(k - 1) + G(k - 3) + G(k - 5) # def of G(n)
= G(k) + G(k - 5) # def of G(n)
>= G(n) # since G(n) is nondecreasing

Ofcourse you'd need a nice base case and prove G(n) is nondecreasing but both of those are easy.

4. LOOKING BACK
Well, since it's a proof it's not really necessary to prove it works, but after reviewing my answer I discovered all that was really necessary to solve the problem easily was finding G(n) and the nice simple recursive version of G(n) resulted in the same answer as my disgusting summation version but not only was considerably easier to read but made proving the statement G(n) <= F(n) quite simple.