4-Complexity_Analysis

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

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

CMPT 225 Computational Complexity Analysis and Big O Notation Unit 4

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

View Full Document
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
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

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

View Full Document
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
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”

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

View Full Document
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
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 01/29/2012 for the course CMPT 225 taught by Professor Annelavergne during the Summer '07 term at Simon Fraser.

### 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
Ask a homework question - tutors are online