Introduction to Algorithms No.9

Hello. Today I have completed "I. Foundation." And I have proceeded to "II. Sorting and Order Statistics." Today, I will briefly summarize what I have learnt in "I. Foundation."

Chapter 1. The Roles of Algorithms in Computing
I have learnt the significance of algorithms. Good algorithms are as important as good computer. As computer advances, we should understand algorithms the more.

Chapter 2. Getting Started
I have learnt basic sorting algorithms such as insertion-sort, selection-sort, and merge-sort. And I have also learnt "loop-invariant." An (sorting) algorithm (of an array A) called "loop-invariant" is:
-------------------------------------------------
At the start of each iteration of the loop (e.g. for n in (0, N)), the subarray A[0...n] consists of the elements originally in A[0...n] , but in sorted order.
-------------------------------------------------

Chapter 3. Growth of Functions
I have learnt how to describe a running time.
-------------------------------------------------
Big O-notation determines the upper bound of a running time. Big Omega-notation the lower. Theta-notation the both.
-------------------------------------------------

Chapter 4. Divide and Conquer
I have learnt how to get a recursion of a running time of an algorithm. And I have also learnt how to calculate the recursion and get the running time. Taking merge-sort, I have the following recursion:
-------------------------------------------------
T(n) = T(floor(n/2)) + T(ceil(n/2)) + f(n), f(n) in Theta(n).
-------------------------------------------------
Let's think about the recursion in terms of "Divide and Conquer" (and Combine). T(n) is the (worst) running time of merge-sorting a n-size array. T(floor(n/2)) + T(ceil(n/2)) is the summation of the  running time of two DIVIDED arrays. And that sorting of the each array is called CONQUER. The last item, f(n) (in Theta(n)), is the running time of COMBINE. In other words, the sorting of the two sorted arrays takes f(n) time. And I have learnt how to solve the recursion and get the running time.

Chapter 5. Probabilistic Analysis and Randomized Algorithms
I have learnt the foundation of probabilistic analysis and how to describe a uniform distribution in programming.



Thank you.




Comments

Popular posts from this blog

Introduction to Algorithms No.3

Introduction to Algorithms No.7

Introduction to Algorithms No.10