Wednesday 5 December 2012

You already know...

...how this will end.

It's my last SLOG. We all knew it was coming. I want to say I enjoyed this class but I can't. I feel neutral on the whole thing. There were both good and bad times. I feel anxious and nervous about the future; did I take enough out of this class? How can I tell? I don't really know the answers to these questions and I wish I did. I just hope I can continue to understand and develop my knowledge of proofs in the future.

Now, less reflection and more about the mathematical proof that I was supposed to do. The reason why this blog post is so late is because for the past day or two, I've been thinking about this one problem and I have yet to figure out the solution. So here's what I have:


Piles of Pennies:
What is the problem?
You are sitting in front of two drawers. The left drawer contains 64 pennies, the right drawer contains nothing. Can you arrange things so that one of the drawers has 48 pennies, using the following two operations:
L
If the left pile has an even number of pennies, transfer half of them to the right pile. If the left pile has an odd number of pennies, operation L is disallowed.
R
If the right pile has an even number of pennies, transfer half of them to the left pile. If the right pile has an odd number of pennies, operation R is disallowed.
What about arranging things so that one of the piles has other numbers in the range [0,64]?
How to Start: Figuring out Single Cases:
For any problem that involves working operations, we should walk through the problem with some default/random values (and then figure out a plan from there). In fact, it would be best to get 48 pennies in either drawer (the initial question).
We start with the values:
[64,0]    N/A
[32,32] L
[16,48] L

So it took us 2Ls to get to 48. Let’s try a harder value: 33.

[64,0] L=> [32,32] L=> [16,48] R=> [40,24] L=> [20,44] R=> [42,22]…
Clearly, I seem to have no idea.
So after trying to get to 33 for 20 minutes, I think I have come up with an alternative approach: how would piles look like before they had gotten to 33.

I think it would be best to have the final state be called n (it’s just easier to work with variables).
In this scenario, the n state will have to look like this:
[33,31] (or reversed but we will ignore these other states since they don’t help us).
Clearly, we could not have gotten to the n state from the n-1 state from a L move since this would not make sense arithmetically (33 * 2 > 64 is one reason why), so clearly it came from a right move:
[2, 62]
This too, could have only been possible with one unique move: an L operation, giving us the n-2 state:
[4, 60] And similarly as above, we move to:
[8, 56] and again…
[16, 48] and suddenly we’re on a move that we’ve seen in the previous example giving us an answer:
LLLLLR is our final combination of operations.
Let’s try this backwards method again for 17:
[17,47] <-L [34,30] <-R [4,60] and we’re back to a familiar track.
We get: LLLLRL


Partial Solution: Some Understanding

So while, I have no formal proof, I have come to some form of a conclusion about the patterns that I see. Firstly, the number we want to get to between the ranges of 0-64, can be any number. Yes, this is a huge assumption but I tried prime numbers and they seemed to work just as well (and every non-prime number is divisible by 2 so I would assume they work).

While I have no formal way of proving this, I did realize that thinking of this problem in a backwards manner is simply the best way to think of it. If I were writing a program, it would make it far easier to work with rather than having to think of it like a chess game (and predicting where my moves would take me and working from there). It very much is like a binary tree in sense; looking through all the possibilities of starting from [64,0] would be far too time-consuming but if you start at the end result [x,64-x], then it seems that you have a clear route to your answer.

Even though I have failed to complete a thorough proof of the situation, I feel as if I did make some headway on to how this works.

Nonetheless, I feel like this has been an interesting experience (the SLOG) but not one I would want to do again.

It's time I go prepare for my exams. Good luck to all!

Cheers!

Sunday 25 November 2012

Burned out...

Every week has become an infinite loop of assignments, mid-terms and quizzes.

