Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Algorithms Book by Thomas H. Cormen Charles E. Leiserson Ronald L. Rivest and Clifford Stein Powerpoint by Michael Block.

Similar presentations


Presentation on theme: "Introduction to Algorithms Book by Thomas H. Cormen Charles E. Leiserson Ronald L. Rivest and Clifford Stein Powerpoint by Michael Block."— Presentation transcript:

1 Introduction to Algorithms Book by Thomas H. Cormen Charles E. Leiserson Ronald L. Rivest and Clifford Stein Powerpoint by Michael Block

2 Chapter 1

3 Algorithms

4 - 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.

5 Algorithms - Examples - Sorting Algorithms Insertion Sort 1473147314731473 Original Input Find the first incorrect placement Sort the next incorrect placement Final sorted input Merge Sort 14731473 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.

6 Data Structures

7 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.

8 NP-Complete Problems

9 NP-Complete Problems - Basic Definition A problem without an efficient algorithm. If an efficient algorithm exists for one it works for all.

10 Efficiency

11 - 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.

12 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.

13 Chapter 3

14 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

15 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.

16 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¹.

17 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.

18 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.


Download ppt "Introduction to Algorithms Book by Thomas H. Cormen Charles E. Leiserson Ronald L. Rivest and Clifford Stein Powerpoint by Michael Block."

Similar presentations


Ads by Google