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

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

View Full Document Right Arrow Icon
B.B. Karki, LSU 4.2 CSC 3102 Analysis of Algorithmic Efficiency
Background image of page 1

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

View Full DocumentRight Arrow Icon
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
Background image of page 2
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
Background image of page 3

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

View Full DocumentRight Arrow Icon
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.
Background image of page 4
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
Background image of page 5

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

View Full DocumentRight Arrow Icon
B.B. Karki, LSU 4.7 CSC 3102 Examples: Input Size and Basic Operation Basic operation Input size measure Problem Visiting a vertex or
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.

This note was uploaded on 10/06/2009 for the course CSC 3102 taught by Professor Kraft,d during the Fall '08 term at LSU.

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 Right Arrow Icon
Ask a homework question - tutors are online