<?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.2017.51004</article-id><article-id pub-id-type="publisher-id">OJMSi-73429</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>
 
 
  Analysis of the Multi-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 Mathematics, Faculty of Science, Al Azhar University, Cairo, Egypt</addr-line></aff><pub-date pub-type="epub"><day>09</day><month>12</month><year>2016</year></pub-date><volume>05</volume><issue>01</issue><fpage>47</fpage><lpage>58</lpage><history><date date-type="received"><day>September</day>	<month>26,</month>	<year>2016</year></date><date date-type="rev-recd"><day>Accepted:</day>	<month>January</month>	<year>9,</year>	</date><date date-type="accepted"><day>January</day>	<month>12,</month>	<year>2017</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><html>
 <head></head>
 
  In this paper, we study a new version from Dual-pivot Quicksort algorithm when we have some other number 
  <img src="Edit_b59babb8-4a6b-4d0e-9f5a-2e7b7cddd175.bmp" alt="" /> of pivots. Hence, we discuss the idea of picking 
  <img src="Edit_9fb8e3c1-01c3-45d0-8793-7b98a2c0a686.bmp" alt="" /> pivots  
  <img src="Edit_13d61596-c99f-4caa-9bb6-ea22470fe580.bmp" alt="" />by random way and splitting the list simultaneously according to these. The modified version generalizes these results for multi process. We show that the average number of swaps done by Multi-pivot Quicksort process and we present a special case. Moreover, we obtain a relationship between the average number of swaps of Multi-pivot Quicksort and Stirling numbers of the first kind.
 
