4-Complexity_Analysis

4-Complexity_Analysis - CMPT 225 Unit 4 Computational...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
CMPT 225 Computational Complexity Analysis and Big O Notation Unit 4
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CMPT 225 2 Our Objectives • At the end of this unit, we will be able to … • Analyze the time and space efficiency of algorithms (such as insertion, deletion, searching, sorting) associated with various data structures and express this efficiency using the Big O( ) notation • Given a set of client’s requirements, select or design most efficient algorithms associated with data structures when developing a “good” software solution
Background image of page 2
CMPT 225 3 Motivation When developing a software solution (solution to a problem statement and a set of requirements), it may be the case that more than one data structures satisfy the requirements, therefore one must choose a data structure (and its set of operations) To implement the data structure’s set of operations, one may also have a choice of algorithms
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CMPT 225 4 Motivation: Example Imagine that a client requires a software application which is to manipulate lots of data More specifically, users will insert and remove data frequently Therefore, it would be nice if these 2 operations were implemented such that they performed efficiently So, for example, one may choose to use an ADT List as part of this software solution, then one may choose to implement this List using a linked list as an underlying data structure, then one may choose to implement the insert and the remove operations i.e., choosing their algorithms – this implies the way the linked list is built such that these operations indeed perform efficiently
Background image of page 4
CMPT 225 5 Other Examples of Efficiency-Related Requirements For example, the following are requirements (from client) that would lead us to choose efficient algorithms and data structures in designing and implementing our software solution: “The need to constantly access the list of our customers” Data being searched/added/removed frequently “Online search engine” “The response from the system (e.g.: a real time system such as an air traffic control systems ) must be near instantaneous”
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CMPT 225 So How Does One Choose? Assumption: efficient algorithm, once implemented, leads to efficient performance To choose an efficient algorithm amongst many One first determine the efficiency of the candidates (algorithms) • How efficient is an algorithm at using available resources when executing • Resources: memory (space) and execution time Then based on the comparison of their efficiency, one selects the most efficient 6
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 39

4-Complexity_Analysis - CMPT 225 Unit 4 Computational...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online