# feb9 - Illinois Institute of Technology Department of...

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

Illinois Institute of Technology Department of Computer Science Lecture 6: February 9, 2009 CS 430 Introduction to Algorithms Spring Semester, 2009 1 Lower Bounds on Sorting All of the sorting algorithms that we have seen have been based on element comparisons a i : a j of the items being sorted; all of them use Ω( n log n ) such comparisons. Today we’ll see that this is no coincidence: Any sorting algorithm based on comaprisons of the elements being sorted must use that many element comparisons in both the worst case and on the average. In this discussion we will consider only the case in which no two elements are equal, so such a comparison results in either a > or < answer, never =. Any sorting algorithm that works correctly for all inputs must work for this type of input. For a fixed value of n , we can take such a sorting algorithm and expand it into a binary decision tree in which internal nodes are the comparisons and leaves are the sorted elements—that is, a leaf corresponds to a permutation of the input elements. For the algorithm to sort correctly, each of the possible n ! permutations

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.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern