algo analysis

21
Algorithm analysis CSC 391

Upload: shakila-mahjabin

Post on 20-Nov-2014

134 views

Category:

Education


1 download

DESCRIPTION

CSC-391. Data Structure and Algorithm course material

TRANSCRIPT

Page 1: Algo analysis

Algorithm analysisCSC 391

Page 2: Algo analysis

Polynomials in running time

Desirable scaling property.

When the input size doubles, the algorithm should only slow down by some constant factor C.

We say that an algorithm is efficient if has a polynomial running time.

Page 3: Algo analysis

Cost of basic operations

Observation. Most primitive operations take constant time

Page 4: Algo analysis
Page 5: Algo analysis
Page 6: Algo analysis
Page 7: Algo analysis
Page 8: Algo analysis
Page 9: Algo analysis

Factors affecting running time

Page 10: Algo analysis
Page 11: Algo analysis
Page 12: Algo analysis
Page 13: Algo analysis
Page 14: Algo analysis
Page 15: Algo analysis
Page 16: Algo analysis
Page 17: Algo analysis
Page 18: Algo analysis
Page 19: Algo analysis

** The difference between Big O notation and Big Omega notation is that Big O is used to describe the worst case running time for an algorithm. But, Big Omega notation, on the other hand, is used to describe the best case running time for a given algorithm.

Page 20: Algo analysis

Big-Theta notation

Page 21: Algo analysis