<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">OJMSi</journal-id><journal-title-group><journal-title>Open Journal of Modelling and Simulation</journal-title></journal-title-group><issn pub-type="epub">2327-4018</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/ojmsi.2016.41001</article-id><article-id pub-id-type="publisher-id">OJMSi-63185</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Physics&amp;Mathematics</subject></subj-group></article-categories><title-group><article-title>
 
 
  On the Convergence of the Dual-Pivot Quicksort Process
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Mahmoud</surname><given-names>Ragab</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Beih</surname><given-names>El-Sayed El-Desouky</given-names></name><xref ref-type="aff" rid="aff2"><sup>2</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Nora</surname><given-names>Nader</given-names></name><xref ref-type="aff" rid="aff2"><sup>2</sup></xref></contrib></contrib-group><aff id="aff2"><addr-line>Department of Mathematics, Faculty of Science, Mansoura University, Mansoura, Egypt</addr-line></aff><aff id="aff1"><addr-line>Department of Mathematies, Faculty of Science, Al Azhar University, Cairo, Egypt</addr-line></aff><pub-date pub-type="epub"><day>29</day><month>01</month><year>2016</year></pub-date><volume>04</volume><issue>01</issue><fpage>1</fpage><lpage>15</lpage><history><date date-type="received"><day>19</day>	<month>November</month>	<year>2015</year></date><date date-type="rev-recd"><day>accepted</day>	<month>26</month>	<year>January</year>	</date><date date-type="accepted"><day>29</day>	<month>January</month>	<year>2016</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
  Sorting an array of objects such as integers, bytes, floats, etc is considered as one of the most important problems in Computer Science. Quicksort is an effective and wide studied sorting algorithm to sort an array of n distinct elements using a single pivot. Recently, a modified version of the classical Quicksort was chosen as standard sorting algorithm for Oracles Java 7 routine library due to Vladimir Yaroslavskiy. The purpose of this paper is to present the different behavior of the classical Quicksort and the Dual-pivot Quicksort in complexity. In Particular, we discuss the convergence of the Dual-pivot Quicksort process by using the contraction method. Moreover we show the distribution of the number of comparison done by the duality process converges to a unique fixed point.
 
