Wednesday, March 31, 2010

Final Post

If I may just say, I find this last unit to be the most confusing. I don't quite grasp the concepts trying to be expressed. Although, I find all previous units a lot more understandable. Those exercises and assignments really help. Keep in mind, this portion is more of a mental note than anything. It's one of those looking back moments when I realize how far I've come in this course. It's interesting to see how many times I said the material confused me in the past, and now I understand it almost perfectly. It puts a smile on my face. :P

Anyways! Would you look at that? It's the end of the school year already! It all goes by so fast...
As this will most likely be my final post, I just wanted to say how much I've enjoyed this course. It was challenging at times, but nothing that couldn't be overcome. This was fun, and I wish all whom are reading this good luck in your exams, and have a great summer!

Signing off. ;)

Saturday, March 27, 2010

Folding Exercise

In this exercise, we were given a piece of paper and had to fold it so that the left end was on top of the right end. This was repeated as many times as the paper would permit, always left end on top of right end. After each fold, we had to unravel the paper and record the order of the creases that were vertex up and vertex down.

These were the results we got for up to five folds:

u = vertex up
d = vertex down

1st Fold: d ---> 1 crease
2nd Fold: u, d, d ---> 3 creases
3rd Fold: u, u, d, d, u, d, d ---> 7 creases
4th Fold: u, u, d, u, u, d, d, d, u, u, d, d, u, d, d ---> 15 creases
5th Fold: u, u, d, u, u, d, d, u, u, u, d, d, u, d, d, d, u, u, d, u, u, d, d, d, u, u, d, d, u, d, d ---> 31 creases

By this time we noticed a pattern of a "middle d", as shown above in green.
We observed that everything to the right of this "middle d" was identical to the entire previous fold. Everything to the left of the "middle d" was the reverse of the right side, mirrored by the "middle d".

Further observation showed that from the first crease up to and including the "middle d", there was a pattern:

1st Fold: 1 crease ---> 2^(1-1) = 2^0 = 1 crease + prev creases
2nd Fold: 2 creases ---> 2^(2-1) = 2^1 = 2 creases + prev creases
3rd Fold: 4 creases ---> 2^(3-1) = 2^2 = 4 creases + prev creases
4th Fold: 8 creases ---> 2^(4-1) = 2^3 = 8 creases + prev creases
5th Fold: 16 creases ---> 2^(5-1) = 2^4 = 16 creases + prev creases

