Tuesday, December 2, 2014

Last Post

Dear Blog,

For my last blog of the course, I thought I would just conclude everything about this course, and by everything, I mean my feelings, struggles, achievements, etc. This was definitely a challenging course, probably the most challenging course I had all semester. But it was also probably my favourite. I thoroughly enjoyed the challenges this course brought me.

My favourite topic was probably proofs as a whole. I enjoyed proving functions to be bound below or above each other. My least favourite topic has probably been counting steps and halting. These two concepts are still make me struggle and I most definitely must review them before the final exam.

For the most part, my marks in this course have fluctuated, but the most important thing is the final exam. I did pretty well on Assignment 1, not so well on Assignment 2 and mediocre on the mid terms and tutorial quizzes. I hope to get a fairly good mark on my slogs to give me a bit of an extra mark boost. I really want a good mark in this course to ensure I get into the CS subject post in my second year. I'll need at least a 60% in this course, and a 60% in CSC148 with an average of 67% between the two.. so wish me luck.

If you get the chance, take a look at this student's blog. http://csc165judy2014.blogspot.ca/. I thought it was really well done. The layout was spectacular and the posts were sufficient and informative. It's difficult to find well done blogs like that one. I really enjoyed her post on November 19, her problem solving episode. It was quite the brain teaser.

Well, thanks for reading all of my posts throughout the term. Wish me luck on the final!

Over and out,

-J.M.

Problem-Solving Episode

Dear Blog,

I am going to walk you through a problem-solving episode, using Polya's problem-solving technique. This problem is one we tried during a lecture. It is called Penny Piles. The problem states that you are sitting in front of two drawers. The left drawer contains 64 pennies and the right drawer contains 0 pennies. The problem is to figure out if you can arrange the drawers so that  one has 48 pennies using the following operations of l and r.

l: if the left drawer has an even number of pennies, you may transfer half to the right drawer
r: if the right drawer has an even number of pennies, you may transfer half to the left drawer.

After doing this, you must choose a number other than 48 in the range [0,64] and try to arrive with that many pennies in one drawer with the same initial position. It then asks if there are any numbers in that range that are impossible to achieve.

1. Understand the problem:

At first glance, this problem was super confusing, but after re-reading the problem a few times, I fully understood it. Basically you start with 64 pennies in one drawer and 0 in the other. You are allowed to take half of the pennies from the drawer with 64 and put them in the other, leaving you with 32 and 32. You can continue doing this with both drawers as long as they contain an even number of pennies.

2. Devise a plan:

I started out by trying to make one drawer have 48 and one have 16, satisfying the first condition.

Steps
Left
Right
0
64
0
1
32
32
2
48
16

I will then try to get other numbers in the range [0,64], by continuously dividing numbers by two and trying to arrive at new numbers.

3. Carrying out the Plan:

Simply through trial and error, I realize that every number in the range [0,64] is possible to achieve. (This took a while).

4. Looking Back

Since this step involves looking back, I did just that, and I realized, there has to be a much easier way to solve this problem without going through every possible number combination. So, I devised a new plan. I tried many times to think of an equation for this problem, but have so far failed. But this problem has stuck with me and every now and then I still try. I have drawn out many branches of combinations and it seems to me that it if this is a function, it is an exponential function, and it may be important to start at an even square, like 64 or 144. For the time being, I am stumped, but this is a very interesting problem.

Thank you,

-J.M

Monday, December 1, 2014

Other Slogs

Hello,

This will be a short blog because I just wanted to express some disappointment in my blog. Throughout the term, I would check other slogs to maybe gain some new insight or see how other people are finding the course material but almost all of the slog URLs that I clicked on contained 1 or 2 entries. It was tough to find some interesting information.

In other news, my group and I just handed in assignment 3. The last couple of questions were definitely difficult. I found it extremely difficult proving that there exists a function that is not in big O(g) and not in big Omega(g). I had to create a piecewise function for g and I hope my answer sufficed. Proofs involving limits on that assignment also confused me quite a bit. It is just the structure of the proof that I struggle with. Other than that, I will just be focused on the finals for all of my courses, especially this one as it is the most important. I need a good mark in this course to get into the CS subject post.

Wish me luck!

-J.M

Tuesday, November 25, 2014

Week 11 - Halting

Dear Blog,

This week was relatively short in CSC 165 because we had a break on the Monday and Tuesday, but we were introduced to a new concept, one that I find particularly difficult, and that was halting. Basically, a program halts if it returns control to the user. If it loops infinitely, then it did not halt. An error is even considered a halt.

Professor Heap spoke about how it is impossible to create a function that is able to check whether or not another function will halt. This concept is pretty difficult for me to grasp.