So I said last week how I was looking forward to A3. I lied...kind of. This last week just sucked. I got a lot of my marks and they were not as good as I had hoped. That bears down on a working mind and probably has made me skeptical of A3. I don't know if I am still over it or not. I just know, I haven't felt too good about any assignment/mid-term since the last A2 for this very class (and that didn't turn out that well either).

I am looking at A3 now and there are 2 questions that look like they could be quite fun (the ones regarding DFSA) while the others I am quite skeptical about, specifically question 4 which just looks like a nightmare. Whatever we learned this week, I don't have a particular name for it per say (Finite Automata? Maybe...), is what I would want to continue learning. Working with DFSAs and NFAs has just been loads of fun and interesting.

I can't really add more than that about this previous week; I am slightly worried about A3 but that's how I felt about A2 and A1 as well so I have my fingers crossed that I will continue having the epiphanies.

Cheers!

P.S. Looks like next week I will do my "walk-through" of a question that I liked or gave me some trouble. I think I will do it on one of the questions from the assignments because those were fun to work with.

Tuesday 20 November 2012

"The Man" has dealt me a blow!

So we got the marks of A2 back this week.

Not good. These were my first thoughts. A clear contrast is evident between my thoughts after finishing A2 (and having looked at the solutions) and looking at the mark given to me.

So let's talk about why I am in such a mood. I personally felt I did really well on my proofs; they were pretty clear and really had nothing wrong with them. I was correct, more or less. So why was I given a "passable" on my first question from A2? I did not explain how I achieved my first equation and I was missing, according to the marker, the n = 1 base case.

Yes, my answer was clearly missing an explanation of how I achieved my equation. I never thought it would be necessary to put that onto the final assignment that I handed in. This was also the case for A1 and I was not docked any marks then (where I did not show how I achieved an equation but rather only proved it would work for all n.)

The base case problem? I felt, since my equation only had 2 cases (one with n < 2 and then n > 1), that I felt only one case was necessary. The marker disagreed; fair enough. The problem here lies in the fact that both these errors cost me 12.5% on A2 (each). Even if they were considered to be errors, I would feel they are very much so MINOR DETAILS, to what is otherwise in my honest opinion, a fairly good proof.

Now enough whining about A2. I must say last week's lectures were very interesting. Why?  Since they were very much so related to the lectures we were having in my other course, CSC207. In that course, we focused on regular expressions. I can't really recall what they were called in this course (they were just referred as Languages IIRC but not sure), but the formatting was very similar (long story short: I had a quiz to study for, so I picked my poison.).

I hope we continue moving forward with these, it's always great to see related courses. Furthermore, I realize the time has come for me to decide something to do for my problem on this SLOG (and walk through it). Hopefully this week, I can get on that. Last but not least, I look forward to A3 -- as I mentioned in an earlier blog, the assignments in this class have been pretty interesting so far and I hope the trend continues.

Cheers!

Monday 12 November 2012

Out of sight...out of mind!

So I am late by a day. Sue me!

I have had no time to focus on CSC236 after the assignment finished. None at all. So basically I want to talk about the test we had this previous week because I've done little else (due to another major assignment due this week).

I spent a lot of time trying to understand correction. In fact, by the time I had finished preparing for the test, I was probably more ready for that than what we actually got. I know one could argue that the assignment should have prepared me but let's be honest here, you can't expect one assignment alone to prepare me for a test. However, it did make me feel more comfortable with winding down and what not where as I was COMPLETELY uneducated about correction.

So when I found out just before the test that there would in fact be no correction what so ever, I was heavily disappointed. I think I did alright at best on the test we got. I didn't finish all the of question on there and my problem did seem to be the test itself. As I mentioned earlier, my intuitiveness is just a bit slower than other peoples and when you put a clock in-front of me (or at my side as it were), doubly-so. I think I wrote the formats of the answers well enough so we'll see how far that gets me. I've actually been trying to avoid thinking about the test but here we are...

Anyways, here's hoping.
Cheers!

Sunday 4 November 2012

If wishes were fishes...

I love how the titles of this blog have taken such an ominous turn in the past few weeks.

Well, test #2 is imminent and I feel mildly prepared. That isn't good. I felt a lot more prepared for the first test, and look at how well that turned out (hint: read earlier blog posts).

I'll get more to the test later but I am more interested in talking about the assignment. I must say, other than the improvement in lecture quality from 165, the assignments have been far more interesting too. After understanding how to do questions, I really did feel a sense of accomplishment which was completely missing in every assignment in 165. I guess you can say it hit the "problem solving" button in my head like some of the actual programming classes.

I think this was because I really had time to think about the questions. I read them over multiple times over a week or so to understand how I would figure them out. Yeah, I realize I didn't need that much time, but my point is, I set the assignment on the "keep warm" setting for a while. I also re-read many of the notes online and the text book for this course to help facilitate my progression. Next thing you know, I was having epiphanies left and right. Something just clicked.

This leads me to believe that maybe tests aren't particularly that important in this type of course. I know people will disagree with me on this one but I feel that when you're given some time to do proofs, you think out all the possible scenarios, which you chip away at to give you that "AHA!" moment. I don't think you can do that with tests and that's what I feel is missing. Maybe for future exams, we could have some easier proofs that test you on basic knowledge and this harder question which everyone gets 24 hours before the exam. I know I am just rambling but it's something that should be considered in my opinion.

Anyways, I am off to go try some more proofs in the aim that I feel more prepared for tomorrow's test.

Cheers and Good luck!

Sunday 28 October 2012

The Worst of Times...

So it hasn't been a good week.

I've barely had any time to focus on this course and after looking at the tutorial questions, I know I am in trouble. In fact, I would say I completely confused as to what's going in lectures too. I plan on spending some more time reading over the notes to hopefully attain some knowledge.

In the past, the tutorial has been really helpful for my understanding of proofs and lecture material. I hope the same can be said after tomorrow. I can't really add much more today, other than the fact that I really hope we move on from big O and what not soon.

Cheers everyone, and good luck -- I know I will need it.

Sunday 21 October 2012

No time for proofs...

These past 2 weeks have been tough.

It's mid-term season at UofT and to be perfectly honest, I have had little time to focus on CSC236 with all the assignments and tests I have been receiving. With another couple of assignments and a mid-term this upcoming week, I feel I will only digress even further in my understanding for this course's material.

Thankfully, the lectures of this class have been brilliant so far and I understand them most of the time. I know, subconsciously at least, that understanding the lectures and doing well on assignments are two different beasts. However, with the amount of work I have received in the previous week, I understand some compromises have to be made. Even better, I am so glad that our assignment is due in November, the month which should be relatively freeing from a dreadful October.

Before I sign off, I would like to say working with these recursive functions for proofs hasn't been as hard as I had thought they would be. Maybe I shouldn't get over-confident before practicing first hand rigorously but I feel more confident about them than I thought I would have.

I know I will have a tutorial and 2 lectures for this course in the upcoming week, but sadly my mind will be elsewhere; the mid-term and the other assignments that are due this week. Hopefully, I'll understand enough to focus on the weekend for A2.

Cheers!