Assignment #2
First off I want to say that A2 was much easier than A1 for me. Maybe it's because there were examples to reference to for basically every problem on it. I manged to work out the Fibonacci sequence that showed up in the binary string pattern only Odd Maximal Contiguous Ones Free Strings. OMCOFS are basically binary strings that when seperated using 0 as delimiter, had even number of 1s in each section. What I did struggle with was explaining why the Fibbonacci was correct. I had the same problem in A1 in finding the one to one ration between two and three subsets. I wrote that given OMCOFS of length n, the number of them ending in 0, added to the number of OMCOFSs ending in 1 is equal to OMCOFSs of length n-1 and n-2. This was clearly true but did not support it for all OMCOFs of length n. I had to use this fact given in the solution... "An OMCOFS of length n that ends in 1 certainly can't end in 01, so these must end in 11. Thus, the OMCOFSs of length n that end in 1 are in 1-1 correspondence with the OMCOFSs of length n-2 (by appending or removing 11)."
Term Test # 2
I was completely unsure of what parts I should be studying for during this test. I ended up working on unwinding, master theorem, and recurrences. Those weren't too difficult to study for as we have been doing exercises on those topics including assignment 2 as well. I didn't really have time to study proof of correctness, so I simply focused on the other topics. If last test was anything to go by, then the later topics such as proof of correctness, wouldn't be on the second term test... I was wrong, and I guess it was to be fair to the morning section who had later sections (structural induction) in T1. We we're asked to prove that a given piece of code could take x and y and would return x^y. Having little understanding of how to prove things correct I blanked out skipped to the next section and finished the master theorem questions instead. After getting through the second easier question on T2 I finally went back to calm down and take some time to read over the code on question 1. I used complete induction, as the question told me to, and followed my instincts. I took everything that I knew the code would return as a fact I could use. Now this may seem obvious to anyone keeping up in class, but this was such a relief for me to figure out during the last 5 minuets of the test. I ended up doing pretty well, just loosing marks in forgetting to prove termination and quantifying the x value in the IH.
Assingment #3
I'm looking forward to getting more practice with proofs of correctness with assignment 3. So far our intro to Formal Languages is looking very interesting. DFSAs(deterministic final state automata) look pretty enjoyable to figure out as well from our last tutorial.