Pivot partioning

From Algowiki
Revision as of 12:54, 30 April 2015 by Weihe (talk | contribs) (Created page with "==Input== # An ordered sequence <math>S</math> of length <math>n</math>. # A definition of Genericity#Comparison|comparis...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Input

  1. An ordered sequence [math]\displaystyle{ S }[/math] of length [math]\displaystyle{ n }[/math].
  2. A definition of comparison on the component type of [math]\displaystyle{ S }[/math].
  3. A pivot valiue of the component type of [math]\displaystyle{ S }[/math].

Output

A permutation of [math]\displaystyle{ S }[/math] such that [math]\displaystyle{ S[i] \le S[i+1] }[/math] for all [math]\displaystyle{ i\in \{1,...,n-1\} }[/math].

Objective

N/A

Complexity

Polynomial.

Known algorithms

  1. Pivot partitioning by scanning