Also, I got Assignment 2 back and my group did not do as well as we had hoped at all. Overall, not the best week in CSC165. We are trying to get a good head start on Assignment 3 so we can study and be prepared for the final.

Wish me luck!

J.M

Week 10

Dear Blog,

Before I was pretty confused about Big O and Big Omega but now I have a pretty good grasp of it. In week 10 we learned many different ways of proofing and disproving Big O and Big Omega statements.

It is quite simple to prove Big O statements in my opinion, because there are different ways to do it, as long as the C and B you end up choosing satisfy the equation, you are good to go. I felt that week 10 was very important for me to understand the concepts of Big O, Big Omega, lower bounds, and upper bounds.

I am happy with my midterm mark and I hope to keep improving in this course. I hope to do well on Assignment 2 and Assignment 3 so I have a very good shot at getting in the subject post next year!

Thanks,
J.M

Monday, November 3, 2014

Big-Oh

Dear Blog,

           Recently in CSC165:  Mathematical Expression and Reasoning for Computer Science, we have been learning about how to count the steps of sorting algorithms, the worst case scenarios of algorithms and the "Big-Oh". The week started off a big confusing, there were a lot of variable involved with counting steps but as we progressed, it became more clear to me. Counting steps basically involves counting the total amount of steps an algorithm takes to sort a set, usually we will count the total amount of steps it would take the worst case scenario of the algorithm to perform. For example if we wanted a set sorted from least to greatest, the worst case scenario would be if it started in order from greatest to least.

          Big-Oh of n^2 basically shows how all quadratic functions grow at roughly the same speed. The worst case scenario can be an overestimate or an underestimate. I will elaborate more when I have more time. For now, I have to focus on my term test. 

Thank you,
J.M


Preparing for the Term Test

Dear Blog,

           The second term test is approaching and I feel quite confident about it. I found last year's text pretty straightforward and after completing many examples from my notes, the course notes and lecture slides, I feel like the proof king. I am really counting on doing well as I missed the first test and now this one is worth more of my final grade. Also, my group just handed in Assignment 2 and I feel as though we performed decently on it. We struggled with claims 1.2 and 1.3 but overall I think I will be content with our mark.

Thanks for reading,
           J.M

Sunday, October 26, 2014

Finishing With Proofs

Hello Readers,

            Recently in CSC165, we have finished learning about proofs. And although they are quite difficult, once you finish a proof correctly, it is really rewarding. Some different types of proofs we learned about were:
  • Proving Existence (Proving that a set is non-empty)
  • Proving a Claim About a Sequence (define a sequence and then prove something about that sequence)
  • Contradiction, which is a special case of contrapositive. 
  • Non-boolean Functions, expressing a proof about a function that returns a non-boolean value (e.g: number, integer)
  • Proof By Cases (splitting you arguments to show all possibilities)
  • Proving Something False (Prove the negation of the claim)
  • Proof About Limits (you usually have to pick a certain value to make the proof work)
            There are definitely many other types of proofs but these are the main ones we have learned. Assignment 2 is all about proofs, and I hope to do well on that with the same partners I worked with last time. 

            Since finishing with proofs, we have started learning about sorting strategies. This concept is not new to me because I learned many different sorting algorithms in my grade 12 computer science class, so I'm hoping this will not be too challenging for me. I am quite confident with the different types of sorts, especially:
  • Insertion Sort:  Each iteration, insertion sort removes one element from the data, inserts it where it belongs in the list and repeats until everything is sorted.
  • Bubble Sort: Repeated checks each pair of adjacent items in the data and switches them if they are out of order, quite inefficient for big lists
  • Selection Sort: Cycles through the entire list looking for the next item in the list and once it knows which item to take, places it in the correct position.
I do not know much about mergesort and quicksort, but I do know they are very efficient so I can't wait to learn about them! 

          CSC165 is still my most challenging class, but also still my favourite class. I will keep you updated on how the unit on sorts turns out and how I will be preparing for my next term test. Thanks for reading!

Tuesday, October 14, 2014

Past Two Weeks

Dear Blog,

            I apologize that I have been slow on the blog posts. As stated in my previous blog, I've been really sick lately with the stomach flu, so sick that I could not write my first term test. In the past few weeks, Professor Heap has begun to teach us proofs. He started by teaching us proof structures then moved onto actual proof statements. I'm trying to keep up with the lectures even though I haven't been able to attend all of them. After midterms, when I am hopefully no longer sick, I hope to buckle down hard and really practice the different kinds of proofs until I know exactly what I am doing. I was prepared for the first term test, but I need to be even more prepared for the second, especially with how high it is weighted for me now. I will keep you updated with my struggles.

Thanks
- J.M

Thursday, October 9, 2014