Therefore can conclude that on any given fold, the formula for finding the number of creases produced is 2^(fold # - 1) + the number of creases from the previous fold.

However, the number of creases from the previous fold is always 1 fold less than the number of creases up to and including the "middle d". Therefore a more exact formula would be:

2[2^(fold # -1)] - 1

This formula is guaranteed to give you the number of creases in the paper if given the fold number you are on.

Ex: Fold # 5 ----> 2[2^(5-1)] -1
= 2[2^4] -1
= 2[16] - 1
= 32 -1
= 31

There are 31 creases on the 5th fold, as confirmed in the observations above.

Note: I'm aware this formula is a side step away from the actual question of "can you predict the sequence of ups and downs on a specific fold?" To be honest, I'm not sure how to predict the ups and downs other than what was observed above. An idea of a recursion method comes to mind, but I'm not sure how to implement it if that's correct. So I'm satisfied with finding the number of creases for any given fold instead.

Sunday, March 21, 2010

Side Note

I apologize for the clustered look of my previous post. My internet is malfunctioning and the site doesn't seem to want to keep the indents or enters that made my post pleasing to the eyes. Sorry for this inconvenience.

Proofing on the Side

While completing exercise 3 earlier this week, I ran into some stylistic proofing problems. Some parts to a proof are straightforward to follow while others need a little more explanation to be logical / believable. The following is an sample of a proof taken directly from my answers in exercise 3:

Note: srt = square root

Step 1: 2n + 3 # Def of f(n)

Step 2: = 2srt(n)srt(n) + 3 #Algebraic Equivalence

Step 3: > 2srt(n)srt(n) #Subtract 3
Step 4: > 10csrt(n) # Refer to (***) below

As you can see, Steps 1 through 3 are very simple to understand. Step 4 however appears to be quite a stretch. This is where my stylistic problem occurred. I was able to prove this statement, but not in the same method as the previous steps. Now whenever I have this problem, I will do the following: Refer to look at the proof somewhere else on the page, indicated by my "Refer to (***) below" reference. Next, label this proof (***) and go about proving it. Sounds simple no?

So now at the bottom of that question I have the following:

(***): n > 25c^2 # n = (ceiling of 25c^2 + B + 1) > 25c^2

iff n > (5c)^2 # Algebraic Equivalence

iff srt(n) > 5c # Srt both sides

iff srt(n)srt(n) > 5c(srt(n) # Multiply both sides by srt(n)

iff 2srt(n)srt(n) > 10csrt(n) #Multiply both sides by 2

Thus Step 4 above is proven!

With this side proof, as well as the proof above, the statement for the assignment was proven and everything was legible for the marker. I like this "proof on the side" method. It's very useful and easy to understand. I'll be sure to use it in future assignments, and I encourage all who may be reading this to do the same. Good luck to all. 'Night :)

Friday, March 12, 2010

Sorting is so Much Neater

Sorting was introduced in Monday's lecture. For some students in CSC 148, this is somewhat review. It was interesting to see Danny compare sorting methods to a life example like srting a hand of cards. I never made the conection how similar the two were until seeing it in class. It just seemed natural before. Personally I would use insertion sort for a hand of cards. Something like merge sort would be odd, although equally affective.

I like how by fixing up some code, you can make sorting time in applications faster. This could be very usuful in large projects.

Note: An algorithm will never take 0 or less seconds. If it does, get that thing patented!

Note to self: Learn L'Hopital's Rle - I will come in handy when trying to find limits.

Saturday, March 6, 2010

Implication Continues....

Hello all! How is everyone post-test? Did you find it easy? Personally that last question gave me a bit of trouble. "Prove floor of x > floor of x/3.0." I'm still not 100 % sure how to solve it, even with the solutions posted... Guess that's what office hours are for...

The next lesson is more implication. We already know how to solve P(n) implies Q(n). What about when Q(n) implies something else, and so does that, and so on, etc. Example: P(0) implies P(1) AND P(1) implies P(2) AND ... AND P(12) implies P(13). ........then P(0) implies P(13).

Note: "The starting point doesn't have to be zero, since the key idea is passing a property of some natural number to its successors." (Quote taken from lecture notes.)

To solve these problems though is very similar to previously learned induction; First establish the starting point property is true, then check that the property "spreads from each natural number to its successor," using "universally quantified implication."

This doesn't appear to be that difficult, but I'm sure future problems will soon prove me wrong.

Practice, practice, practice. Good luck.

Saturday, February 27, 2010

Are you Ready for the Test?!

Hello all. Tell me. Are YOU ready for the test on Monday?
I, personally, will be spending this weekend studying for it. It supposedly will contain everything we've learned up until now, but I think it will be dominantly about proofs. As in proving whether or not a statement is True in the taught format / style.

I've realised that as long as you do roughly the following, you will be fine.... structure wise.

Assume your variables.
Assume your antecedent.
Pick a variable if required.
Work out all that middle juicy stuff to your proof.
End up with your consequent.
Restate the original statement. # Assumed antecedent, got consequent.
Conclude the original statement this time containing any "for all"s and "there exists".
Note: Be sure to add comments for every line explaining yourself.
Done.

The same applies for proving the statement false, just be sure you're proving the original statement's negation instead. # The negation is True, therefore the original statement is False.

Careful with epsilon and delta proofs though. These are proven in a slightly different manner I've noticed which can be rather confusing. I think these one's require the most practice....

Anyways, hope this little blog was helpful in some way. Happy studying and good luck to all! See you Monday. ;)