Sunday, October 28, 2012

More on Recursive Functions:



     In this week we learned not only how to proof recursive functions but also how to define them. it is getting very complicated indeed, since it needs plenty of thinking it through and trying it out on many different values to make sure that you came up with the right formula for the recursive function. I find it a little easier to actually read the questions out loud and start drawing pictures or numbers on paper of the expected results. so if you have a better and easier way to do this, please let me know.

     After I do the above step and solve the problem I begin trying it with different type of values for (n) from smallest to some of the higher values. this was an example to help me under stand the whole divide and conquer recurrences from Introduction to the Theory of Computation book
the functions started looking like this:

   then it became in a closed form and looked like this:
then with mathematical substitutions we came out with the final T(n) that looks like this:
I hope for next week we won't take new topics and work more on these problems and on how to solve them.

Friday, October 19, 2012

Recursive Functions



The test for last week was OK, didn't get time to finish it though spent too much time one the previous questions. Therefore I learned that I should divide the time on all the questions accordingly
I read more about structural induction from the lecture notes and the 236 course notes, but still not sure if I understood the concept. Hopefully we’ll take more things on it in class
I find recursive functions very interesting, since you don’t get an answer right away you eventually need to break it down, then look and understand the relations between the changes then come up with the formula for how many times the function will run. For an example


Where n is greater than zero then we would break it up more
Let us use k = n
F(k) = f(k-1) +2k-1
 = (f(k-2)+2k-1-1) +2n-1= f(k-2)+2*2k-3
= (f(k-3)+2k-2-1)+4k-3= f(k-3)+2*3k-6
= (f(k-4)+2k-3-1)+6k-6 =f(k-4)+2*4k-10
.
.
.
= f(k-i)+2*ik-i^2-i
.
.
.



I like how we are still using complete induction and mathematical inductions to prove the recursive functions. Made my life a little bit easier. But I definitely will have to review theta and big O from last year.

Monday, October 8, 2012

My First Blog


I just found out that we were supposed to post our first Slog today. partially my fault though, since I saw it at the end of our calender, I never payed any attention to it, especially when I had two quizzes and 2 pre-labs that were not easy last week, as well as the midterm and the huge assignment for this week. Just my luck that I decided to read it today and see what it was all about.

So this is my fourth week of CSC236, and I am terrified of the midterm that is coming. Hopefully I do well. we learned simple, complete, and mathematical induction in the last 3 weeks, as I became a little familiar with it. had only couple of days to learn well-ordering, not pretty sure if I got it. 
but lets hope for the best