Well yet another assignment done and one more to go! I must say that this assignment was a bigger challenge than the first (as expected). I am glad that question one from assignment 1 was pushed back. My partner and I had figured out the number of nodes a while back (in the time of assignment 1 before Danny announced the extension) but we had struggled for a while on how to prove it. I think the first challenge for most after looking at the responses on the bulletin board, the struggle people had to get a formula that is suitable for the nodes. But the tough part of this question would definitely be the proving. When I had a formula, I wasn't sure how I can put into words in a proof so I decided to do something I was a bit more comfortable for me. I wrote a python code for a ternary tree of n nodes. It made me visualize and assess the problem much easier. For any n, I was able to trace my code going through it recursively and making sure that it made sense for proving purposes. We used the proving of the "precondition implies postcondition" method that we learnt recently in class. In doing this, it gave us a better understanding of how to prove preconditions. Although we had a good format down since we had done writing out question 4 first.
For question 2, we had thought we got the proof easy but then we had a discussion about what the constant should be for the time complexity. We were looking at the course slides for week 4 (I think) for the recursive functions on time complexity. On the day slides, the time complexity had 4 + T(ceiling(n/2)) but then for the exact same question in the evening lecture slide they had 3 + T(ceiling(n/2)). This made my partner and I confused. Until we realized that the constant didn't really matter after reading a post done on the bulletin board. The only condition was the constant be not zero because the algorithm would fail. Other than that part, we found the rest of the problem easy.
Now as for question 3, We basically wrote a bunch of scratch work until we saw an algorithm but could'nt figure it out until we unwound it and found the connection. Then it was finally easy to put into words (well sort of).
I can't complain about the assignment, it was tough but with enough time, you can pull it off with no problems.
Tuesday, October 28, 2008
Friday, October 10, 2008
Test Aftermath
Well just had my first term test for csc236 today and went fairly decent. Some problems arised trying to figure out the Fibonnaci question which led to poor time management for the rest of the questions. I understood the question, but slightly had my understanding of the question a tad off. It had said "...greater than 5"! For some odd reason, I was thinking greater or equal to 5 which then completely made me loose track of where I was in the proof (even though it was a small fix, but sometimes its the small things that cause the most problems). I wish I could have finished the test, as I knew the answer to the last question I wrote but due to my lack of time management, I paid for it. Good thing that this will probably go towards the lower breakdown of the course and also good thing that i have my A1 mark to back up any faults I may have had during this test.
Time management has been one of my flaws for many of the tests I've done. Its either I get too caught up in a question (like this one today) or if I don't know the answer but have to do bunch of scratch work to come to the answer, it takes up too much of my time. Although my friends have offered advice on how to deal with this, in what way do you find to manage your time better? If you have 10 minutes left and you have two questions (but each take 10 minutes at least on it), do you dedicate your time on one of the two or split your time in half for both even though you know you can't finish?
Time management has been one of my flaws for many of the tests I've done. Its either I get too caught up in a question (like this one today) or if I don't know the answer but have to do bunch of scratch work to come to the answer, it takes up too much of my time. Although my friends have offered advice on how to deal with this, in what way do you find to manage your time better? If you have 10 minutes left and you have two questions (but each take 10 minutes at least on it), do you dedicate your time on one of the two or split your time in half for both even though you know you can't finish?
Subscribe to:
Posts (Atom)