Analyzing algorithms

 

CS 241: Data Structures
Lecture #1: Algorithms and analysis

Analyzing algorithms
bullet Criteria for selection given a modular approach to programming, we are interested in finding the "best" algorithm to implement a particular problem; so we must be able to compare algorithms

Control bar


















































 

CS 241: Data Structures
Lecture #1: Algorithms and analysis

Analyzing algorithms
bullet Criteria for selection
bullet Criteria for algorithm selection there are a number of criteria which we might use to choose one algorithm over another; some of these are extrinsic and/or subjective, but still important (e.g., clarity, ease of implementation)

Control bar


















































 

CS 241: Data Structures
Lecture #1: Algorithms and analysis

Analyzing algorithms
bullet Criteria for selection
bullet Criteria for algorithm selection
bullet Time, space and other resources among the more intrinsic and objective criteria involvethe algorithm's usage of computer resources, including time, space (of several kinds) or communication bandwidth

Control bar


















































 

CS 241: Data Structures
Lecture #1: Algorithms and analysis

Analyzing algorithms
bullet Criteria for selection
bullet Criteria for algorithm selection
bullet Time, space and other resources
bullet Resource usage in context (I) the same program, when run on different machines, may display different resource usage

Control bar


















































 

CS 241: Data Structures
Lecture #1: Algorithms and analysis

Analyzing algorithms
bullet Criteria for selection
bullet Criteria for algorithm selection
bullet Time, space and other resources
bullet Resource usage in context (I)
bullet Resource usage in context (II) the same program, when implemented in different languages, may display different resource usage

Control bar


















































 

CS 241: Data Structures
Lecture #1: Algorithms and analysis

Analyzing algorithms
bullet Criteria for selection
bullet Criteria for algorithm selection
bullet Time, space and other resources
bullet Resource usage in context (I)
bullet Resource usage in context (II)
bullet Resource usage in context (III) the same program, when run at different times on the same data, may display different resource usage

Control bar


















































 

CS 241: Data Structures
Lecture #1: Algorithms and analysis

Analyzing algorithms
bullet Criteria for selection
bullet Criteria for algorithm selection
bullet Time, space and other resources
bullet Resource usage in context (I)
bullet Resource usage in context (II)
bullet Resource usage in context (III)
bullet Detailed versus broad analyses

Control bar