1 / 26

Lecture 3 Sorting and Selection

In this lecture, we delve into various sorting algorithms, specifically focusing on comparison sorting, counting sort, and radix sort. We'll analyze their running times, including the stable characteristics of counting sort and the applications of radix sort. Additionally, we discuss the selection problem and the lower bound for comparison-based sorting. The lecture highlights randomized selection techniques that achieve expected linear time using O(n) comparisons. Join us as we dissect fundamental concepts and enhance understanding of sorting methodologies.

Download Presentation

Lecture 3 Sorting and Selection

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lecture 3 Sorting and Selection

  2. Comparison Sort

  3. Decision Tree

  4. Running Time Is there a faster sorting of other type?

  5. Counting sort

  6. Counting sort (Running Time)

  7. A Student’s Variation

  8. Counting sort is stable. That is, the same value appear in the output array in the same order as they do in the input array.

  9. Radix Sort

  10. Running Time

  11. An Application: Selection Problem

  12. If we use comparison, what is the lower bound?

  13. Randomized Selection

  14. Running time

  15. Selection with O(n) Comparisons

  16. Why? See next page!!!

  17. ( + low side) contains red part ( + high side) contains blue part

  18. Analysis

  19. Analysis

  20. What we learnt in this lecture? • What is “comparison sort”?. • Lower bound for comparison sort. • Counting sort and Radix sort. • What is selection problem? • expected linear time andlinear time selections.

  21. Puzzle

More Related