</html></p></abstract><kwd-group><kwd>Quicksort</kwd><kwd> Convergence</kwd><kwd> Multi-Pivot Quicksort Process</kwd><kwd> Stirling Number of the First Kind</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>Quicksort studied in many books such as [<xref ref-type="bibr" rid="scirp.73429-ref1">1</xref>] [<xref ref-type="bibr" rid="scirp.73429-ref2">2</xref>] and [<xref ref-type="bibr" rid="scirp.73429-ref3">3</xref>] . It is an exhaustively anatomize sorting algorithm and following the idea of divide-and-conquer on an input consisting of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x5.png" xlink:type="simple"/></inline-formula> items [<xref ref-type="bibr" rid="scirp.73429-ref4">4</xref>] . Quicksort used a pivot item to divide its input items into two partitions; the items in one sublist seem diminutive or identically tantamount to the pivot; the items in the other sublist seem more sizably voluminous than or equipollent to the pivot, after then it uses recursion to order these sublists. It is prominent that the input consists of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x6.png" xlink:type="simple"/></inline-formula> items with different keys in arbitrary order and the pivot is picked by just picking an item, and then on average Quicksort utilizes <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x7.png" xlink:type="simple"/></inline-formula> comparisons between items from the input. The Partial Quicksort algorithm analyzed by Ragab [<xref ref-type="bibr" rid="scirp.73429-ref5">5</xref>] [<xref ref-type="bibr" rid="scirp.73429-ref6">6</xref>] and [<xref ref-type="bibr" rid="scirp.73429-ref7">7</xref>] depends on the idea of the standard Quicksort. It uses a smart strategy to find the <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x8.png" xlink:type="simple"/></inline-formula> smallest elements out of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x9.png" xlink:type="simple"/></inline-formula> distinct elements and sort them. Yaroslavskiy declared in 2009 that he had made some improvements for the Quicksort algorithm, the demand being drawn by experiments.</p><p>Yaroslavskiy’s algorithm replaced the new standard Quicksort algorithm in Oracle’s Java 7 runtime library. This algorithm uses two items as pivots to divide the items. If two pivots <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x10.png" xlink:type="simple"/></inline-formula> and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x11.png" xlink:type="simple"/></inline-formula> such that <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x12.png" xlink:type="simple"/></inline-formula> are used, the splitting step sublists the remaining <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x13.png" xlink:type="simple"/></inline-formula> items into three sublists, items more minute than or equipollent to<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x14.png" xlink:type="simple"/></inline-formula>, items between <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x15.png" xlink:type="simple"/></inline-formula> and<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x16.png" xlink:type="simple"/></inline-formula>, and items more sizably voluminous than or equipollent to<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x17.png" xlink:type="simple"/></inline-formula>. Recursion is then applied to the three sublists. It came as a surprise that two pivots should avail, since in his thesis [<xref ref-type="bibr" rid="scirp.73429-ref8">8</xref>] Sedgewick had introduced and explained a Dual- pivot technique inferior to classical Quicksort. Hence, Hennequin in his thesis studied the general technique of using <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x18.png" xlink:type="simple"/></inline-formula> pivot items [<xref ref-type="bibr" rid="scirp.73429-ref2">2</xref>] .</p><p>We analyze the limiting distribution of the number of swaps needed by the duality process is proposed. It is known to be the unique fixed point of a certain distributional transformation <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x19.png" xlink:type="simple"/></inline-formula> with zero mean and finite variance. Depending on the results of [<xref ref-type="bibr" rid="scirp.73429-ref1">1</xref>] and [<xref ref-type="bibr" rid="scirp.73429-ref9">9</xref>] , we analyze the Multi-pivot Quicksort when we selected <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x19.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x20.png" xlink:type="simple"/></inline-formula> pivots and we study the relationship with Striling numbers of the first kind.</p></sec><sec id="s2"><title>2. Multi -Pivot Quicksort</title><p>Later, many researchers has received the interest of the visualization of multi-pivot Quicksort in accordance with Yaroslavskiy proposed the duality pivot process which outperforms standard Quicksort by Java JVM. After that, this algorithm has been explained in terms of comparisons and swaps by Wild and Nebel [<xref ref-type="bibr" rid="scirp.73429-ref10">10</xref>] .</p><p>A normal expansion of duality process would be to have some other number <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x21.png" xlink:type="simple"/></inline-formula> of pivots. Hence, we cogitation the approximation of pick <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x21.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x22.png" xlink:type="simple"/></inline-formula> pivots <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x21.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x22.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x23.png" xlink:type="simple"/></inline-formula> by random way and splitting the list simultaneously according to these. let a random permutation of the list <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x21.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x22.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x23.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x24.png" xlink:type="simple"/></inline-formula> be given to be ordered using this variant, with all the <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x21.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x22.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x23.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x24.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x25.png" xlink:type="simple"/></inline-formula> substitution. The <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x21.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x22.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x23.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x24.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x25.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x26.png" xlink:type="simple"/></inline-formula> rightmost item are picked as pivots are compared to each other and interchange, if they are out of order.</p><p>There are <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x27.png" xlink:type="simple"/></inline-formula> items are swaps to the pivots and the list is splitted to <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x27.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x28.png" xlink:type="simple"/></inline-formula> sublists. The partition step can be worked as follows. We compare the leftmost item to pivot which chosen by random way; if this pivot is bigger than it, it is compared with another pivot which was smaller than the first pivot. Otherwise it is swaped with a bigger pivot (to the right) and after a series of number of swaps are inserted to its place between any two pivots, or to the left of the smallest pivot or to the right of the biggest pivot. We continue with the same technique, until all items are examined.</p><p>Each item of the <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x29.png" xlink:type="simple"/></inline-formula> items swaps with the pivots by binary tree, first each item is swaps with the median of the sorted list of the pivots. If it is compared with the first element, otherwise is compared with the third element and after a collection of swaps is inserted to its placement.</p><p>For the pervious process, there are <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x30.png" xlink:type="simple"/></inline-formula> sublists. If we let that the input is a random permutation <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x30.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x31.png" xlink:type="simple"/></inline-formula> of<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x30.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x31.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x32.png" xlink:type="simple"/></inline-formula>.</p><p>We assume that <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x33.png" xlink:type="simple"/></inline-formula> be an integer. The method “<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x33.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x34.png" xlink:type="simple"/></inline-formula>-pivot quicksort” performs as follows:</p><p>As long as <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x35.png" xlink:type="simple"/></inline-formula> then sort the input directly. When<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x35.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x36.png" xlink:type="simple"/></inline-formula>, order the first <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x35.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x36.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x37.png" xlink:type="simple"/></inline-formula> items such that <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x35.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x36.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x37.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x38.png" xlink:type="simple"/></inline-formula> and set <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x35.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x36.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x37.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x38.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x39.png" xlink:type="simple"/></inline-formula> <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x35.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x36.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x37.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x38.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x39.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x40.png" xlink:type="simple"/></inline-formula>. In the splitting step, the remaining <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x35.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x36.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x37.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x38.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x39.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x40.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x41.png" xlink:type="simple"/></inline-formula> items are divided to <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x35.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x36.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x37.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x38.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x39.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x40.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x41.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x42.png" xlink:type="simple"/></inline-formula> sets <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x35.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x36.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x37.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x38.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x39.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x40.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x41.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x42.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x43.png" xlink:type="simple"/></inline-formula> where an item <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x35.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x36.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x37.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x38.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x39.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x40.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x41.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x42.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x43.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x44.png" xlink:type="simple"/></inline-formula> belongs to set <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x35.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x36.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x37.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x38.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x39.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x40.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x41.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x42.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x43.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x44.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x45.png" xlink:type="simple"/></inline-formula> as long as<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x35.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x36.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x37.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x38.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x39.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x40.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x41.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x42.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x43.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x44.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x45.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x46.png" xlink:type="simple"/></inline-formula>. The sets <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x35.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x36.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x37.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x38.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x39.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x40.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x41.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x42.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x43.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x44.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x45.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x46.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x47.png" xlink:type="simple"/></inline-formula> are then ordered recursively. Assume that <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x35.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x36.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x37.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x38.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x39.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x40.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x41.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x42.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x43.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x44.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x45.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x46.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x47.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x48.png" xlink:type="simple"/></inline-formula> be fixed. As for duality Quicksort process, if we assume that <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x35.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x36.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x37.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x38.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x39.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x40.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x41.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x42.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x43.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x44.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x45.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x46.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x47.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x48.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x49.png" xlink:type="simple"/></inline-formula> and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x35.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x36.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x37.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x38.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x39.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x40.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x41.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x42.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x43.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x44.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x45.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x46.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x47.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x48.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x49.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x50.png" xlink:type="simple"/></inline-formula> give the random variables that count the swaps required to sort <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x35.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x36.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x37.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x38.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x39.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x40.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x41.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x42.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x43.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x44.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x45.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x46.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x47.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x48.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x49.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x50.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x51.png" xlink:type="simple"/></inline-formula> items when we select <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x35.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x36.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x37.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x38.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x39.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x40.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x41.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x42.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x43.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x44.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x45.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x46.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x47.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x48.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x49.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x50.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x51.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x52.png" xlink:type="simple"/></inline-formula> pivot items, uniformly selected from the list and partitioning respectively. The total number of swaps needed by Multi-pivot Quicksort sorting inputs given by</p><disp-formula id="scirp.73429-formula91"><label>(1)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/4-2860099x53.png"  xlink:type="simple"/></disp-formula><p>where <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x54.png" xlink:type="simple"/></inline-formula> random variable that count the number of swaps made for sort the items smaller than first pivot <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x54.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x55.png" xlink:type="simple"/></inline-formula> denote the number of swaps need to order the items between first pivot and the second pivot. <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x54.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x55.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x56.png" xlink:type="simple"/></inline-formula>denote the number of swaps need to order the items between <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x54.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x55.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x56.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x57.png" xlink:type="simple"/></inline-formula> pivot and the <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x54.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x55.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x56.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x57.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x58.png" xlink:type="simple"/></inline-formula> pivot. The random variables<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x54.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x55.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x56.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x57.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x58.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x59.png" xlink:type="simple"/></inline-formula>, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x54.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x55.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x56.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x57.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x58.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x59.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x60.png" xlink:type="simple"/></inline-formula>and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x54.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x55.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x56.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x57.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x58.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x59.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x60.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x61.png" xlink:type="simple"/></inline-formula> have the same distribution and independent of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x54.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x55.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x56.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x57.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x58.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x59.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x60.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x61.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x62.png" xlink:type="simple"/></inline-formula> and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x54.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x55.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x56.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x57.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x58.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x59.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x60.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x61.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x62.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x63.png" xlink:type="simple"/></inline-formula> means the equality in distribution.</p><p>The average number of swaps done by the multi algorithm applied to an list of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x64.png" xlink:type="simple"/></inline-formula> items by <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x64.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x65.png" xlink:type="simple"/></inline-formula>-pivot Quicksort given by the following recurrence</p><disp-formula id="scirp.73429-formula92"><label>(2)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/4-2860099x66.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.73429-formula93"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x67.png"  xlink:type="simple"/></disp-formula><p>where <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x68.png" xlink:type="simple"/></inline-formula> refers to the pivots in increasing order, see [<xref ref-type="bibr" rid="scirp.73429-ref11">11</xref>] and [<xref ref-type="bibr" rid="scirp.73429-ref12">12</xref>] .</p><p>Let <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x69.png" xlink:type="simple"/></inline-formula> be the expected value of a “toll function” during the</p><p>first recursive call, where <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x70.png" xlink:type="simple"/></inline-formula> and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x70.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x71.png" xlink:type="simple"/></inline-formula> are constants and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x70.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x71.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x72.png" xlink:type="simple"/></inline-formula> denotes</p><p>the average number of swaps for ordering the sublist of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x73.png" xlink:type="simple"/></inline-formula> items less than <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x73.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x74.png" xlink:type="simple"/></inline-formula> by the Multi-Pivot Quicksort on <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x73.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x74.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x75.png" xlink:type="simple"/></inline-formula> pivots to simplify the relation by noting that the pivots are selected by the random way and the sums are equal,</p><disp-formula id="scirp.73429-formula94"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x76.png"  xlink:type="simple"/></disp-formula><p>By collecting terms with a common factor<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x77.png" xlink:type="simple"/></inline-formula>, when<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x77.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x78.png" xlink:type="simple"/></inline-formula>. Fix <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x77.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x78.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x79.png" xlink:type="simple"/></inline-formula> There are <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x77.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x78.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x79.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x80.png" xlink:type="simple"/></inline-formula> methods of picking <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x77.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x78.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x79.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x80.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x81.png" xlink:type="simple"/></inline-formula> with<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x77.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x78.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x79.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x80.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x81.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x82.png" xlink:type="simple"/></inline-formula>.</p><disp-formula id="scirp.73429-formula95"><label>(3)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/4-2860099x83.png"  xlink:type="simple"/></disp-formula><p>Multiplying both sides by<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x84.png" xlink:type="simple"/></inline-formula>, the recurrence relation becomes</p><disp-formula id="scirp.73429-formula96"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x85.png"  xlink:type="simple"/></disp-formula><p>multiplying by <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x86.png" xlink:type="simple"/></inline-formula> and summing over<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x86.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x87.png" xlink:type="simple"/></inline-formula>., hence we get the generating function for the average number of swaps [<xref ref-type="bibr" rid="scirp.73429-ref10">10</xref>] . Let <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x86.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x87.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x88.png" xlink:type="simple"/></inline-formula> and consider the generating func-</p><p>tion <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x89.png" xlink:type="simple"/></inline-formula></p><disp-formula id="scirp.73429-formula97"><label>(4)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/4-2860099x90.png"  xlink:type="simple"/></disp-formula><p>We find that</p><disp-formula id="scirp.73429-formula98"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x91.png"  xlink:type="simple"/></disp-formula><p>Such that <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x92.png" xlink:type="simple"/></inline-formula> gives the k-th order derivative of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x92.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x93.png" xlink:type="simple"/></inline-formula> In the right-hand side of Equation (4), the first sum becomes</p><p><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x94.png" xlink:type="simple"/></inline-formula>.</p><p>The recurrence becomes as follows</p><disp-formula id="scirp.73429-formula99"><label>(5)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/4-2860099x95.png"  xlink:type="simple"/></disp-formula><p>In the right -hand side of Equation (5). The first sum becomes in this form because it may be easily explained by mathematical induction that the k-th order derivative of</p><disp-formula id="scirp.73429-formula100"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x96.png"  xlink:type="simple"/></disp-formula><p>is</p><disp-formula id="scirp.73429-formula101"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x97.png"  xlink:type="simple"/></disp-formula><p>The recurrence is converted to the following differential equation [<xref ref-type="bibr" rid="scirp.73429-ref13">13</xref>] :</p><disp-formula id="scirp.73429-formula102"><label>(6)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/4-2860099x98.png"  xlink:type="simple"/></disp-formula><p>Multiplying by<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x99.png" xlink:type="simple"/></inline-formula>, the previous Equation (6) is transformed to</p><disp-formula id="scirp.73429-formula103"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x100.png"  xlink:type="simple"/></disp-formula><p>This differential equation is a Cauchy-Euler equation [<xref ref-type="bibr" rid="scirp.73429-ref14">14</xref>] . We change variables <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x101.png" xlink:type="simple"/></inline-formula>, it is <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x101.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x102.png" xlink:type="simple"/></inline-formula></p><disp-formula id="scirp.73429-formula104"><label>(7)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/4-2860099x103.png"  xlink:type="simple"/></disp-formula><p>By using the differential operator <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x104.png" xlink:type="simple"/></inline-formula> to solve the previous differential Equation (7) which is defined by</p><disp-formula id="scirp.73429-formula105"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x105.png"  xlink:type="simple"/></disp-formula><p>and using the mathematical induction we find that at <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x106.png" xlink:type="simple"/></inline-formula></p><disp-formula id="scirp.73429-formula106"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x107.png"  xlink:type="simple"/></disp-formula><p>and</p><disp-formula id="scirp.73429-formula107"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x108.png"  xlink:type="simple"/></disp-formula><p>We find</p><disp-formula id="scirp.73429-formula108"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x109.png"  xlink:type="simple"/></disp-formula><p>the relation holds at<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x110.png" xlink:type="simple"/></inline-formula>. We assume the relation holds at <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x110.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x111.png" xlink:type="simple"/></inline-formula></p><disp-formula id="scirp.73429-formula109"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x112.png"  xlink:type="simple"/></disp-formula><p>at <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x113.png" xlink:type="simple"/></inline-formula> we find</p><disp-formula id="scirp.73429-formula110"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x114.png"  xlink:type="simple"/></disp-formula><p>So, it is easy to find the relation is satisfied for all values of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x115.png" xlink:type="simple"/></inline-formula></p><disp-formula id="scirp.73429-formula111"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x116.png"  xlink:type="simple"/></disp-formula><p>When we apply the operator<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x117.png" xlink:type="simple"/></inline-formula>, our relation seems in the form</p><disp-formula id="scirp.73429-formula112"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x118.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.73429-formula113"><label>(8)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/4-2860099x119.png"  xlink:type="simple"/></disp-formula><p>where <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x120.png" xlink:type="simple"/></inline-formula> is called as the initial polynomial and is given as follows, see [<xref ref-type="bibr" rid="scirp.73429-ref15">15</xref>] ,</p><disp-formula id="scirp.73429-formula114"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x121.png"  xlink:type="simple"/></disp-formula><p>where <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x122.png" xlink:type="simple"/></inline-formula> with<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x122.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x123.png" xlink:type="simple"/></inline-formula>, denotes the falling factorial. If we use the fundamental theorem of algebra which proposed that a polynomial of degree <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x122.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x123.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x124.png" xlink:type="simple"/></inline-formula> has <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x122.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x123.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x124.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x125.png" xlink:type="simple"/></inline-formula> complex roots with multiplicities. Notice that −2 is constantly a simple root because,</p><disp-formula id="scirp.73429-formula115"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x126.png"  xlink:type="simple"/></disp-formula><p>And we get</p><disp-formula id="scirp.73429-formula116"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x127.png"  xlink:type="simple"/></disp-formula><p>Setting <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x128.png" xlink:type="simple"/></inline-formula> and the residual roots be<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x128.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x129.png" xlink:type="simple"/></inline-formula>, see [<xref ref-type="bibr" rid="scirp.73429-ref16">16</xref>] . Our polynomial be in the form</p><disp-formula id="scirp.73429-formula117"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x130.png"  xlink:type="simple"/></disp-formula><p>This differential equation can be written as</p><disp-formula id="scirp.73429-formula118"><label>(9)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/4-2860099x131.png"  xlink:type="simple"/></disp-formula><p>where <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x132.png" xlink:type="simple"/></inline-formula> to solve our differential equation, we assume that there are two functions <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x132.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x133.png" xlink:type="simple"/></inline-formula> and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x132.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x133.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x134.png" xlink:type="simple"/></inline-formula> where</p><disp-formula id="scirp.73429-formula119"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x135.png"  xlink:type="simple"/></disp-formula><p>Then</p><disp-formula id="scirp.73429-formula120"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x136.png"  xlink:type="simple"/></disp-formula><p>By using the property of linearity of differential operator</p><disp-formula id="scirp.73429-formula121"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x137.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.73429-formula122"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x138.png"  xlink:type="simple"/></disp-formula><p>if we apply <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x139.png" xlink:type="simple"/></inline-formula> times the solution, we get</p><disp-formula id="scirp.73429-formula123"><label>(10)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/4-2860099x140.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.73429-formula124"><label>(11)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/4-2860099x141.png"  xlink:type="simple"/></disp-formula><p>where <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x142.png" xlink:type="simple"/></inline-formula> and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x142.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x143.png" xlink:type="simple"/></inline-formula> are constants of integration. Note that</p><disp-formula id="scirp.73429-formula125"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x144.png"  xlink:type="simple"/></disp-formula><p>Therefore, to evaluate<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x145.png" xlink:type="simple"/></inline-formula>, we find</p><disp-formula id="scirp.73429-formula126"><label>(12)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/4-2860099x146.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.73429-formula127"><label>(13)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/4-2860099x147.png"  xlink:type="simple"/></disp-formula><p>Moreover</p><disp-formula id="scirp.73429-formula128"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x148.png"  xlink:type="simple"/></disp-formula><p>Combining both solutions,</p><disp-formula id="scirp.73429-formula129"><label>(14)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/4-2860099x149.png"  xlink:type="simple"/></disp-formula><p>such that<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x150.png" xlink:type="simple"/></inline-formula>. To solve this system of of equations, we should calculate the constants of integration</p><disp-formula id="scirp.73429-formula130"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x151.png"  xlink:type="simple"/></disp-formula><p>In terms of series;</p><disp-formula id="scirp.73429-formula131"><label>(15)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/4-2860099x152.png"  xlink:type="simple"/></disp-formula><p>The third sum of Equation (15) collects to the solution a stationary contribution. Furthermore, the root <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x153.png" xlink:type="simple"/></inline-formula> when <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x153.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x154.png" xlink:type="simple"/></inline-formula> is even, participates a constant and the root<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x153.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x154.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x155.png" xlink:type="simple"/></inline-formula>, collects<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x153.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x154.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x155.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x156.png" xlink:type="simple"/></inline-formula>, with<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x153.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x154.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x155.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x156.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x157.png" xlink:type="simple"/></inline-formula>. Eliciting the coefficients, the average number of swaps for Multi-pivot Quicksort is</p><disp-formula id="scirp.73429-formula132"><label>(16)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/4-2860099x158.png"  xlink:type="simple"/></disp-formula><p>The number of methods to permute a list of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x159.png" xlink:type="simple"/></inline-formula> items into <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x159.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x160.png" xlink:type="simple"/></inline-formula> cycles counted by the Stirling numbers of the first kind <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x159.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x160.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x161.png" xlink:type="simple"/></inline-formula> see [<xref ref-type="bibr" rid="scirp.73429-ref17">17</xref>] .</p><p>We show the relation between the number of swaps done by the multi Quicksort process and Sirling number of the first kind. Form Equation (17) we assume that</p><p><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x162.png" xlink:type="simple"/></inline-formula>and consider the generating function <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x162.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x163.png" xlink:type="simple"/></inline-formula></p><disp-formula id="scirp.73429-formula133"><label>(17)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/4-2860099x164.png"  xlink:type="simple"/></disp-formula><p>The relation is converted to a k-th order differential equation</p><disp-formula id="scirp.73429-formula134"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x165.png"  xlink:type="simple"/></disp-formula><p>This differential equation is a Cauchy-Euler equation. We use the deferential operator <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x166.png" xlink:type="simple"/></inline-formula> for the solution of the differential equation. It is defined as follows</p><disp-formula id="scirp.73429-formula135"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x167.png"  xlink:type="simple"/></disp-formula><p>also, by induction</p><disp-formula id="scirp.73429-formula136"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x168.png"  xlink:type="simple"/></disp-formula><p>applying the operator<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x169.png" xlink:type="simple"/></inline-formula>,our equation becomes</p><disp-formula id="scirp.73429-formula137"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x170.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.73429-formula138"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x171.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.73429-formula139"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x172.png"  xlink:type="simple"/></disp-formula><p>where <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x173.png" xlink:type="simple"/></inline-formula> is falling factorial, see [<xref ref-type="bibr" rid="scirp.73429-ref18">18</xref>] .</p><disp-formula id="scirp.73429-formula140"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x174.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.73429-formula141"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x175.png"  xlink:type="simple"/></disp-formula><p>where <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x176.png" xlink:type="simple"/></inline-formula> is Stirling numbers of the first kind, see [<xref ref-type="bibr" rid="scirp.73429-ref19">19</xref>] . we use the relation</p><disp-formula id="scirp.73429-formula142"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x177.png"  xlink:type="simple"/></disp-formula><p>hence</p><disp-formula id="scirp.73429-formula143"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x178.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.73429-formula144"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x179.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.73429-formula145"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x180.png"  xlink:type="simple"/></disp-formula><p>by equality the coefficients we obtain</p><disp-formula id="scirp.73429-formula146"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x181.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.73429-formula147"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x182.png"  xlink:type="simple"/></disp-formula></sec><sec id="s3"><title>3. Quicksort</title><p>In this section we show the average number of swaps needed by the Quicksort is a particular case form the public case of the multi-pivot Quicksort [<xref ref-type="bibr" rid="scirp.73429-ref20">20</xref>] . For <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x183.png" xlink:type="simple"/></inline-formula></p><disp-formula id="scirp.73429-formula148"><label>(18)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/4-2860099x184.png"  xlink:type="simple"/></disp-formula><p>where <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x185.png" xlink:type="simple"/></inline-formula> give the random variables which counting the number of swaps needed for splitting the list of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x185.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x186.png" xlink:type="simple"/></inline-formula> items, such that the classical algorithm is applied to an list of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x185.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x186.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x187.png" xlink:type="simple"/></inline-formula> different items [<xref ref-type="bibr" rid="scirp.73429-ref5">5</xref>] . We find that <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x185.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x186.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x187.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x188.png" xlink:type="simple"/></inline-formula> such that if<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x185.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x186.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x187.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x188.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x189.png" xlink:type="simple"/></inline-formula>, the following recurrence holds. We find the average number of swaps done by the Quicksort from Equation (2) we find at <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x185.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x186.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x187.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x188.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x189.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x190.png" xlink:type="simple"/></inline-formula> the equation becomes</p><disp-formula id="scirp.73429-formula149"><label>(19)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/4-2860099x191.png"  xlink:type="simple"/></disp-formula><p>Assume that if we need to sort list of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x192.png" xlink:type="simple"/></inline-formula> of different items, where their positions in the list are counted from left to right by <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x192.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x193.png" xlink:type="simple"/></inline-formula> [<xref ref-type="bibr" rid="scirp.73429-ref6">6</xref>] . First, the item at position 1 compared with the pivot. The number of items which are bigger than pivot and were animated during split operation is</p><disp-formula id="scirp.73429-formula150"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x194.png"  xlink:type="simple"/></disp-formula><p>Subsequently, we consider as well that pivots are uniformly picked and noticing that we have to number the final swap with the pivot at the end of split operation [<xref ref-type="bibr" rid="scirp.73429-ref21">21</xref>] , we get</p><disp-formula id="scirp.73429-formula151"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x195.png"  xlink:type="simple"/></disp-formula><p>So, we find the toll function given by</p><disp-formula id="scirp.73429-formula152"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x196.png"  xlink:type="simple"/></disp-formula><p>We find<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x197.png" xlink:type="simple"/></inline-formula>, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x197.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x198.png" xlink:type="simple"/></inline-formula>So the recurrence becomes</p><disp-formula id="scirp.73429-formula153"><label>(20)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/4-2860099x199.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.73429-formula154"><label>(21)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/4-2860099x200.png"  xlink:type="simple"/></disp-formula><p>We solve this recurrence relation by transforming into a differential equation. First multiply both sides by <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x201.png" xlink:type="simple"/></inline-formula></p><disp-formula id="scirp.73429-formula155"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x202.png"  xlink:type="simple"/></disp-formula><p>Let <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x203.png" xlink:type="simple"/></inline-formula></p><disp-formula id="scirp.73429-formula156"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x204.png"  xlink:type="simple"/></disp-formula><p>multiplying by <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x205.png" xlink:type="simple"/></inline-formula> and summing over<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x205.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x206.png" xlink:type="simple"/></inline-formula>, so as to get the generating function for the average number of swaps consider the generating function <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x205.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x206.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x207.png" xlink:type="simple"/></inline-formula></p><disp-formula id="scirp.73429-formula157"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x208.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.73429-formula158"><label>(22)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/4-2860099x209.png"  xlink:type="simple"/></disp-formula><p>Multiplying by<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x210.png" xlink:type="simple"/></inline-formula>, the differential equation is simplified to</p><disp-formula id="scirp.73429-formula159"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x211.png"  xlink:type="simple"/></disp-formula><p>We can solve this differential equation using basic principles</p><disp-formula id="scirp.73429-formula160"><label>(23)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/4-2860099x212.png"  xlink:type="simple"/></disp-formula><p>This differential equation is a Cauchy-Euler equation [<xref ref-type="bibr" rid="scirp.73429-ref22">22</xref>] . We change variables<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x213.png" xlink:type="simple"/></inline-formula>, it is <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x213.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x214.png" xlink:type="simple"/></inline-formula></p><disp-formula id="scirp.73429-formula161"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x215.png"  xlink:type="simple"/></disp-formula><p>we use the differential operator <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x216.png" xlink:type="simple"/></inline-formula> to solve the differential equation which defined as follows</p><disp-formula id="scirp.73429-formula162"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x217.png"  xlink:type="simple"/></disp-formula><p>applying the operator<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x218.png" xlink:type="simple"/></inline-formula>, our equation becomes</p><disp-formula id="scirp.73429-formula163"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x219.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.73429-formula164"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x220.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.73429-formula165"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x221.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.73429-formula166"><graphic  xlink:href="http://html.scirp.org/file/4-2860099x222.png"  xlink:type="simple"/></disp-formula><p>and applying the pervious technique we find the solution of the differential equation given by</p><disp-formula id="scirp.73429-formula167"><label>(24)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/4-2860099x223.png"  xlink:type="simple"/></disp-formula><p>where <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x224.png" xlink:type="simple"/></inline-formula> is constant of integration. In terms of series</p><disp-formula id="scirp.73429-formula168"><label>(25)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/4-2860099x225.png"  xlink:type="simple"/></disp-formula><p>Extracting the coefficients, the expected number of swaps for Multi-pivot Quicksort is</p><disp-formula id="scirp.73429-formula169"><label>(26)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/4-2860099x226.png"  xlink:type="simple"/></disp-formula></sec><sec id="s4"><title>4. Conclusion</title><p>We study a new version from Dual-pivot Quicksort algorithm when we have some other number <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x227.png" xlink:type="simple"/></inline-formula> of pivots. Hence, we discuss the idea of picking <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x227.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x228.png" xlink:type="simple"/></inline-formula> pivots <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x227.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x228.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/4-2860099x229.png" xlink:type="simple"/></inline-formula> by random way and splitting the list simultaneously according to these. Moreover, we derive a generalization of this result for multi process. We show that the average number of swaps done by Multi-pivot Quicksort process and we present a special case. Furthermore, we present the relationship between the average number of swaps of Multi-pivot Quicksort and Stirling numbers of the first kind.</p></sec><sec id="s5"><title>Acknowledgements</title><p>We thank the Editor and the referee for their comments.</p></sec><sec id="s6"><title>Cite this paper</title><p>Ragab, M., El- Desouky, B.E.-S. and Nader, N. (2017) Ana- lysis of the Multi-Pivot Quicksort Process. Open Journal of Modelling and Simulation, 5, 47-58. http://dx.doi.org/10.4236/ojmsi.2017.51004</p></sec></body><back><ref-list><title>References</title><ref id="scirp.73429-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">Ragab, M., El-Desouky, B.S. and Nader, N. (2016) On the Convergence of the Dual-Pivot Quicksort Process. Open Journal of Modelling and Simulation, 4, 1-15.  
https://doi.org/10.4236/ojmsi.2016.41001</mixed-citation></ref><ref id="scirp.73429-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">Hennequin, P. (1991) Analyse en moyenne d’algorithmes: Tri rapide et arbres de recherche. Ph.D. Thesis, Ecole Politechnique, Palaiseau.</mixed-citation></ref><ref id="scirp.73429-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">Sedgewick, R. and Flajolet, P. (1996) An Introduction to the Analysis of Algorithms. Addison-Wesley, Longman, 1-492.</mixed-citation></ref><ref id="scirp.73429-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">Hoare, C.A.R. (1962) Quicksort. Computer Journal, 5, 10-15.  
https://doi.org/10.1093/comjnl/5.1.10</mixed-citation></ref><ref id="scirp.73429-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">Ragab, M. (2011) Partial Quicksort and Weighted Branching Processes. Ph.D. Thesis, 28-35.</mixed-citation></ref><ref id="scirp.73429-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">Ragab, M. and Rosler, U. (2014) The Quicksort Process. Stochastic Processes and Their Applications, 2, 1036-1054. https://doi.org/10.1016/j.spa.2013.09.014</mixed-citation></ref><ref id="scirp.73429-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">Ragab, M. (2015) On the Quicksort Algorithm and Its Related Process. Journal of Mathematical Modeling and Operations Research, 13-30.</mixed-citation></ref><ref id="scirp.73429-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">Sedgewic, R.K. (1975) Quicksort. Ph.D. Thesis, Garland Publishing.</mixed-citation></ref><ref id="scirp.73429-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">Iliopoulos, V. and Penman, D.P. (2012) Dual Pivot Quicksort. Discrete Mathematics, Algorithms and Applications, 4, Article ID: 1250041.  
https://doi.org/10.1142/S1793830912500413</mixed-citation></ref><ref id="scirp.73429-ref10"><label>10</label><mixed-citation publication-type="other" xlink:type="simple">Wild, S. and Nebel, M.E. (2012) Average Case Analysis of Java 7’s Dual Pivot Quicksort. Proceedings of the 20th European Symposium on Algorithms (ESA’12), 825-836.  
https://doi.org/10.1007/978-3-642-33090-2_71</mixed-citation></ref><ref id="scirp.73429-ref11"><label>11</label><mixed-citation publication-type="other" xlink:type="simple">Iliopoulos, V. (2013) Quicksorting on Multiple Pivots and a Vandermonde Matrix. Seminar in the Department of Mathematical Sciences, University of Essex, Colchester.</mixed-citation></ref><ref id="scirp.73429-ref12"><label>12</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, Colchester.  
http://repository.essex.ac.uk/13266</mixed-citation></ref><ref id="scirp.73429-ref13"><label>13</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> RAIRO—Theoretical Informatics and Application</source><volume> 23</volume>,<fpage> 335</fpage>-<lpage>343</lpage>.<pub-id pub-id-type="doi"></pub-id></mixed-citation></ref><ref id="scirp.73429-ref14"><label>14</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. https://doi.org/10.1016/0304-4149(92)90035-O</mixed-citation></ref><ref id="scirp.73429-ref15"><label>15</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. https://doi.org/10.1007/BF02679621</mixed-citation></ref><ref id="scirp.73429-ref16"><label>16</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. https://doi.org/10.1002/rsa.10007</mixed-citation></ref><ref id="scirp.73429-ref17"><label>17</label><mixed-citation publication-type="other" xlink:type="simple">El-Desouky, B.S. and Cakic, N.P. (2011) Generalized Higher Order Stirling Numbers. Mathematical and Computer Modelling, 54, 2848-2857.  
https://doi.org/10.1016/j.mcm.2011.07.005</mixed-citation></ref><ref id="scirp.73429-ref18"><label>18</label><mixed-citation publication-type="other" xlink:type="simple">El-Desouky, B.S., Cakic, N.P. and Mansour, T. (2010) Modified Approach to Generalized Stirling Numbers via Differential Operators. Applied Mathematics Letters, 23, 115-120.  
https://doi.org/10.1016/j.aml.2009.08.018</mixed-citation></ref><ref id="scirp.73429-ref19"><label>19</label><mixed-citation publication-type="other" xlink:type="simple">El-Desouky, B.S, El-Bedwehy, N., Mustafa, A. and Menem, F. (2014) A Family of Generalized Stirling Numbers of the First Kind. Applied Mathematics, 5, 1573-1585.  
https://doi.org/10.4236/am.2014.510150</mixed-citation></ref><ref id="scirp.73429-ref20"><label>20</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 Orleans, 11-13 January 2004, 300-307.</mixed-citation></ref><ref id="scirp.73429-ref21"><label>21</label><mixed-citation publication-type="other" xlink:type="simple">Knuth, D.E. (1973) The Art of Computer Programming, Volume III: Sorting and Searching. Addison-Wesley, Upper Saddle River.</mixed-citation></ref><ref id="scirp.73429-ref22"><label>22</label><mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>El-Desouky</surname><given-names> B.S. </given-names></name>,<etal>et al</etal>. (<year>2011</year>)<article-title>Generalized String Numbers of the First Kind: Modified Approach</article-title><source> Journal of Pure and Mathematics Advances and Applications</source><volume> 5</volume>,<fpage> 43</fpage>-<lpage>59</lpage>.<pub-id pub-id-type="doi"></pub-id></mixed-citation></ref></ref-list></back></article>