Lecture7

# Lecture7 - Algorithms in Systems Engineering IE170 Lecture...

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

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

View Full Document

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Algorithms in Systems Engineering IE170 Lecture 7 Dr. Ted Ralphs IE170 Lecture 7 1 References for Today’s Lecture • Required reading – CLRS Chapter 6 • References – D.E. Knuth, The Art of Computer Programming, Volume 3: Sorting and Searching (Third Edition), 1998. – R. Sedgewick, Algorithms in C++ (Third Edition), 1998. IE170 Lecture 7 2 The Sorting Problem • We will now undertake a more formal study of algorithms for the sorting problem . • This problem is fundamental to the study of algorithms. • Most often, the items to be sorted are individual records , usually consisting of a key and related satellite data . • Recall our previous definition (slightly generalized here). Input : A sequence of n records a 1 , a 2 , . . . , a n . Output : A reordering a 1 , a 2 , . . . , a n of the input sequence such that a 1 ≤ a 2 ≤ ··· ≤ a n . • Note that the records can be anything for which a “ ≤ ” operator can be defined (usually by comparing the specified key). • We may be interested in sorting the same list in more that one way. • What are some contexts in which sorting is important? IE170 Lecture 7 3 Sorting Algorithms • It is safe to say that there are more algorithms for sorting than any other single problem. • There are so many fundamentally different ways of solving this problem that entire books have been devoted to the topic. • It is known that the running time of any comparison-based sorting algorithm is in Ω( n lg n ) ( why ?). • Any algorithm whose worst-case running time matches this lower bound is said to be asymptotically optimal or just optimal . • Many of the known algorithms, including merge sort are optimal....
View Full Document

{[ snackBarMessage ]}

### Page1 / 14

Lecture7 - Algorithms in Systems Engineering IE170 Lecture...

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

View Full Document
Ask a homework question - tutors are online