{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# DA04 - Analysis of Algorithmic Efficiency CSC 3102 4.2 B.B...

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

B.B. Karki, LSU 4.2 CSC 3102 Analysis of Algorithmic Efficiency

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

View Full Document
B.B. Karki, LSU 4.3 CSC 3102 Analysis Framework Two kinds of efficiency: Time efficiency: How fast an algorithm runs Space efficiency: Deals with extra memory space an algorithm requires We often deal with time efficiency. Input’s size Time’s units Order of growth
B.B. Karki, LSU 4.4 CSC 3102 Measuring an Input’s Size Efficiency as a function of some parameter n indicating the algorithm’s input size Size of the list for the problems of sorting or searching Degree of polynomial for the problem of evaluating a polynomial: Choice of input-size parameter does matter in some situations Operations of the algorithm can affect the choice Size of inputs for algorithms involving properties of numbers is often expressed by the number b of bits in the n s binary representation: p ( x ) = a n x n + a n 1 x n 1 + ..... + a 0 b = log 2 n + 1

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

View Full Document
B.B. Karki, LSU 4.5 CSC 3102 Time Efficiency: Units and Analyses Standard unit of time measurement - a second, a millisecond, and so on Measure the running time of a program implementing the algorithm. Basic operation: the operation that contributes most towards the running time of the algorithm Count the number of repetitions of the basic operation Mathematical (or theoretical) analysis of an algorithm’s efficiency Independent of specific inputs Limited applicability. Empirical (or experimental) analysis of an algorithm’s efficiency Applicable to any algorithm Results dependent on the particular sample of instances and the computer used.
B.B. Karki, LSU 4.6 CSC 3102 Mathematical Analysis Time efficiency is analyzed by determining the number of repetitions of the basic operation as a function of input size. T ( n ) c op C ( n ) running time execution time for basic operation on a particular computer number of times basic operation is executed n is input size

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

View Full Document
B.B. Karki, LSU 4.7 CSC 3102 Examples: Input Size and Basic Operation Basic operation Input size measure Problem Visiting a vertex or
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 20

DA04 - Analysis of Algorithmic Efficiency CSC 3102 4.2 B.B...

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

View Full Document
Ask a homework question - tutors are online