Showing posts with label Week Four. Show all posts
Showing posts with label Week Four. Show all posts

As I was super busy lately, I've totally neglected my blog for a while. So, I'll pick up where I left off.... week 4!

We started looking at more recursive functions and definitions, and we started discussing some proofs involving them. We were introduced to Fibonacci. I was very surprised by how many different places it shows up. We also had some practice identifying recursive definitions. I thought the third example was very interesting. It was as follows

f(n): 
= 0,  if n = 0
= f(n+1) - 3n2,  if n > 0

During class, I thought that this was not a properly defined recursive function because f(n) always depends on its next element, which we'll never get since it depends on the element after that. I had no idea that it could work until Prof. Heap showed us that it could be rewritten.

We also started looking at time complexity of code again, especially of recursive code. We did some of this in CSC165 last year, but I've almost completely forgotten how to deal with it. It was a bit tough at first trying to calculate complexity.  Since we didn't have time to prove the time complexity of something, I've forgotten how to do that too. I'll need to find time to sit down and try to do a problem.

I missed some class last week, so I'll need to get all the notes and read everything over before I write about week 5. The test, I'll just write about briefly now.

The test on Friday wasn't as bad as I had expected it to be. I had a lot of stuff to do, and I ended up only studying the day before, so I was pretty worried. Then again, as I've said last year, it's hard to study for tests involving proofs. Either you get it, or you don't. Anyway, unfortunately for me, I didn't get to finish the entire test. I realized the answer 30 seconds before time was up. I started scribbling and I actually had part of key step on paper, but I didn't get to finish writing up my proof formally. The lack of practice and studying probably made me think a bit slower than I should have. It was an overall disappointing test, but I'll use it to remind myself to study harder for the next test.

Anyway, I hope everyone had a great Thanksgiving weekend. Let the midterms continue...

A1

I didn't know whether to put this under Week Three or Week Four, but anyway, I finished assignment 1 yesterday, a few hours before it was due. It wasn't all that bad in the end.. but I did have a lot of trouble starting the assignment and figuring out exactly what I needed to do. Question 2 really stumped me because I thought we actually had to prove that our technique works using induction. Instead, the TA told me just to use it to come up with a solution for n+1 meals. I sincerely hope that was what Prof. Heap wanted, otherwise I would have messed up a whole question. 


Anyway, I don't know what more to say about it. I started the actual writing of the assignment pretty much on Sunday, which was not such a great idea. The assignment was definitely tricky because I was afraid I wouldn't be able to finish it. Somehow, I managed to pull through. Hopefully I've learned my lesson and will start the next assignment early. On a totally different note, TA's are very helpful when you're stuck. I'm so glad there are so many office hours since I can't make more than half of them.