Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Standard view
Full view
of .
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1


Ratings: (0)|Views: 2|Likes:
Published by satyam
Uploaded from Google Docs
Uploaded from Google Docs

More info:

Published by: satyam on Mar 27, 2011
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less





Synopsis of 
Submitted by:
Name:satyam pandey
Roll no:04
Reg no:10807962
Submitted to:
Hardeep kaur 
Quick sort
1. History
2. Algorithm
2.1 Parallelization
3. Formal Analysis
3.1 Randomized Quick sort Expected Complexity
3.2 Average Complexity
3.3 Space Complexity
4. Selection Based Pivoting
5. Variants
6. Comparison With Other Sorting Algorithms
Flash sort
1. History
2. Efficiency
Intro sort
Q sort
1. Prototype
2. Behavior
 As we all know the basic and best procedure for programming or any other work is step by stepdescription, such description is called as Algorithm. It is well known that the information- theoreticlower bound for comparison based sorting algorithm is
n!] = Ω( ) comparisons for n keys. We ask whether or not we can expect those comparisons to be evenly distributed over the keys. Clearly somealgorithms on some inputs will use fewer total comparisons and some keys can be rarely used.
However, we want to know if every sorting algorithm has some inputs which cause the distribution of comparisons to be “ equitable”, i.e., no keys being involved in just a few comparisons. We restrict our attention to algorithms that use pair-wise comparisons.
is a well-known sorting algorithm developed by C. A. R. Hoare that, onaverage makesΘ(
) (big O notation) comparisons to sort
items. In the worstcase, it makes Θ(
) comparisons,
though if implemented correctly this behavior is rare. Typically, quicksort is significantly faster inpractice than other Θ(
) algorithms, because its inner loop can be efficiently implemented on mostarchitectures, and in most real-world data, it is possible to make design choices which minimize the
probability of requiring quadratic time Additionally, quicksort tends to make excellent usage of thememory hierarchy, taking perfect advantage of virtual memory and available caches. Coupled with thefact that quicksort is an in-place sort and uses no temporary memory, it is very well suited to modern
computer architectures.
The quick sort algorithm was developed by C. A. R. Hoare while in the Soviet Union, as a visiting
student at Moscow State University. At that time, Hoare worked in a project on machine translation for the National Physical Laboratory. He developed the algorithm in order to sort the words to betranslated, to make them more easily matched to an already-sorted Russian-to-English dictionary thatwas stored on magnetic tape
Comparison with other sorting algorithms
Quick sort is a space-optimized version of the binary tree sort. Instead of inserting items sequentiallyinto an explicit tree, quick sort organizes them concurrently into a tree that is implied by the recursivecalls. The algorithms make exactly the same comparisons, but in a different order.The most direct competitor of quick sort is heap sort . Heap sorts worst-case running time is alwaysΘ(
). But, heap sort is assumed to be in average somewhat slower than quick sort. This is stilldebated and in research, with some publications indicating the opposite. In Quick sort remains thechance of worst case performance except in the intro sort variant, which switches to heap sort when abad case is detected. If it is known in advance that heap sort is going to be necessary, using it directlywill be faster than waiting for intro sort to switch to it.Quick sort also competes with merge sort, another recursive sort algorithm but with the benefit of worst-case Θ(
) running time. Merge sort is a stable sort , unlike quick sort and heap sort, and canbe easily adapted to operate on linked lists and very large lists stored on slow-to-access media such asdisk storage or network attached storage. Although quick sort can be written to operate on linked lists,
it will often suffer from poor pivot choices without random access. The main disadvantage of mergesort is that, when operating on arrays, it requires Θ(
) auxiliary space in the best case, whereas thevariant of quick sort with in-place partitioning and tail recursion uses only Θ(log
) space. (Note that
when operating on linked lists, merge sort only requires a small, constant amount of auxiliary storage.)Bucket sort with two buckets is very similar to quick sort; the pivot in this case is effectively the value
in the middle of the value range, which does well on average for uniformly distributed inputs.
Flash sort
Flash sort
is a sorting algorithm with extremely good O(n) efficiency for balanced data sets, publishedin 1998 by Karl-Dietrich Neubert.
 Flash sort works based on the principle that in either a randomized or partially-ordered data set inwhich data are in a balanced distribution, one can immediately estimate where an item should be placedwhen one knows the range of the set. This approximate location is called the
of an item
, and iscomputed as

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->