Lecture01 - CSE 830: Design and Theory of Algorithms Dr....

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

View Full Document Right Arrow Icon
1 CSE 830: Design and Theory of Algorithms Dr. Eric Torng torng@msu.edu 2144 EB Algorithm Analysis Overview RAM model of computation Concept of input size Measuring complexity Best-case, average-case, worst-case Asymptotic analysis Asymptotic notation The RAM Model • RAM model represents a “generic” implementation of the algorithm • Each “simple” operation (+, -, =, if, call) takes exactly 1 step. • Loops and subroutine calls are not simple operations, but depend upon the size of the data and the contents of a subroutine. We do not want “sort” to be a single step operation. • Each memory access takes exactly 1 step.
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 Input Size In general, larger input instances require more resources to process correctly We standardize by defining a notion of size for an input instance Examples What is the size of a sorting input instance? What is the size of an “Odd number” input instance? Algorithm Analysis Overview RAM model of computation Concept of input size Measuring complexity Best-case, average-case, worst-case Asymptotic analysis Asymptotic notation Measuring Complexity The running time of an algorithm is the function defined by the number of steps (or amount of memory) required to solve input instances of size n F(1) = 3 F(2) = 5 F(3) = 7 –… F(n) = 2n+1 Problem: Inputs of the same size may require different numbers of steps to solve
Background image of page 2
3 3 different analyses •T h e worst case running time of an algorithm is the
Background image of page 3

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

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 10

Lecture01 - CSE 830: Design and Theory of Algorithms Dr....

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online