Wednesday, December 5, 2012

Virtual Week: Endgame

Virtual Week signifies the end of our semester. This semester has been quite the learning experience. First, I would like to thank Danny. You are an amazing professor; one of the best I've had yet! Listening to you in lecture made concepts clear and really understandable. I think the greatest characteristic you possess is that you know what it is like to be a student. You try to help us do well in this course, with your very helpful and ever-shifting grading scheme. I think your generosity will help out a lot of students when it comes to their final marks.

I think doing well in this course requires us to build a strong foundation out of the fundamentals in this course. I wish I had discovered this earlier in the term. I'm sure reading the course notes on a regular basis would have given me a great deal of help. By having the fundamentals in check, I'm sure any problem is not too far a stretch for our minds.

Looking back on this SLOG, I realize I actually really like the concept. Believe it or not, I actually enjoyed Slogging every week; I didn't see it as a nuisance or a chore. Doing my SLOG on a weekly basis helped me express my emotions, from venting out my frustrations to celebrating on seemingly small achievements. Even if nobody from our course was reading, the facade of having someone out there to talk to was comforting, After reading several other SLOGs by different student, I realized that I wasn't alone in many cases.

Throughout the course, I have made great strides as a student. As some earlier readers may notice, I overcame my self-diagnosed chronic-procrastination with hard work and determination. After thinking of every course as a hurdle towards a degree, I took viewed every course as an obstacle. I wouldn't spend anytime trying to "stop and smell the roses" so to speak. However, looking back at the subject of Formal Languages and DFSAs, I actually enjoyed what we learned. I actually took what we learning as a way to be enlightened. I actually took the time to "stop and smell the roses". The sense of euphoria, which I had temporarily lost, has started to come back slowly. I am no longer a drone programmed to complete my task.

I feel confident going into examinations. I will pass this course and take my experiences with me. Hopefully I will take the optimism I gained from the last few weeks in this course, and apply to everything I do in my university career from now on. Devoting time to do more readings and finding ways to expand my thinking, will help me greatly in the near future.

Slogging has given me the impression of writing an open diary; I am able to express my emotions, as well as recapping the week that was in the course. At the same time, it was able to give me a window to my previous mindsets and goals. I am able to look back in this magical mirror, known as my SLOG, and see how I was before. I'm glad that I kept with Slogging and I think it is a really great idea. This is the last SLOG entry I will do, and surely I will miss Slogging. So for the last time everyone good luck with your exams and future endeavors, and wish me good luck as well!

Tuesday, December 4, 2012

Problem Solving Tutorial: Space Slicing

Problem:

I can divide a sheet of paper into two regions with a single straight line. With two straight lines, I can divide a sheet into four regions, and with three straight lines I can divide it into seven regions.

If n is some positive whole number, what is the maximum number of regions I can divide a sheet of paper into with n straight lines?

So, first I'll write down the information that is given and denote the number of cuts by the letter n:

Number of cuts (n): 1
Number of sections : 2

Number of cuts (n): 2
Number of sections: 4

Number of cuts (n): 3
Number of sections: 7

I started of looking for a pattern and I quickly realized there was a potential pattern when looking at the number of sections created. If you look at the number of sections created, it increases from 2 to 4 to 7 sections. When the number of cuts is equal to 2 there are 4 sections, which is 2 more sections than there was only 1 cut. Similarly, when the number of cuts is equal to 3 there are 4 sections, which is 3 more than there was only 2 cuts.

So,

(n = 2) - (n = 1)
= 4 sections - 2 sections
= 2 sections

(n = 3) - (n = 2)
= 7 sections - 4 sections
= 3 sections

As you can see, the difference in the number of sections increased by 1 (from 2 sections to 3 sections in difference).

So following this potential pattern I would get:

(n = 4) - (n = 3) = 4 sections
(n=4) - (7 sections) = 4 sections
(n=4) = 4 sections + 7 sections
(n = 4) = 11 sections

By isolating for when there are n= 4 cuts, we see that there should be 11 sections. We can confirm this pattern by visually seeing the number of cuts and the number of sections which result.

 Since the result when the number of cuts is either 1 or 2 is obvious, I'll skip to when there are three cuts and four cuts. This will be really helpful in visualizing what we are working with.

When n = 3, number of sections = 7 :


 When n = 4, number of sections = 11 :


So now it is safe to say that what I identified earlier is indeed a pattern. The updated information is now:

Number of cuts (n): 1
Number of sections : 2

Number of cuts (n): 2
Number of sections: 4

Number of cuts (n): 3
Number of sections: 7

Number of cuts (n): 4
Number of sections: 11

This problem deals with recursion. We can say that:

T(n) = { 2                          , if n = 1
           { T(n-1) + n            , if n > 1

You need to unwind this formula:
T(n) = T(n-1) + n

After unwinding, you can find the closed-form for it.  Using the "golden ratio" where α = (1 + √5)/2 and β = (1 - √5)/2 . You can prove that the closed for holds for when n = 1, and for where n > 1. By doing so you are able to prove the recurrence and therefore solve the problem I am unable to unwind the recurrence, so it seems that I am stuck here.