Introduction to Algorithms Book by Thomas H. Cormen Charles E. Leiserson Ronald L. Rivest and Clifford Stein Powerpoint by Michael Block
Chapter 1
Algorithms
- Basic Definition A set procedure to process information. A correct algorithm is defined as: Any algorithm that creates the desired relationship between the input and output values.
Algorithms - Examples - Sorting Algorithms Insertion Sort Original Input Find the first incorrect placement Sort the next incorrect placement Final sorted input Merge Sort Grouped Organize * Final sorted input * This step takes a lot longer than the others Insertion sort is efficient when sorting small amounts of numbers. Merge sort is efficient with large amounts of numbers.
Data Structures
Data Structures - Basic Definition A means of storing data. Does not have to be organized. Usually created for a specific purpose or situation. Use the data structure best suited for your problem to allow your algorithm to be as efficient as possible.
NP-Complete Problems
NP-Complete Problems - Basic Definition A problem without an efficient algorithm. If an efficient algorithm exists for one it works for all.
Efficiency
- Basic Definition Efficiency determines how well designed an algorithm is. Efficiency does not have to be measured in time. Efficiency can be found by creating a formula of each part in the algorithm based on a variable and solving for that variable.
And now for something completely different... We will take a short break from algorithms and chapter 2 to work on math concepts in chapter 3.
Chapter 3
All Greek to me - - Pronounced theta Used in graphing curves and parabolas to create an upper and lower bound. Original function Asymptotic lower bounds Asymptotic upper bounds Starting point for the asymptotic bind
All Greek to me - f(n) = (g(n)) Data being tested Theta creates an upper and lower bounds so that the data stays within an acceptable range. Because the base of both sides is (n) the equation is asymptotically tight bound. The coeficients of n do not matter as long as the term stays basically the same.
All Greek to me - Asymptotically tight boundNot asymptotically tight bound f(n) = (g(n))f(n²) = (g(n)) Because n is on both sides of the equation. Because one side contains n² and the other contains n¹.
All Greek to me - O O - Pronounced big-oh Starting point for the asymptotic bind Asymptotic upper bounds Original function Used in graphing curves and parabolas to create an upper bound.
All Greek to me - O O follows all the same rules as does with the exception that it is only for creating an upper bounds and not a lower one.