November 9

November 9 - CSCI 2670 Introduction to Theory of Computing November9,2005 Agenda Yesterday Today Section7.1 Chapter7 Remainderofsemester November 9

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

View Full Document Right Arrow Icon
CSCI 2670 Introduction to Theory of Computing November 9, 2005
Background image of page 1

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

View Full DocumentRight Arrow Icon
November 9, 2005 Agenda Yesterday Review of undecidability proofs Today Section 7.1 Remainder of semester Chapter 7
Background image of page 2
November 9, 2005 Complexity of algorithms Among decidable problems, we still have  levels of  difficulty  for algorithms We may consider an algorithm more difficult for a  variety of reasons Takes longer to execute Requires more memory to execute Time complexity:  Given an algorithm and an input  string, how long will the algorithm take to  execute?
Background image of page 3

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

View Full DocumentRight Arrow Icon
November 9, 2005 Example INSERTION-SORT(A) 1. For j = 2 to length(A) 2.    key := A[j] 3.    i := j-1 4.    While i > 0 and A[i] > key 5.       A[i+1] := A[i] 6.       i := i-1 7.    A[i+1] := key       
Background image of page 4
November 9, 2005 Trace 4 6 1 8 5 3  4 Next look at 1 1 4 6 8 5 3 8 is okay Move 5 then move 3 1 4 5 6 8 3 1 3 4 5 6 8
Background image of page 5

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

View Full DocumentRight Arrow Icon
November 9, 2005 How long does insertion sort take? Two loops
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 02/07/2011 for the course CS 501 taught by Professor Sm during the Spring '11 term at Indiana.

Page1 / 16

November 9 - CSCI 2670 Introduction to Theory of Computing November9,2005 Agenda Yesterday Today Section7.1 Chapter7 Remainderofsemester November 9

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