Sunday, 26 October 2014

SLOG Week 6

This week we were introduced to a problem called penny piles.

Understand the problem

You start with two side by side drawers. The left one contains 64 pennies while the right one contains zero pennies.

- If the left drawer has an even number of pennies, you may transfer half of them to the right drawer. YOU CANNOT DO THIS IF THE LEFT DRAWER HAS AN ODD NUMBER OF PENNIES.

- If the right drawer has an even number of pennies, you may transfer half of them to the left drawer.
YOU CANNOT DO THIS IF THE RIGHT DRAWER HAS AN EVEN NUMBER OF PENNIES.

Thus we can conclude that you may are unable to do take away pennies from any drawer that has an odd number of pennies.

WHAT WE WANT TO KNOW:

- Can we arrange things so that one of the drawers has 48 pennies using the 2 methods available above?

- Starting from the same initial position (left drawer: 64 pennies, right drawer 0 pennies) can you pick any number in the range [0,64] and obtain that number on one of the drawers using the two methods given? If not, which ones are impossible to achieve?

- What happens when you start with a different number of pennies in the left drawer?

Devise a plan

During class, I tried many different approaches to this question. This included trying to find a pattern in which I could relate to with a mathematical formula which could get me any number which worked.

What I got was two formulas which would calculate the number of pennies needed to be on each side to achieve a number.

( Even or Odd Number, Other side)  aka (what we want, what the other side needs to be)

Where n is a generic integer number

Even Number: ( 2^n , 64 - 2^n)
Odd Number: (2^n + 1, 64 - 2^n - 1)

This approach did not really lead me to an answer since it didn't answer any of the questions above.

Thus, I decided to make a tree diagram because that would should all the possible results and would be able to answer to first two questions.

Carry out the plan




As shown from the above tree diagram, every even number in the range [0,64] even number is achievable and will eventually become an odd number. When this happens both sides of the drawer will become odd since even + odd = odd.

Therefore we have found out that since all numbers in the range [0,64] exists on the tree diagram, you can pick any number in the range [0,64] and arrange things so that one of the drawers has that number of pennies using the two methods of arrangement available to us. Since this is true, we can also arrange things so that one drawer has 48 pennies.

However, this is not the case if we started with a different number of pennies in the left drawer. This is because if we start with an odd number of pennies in the left drawer, there will be an odd number of pennies in the right drawer. Since both drawers have an odd number of pennies, it is impossible to use either of the methods of arrangements given to us.

We have thus answered the three things we want to know.

Looking Back

The tree diagram looks as if it has effectively solved the problem. However, this method would prove to be very tedious and inefficient had we been given a bigger range such as [0,1000]. A better way of doing this may be to write a program to compute all the combinations for you or maybe to actually use a mathematical proof.

OTHER SLOGS

I really liked how John could find  a way to determine whether the statement is true or false. From it, I learned that it is probably best to do this first rather than mindlessly diving in to discover every possible solution like I did previously.
http://kimjohnlim.blogspot.ca/2014/12/slog-week-11.html?showComment=1417660528863



Saturday, 18 October 2014

SLOG Week 5

After a very enjoyable thanksgiving weekend, I received my marks for my first CSC165 midterm. Thankfully I received a few marks for my answer despite it being rushed and probably unreadable to the T.A. However, I am a bit disappointed in myself since I knew what conditions had to be met to falsify one statement while making the other statement true but, due to my lack of sleep, I wasn't able to think of examples.

On another note, this weeks lecture's on proofs escalated to a greater difficulty quite fast. The structure of proofs is straightforward but coming up with everything to put into the body of the proof is just mind boggling. With 3 midterms coming up, I'm having trouble finding the time to review and understand the material but since I commute, I'm going to try to go over the notes everyday to and from school to ensure I don't lag behind the rest of the class.

Monday, 13 October 2014

SLOG Week 4

       This week we continued on with proofs and although I originally feared proofs due to MAT 137, I found the material understandable and quite easy. Hopefully it stays this way throughout the next few weeks but that will probably be just a wild dream since I've seen the level of depth and difficulty proofs can reach.

       Like all weeks thus far, I found the tutorials really helpful. They helped clarify the structure of proofs which is something MAT 137 wasn't able to fully convey to me. As a result, I'm expecting to do a lot better in both this course and MAT 137 as long as I get just a bit more practice in proof problems.

       My first term test in this course this week was also the first test in my entire university career. Due to this fact, I stayed up all night studying for the test in order to get perfect. To my relief, the test wasn't that difficult but, since I stayed up all night, I ended up confusing myself on the last question to the point where I barely had time to write my final answer. Therefore I learned a valuable lesson; to always get sleep before an examination of any kind.

Saturday, 4 October 2014

SLOG Week 3

        The first month of school is finally over! Despite being initially confused this past month due to all the symbols and logic, to my surprise I found that I actually understood everything that has been taught so far. This is quite an improvement to my initial reaction which was that I was going to do pretty horribly but I guess that hard work pays off.

        One of the most fascinating things I have witnessed this week was how complicated implications can become. What was once a simple line of symbols quickly expanded until it spanned the entire page through the use of equivalent statements, De Morgans Law, and the Distributive Law. After seeing the use of these three concepts, I was able to do the tutorial worksheet with relative ease and I was actually enjoying myself while solving the questions.

       This week we were introduced to proofs which was something I dreaded since I had a lot of trouble with proofs in MAT 137. Even now I don't think I can confidently solve a simple proof but hopefully by midterms, this course will clear things up for me.