Saturday 25 October 2014

Week 7

This week we learned about proof by cases,Sorting algorithm complexity, and the big-Oh. In proof by cases I learned when there are multiple options to approaching a proof it is helpful to split up the proof and prove the different cases. We looked at sorting algorithms such as merge sort and bubble sort and saw that merge was faster in 'running time'; "the number of steps that are taken by the algorithm" and we actually care about "how the number of steps grows as the size of input grows". We learned that running time is important to computer scientist because they like to be efficient. I learned that the most important term is the highest-order one, constant factors do not matter and that we count how many steps an algorithm takes. We learned about the asymptotic upper-bound notation of O(n) which means the function or equation does not grow faster than whatever is in the brackets of the O. I learned to count the time complexity, you count the number of lines of code that are executed. Although I am confused of where there letters come into the equation or how they got these equations for the running time, in the lecture slides.

No comments:

Post a Comment