Sunday, 26 October 2014

Penny Piles Problem

The daily lives for computer scientists are to create solutions to problems. The name of our problem that we were presented in class was called “Penny Piles”. My understanding of the problem is that the left draw contains 64 pennies and the right draw contains 0 pennies. Thereby, the goal was to arrive at 48 pennies in one draw. However, there were two rules in which we were given and they included:
        
          a) If the left draw has an even number of pennies, half of them can be transferred to the right draw. If     the left draw ends up with an odd number of pennies then operation l is disallowed.

b)   If the right draw has an even number of pennies, half of them can be transferred to the left draw.If      the right draw ends up with an odd number of pennies then operation r is disallowed.

I worked with one of my friends to tackle this problem since we were suggested to do so.  We started with the 64 pennies in the right draw and 0 in the left. We divided 64 by 2 since it was even and got 32 pennies to transfer to the left draw. This resulted in both draws having 32 pennies. We divided 32 by 2 once again and transferred the 16 pennies into the right draw. This resulted in 48 pennies in the right draw and 16 in the left. We repeated this method until we arrived at odd numbers of pennies in both draws, 63 in the right and 1 in the left draw. Even though we arrived at the desired 48 pennies in one draw at the beginning, the problem was not totally solved.

We tried different numbers in the range [0,64] in which all of them seemed to work. We tried the different numbers on both sides and we concluded that it did not matter which side we started from the left or the right because we arrived at the same answer. If you notice the algorithm, l(left draw) + r(right draw) = 64(total number of pennies)




Comment on how your solutions were like! Have a great week!

Introduction to Proof Structure

Welcome to the world of proofs! This week, we were introduced to the structure of how to compose a proof. We are given a statement and required to write a specific step by step structure that demonstrates how we are supposed to carry about writing the proof itself. Comments were also required to show that you have understanding of the claims that you are making in the proof.

Below, I will demonstrate with an example on how a proof structure is to be written for this course with a few additional comments.
             
(for all)x E R, (for all)y E R, x<y => (there exists)z E R, x<z and z<y

Assume x E R, y E R   # this is the domain assumption (can only be made for universal quantifiers)
     
   Assume x < y # antecedent
      
      Let z’ …… # since the value of z has not been determined yet, it is z prime.
                       # this assumption depends on the values of x and y.
     [proof of z’ E R]
   
     Then z’ E R # this is written once this statement is actually proven
   
     [proof of x<z’ and z’ < y]
    
     Then x < z’ and z’ < y
   
     Then (there exists) z E R, x < z and z< y # introduce (there exists symbol)

     Then x < y => ex z’ E R # intro =>(implication)

Then (for all)x E R, (for all)y E R, x < y => (there exists)z E R, x<z and z<y #intro (for all)

Midterm Examination Day

We had our first midterm test for this course and my first midterm test overall in my university career so far. I could not have been more nervous because it felt as if it was a matter of life or death at that point. I literally saw the tension and pure anticipation pasted on everyone`s faces while awaiting entry into the examination room. The examination room itself was intimidating due to the vastness of the room. What caught my eye was seeing the “infinite” rows of desks placed so neatly that it seemed as if it was not even an inch out of place. Now for sure I accepted the fact that I am not in high school anymore.

Having the midterm test placed in front of me waiting to be opened, was the most anticipating feeling because everyone wants to know if the material inside would make us or break us. Once I opened the booklet, the structure of the test was almost identical to the sample test we were given before the midterm. I was happy at first and then realized that I should have just written the sample test as my cheat sheet. As I was going through the first question, I definitely had an idea how to tackle the question since I studied the sample test.

Unfortunately for me, I had moments of self-doubt and changed my answers in which I believe was the biggest mistake I made. From assignment 1, I had learnt a lot but I allowed my nerves to get the best of me after a long time of writing examinations. However, I have learnt from this experience by understanding that there will be moments of self-doubt in examinations sometimes, but learn to have confidence in the materials you have studied. Yes, I am disappointed in myself, however, I know that there will be other opportunities in this course in which I can make up for my lost marks.

Share your exam experience and comment below!

The Blood, Sweat and Tears of Assignment 1!


Can you imagine that more than three weeks have passed already since we have started university? This third week was very significant because we were presented with our very first assignment in CSC165. I must say that many of us have put in a lot of blood, sweat and tears in completing Assignment 1. This was an extremely productive as well as a thinking based assignment which required my group and me to apply all the material that was covered in the lectures so far.  Some of the questions were quite straightforward as they were more “warm up” questions to prepare for the more challenging ones. We each had our own individual interpretations for some of the more challenging questions such as numbers 3 and 5.

We had some trouble with those two questions in particular because it relied heavily on how you interpret what it was asking as well as identifying all the possible scenarios. Some of the questions I had problems understanding how to write in symbol form because it turned out to be more complex than I personally anticipated. However, with the avid support systems and teamwork provided by my teammates, we were able to each contribute in our own ways for each of the questions. We in-cooperated each other’s ideas and asked questions when we did not understand one another’s way of thinking.

Additionally, there were times we felt like giving up, however, we made a conscious decision to keep trying and produce the best possible answers that we could develop. Through this experience, I was able to understand much more of the topics than before by working with other students with varying thought processes and strengths. I really hope that our hard work paid off and everyone else`s as well in this course.

What are your thoughts on assignment 1?


Comment below!