</p></abstract><kwd-group><kwd>Randomized Quicksort</kwd><kwd> Convergence</kwd><kwd> Dual-Pivot Quicksort Process</kwd><kwd> Running Time Analysis</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>Quicksort is one of the important sorting algorithms. Hoare [<xref ref-type="bibr" rid="scirp.63185-ref1">1</xref>] proposed an algorithm depended on selecting an arbitrary element from the array. This element called a pivot element such that Quicksort algorithm used for parting the arrays into two sub-arrays: those smaller than the pivot and those larger than the pivot [<xref ref-type="bibr" rid="scirp.63185-ref2">2</xref>] .</p><p>After that Quicksort depends on recursive sorting of the two subarrays. Later Sedgewick studied several variants.</p><p>Regnier [<xref ref-type="bibr" rid="scirp.63185-ref3">3</xref>] studied the limiting distribution of the number of comparisons done by Quicksort algorithm when suitably normalized. It converges with uncertain unknown limit. The first accounts were computed by Hennequin who proved that this distribution is not a normal distribution. The limiting distribution is characterized by a stochastic fixed point equation [<xref ref-type="bibr" rid="scirp.63185-ref4">4</xref>] [<xref ref-type="bibr" rid="scirp.63185-ref5">5</xref>] . The cost of the Quicksort algorithm depends on the position of the selected pivot. There are many cases to choose the pivot element. The worst-case, the best-case and the average case express the performance of the algorithm. We will discuss some of them and for more details; we refer to Ragab [<xref ref-type="bibr" rid="scirp.63185-ref6">6</xref>] and [<xref ref-type="bibr" rid="scirp.63185-ref7">7</xref>] . The worst-case occurs when the pivot is the smallest (or largest) element at partitioning on array of size n, yielding one empty sub-array, one element (pivot) in the correct place and one sub-array of size n − 1. So, the two sub-arrays are lopsided so this case is defined by worst case [<xref ref-type="bibr" rid="scirp.63185-ref8">8</xref>] . We found the recursion depth is n − 1 levels and the complexity of Quicksort is<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x6.png" xlink:type="simple"/></inline-formula>. The best case occurs when the pivot is in the median at each partition step, i.e. after each partitioning, on array of size n, yielding two sub-arrays of approximately equal size and, the pivot element in the middle position takes n data comparisons [<xref ref-type="bibr" rid="scirp.63185-ref9">9</xref>] . There are various methods to choose a good pivot, like choosing the First element, Last element, and Median-of-three elements (selection three elements, and find the median of these elements), and so on. In this case the Quicksort algorithm selects a pivot by random selection each time. This choice reduces probability that the worst-case ever occurs. The other method, which essential prevents the worst case from ever occurring, picks a pivot as the median of the array each time. When we chose the pivot, we compare all other elements to it and we have n − 1 comparisons to divided the array. The choosing of the pivot divided the array into one sub-array of size 0 and one sub-array of size n − 1, or into a sub-array of size 1 and other one of size n − 2, and so on up to a sub-array of size n − 1 and one of size 0. We have n possible positions and each one is equality in probability 1/n. Hennequin studied comparisons for array by using Quicksort with r pivots when r = 2, same comparisons as classic Quicksort in one partitioning. When r &gt; 2, he found the problem is complied. Yaroslavskiy [<xref ref-type="bibr" rid="scirp.63185-ref10">10</xref>] introduced a new implementation of Dual-pivot Quicksort in Java 7’s runtime library. In 2012, Wild and Nabel denoted exact numbers of swaps and comparisons for Yaroslavskiy’s algorithm [<xref ref-type="bibr" rid="scirp.63185-ref10">10</xref>] . In this paper, our aim is to analyze the running time performance of Dual-pivot Quicksort. The limiting distribution of the normalized number of comparisons required by the Dual-pivot Quicksort algorithm is studied. It is known to be the unique fixed point of a certain distributional transformation T with zero mean and finite variance.</p><p>We show that using two pivot elements (or partitioning to three subarrays) is very efficient, particularly on large arrays. We propose the new Dual-pivot Quicksort scheme, faster than the known implementations, which improves this situation (see in [<xref ref-type="bibr" rid="scirp.63185-ref11">11</xref>] and [<xref ref-type="bibr" rid="scirp.63185-ref12">12</xref>] ). The implementation of the Dual-pivot Quicksort algorithm has been inspected on different inputs and primitive data types.</p><p>The new Quicksort algorithm uses partitioning a source array<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x7.png" xlink:type="simple"/></inline-formula>, where g is primitive array which we need to sort it. Such as int, float, byte, char, double, long and short, to three parts defined by two pivot elements p and q (and therefore, there are pointers A, B, C and left and right indices of the first and last elements respectively). The aim of this paper is to present such a version arising from an algorithm depending on the work in [<xref ref-type="bibr" rid="scirp.63185-ref13">13</xref>] and [<xref ref-type="bibr" rid="scirp.63185-ref14">14</xref>] . The Dual-pivot Quicksort is explained clearly in [<xref ref-type="bibr" rid="scirp.63185-ref15">15</xref>] and it works as follow:</p><p>1) For small arrays (length &lt; 17), use the Insertion sort algorithm [<xref ref-type="bibr" rid="scirp.63185-ref10">10</xref>] .</p><p>2) Choose two pivot elements p and q. We can get, for example, the first element <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x8.png" xlink:type="simple"/></inline-formula> as p and the last element <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x9.png" xlink:type="simple"/></inline-formula> as q.</p><p>3) p must be less than q, otherwise they are swapped. So, we have the following parts.</p><p>・ Part I with indices from left + 1 to A − 1 with elements, which are less than p.</p><p>・ Part II with indices from A to B − 1 with elements, which are greater or equal to p and less or equal to q.</p><p>・ Part III with indices from C + 1 to right − 1 with elements greater than q.</p><p>・ Part IV contains the rest of the elements to be examined with indices from B to C.</p><p>4) The next element <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x10.png" xlink:type="simple"/></inline-formula> from the part IV is compared with two pivots p and q, and placed to the corresponding part I, II, or III.</p><p>5) The pointers A, B, and C are changed in the corresponding directions.</p><p>6) The steps 4 - 5 are repeated while<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x11.png" xlink:type="simple"/></inline-formula>.</p><p>7) The pivot element p is swapped with the last element from part I, the pivot element q is swapped with the first element from part III.</p><p>8) The steps 1 - 7 are repeated recursively for every part I, part II, and part III as in <xref ref-type="fig" rid="fig1">Figure 1</xref>.</p><fig id="fig1"  position="float"><label><xref ref-type="fig" rid="fig1">Figure 1</xref></label><caption><title> Graph explains the dual-pivot quicksort algorithm</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/1-2860070x12.png"/></fig></sec><sec id="s2"><title>2. Run-Time Performance</title><p>In this section, we introduce some running time of the Dual-pivot Quicksort. An efficient procedure is described by Vasileios Iliopoulos and David B. Penman [<xref ref-type="bibr" rid="scirp.63185-ref13">13</xref>] , where they analyze the Dual pivot Quicksort algorithm. Their approach can be here provided and for more details we refer to [<xref ref-type="bibr" rid="scirp.63185-ref13">13</xref>] and [<xref ref-type="bibr" rid="scirp.63185-ref14">14</xref>] . First we introduce the algorithm of it and we compare between it and the classical Quicksort as follows [<xref ref-type="bibr" rid="scirp.63185-ref16">16</xref>] .</p><p>The following graphs show the relation between the size of array which need to sort and the time of complexity which represent by the number of comparisons and swaps as in <xref ref-type="fig" rid="fig2">Figure 2</xref>. We found the Dual-pivot Quicksort is faster than classical Quicksort.</p></sec><sec id="s3"><title>3. The Dual-Pivot Quicksort Average Case Analysis</title><p>To find the distributional equation, we note the following: for the underlying process, there are two parts. The first part is partitioning and the second is the total number of comparisons to sort an array of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x13.png" xlink:type="simple"/></inline-formula> keys, when the pivot is a uniform random variable <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x14.png" xlink:type="simple"/></inline-formula> is equal to the number of comparisons to sort the sub- array of on <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x15.png" xlink:type="simple"/></inline-formula> keys below the first pivot [<xref ref-type="bibr" rid="scirp.63185-ref17">17</xref>] .</p><p>In addition, we need to compute the number of comparisons to sort the sub-array of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x16.png" xlink:type="simple"/></inline-formula> elements above the second pivot plus the number of comparisons to sort the sub-array of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x17.png" xlink:type="simple"/></inline-formula> elements between the first and the second pivot.</p><p>Plus <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x18.png" xlink:type="simple"/></inline-formula> comparisons done to partition the array which come from when the all elements compare one time with the first pivot and the remain elements compare two times with the second and the first pivot. Therefore,</p><fig id="fig2"  position="float"><label><xref ref-type="fig" rid="fig2">Figure 2</xref></label><caption><title> Comparison between the classical Quicksort and the Dual-pivot Quicksort</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/1-2860070x19.png"/></fig><disp-formula id="scirp.63185-formula1"><label>(1)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/1-2860070x20.png"  xlink:type="simple"/></disp-formula><p>where the random variables<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x21.png" xlink:type="simple"/></inline-formula>, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x21.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x22.png" xlink:type="simple"/></inline-formula>and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x21.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x22.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x23.png" xlink:type="simple"/></inline-formula> are identically distributed and independent of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x21.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x22.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x23.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x24.png" xlink:type="simple"/></inline-formula> and<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x21.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x22.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x23.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x24.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x25.png" xlink:type="simple"/></inline-formula>. Here <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x21.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x22.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x23.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x24.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x25.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x26.png" xlink:type="simple"/></inline-formula> refers to the equality in distribution.</p><p>The array is partitioned into three subarrays one with <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x27.png" xlink:type="simple"/></inline-formula> keys smaller than the first pivot, a subarray of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x27.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x28.png" xlink:type="simple"/></inline-formula> keys between two pivots and the part of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x27.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x28.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x29.png" xlink:type="simple"/></inline-formula> elements greater than the second pivot. The algorithm is then recursively applied to each of these subarrays. The number of comparisons during the first stage is</p><disp-formula id="scirp.63185-formula2"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x30.png"  xlink:type="simple"/></disp-formula><p>where <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x31.png" xlink:type="simple"/></inline-formula> and<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x31.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x32.png" xlink:type="simple"/></inline-formula>. Using [<xref ref-type="bibr" rid="scirp.63185-ref11">11</xref>] , the average value of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x31.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x32.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x33.png" xlink:type="simple"/></inline-formula> can be calculated as follow:</p><disp-formula id="scirp.63185-formula3"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x34.png"  xlink:type="simple"/></disp-formula></sec><sec id="s4"><title>4. Expected Number of Comparisons</title><p>Here by Equation (1) and using [<xref ref-type="bibr" rid="scirp.63185-ref13">13</xref>] , it is easy to determine the recurrence for the expected number of comparisons due to the duality as follow:</p><disp-formula id="scirp.63185-formula4"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x35.png"  xlink:type="simple"/></disp-formula><p>Since the three double sums above are equal, then the recurrence becomes</p><disp-formula id="scirp.63185-formula5"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x36.png"  xlink:type="simple"/></disp-formula><p>setting<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x37.png" xlink:type="simple"/></inline-formula>,</p><disp-formula id="scirp.63185-formula6"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x38.png"  xlink:type="simple"/></disp-formula><p>By initial conditions we have<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x39.png" xlink:type="simple"/></inline-formula>. Multiplying both sides by<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x39.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x40.png" xlink:type="simple"/></inline-formula>, we obtain</p><disp-formula id="scirp.63185-formula7"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x41.png"  xlink:type="simple"/></disp-formula><p>We introduce a difference operator for the solution of this recurrence. The operator is defined by</p><disp-formula id="scirp.63185-formula8"><label>(2)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/1-2860070x42.png"  xlink:type="simple"/></disp-formula><p>And for higher orders</p><disp-formula id="scirp.63185-formula9"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x43.png"  xlink:type="simple"/></disp-formula><p>Thus, we have</p><disp-formula id="scirp.63185-formula10"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x44.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.63185-formula11"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x45.png"  xlink:type="simple"/></disp-formula><p>By definition (2),</p><disp-formula id="scirp.63185-formula12"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x46.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.63185-formula13"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x47.png"  xlink:type="simple"/></disp-formula><p>then</p><disp-formula id="scirp.63185-formula14"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x48.png"  xlink:type="simple"/></disp-formula><p>Dividing by<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x49.png" xlink:type="simple"/></inline-formula>, we obtain the telescoping recurrence</p><disp-formula id="scirp.63185-formula15"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x50.png"  xlink:type="simple"/></disp-formula><p>which yields</p><disp-formula id="scirp.63185-formula16"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x51.png"  xlink:type="simple"/></disp-formula><p>Multiplying by<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x52.png" xlink:type="simple"/></inline-formula>, this recurrence is transformed to a telescoping one</p><disp-formula id="scirp.63185-formula17"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x53.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.63185-formula18"><label>(3)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/1-2860070x54.png"  xlink:type="simple"/></disp-formula><p>By using maple V. Iliopoulos and D. B. Penman [<xref ref-type="bibr" rid="scirp.63185-ref13">13</xref>] get</p><disp-formula id="scirp.63185-formula19"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x55.png"  xlink:type="simple"/></disp-formula><p>And for the other sums in Equation (3):</p><disp-formula id="scirp.63185-formula20"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x56.png"  xlink:type="simple"/></disp-formula><p>Therefore,</p><disp-formula id="scirp.63185-formula21"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x57.png"  xlink:type="simple"/></disp-formula><p>Now the equation becomes</p><disp-formula id="scirp.63185-formula22"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x58.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.63185-formula23"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x59.png"  xlink:type="simple"/></disp-formula><p>Finally, the expected number of comparisons, when two pivots are chosen is</p><disp-formula id="scirp.63185-formula24"><label>(4)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/1-2860070x60.png"  xlink:type="simple"/></disp-formula><p>where <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x61.png" xlink:type="simple"/></inline-formula> is the harmonic number defined by <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x61.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x62.png" xlink:type="simple"/></inline-formula> (see [<xref ref-type="bibr" rid="scirp.63185-ref18">18</xref>] and [<xref ref-type="bibr" rid="scirp.63185-ref19">19</xref>] ).</p><p>This is the same value of the expected number of comparisons, when one pivot chosen in the classical Quicksort [<xref ref-type="bibr" rid="scirp.63185-ref20">20</xref>] . Note that this result for the dual Quicksort is identical with the expected number of comparisons in [<xref ref-type="bibr" rid="scirp.63185-ref13">13</xref>] .</p></sec><sec id="s5"><title>5. Varience of Comparisons</title><p>The main result of this section was obtained by [<xref ref-type="bibr" rid="scirp.63185-ref13">13</xref>] (see following results for explanation and notation). Now we compute the variance of the number of comparisons by Dual-pivot Quicksort. Recall that</p><disp-formula id="scirp.63185-formula25"><label>(5)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/1-2860070x63.png"  xlink:type="simple"/></disp-formula><p>From Equation (1), we have</p><disp-formula id="scirp.63185-formula26"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x64.png"  xlink:type="simple"/></disp-formula><p>noting that the resulting subarrays are independently sorted, then we get</p><disp-formula id="scirp.63185-formula27"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x65.png"  xlink:type="simple"/></disp-formula><p>Letting</p><disp-formula id="scirp.63185-formula28"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x66.png"  xlink:type="simple"/></disp-formula><p>be the ordinary probability generating function for the number of comparisons needed to sort n keys, we obtain</p><disp-formula id="scirp.63185-formula29"><label>(6)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/1-2860070x67.png"  xlink:type="simple"/></disp-formula><p>It holds that <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x68.png" xlink:type="simple"/></inline-formula> and<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x68.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x69.png" xlink:type="simple"/></inline-formula>. Moreover, the second order derivative of Equation (6) evaluated at <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x68.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x69.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x70.png" xlink:type="simple"/></inline-formula> is recursively given by</p><disp-formula id="scirp.63185-formula30"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x71.png"  xlink:type="simple"/></disp-formula><p>By simple manipulation of indices, the sums of the products of expected values are equal. The double sum of the product of the mean number of comparisons can be simplified as follows:</p><disp-formula id="scirp.63185-formula31"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x72.png"  xlink:type="simple"/></disp-formula><p>We find</p><disp-formula id="scirp.63185-formula32"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x73.png"  xlink:type="simple"/></disp-formula><p>The recurrence becomes</p><disp-formula id="scirp.63185-formula33"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x74.png"  xlink:type="simple"/></disp-formula><p>where <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x75.png" xlink:type="simple"/></inline-formula> is the second order harmonic number defined by <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x75.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x76.png" xlink:type="simple"/></inline-formula> (see [<xref ref-type="bibr" rid="scirp.63185-ref17">17</xref>] and [<xref ref-type="bibr" rid="scirp.63185-ref18">18</xref>] ). Letting <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x75.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x76.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x77.png" xlink:type="simple"/></inline-formula> and subtracting <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x75.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x76.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x77.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x78.png" xlink:type="simple"/></inline-formula> from<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x75.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x76.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x77.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x78.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x79.png" xlink:type="simple"/></inline-formula>, we get</p><disp-formula id="scirp.63185-formula34"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x80.png"  xlink:type="simple"/></disp-formula><p>By using the identity [<xref ref-type="bibr" rid="scirp.63185-ref4">4</xref>]</p><disp-formula id="scirp.63185-formula35"><label>(7)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/1-2860070x81.png"  xlink:type="simple"/></disp-formula><p>It holds that</p><disp-formula id="scirp.63185-formula36"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x82.png"  xlink:type="simple"/></disp-formula><p>The previous equation is the same as</p><disp-formula id="scirp.63185-formula37"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x83.png"  xlink:type="simple"/></disp-formula><p>And our recurrence becomes</p><disp-formula id="scirp.63185-formula38"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x84.png"  xlink:type="simple"/></disp-formula><p>Dividing by<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x85.png" xlink:type="simple"/></inline-formula>, we obtain the telescoping recurrence</p><disp-formula id="scirp.63185-formula39"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x86.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.63185-formula40"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x87.png"  xlink:type="simple"/></disp-formula><p>which is equivalent to</p><disp-formula id="scirp.63185-formula41"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x88.png"  xlink:type="simple"/></disp-formula><p>Again as before, multiplying both sides by<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x89.png" xlink:type="simple"/></inline-formula>, the recurrence telescopes with solution</p><disp-formula id="scirp.63185-formula42"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x90.png"  xlink:type="simple"/></disp-formula><p>Using the well known fact that</p><disp-formula id="scirp.63185-formula43"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x91.png"  xlink:type="simple"/></disp-formula><p>the variance of the number of key comparisons of the Dual-pivot Quicksort is (see [<xref ref-type="bibr" rid="scirp.63185-ref17">17</xref>] [<xref ref-type="bibr" rid="scirp.63185-ref19">19</xref>] and [<xref ref-type="bibr" rid="scirp.63185-ref20">20</xref>] )</p><disp-formula id="scirp.63185-formula44"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x92.png"  xlink:type="simple"/></disp-formula><p>where <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x93.png" xlink:type="simple"/></inline-formula> is the second order harmonic number defined by (see [<xref ref-type="bibr" rid="scirp.63185-ref18">18</xref>] and [<xref ref-type="bibr" rid="scirp.63185-ref19">19</xref>] )</p><disp-formula id="scirp.63185-formula45"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x94.png"  xlink:type="simple"/></disp-formula></sec><sec id="s6"><title>6. Asympototic Distribution</title><p>In this section, we show the convergence results which are essential for the main purpose.</p><p>Defining a random variables</p><disp-formula id="scirp.63185-formula46"><label>(8)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/1-2860070x95.png"  xlink:type="simple"/></disp-formula><p>Equation (8) can be rewritten in the following form</p><disp-formula id="scirp.63185-formula47"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x96.png"  xlink:type="simple"/></disp-formula><p>and so,</p><disp-formula id="scirp.63185-formula48"><label>(9)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/1-2860070x97.png"  xlink:type="simple"/></disp-formula><p>By a simple manipulation, one gets</p><disp-formula id="scirp.63185-formula49"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x98.png"  xlink:type="simple"/></disp-formula><p>where the cost function <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x99.png" xlink:type="simple"/></inline-formula> is given as and it seems to be like in [<xref ref-type="bibr" rid="scirp.63185-ref6">6</xref>] and [<xref ref-type="bibr" rid="scirp.63185-ref7">7</xref>] , and given by</p><disp-formula id="scirp.63185-formula50"><label>(10)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/1-2860070x100.png"  xlink:type="simple"/></disp-formula><p>Now, we show the random vector <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x101.png" xlink:type="simple"/></inline-formula> converges to a uniformly distributed random vector <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x101.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x102.png" xlink:type="simple"/></inline-formula> on<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x101.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x102.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x103.png" xlink:type="simple"/></inline-formula>. So,</p><disp-formula id="scirp.63185-formula51"><label>(11)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/1-2860070x104.png"  xlink:type="simple"/></disp-formula><p>Here <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x105.png" xlink:type="simple"/></inline-formula> is uniformly distributed random vector on<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x105.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x106.png" xlink:type="simple"/></inline-formula>. The moment generating function of</p><p><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x107.png" xlink:type="simple"/></inline-formula>is given by</p><disp-formula id="scirp.63185-formula52"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x108.png"  xlink:type="simple"/></disp-formula><p>For the random vector<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x109.png" xlink:type="simple"/></inline-formula>,</p><disp-formula id="scirp.63185-formula53"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x110.png"  xlink:type="simple"/></disp-formula><p>Now, the random vector <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x111.png" xlink:type="simple"/></inline-formula> has the following moment generating function</p><disp-formula id="scirp.63185-formula54"><label>(12)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/1-2860070x112.png"  xlink:type="simple"/></disp-formula><p>By the above Equation (12) the moment generating function of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x113.png" xlink:type="simple"/></inline-formula> is an approximation to the average value of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x113.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x114.png" xlink:type="simple"/></inline-formula> over the interval<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x113.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x114.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x115.png" xlink:type="simple"/></inline-formula>. The moment generating function of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x113.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x114.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x115.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x116.png" xlink:type="simple"/></inline-formula> is an approximation to the average value of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x113.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x114.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x115.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x116.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x117.png" xlink:type="simple"/></inline-formula> over the interval <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x113.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x114.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x115.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x116.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x117.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x118.png" xlink:type="simple"/></inline-formula> (see [<xref ref-type="bibr" rid="scirp.63185-ref8">8</xref>] and [<xref ref-type="bibr" rid="scirp.63185-ref9">9</xref>] ).</p><p>For the cost function</p><disp-formula id="scirp.63185-formula55"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x119.png"  xlink:type="simple"/></disp-formula><p>By using asymptotically, the expected complexity of Dual-pivot Quicksort is <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x120.png" xlink:type="simple"/></inline-formula> given in Equation (4), it follows that</p><disp-formula id="scirp.63185-formula56"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x121.png"  xlink:type="simple"/></disp-formula><p>Thus <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x122.png" xlink:type="simple"/></inline-formula> converges to some<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x122.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x123.png" xlink:type="simple"/></inline-formula>, defined as</p><disp-formula id="scirp.63185-formula57"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x124.png"  xlink:type="simple"/></disp-formula><p>where U<sub>1</sub> and U<sub>2</sub> are uniformly distributed random variables on<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x125.png" xlink:type="simple"/></inline-formula>. Therefore, if we assume for moment that Y<sub>n</sub> converges in distribution to some Y, we obtain</p><disp-formula id="scirp.63185-formula58"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x126.png"  xlink:type="simple"/></disp-formula><p>Here <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x127.png" xlink:type="simple"/></inline-formula> and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x127.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x128.png" xlink:type="simple"/></inline-formula> are independent. <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x127.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x128.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x129.png" xlink:type="simple"/></inline-formula>and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x127.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x128.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x129.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x130.png" xlink:type="simple"/></inline-formula> have the same distribution as Y. Finally we show that <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x127.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x128.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x129.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x130.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x131.png" xlink:type="simple"/></inline-formula> converges in fact to the fixed point Y.</p><p>Let D be the space of distribution functions F with finite second moments <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x132.png" xlink:type="simple"/></inline-formula> and the first moment<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x132.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x133.png" xlink:type="simple"/></inline-formula>. We use the Wasserstein metric [<xref ref-type="bibr" rid="scirp.63185-ref4">4</xref>] on D.</p><disp-formula id="scirp.63185-formula59"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x134.png"  xlink:type="simple"/></disp-formula><p>where <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x135.png" xlink:type="simple"/></inline-formula> denotes the <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x135.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x136.png" xlink:type="simple"/></inline-formula> norm. Defining a map <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x135.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x136.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x137.png" xlink:type="simple"/></inline-formula> by</p><disp-formula id="scirp.63185-formula60"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x138.png"  xlink:type="simple"/></disp-formula><p>where <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x139.png" xlink:type="simple"/></inline-formula> and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x139.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x140.png" xlink:type="simple"/></inline-formula> are independent .</p><disp-formula id="scirp.63185-formula61"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x141.png"  xlink:type="simple"/></disp-formula><p>Here τ<sub>1</sub> and τ<sub>2</sub> are uniformly distributed random variables on <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x142.png" xlink:type="simple"/></inline-formula> and C is a map defined as<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x142.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x143.png" xlink:type="simple"/></inline-formula>. We have to refer to Roesler (see in [<xref ref-type="bibr" rid="scirp.63185-ref4">4</xref>] [<xref ref-type="bibr" rid="scirp.63185-ref21">21</xref>] and [<xref ref-type="bibr" rid="scirp.63185-ref22">22</xref>] ) for the main idea for the next lemma.</p><p>Lemma 1</p><p>The map <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x144.png" xlink:type="simple"/></inline-formula> is a contraction on <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x144.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x145.png" xlink:type="simple"/></inline-formula> and has a unique fixed point. Moreover, every sequence <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x144.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x145.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x146.png" xlink:type="simple"/></inline-formula> converges in the d-metric to fixed point of T.</p><p>Proof</p><p>Let F and G are in D</p><disp-formula id="scirp.63185-formula62"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x147.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.63185-formula63"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x148.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.63185-formula64"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x149.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.63185-formula65"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x150.png"  xlink:type="simple"/></disp-formula><p>The random variables <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x151.png" xlink:type="simple"/></inline-formula> and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x151.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x152.png" xlink:type="simple"/></inline-formula> are independent. Also <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x151.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x152.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x153.png" xlink:type="simple"/></inline-formula> and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x151.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x152.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x153.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x154.png" xlink:type="simple"/></inline-formula> are independent. Here <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x151.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x152.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x153.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x154.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x155.png" xlink:type="simple"/></inline-formula> and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x151.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x152.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x153.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x154.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x155.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x156.png" xlink:type="simple"/></inline-formula> are uniformly distributed on<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x151.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x152.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x153.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x154.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x155.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x156.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x157.png" xlink:type="simple"/></inline-formula>. Then</p><disp-formula id="scirp.63185-formula66"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x158.png"  xlink:type="simple"/></disp-formula><p>where</p><disp-formula id="scirp.63185-formula67"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x159.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.63185-formula68"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x160.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.63185-formula69"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x161.png"  xlink:type="simple"/></disp-formula><p>Taking the infimum over all possible <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x162.png" xlink:type="simple"/></inline-formula> we obtain</p><disp-formula id="scirp.63185-formula70"><graphic  xlink:href="http://html.scirp.org/file/1-2860070x163.png"  xlink:type="simple"/></disp-formula><p>using Banach fixed point theorem completes the proof (also see [<xref ref-type="bibr" rid="scirp.63185-ref13">13</xref>] ).</p></sec><sec id="s7"><title>Acknowledgments</title><p>We thank the editor and the referee for their comments.</p></sec><sec id="s8"><title>Cite this paper</title><p>Mahmoud Ragab,Beih El-Sayed El-Desouky,Nora Nader, (2016) On the Convergence of the Dual-Pivot Quicksort Process. Open Journal of Modelling and Simulation,04,1-15. doi: 10.4236/ojmsi.2016.41001</p></sec><sec id="s9"><title>Appendix</title>A1. The Dual-Pivot Quicksort Algorithm [<xref ref-type="bibr" rid="scirp.63185-ref15">15</xref>]<p>DUALITY -PIVOT QUICKSORT (G, left, right)</p><p>// Sort <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x164.png" xlink:type="simple"/></inline-formula> (including end points).</p><p>1) If right ? left &lt; M // i.e. the sub-array has n ≤ M elements</p><p>2) INSERTIONSORT (G, left, right)</p><p>3) Else</p><p>4) If <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x165.png" xlink:type="simple"/></inline-formula></p><p>5)<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x166.png" xlink:type="simple"/></inline-formula>; <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x166.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x167.png" xlink:type="simple"/></inline-formula></p><p>6) Else</p><p>7)<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x168.png" xlink:type="simple"/></inline-formula>; <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x168.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x169.png" xlink:type="simple"/></inline-formula></p><p>8) End If</p><p>9)<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x170.png" xlink:type="simple"/></inline-formula>;<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x170.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x171.png" xlink:type="simple"/></inline-formula>; <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x170.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x171.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x172.png" xlink:type="simple"/></inline-formula></p><p>10) While <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x173.png" xlink:type="simple"/></inline-formula></p><p>11) If <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x174.png" xlink:type="simple"/></inline-formula></p><p>12) Swap <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x175.png" xlink:type="simple"/></inline-formula> and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x175.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x176.png" xlink:type="simple"/></inline-formula></p><p>13) <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x177.png" xlink:type="simple"/></inline-formula></p><p>14) Else</p><p>15) If <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x178.png" xlink:type="simple"/></inline-formula></p><p>16) While <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x179.png" xlink:type="simple"/></inline-formula> and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x179.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x180.png" xlink:type="simple"/></inline-formula> do <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x179.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x180.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x181.png" xlink:type="simple"/></inline-formula> End While</p><p>17) If <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x182.png" xlink:type="simple"/></inline-formula></p><p>18) Swap <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x183.png" xlink:type="simple"/></inline-formula> and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x183.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x184.png" xlink:type="simple"/></inline-formula></p><p>19) Else</p><p>20) Swap <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x185.png" xlink:type="simple"/></inline-formula> and<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x185.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x186.png" xlink:type="simple"/></inline-formula>; Swap <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x185.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x186.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x187.png" xlink:type="simple"/></inline-formula> and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x185.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x186.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x187.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x188.png" xlink:type="simple"/></inline-formula></p><p>21) <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x189.png" xlink:type="simple"/></inline-formula></p><p>22) End if</p><p>23) <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x190.png" xlink:type="simple"/></inline-formula></p><p>24) End if</p><p>25) End if</p><p>26) <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x191.png" xlink:type="simple"/></inline-formula></p><p>27) End While</p><p>28)<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x192.png" xlink:type="simple"/></inline-formula>; <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x192.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x193.png" xlink:type="simple"/></inline-formula></p><p>29)<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x194.png" xlink:type="simple"/></inline-formula>; <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x194.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x195.png" xlink:type="simple"/></inline-formula>// Swap pivots to final position</p><p>30)<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x196.png" xlink:type="simple"/></inline-formula>; <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x196.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x197.png" xlink:type="simple"/></inline-formula></p><p>31) DUALITY-PIVOT QUICKSORT <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x198.png" xlink:type="simple"/></inline-formula></p><p>32) DUALITY-PIVOT QUICKSORT <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x199.png" xlink:type="simple"/></inline-formula></p><p>33) DUALIY-PIVOT QUICKSORT <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2860070x200.png" xlink:type="simple"/></inline-formula></p><p>34) End if</p>A2. The Implementation of the New Dual-Pivot<p>Here’s the implementation of the new Dual-Pivot (Yaroslavskiy) in java:</p><p>public main void sort(double[<xref ref-type="bibr" rid="scirp.63185-ref"></xref>] g) {</p><p>sort(g, 0, g.length);</p><p>}</p><p>public main void sort(double[<xref ref-type="bibr" rid="scirp.63185-ref"></xref>] g, double fromIndex, double toIndex) {</p><p>rangeCheck(g.length, fromIndex, toIndex);</p><p>Yaroslavskiy(g, fromIndex, toIndex - 1, 3);</p><p>}</p><p>private main void rangeCheck(double length, double fromIndex, double toIndex) {</p><p>if (fromIndex &gt; toIndex) {</p><p>throw new IllegalArgumentException(&quot;fromIndex &gt; toIndex&quot;);</p><p>}</p><p>if (fromIndex &lt; 0) {</p><p>throw new ArrayIndexOutOfBoundsException(fromIndex);</p><p>}</p><p>if (toIndex &gt; length) {</p><p>throw new ArrayIndexOutOfBoundsException(toIndex);</p><p>}</p><p>}</p><p>private main void swap(double[<xref ref-type="bibr" rid="scirp.63185-ref"></xref>] g, double i, double j) {</p><p>int tem = g[i];</p><p>g[i] = g[j];</p><p>g[j] = tem;</p><p>}</p><p>private static void dualPivotQuicksort(double [<xref ref-type="bibr" rid="scirp.63185-ref"></xref>] g, double left, double right, double div) {</p><p>double lenth = right - left;</p><p>if (lenth &lt; 27) { // insertion sort for tiny array</p><p>for (double i = left + 1; i &lt;= right; i++) {</p><p>for (int j = i; j &gt; left &amp;&amp;g[j] &lt; g[j - 1]; j--) {</p><p>swap(g, j, j - 1);</p><p>}</p><p>}</p><p>return;</p><p>}</p><p>int third = len / div;</p><p>// &quot;medians&quot;</p><p>int s1 = left + third;</p><p>int s2 = right - third;</p><p>if (s1 &lt;= left) {</p><p>s1 = left + 1;</p><p>}</p><p>if (s2 &gt;= right) {</p><p>s2 = right - 1;</p><p>}</p><p>if (g[s1] &lt; g[s2]) {</p><p>swap(g, s1, left);</p><p>swap(g, s2, right);</p><p>}</p><p>else {</p><p>swap(g, s1, right);</p><p>swap(g, s2, left);</p><p>}</p><p>// chosse the pivots</p><p>double first pivot =g[left];</p><p>double second pivot = g[right];</p><p>// pointers</p><p>double less = left + 1;</p><p>double great = right - 1;</p><p>// sorting the array by the Dual pivot Quicksort</p><p>for (int k = less; k &lt;= great; k++) {</p><p>if (g[k] &lt; first pivot) {</p><p>swap(g, k, less++);</p><p>}</p><p>else if (g[k] &gt; second pivot) {</p><p>until (k &gt; great &amp;&amp; g[great] &lt; second pivot) {</p><p>great--;</p><p>}</p><p>swap(g, k, great--);</p><p>if (g[k] &lt; first pivot) {</p><p>swap(g, k, less++);</p><p>}</p><p>}</p><p>}</p><p>// swaps</p><p>double Dis = great - less;</p><p>if (Dis &lt; 13) {</p><p>div++;</p><p>}</p><p>swap(g, less - 1, left);</p><p>swap(g, great + 1, right);</p><p>// recursive the algorithm for the arrays</p><p>Yaroslavskiy(g, left, less - 2, div);</p><p>Yaroslavskiy(g, great + 2, right, div);</p><p>// subarray</p><p>if ( first pivot &lt; second pivot) {</p><p>Yaroslavskiy(g, less, great, div);</p><p>}</p><p>}</p></sec></body><back><ref-list><title>References</title><ref id="scirp.63185-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">Hoare, C.A.R. (1962) Quicksort. The Computer Journal, 5, 10-15. &lt;br /&gt;http://dx.doi.org/10.1093/comjnl/5.1.10</mixed-citation></ref><ref id="scirp.63185-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">Rosler, U. (2001) On the Analysis of Stochastic Divide and Conquer Algorithms. Algorithmica, 29, 238-261.  
http://dx.doi.org/10.1007/BF02679621</mixed-citation></ref><ref id="scirp.63185-ref3"><label>3</label><mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Regnier</surname><given-names> M. </given-names></name>,<etal>et al</etal>. (<year>1989</year>)<article-title>A Limiting Distribution for Quicksort</article-title><source> Informatique Théorique et Applications</source><volume> 23</volume>,<fpage> 335</fpage>-<lpage>343</lpage>.<pub-id pub-id-type="doi"></pub-id></mixed-citation></ref><ref id="scirp.63185-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">Roesler, U. (1992) A Fixed Point Theorem for Distributions. Stochastic Processes and their Applications, 42, 195-214.  
http://dx.doi.org/10.1016/0304-4149(92)90035-O</mixed-citation></ref><ref id="scirp.63185-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">Roesler, U. and Rueschendorf, L. (2001) The Contraction Method for Recursive Algorithms. Algorithmica, 29, 3-33.  
http://dx.doi.org/10.1007/BF02679611</mixed-citation></ref><ref id="scirp.63185-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">Ragab, M. (2011) Partial Quicksort and Weighted Branching Processes. PhD Thesis, 28-35.</mixed-citation></ref><ref id="scirp.63185-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">Ragab, M. and Rosler, U. (2014) The Quicksort Process. Stochastic Processes and their Applications, 124, 1036-1054.  
http://dx.doi.org/10.1016/j.spa.2013.09.014</mixed-citation></ref><ref id="scirp.63185-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">Fill, J.A. and Janson, S. (2001) Approximating the Limiting Quicksort Distribution. Random Structures Algorithms, 19, 376-406. http://dx.doi.org/10.1002/rsa.10007</mixed-citation></ref><ref id="scirp.63185-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">Fill, J.A. and Janson, S. (2004) The Number of Bit Comparisons Used by Quicksort: An Average-Case Analysis. ACM-SIAM Symposium on Discrete Algorithms., New York, 300-307 (Electronic).</mixed-citation></ref><ref id="scirp.63185-ref10"><label>10</label><mixed-citation publication-type="other" xlink:type="simple">(2009) http://permalink.gmane.org/gmane.comp.java.openjdk.core-libs.devel/2628</mixed-citation></ref><ref id="scirp.63185-ref11"><label>11</label><mixed-citation publication-type="other" xlink:type="simple">Ragab, M. (2015) Partial Quicksort and Weighted Branching Process: Surveys and Analysis. LAP Lambert Academic Publishing, Germany.</mixed-citation></ref><ref id="scirp.63185-ref12"><label>12</label><mixed-citation publication-type="other" xlink:type="simple">Fuchs, M. (2013) A Note on the Quicksort Asymptotics. Random Structures and Algorithms.</mixed-citation></ref><ref id="scirp.63185-ref13"><label>13</label><mixed-citation publication-type="other" xlink:type="simple">Iliopoulos, V. and Penman, D.P. (2012) Dual Pivot Quicksort. Discrete Mathematics, Algorithms and Applications, 04, No. 3. http://dx.doi.org/10.1142/S1793830912500413</mixed-citation></ref><ref id="scirp.63185-ref14"><label>14</label><mixed-citation publication-type="other" xlink:type="simple">Iliopoulos, V. (2013) The Quicksort Algorithm and Related Topics. PhD Thesis. Department of Mathematical Sciences, University of Essex. http://repository.essex.ac.uk/13266</mixed-citation></ref><ref id="scirp.63185-ref15"><label>15</label><mixed-citation publication-type="other" xlink:type="simple">Martinez, C., Nebel, M.E. and Wild, S. (2014) Analysis of Branch Misses in Quicksort. SIAM. &lt;br /&gt; 
http://dx.doi.org/10.1137/1.9781611973761.11</mixed-citation></ref><ref id="scirp.63185-ref16"><label>16</label><mixed-citation publication-type="other" xlink:type="simple">Wild, S., Nebel, M.E. and Martienz, C. (2014) Analysis of Pivot Sampling in Dual-Pivot Quicksort. arXiv preprint arXiv:1412.0193.</mixed-citation></ref><ref id="scirp.63185-ref17"><label>17</label><mixed-citation publication-type="other" xlink:type="simple">Wild, S. (2012) Java 7’s Dual Pivot Quicksort. Master Thesis, University of Kaiserslautern, Kaiserslautern, Germany. 
http://www.uni-kl.de/en/home/</mixed-citation></ref><ref id="scirp.63185-ref18"><label>18</label><mixed-citation publication-type="other" xlink:type="simple">Choi, J. and Srivastava, H.M. (2011) Some Summation Formulas involving Harmonic Numbers and Generalized Harmonic Numbers. Mathematical and Computer Modelling, 54, 2220-2234. &lt;br /&gt; 
http://dx.doi.org/10.1016/j.mcm.2011.05.032</mixed-citation></ref><ref id="scirp.63185-ref19"><label>19</label><mixed-citation publication-type="other" xlink:type="simple">Wild, S., Nebel, M.E., Reitzig, R. and Laube, U. (2013) Engineering Java 7’s Dual Pivot Quicksort. Proceedings of the ALENEX 2013, New Orleans, Louisiana, USA, 7 January 2013, 55-69.</mixed-citation></ref><ref id="scirp.63185-ref20"><label>20</label><mixed-citation publication-type="book" xlink:type="simple">Wild, S. and Nebel, M.E. (2012) Average Case Analysis of Java 7’s Dual Pivot Quicksort . In: Epstein, L. and Ferragina, P., Eds., Algorithms—ESA 2012, Springer, Berlin/Heidelberg, 825-836. &lt;br /&gt; 
http://dx.doi.org/10.1007/978-3-642-33090-2_71</mixed-citation></ref><ref id="scirp.63185-ref21"><label>21</label><mixed-citation publication-type="other" xlink:type="simple">Wild, S., Nebel, M.E. and Mahmoud, M. (2014) Analysis of Quickselect Under Yaroslavskiy’s Dual-Pivoting Algorithm. Algorithmica, 78, 485-506. http://dx.doi.org/10.1007/s00453-014-9953-x</mixed-citation></ref><ref id="scirp.63185-ref22"><label>22</label><mixed-citation publication-type="other" xlink:type="simple">Wild, S., Nebel, M.E. and Neininger, R. (2013) Average Case and Distributional Analysis of Java 7’s Dual Pivot Quicksort. arXiv preprint arXiv:1304.0988.</mixed-citation></ref></ref-list></back></article>