1 / 12

Algorithm Analysis (Time complexity)

Algorithm Analysis (Time complexity). Software development cycle Four phases: Analysis Design Design an algorithm to solve the problem or sub- problem. Algorithm is s tep by step problem-solving process, and solution obtained in finite amount of time. Implementation

Download Presentation

Algorithm Analysis (Time complexity)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Algorithm Analysis (Time complexity)

  2. Software development cycle • Four phases: • Analysis • Design • Design an algorithm to solve the problem or sub- problem. Algorithm is step by step problem-solving process, and solution obtained in finite amount of time. • Implementation • Testing and Debugging

  3. Algorithm Analysis: The Big-O Notation (cont’d.) • By analyzing a particular algorithm, we usually count the number of Primitive Operations: • Assigning a value to a variable • Calling a function • Performing an arithmetic operation • Comparing two values • Returning from a function

  4. The Big-O Notation (cont’d.) • The following table shows each of the seven common functions used in algorithm analysis in order of growth rates. • Examples: • 1- F(n) = 5n2 + 3n log n + 2n + 5 • We say the function F(n) is O(n2) or Big-O of n2 • 2- F(n)= 3 log n + 2 • We say the function F(n) is O(log n) or Big-O of log n • 3- F(n)= 2n + 100 log n • We say the function F(n) is O(n) or Big-O of n

More Related