Lecture 4: Quicksort, Randomized Algorithms

author: Charles E. Leiserson, Department of Brain and Cognitive Sciences, Massachusetts Institute of Technology, MIT
recorded by: Massachusetts Institute of Technology, MIT
published: Feb. 10, 2009,   recorded: September 2005,   views: 12840
released under terms of: CC BY-NC-SA
You might be experiencing some problems with Your Video player.

Slides

Slides
0:00 Introduction to Algorithms - Lecture 4
0:16 Quicksort
2:15 Divide and conquer
5:17 Partitioning subroutine
11:39 Example of partitioning (1)
12:26 Example of partitioning (2)
12:30 Example of partitioning (2)
12:37 Example of partitioning (3)
12:57 Example of partitioning (4)
13:02 Example of partitioning (5)
13:09 Example of partitioning (6)
13:24 Example of partitioning (7)
14:32 Example of partitioning (8)
14:47 Example of partitioning (9)
14:57 Example of partitioning (10)
15:15 Example of partitioning (11)
15:55 Pseudocode for quicksort
18:57 Analysis of quicksort
20:53 Worst-case of quicksort
24:16 Worst-case recursion tree (1)
24:37 Worst-case recursion tree (2)
24:43 Worst-case recursion tree (3)
25:11 Worst-case recursion tree (4)
25:36 Worst-case recursion tree (5)
26:15 Worst-case recursion tree (6)
26:20 Worst-case recursion tree (7)
28:43 Best-case analysis
33:29 Analysis of "almost-best"case (1)
33:35 Analysis of "almost-best"case (2)
33:47 Analysis of "almost-best"case (3)
34:49 Analysis of "almost-best"case (4)
36:44 Analysis of "almost-best"case (5)
41:16 More intuition
46:31 Randomized quicksort
51:05 Randomized quicksort analysis (1)
57:48 Randomized quicksort analysis (2)
60:54 Calculating expectation (1)
61:57 Calculating expectation (2)
63:08 Calculating expectation (3)
65:01 Calculating expectation (4)
67:05 Calculating expectation (5)
68:22 Hairy recurrence
74:57 Substitution method (1)
76:13 Substitution method (2)
76:58 Substitution method (3)
78:07 Substitution method (4)
79:08 Quicksort in practice

Related content

Report a problem or upload files

If you have found a problem with this lecture or would like to send us extra material, articles, exercises, etc., please use our ticket system to describe your request and upload the data.
Enter your e-mail into the 'Cc' field, and we will keep you updated with your request's status.
Lecture popularity: You need to login to cast your vote.
 
    Delicious Bibliography

Description

"OK. Today we are going to talk about a very interesting algorithm called Quicksort -- -- which was invented by Tony Hoare in 1962. And it has ended up being a really interesting algorithm from many points of view. And because of that, it turns out today's lecture is going to be both hard and fast. If you see the person next to you sleeping, you will want to say let's get going. It's a divide-and-conquer algorithm..."

See Also:

Launch Windows Media PlayerLaunch in a standalone WM Player

WMedia PlayerSwitch to Windows Media Player

Download slides icon Download slides: mit6046jf05_leiserson_lec04_01.pdf (362.1 KB)

Download Video - generic video source Download mit6046jf05_leiserson_lec04_01.m4v (Video - generic video source 167.7 MB)

Download Video - generic video source Download mit6046jf05_leiserson_lec04_01.rm (Video - generic video source 128.9 MB)

Download Video Download mit6046jf05_leiserson_lec04_01.flv (Video 226.0 MB)

Download Video Download mit6046jf05_leiserson_lec04_01.wmv (Video 703.6 MB)

Download audio transcript Download mit6046jf05_leiserson_lec04_01.mp3 (Audio lecture 18.6 MB)


Help icon Streaming Video Help

WebLink icon Windows Media Player Firefox Plugin - Download

Link this page

Would you like to put a link to this lecture on your homepage?
Go ahead! Copy the HTML snippet !

Reviews and comments:

Comment1 mahafuz aziz aveek, February 22, 2009 at 10:09 a.m.:

this site is really helpful if somebody wants to take help from this site....so help ur self instead of begging help from others....
thanks


Comment2 maha, April 6, 2009 at 6:53 p.m.:

good site.... thank u for this lecture :)


Comment3 SIJU.C.C, January 7, 2011 at 7:17 p.m.:

Very nice class..really it helped me a lot.Thank you so much sir


Comment4 Talha, April 10, 2011 at 9:25 a.m.:

its very helpfull


Comment5 Ozgur, June 13, 2011 at 1:19 p.m.:

ProgrammingPages.net - http://www.programmingpages.net
Best Programming Resources and Source Code Examples for Java, Php, Visual Basic, C++ ,Asp, Python, Javascript, Ada, Cobol ,C, C#, Delphi, Fortran, Logo, Ruby, Xml.
Programming E-Book, Video Tutorials, History, Algorithms and Faqs.


Comment6 vikram chauhan, August 8, 2011 at 8:52 p.m.:

want to know the quick sort


Comment7 Pap , January 16, 2013 at 11 p.m.:

Very nice video. Thanks professor for such a nice explanation.

Write your own review or comment:

make sure you have javascript enabled or clear this field: