Wednesday 29 October 2014

CSC165 Slog 7

    This week we continued with different examples of proofs and more specifically, upper bounds of a function and lower bounds of a function. Despite it being more proofs, this week was pretty refreshing since we moved away from solely the use of symbols, but we also used some algebra in our proofs which made understanding the reasoning behind steps in the proof a lot easier to follow.
    We covered bounds because of how in comes into play when looking at how many times a function passes any given line of execution in code. I don't know where to find the symbol for the upper bound, so I'll just use the term big-oh. This upperbound method we learned was to give a fairly loose upper bound to how many line executions are performed in any function written in python (looking at how many if statements or while loops included in the code). The typical translation of finding an upper bound of any given function looks the following:
 C ∈ R+,   B ∈ N,  n ∈ N, n>=B, f(n) <=C*g(n) 
    Looking at this function is pretty confusing, but seems to be consistent in the format with the lower bound statements so when we focus on that it should be a bit smoother than the introduction to this complicated statement. Overall though the proof itself has been reasonably smooth to take in and understand.

No comments:

Post a Comment