Term Test

           This week was pretty interesting. Let me paint you a picture. It's the week of my first term test, and CSC165 being one of my relatively harder classes, I study quite hard for it and make a pretty awesome aid sheet. Now, I do not think I could have been any more prepared for this test, I was ready to ace it, but guess what happens next. I wake up with the stomach flu, but because I was so prepared I thought I would tough it out and try to write that test. So, the TA hands out the test papers and I read the first question. "Booya!", I thought in my head, I know this. I got this test in the bag. Well, the only thing in the bag that day was my vomit because I had to excuse myself for the rest of the test with an upset stomach. This is pretty frustrating because now my second term test is doubled in weight and it puts a lot of pressure on it, but I will just have to study ridiculously hard and ace it. Thanks for reading.
     -J.M.

Friday, September 26, 2014

CSC165: Third Week

            Welcome to my second blog on the course CSC165. As stated in my previous blog, this class is quite challenging but also very rewarding. Logic and reasoning is one of my favourite areas of study as it makes you think very abstractly. I was right in assuming I messed up one question in the first tutorial quiz but I know what I did incorrectly and still feel confident about the material we have covered. I feel as though I did much better in this week’s tutorial quiz.
            Throughout the third week of CSC165: Mathematical Expression and Reasoning for Computer Science, we began by learning about conjunction (“and”) and disjunction (“or”). I also learned the symbols for “and” & “or” which are an arrow pointing up and an arrow pointing down, respectively. The only frustrating thing about conjunction and disjunction is the English usage of “and” & “or” sometimes varies from the logic and mathematical usage, so it is important to note the difference. In logic, “and” will combine two statements by declaring they are both true. Using “or” will combine two statements by declaring that at least one of them is true. It is also known in English as “and/or”. After conjunction and disjunction, we went more into depth with negation. Negation is a concept that I do not find too difficult. It is pretty straightforward.
            A few things that I found really useful this week that I feel will help me immensely in this course:
  1.   During the tutorial, our TA put a list of statements that mean the same thing but use different symbols on the board. It really help me understand what the statements and symbols mean.
  2. In Monday and Wednesday’s lectures, professor Heap went over truth tables which really assist you in interpreting predicates. To me, they are much more helpful than Venn Diagrams.
  3. I learned that many laws in arithmetic also apply in logic, such as the commutative, associative and distributive properties.
  4. De Morgan’s Law is useful when trying to negate certain statements.
             This course does not relate much to all of my other courses and I feel like it will stay that way throughout the whole semester. I am enrolled in MAT135: Calculus 1 (A), but I feel like if I had chosen MAT137, it would relate to CSC165 much more. Assignment #1 has been released and is due on October 3rd. I am working with two other guys on this assignment and at this point we have pretty well all of it done. I am quite confident in our answers which is reassuring because midterms are slowly approaching, with the midterm for this class being on October 8th. It is nerve-wracking but I should be okay for it as long as I read over my notes and do many practice problems. I will keep this blog updated weekly with my frustrations, worries, achievements, and basically every other emotion. Thank you for reading.


            -J.M.

Thursday, September 18, 2014

CSC165: First Two Weeks

            Hello, welcome to my blog on CSC165: Mathematical Expression and Reasoning for Computer Science. This blog post is on the first two weeks of CSC165. The first day was a bit of an introduction, I did not learn too many new things other than what the topics this particular half year course will cover. What we mainly focused on in the first week of class was set properties, quantifiers, universal claims (i.e: all), and existential claims (i.e: some). During the first week, I learned many new symbols such as the symbols for subsets, “for all” (each), “there is” (exists), intersections, unions, and complements. Starting the second week we continued with quantifiers and learned how to verify or falsify quantified claims which I found quite interesting. Example: to verify a universal claim (for all), show at least one counter-example to the claim. Afterwards, we continued on to implication, which is a difficult concept to grasp at first but is stimulating to think about. In implication, there is an antecedent and a consequent. If A is the antecedent and B is the consequent, then we can say “If A, then B”. With implication there is also a converse and contrapositive example. If you reverse the direction of an implication, you will get the converse example of that implication. If you toggle and reverse an implication, you get its contrapositive example. This uses a new symbol as well, which negates a statement. I will continuously practice implication and try to master it by providing myself with example problems and re-reading my notes from class.
              So far this course seems like it will be really rewarding. Although I feel like I messed up one question on this week’s tutorial quiz, I still feel confident about the information we have learned thus far. Currently, I am also enrolled in CSC108: Introduction to Computer Programming. One similarity between the courses that I have already noticed is CSC165 touches upon the programming language “Python” which is the same language that is focused on in CSC108.  I realize CSC165 will be more of a challenging course, but it is actually very interesting. The logical topics that will be covered appeal to me and I hope to convey my excitements, frustrations, confusions, achievements and everything else in my upcoming blog posts. Thank you for reading.

            - J.M.