Department of Computer and Information Science, School of Science, IUPUI - PowerPoint PPT Presentation

1 / 11
About This Presentation
Title:

Department of Computer and Information Science, School of Science, IUPUI

Description:

School of Science, IUPUI. Dale Roberts, Lecturer. Computer Science, IUPUI ... Comparison of Growth Rates. Functions in Increasing Order. Dale Roberts ... – PowerPoint PPT presentation

Number of Views:37
Avg rating:3.0/5.0
Slides: 12
Provided by: dalero
Category:

less

Transcript and Presenter's Notes

Title: Department of Computer and Information Science, School of Science, IUPUI


1
Department of Computer and Information
Science,School of Science, IUPUI
CSCI 240
Analysis of Algorithms Growth Rates
Dale Roberts, Lecturer Computer Science,
IUPUI E-mail droberts_at_cs.iupui.edu
2
Choosing n in t(n)
  • The analysis of algorithms attempts to optimize
    some critical resource. The critical resource
    usually chosen is time, so t(n) represents a time
    function.
  • t(n) is influenced by hardware and compiler.
    Other factors include the algorithm used and
    input to the algorithm.
  • Parameter n, usually referring to number of data
    items processed, affects running time most
    significantly.
  • n may be degree of polynomial, size of file
    to be sorted or searched, number of nodes in a
    graph, etc.

3
Best Case, Worse Case and Average Case Defined
  • Best case is amount of time program would take
    with best possible input configuration
  • best case is found for input and easier to find
    not usually the metric chosen
  • Worst case is amount of time program would take
    with worst possible input configuration
  • worst case is found for input and easier to find
    usually the metric chosen
  • Average case is amount of time a program is
    expected to take using "typical" input data
  • definition of "average" can affect results
  • average case is much harder to compute

4
Average Case and Worse Case
  • An algorithm may run faster on certain data sets
    than on others.
  • Finding the average case can be very difficult,
    so typically algorithms are measured by the
    worst-case time complexity.
  • Also, in certain application domains (e.g., air
    traffic control, surgery, IP lookup) knowing the
    worst-case time complexity is of crucial
    importance.

5
Comparison of Growth Rates
  • Functions in Increasing Order

6
Comparison of Growth Rates (cont)
7
Comparison of Growth Rates (cont)
8
Comparison of Growth Rates (cont)
9
Comparison of Growth Rates (cont)
10
Comparison of Growth Rates (cont)
11
Acknowledgements
  • Philadephia University, Jordan
  • Nilagupta, Pradondet
Write a Comment
User Comments (0)
About PowerShow.com