Papers
Topics
Authors
Recent
Search
2000 character limit reached

Sorting with Persistent Comparison Errors

Updated 9 July 2026
  • The paper presents algorithmic milestones achieving O(n log n) time with O(log n) maximum dislocation under persistent error models.
  • It systematically analyzes multiple models—recurrent random, dirty versus clean, and adversarial—to highlight trade-offs between error persistence and sorting quality.
  • The findings demonstrate that, due to fixed comparator biases, approximate sorting with controlled dislocation becomes the natural objective over exact recovery.

Searching arXiv for recent and foundational papers on persistent comparison errors in sorting. Sorting with persistent comparison errors studies comparison-based ordering when the response associated with a pair of elements is not freshly randomized at each query. Instead, once the comparator induces an outcome for a pair, repeating the same comparison yields the same answer. In the Braverman–Mossel setting, each pairwise comparison is wrong with fixed probability pp and then remains fixed; in learning-augmented variants, a fast but unreliable comparator induces a fixed tournament that may disagree with the true order; and in adversarial formulations, sufficiently close items or comparisons incident to a bad set may be answered arbitrarily (Geissmann et al., 2018, Geissmann et al., 2017, Bai et al., 2023, Trevisan, 2023, Jaiswal et al., 11 Feb 2025). Across these formulations, exact sorting is either impossible or no longer the operative objective, and the focus shifts to approximate orders with controlled dislocation, to approximation guarantees that respect an ambiguity radius, or to minimizing the number of expensive exact comparisons.

1. Model families and the meaning of persistence

The defining feature of persistence is that repeated queries on the same pair do not provide independent evidence. In the recurrent random model, the input consists of nn distinct elements, each pairwise comparison is wrong with fixed probability pp, errors are independent across pairs, and once the comparison outcome for a pair (x,y)(x,y) is determined, repeating that comparison later always yields the same outcome (Geissmann et al., 2017). The 2018 optimal-sorting formulation states the same basic regime as the persistent comparison error model introduced by Braverman and Mossel: every comparison between two elements is independently wrong with fixed probability pp, and comparisons cannot be repeated in any useful way because the outcome for a pair is persistent (Geissmann et al., 2018).

A second family replaces probabilistic recurrent errors by a fixed flawed comparator. In the dirty-versus-clean model, the algorithm receives a clean comparator <<, which is exact but expensive, and a dirty comparator, which is fast but may be wrong. For any distinct ai,aja_i,a_j, the dirty relation induces exactly one directed edge, so it forms a tournament rather than a total order, and it need not be transitive, so cycles can occur. This directly models persistent comparison errors as a fixed incorrect predictor of the true order (Bai et al., 2023).

A third family strengthens the adversarial aspect. In the adversarial comparator model, if xixj>1|x_i-x_j|>1, then the comparator must return the correct order, while if xixj1|x_i-x_j|\le 1, the answer may be arbitrary and can depend on the full history of previous queries; the objective becomes kk-approximate sorting or selection rather than exact recovery (Trevisan, 2023). In the robust-sorting tournament model, a tournament nn0 is nn1-imperfect with respect to a hidden order nn2 if every comparison between two good nodes nn3 is correct with respect to nn4, while any comparison involving at least one node in nn5 can be arbitrary (Jaiswal et al., 11 Feb 2025).

Model Persistence mechanism Primary objective
Recurrent random errors Each pair is wrong with fixed probability nn6, and repetitions return the same outcome Minimize maximum and total dislocation (Geissmann et al., 2017)
Dirty and clean comparisons Dirty comparator is a fixed possibly cyclic tournament; clean comparator is exact and expensive Minimize clean comparisons (Bai et al., 2023)
Adversarial comparator Close pairs may be answered arbitrarily, possibly adaptively nn7-approximate sorting/selection (Trevisan, 2023)
nn8-imperfect tournament Edges incident to bad nodes may be arbitrary Maximize agreement with hidden order (Jaiswal et al., 11 Feb 2025)

A common misconception is to treat these settings as ordinary noisy sorting with resampling. That is inaccurate. In the persistent regime, repeated comparison does not attenuate error by majority vote, because the same pairwise edge reappears unchanged. This distinction drives both the impossibility results and the algorithm design.

2. Quality criteria and error measures

The standard quality notion in persistent-error sorting is dislocation. If nn9 has true rank pp0 and appears at position pp1 in the output permutation, then its dislocation is

pp2

The maximum dislocation is

pp3

and the total dislocation is

pp4

Equivalent formulations use pp5, pp6, and

pp7

These measures are central in the Braverman–Mossel line of work and in subsequent pp8- and pp9-time algorithms (Geissmann et al., 2017, Geissmann et al., 2018).

The dirty-comparison model uses a different, explicitly local error measure. For each item,

(x,y)(x,y)0

Thus (x,y)(x,y)1 counts how many dirty comparisons incident to (x,y)(x,y)2 disagree with the true order. This is an element-wise error measure rather than a global count of bad pairs. If one introduces a global error measure (x,y)(x,y)3, then Jensen’s inequality gives

(x,y)(x,y)4

and for dirty comparisons (x,y)(x,y)5 (Bai et al., 2023).

Adversarial formulations replace dislocation by approximation with respect to an ambiguity radius. The definition (x,y)(x,y)6 means (x,y)(x,y)7. A (x,y)(x,y)8-approximate sorting is one in which every inversion involves elements differing by at most (x,y)(x,y)9, and a pp0-approximate pp1-selection is one where the returned item can appear as the pp2-th item of some pp3-approximate sorting. The paper proves the equivalence

pp4

where pp5 is the true pp6-th smallest element (Trevisan, 2023).

The robust-sorting tournament model measures output quality by common subsequence length. If pp7 is the returned ordering and pp8 the hidden truth, the target is to maximize pp9, and the main guarantee is

<<0

This metric is tailored to a setting in which only a bounded set of vertices can corrupt pairwise outcomes (Jaiswal et al., 11 Feb 2025).

These definitions reflect a broader shift in objective. Because perfect sorting is impossible in the persistent-error model, the natural goal is not exact recovery but the strongest achievable structural approximation under the available comparator semantics.

3. Approximate sorting algorithms under recurrent random errors

A basic algorithmic milestone is Window Sort, designed for recurrent random comparison errors. It starts with window <<1; in each iteration, every element compares only against its <<2 left neighbors and <<3 right neighbors in the current permutation, computes a local score, reorders by the resulting computed ranks, and then halves the window size until <<4. If <<5 is currently at position <<6, then its computed rank is

<<7

where <<8 is the number of local comparisons where <<9 is reported larger than the other element. The algorithm runs in ai,aja_i,a_j0 time, since an iteration with window ai,aja_i,a_j1 does ai,aja_i,a_j2 work and the geometric sum over halving windows is ai,aja_i,a_j3 (Geissmann et al., 2017).

The analysis is controlled by local error sets. For an element ai,aja_i,a_j4 and window size ai,aja_i,a_j5, ai,aja_i,a_j6 is the set of errors among comparisons between ai,aja_i,a_j7 and every ai,aja_i,a_j8. If for all elements ai,aja_i,a_j9 and for all window sizes xixj>1|x_i-x_j|>10,

xixj>1|x_i-x_j|>11

then Window Sort returns a sequence whose maximum dislocation is at most

xixj>1|x_i-x_j|>12

From Chernoff bounds and a union bound, the paper derives that with probability at least xixj>1|x_i-x_j|>13, Window Sort has maximum dislocation at most

xixj>1|x_i-x_j|>14

where

xixj>1|x_i-x_j|>15

Its expected total dislocation is at most

xixj>1|x_i-x_j|>16

The paper also gives a slower window-shrinking variant xixj>1|x_i-x_j|>17, with runtime

xixj>1|x_i-x_j|>18

valid for xixj>1|x_i-x_j|>19 (Geissmann et al., 2017).

A subsequent line of work shows that these dislocation guarantees can be achieved in optimal comparison time. The 2018 paper on optimal sorting under persistent comparison errors presents the first randomized xixj1|x_i-x_j|\le 10-time algorithm with xixj1|x_i-x_j|\le 11 maximum dislocation and xixj1|x_i-x_j|\le 12 total dislocation with high probability. Its structure rests on two subproblems: inserting one element into an almost-sorted sequence while preserving xixj1|x_i-x_j|\le 13-scale dislocation, and simultaneously inserting xixj1|x_i-x_j|\le 14 elements into an almost-sorted sequence of xixj1|x_i-x_j|\le 15 elements so that the resulting xixj1|x_i-x_j|\le 16-element sequence remains almost sorted. The key rank-estimation primitive is a noisy binary search that, if xixj1|x_i-x_j|\le 17 has maximum dislocation at most xixj1|x_i-x_j|\le 18, finds an approximate insertion position xixj1|x_i-x_j|\le 19 satisfying

kk0

in kk1 time with probability at least kk2. The full RiffleSort algorithm randomly partitions the input into batches kk3, approximately sorts kk4 using WindowSort, then alternates merge steps based on approximate ranks and repair steps using WindowSort (Geissmann et al., 2018).

The 2025 paper on persistent random comparison faults rephrases the same high-level architecture in terms of NoisySearch and BasketSort. For constants kk5, and in particular for the special case kk6, it states that randomized RiffleSort runs in

kk7

worst-case time and returns a permutation with maximum dislocation kk8 and total dislocation kk9 with high probability. NoisySearch takes an approximately sorted sequence nn00 of size nn01 with maximum dislocation at most nn02, and returns an index nn03 in

nn04

in nn05 time with probability at least nn06. BasketSort takes a sequence nn07 with an upper bound nn08, runs in

nn09

time, and outputs a sequence with maximum dislocation nn10 and total dislocation nn11 with high probability (Geissmann et al., 27 Aug 2025).

Taken together, these results establish a progression from quadratic-time multiscale local repair to nn12-time approximate sorting with asymptotically optimal dislocation guarantees.

4. Dirty comparators, clean repair, and learning-augmented sorting

The dirty-versus-clean model isolates a distinct persistent-error scenario: a cheap predictor is fixed and potentially wrong, while a second comparator is exact but expensive. Formally, the dirty relation induces exactly one directed edge on each distinct pair, hence a tournament, and it may contain cycles. The per-item disagreement count is

nn13

The central theorem states that there is a randomized algorithm that sorts within nn14 running time, nn15 dirty queries, and

nn16

clean comparisons in expectation. A matching lower bound shows that no sorting algorithm can use

nn17

clean comparisons (Bai et al., 2023).

The algorithmic idea is randomized incremental BST insertion. Items are processed in uniformly random order. Each new item first follows a dirty search path in the current BST, while maintaining boundary values nn18 that delimit where the item could still fit. When the dirty path reaches a nil leaf, the algorithm backtracks to the last valid step nn19 such that nn20, and then resumes with clean comparisons from that point. The dirty phase is therefore used only as guidance; the clean phase verifies and repairs precisely the part of the path where the dirty comparator became inconsistent with the true order.

The analysis hinges on two facts. First, the random insertion order makes the BST balanced enough in expectation, yielding nn21 for the dirty-search length nn22. Second, the clean correction is governed by nn23. If the active subtree size at step nn24 satisfies nn25, then

nn26

From this, the paper derives

nn27

and therefore the clean search for item nn28 uses expected length

nn29

Summing over the items yields the overall

nn30

clean-comparison bound (Bai et al., 2023).

A notable feature is smooth degradation. If every nn31 is small, then nn32 per item and the clean comparison complexity is nn33. If the predictor is poor and nn34 can be as large as nn35, then

nn36

matching classical comparison sorting. The same paper also treats multiple dirty predictors: if predictor nn37 has per-item errors nn38, then there is a randomized algorithm using

nn39

clean comparisons, via a reduction to prediction with expert advice using Hedge (Bai et al., 2023).

This framework differs sharply from recurrent random errors. It does not attempt to average away uncertainty by repeated dirty queries. Instead, it exploits the structure of a fixed flawed predictor and pays exact-comparison cost only where local inconsistency forces repair.

5. Lower bounds and impossibility phenomena

Persistent comparison errors impose strong information-theoretic limits. In the recurrent random model, no randomized algorithm can achieve maximum dislocation nn40 with high probability, and no randomized algorithm can achieve expected total dislocation nn41, regardless of running time. One proof route uses a pairwise inversion lemma: for any randomized algorithm nn42 and any nn43, the probability that nn44 outputs nn45 and nn46 in the wrong relative order is at least

nn47

From this, choosing pairs at distance nn48 yields the nn49 maximum-dislocation barrier, and considering disjoint adjacent pairs yields the nn50 expected total-dislocation barrier (Geissmann et al., 2017).

The optimal-sorting papers sharpen the computational side of the barrier. They state that if one could guarantee nn51 maximum dislocation in nn52 time under persistent errors, then one would obtain an nn53-time exact sorting algorithm even without errors, contradicting the classical lower bound for comparison sorting. Accordingly, nn54 time is necessary for nn55-scale maximum dislocation, while nn56 maximum dislocation and nn57 total dislocation are asymptotically optimal targets (Geissmann et al., 2018, Geissmann et al., 27 Aug 2025).

The dirty-comparison setting has an analogous lower bound, but indexed by local prediction error rather than by dislocation. No sorting algorithm can use

nn58

clean comparisons. The lower-bound argument is information-theoretic: if too few clean comparisons are made, the algorithm cannot distinguish among the many permutations consistent with the dirty comparator and the error budget (Bai et al., 2023).

Adversarial comparison models introduce further impossibility phenomena. In the threshold-nn59 adversarial comparator model, no algorithm can do better than a factor-nn60 approximation in general, because adversarial comparisons can make a cluster of nearby values indistinguishable. The same paper cites the Ajtai–Feldman–Hassidim–Nelson lower bound

nn61

for deterministic nn62-approximate sorting and selection, while randomized algorithms achieve polylogarithmic overhead over linear-time baselines (Trevisan, 2023).

Related lower bounds appear in downstream problems. For longest increasing subsequence under persistent comparison errors, the achievable approximation factor is asymptotically limited: there exists a distribution over instances on which no algorithm can guarantee better than an nn63 approximation with high probability, and any nn64-approximation algorithm requires nn65 comparisons even in the absence of errors (Geissmann, 2018).

These lower bounds show that persistent errors do not merely perturb classical sorting. They change the optimization target and define a new frontier where logarithmic maximum displacement, linear total displacement, or logarithmic clean-comparison dependence on local error become the natural optimum.

Several adjacent areas refine the structural picture of persistence. In the energy-based noisy comparator model, comparison outcomes are randomized with bias determined by nn66 and by a weight nn67, through probabilities of the form

nn68

The sorting process is modeled as a finite Markov chain on permutations, and the paper shows that repeatedly comparing adjacent elements can be better than comparing arbitrary pairs: for three elements, the stationary ratios include

nn69

The conclusion is about long-run behavior: local adjacent-comparison dynamics can concentrate more stationary mass on the correctly sorted permutation than more global noisy dynamics (Geissmann et al., 2016).

A related Markovian viewpoint appears in swap-based noisy sorting. In nn70, a random pair of positions at distance at most nn71 is compared, the comparison is wrong with probability nn72, and a swap is performed if the noisy comparison declares the pair out of order. For nn73, the chain is reversible and the stationary distribution satisfies

nn74

where nn75 is the inversion count. The paper proves that, with high probability for nn76,

nn77

and that the convergence-time proxies nn78 and nn79 are both nn80. For nn81, the chain is non-reversible and stationary quality is much worse, with

nn82

and

nn83

This yields a clear trade-off between faster convergence for larger nn84 and better stationary quality for smaller nn85 (Gavenčiak et al., 2018).

Persistent-error sorting also functions as a subroutine in other problems. For LIS under persistent comparison errors, approximate sorting with low maximum dislocation is the key bridge. If an approximate order nn86 satisfies nn87, then every pair of elements separated by at least nn88 positions in nn89 appears in the correct relative order in the true sorted order, and the longest nn90-distant subsequence nn91 satisfies

nn92

Using an nn93-time approximate sorting algorithm with maximum dislocation nn94, the paper obtains an nn95-approximation to LIS in nn96 time with probability at least nn97 (Geissmann, 2018).

Robust sorting in a nn98-imperfect tournament yields a different application profile. The robust-sorting paper gives a randomized algorithm that queries

nn99

edges and outputs pp00 such that

pp01

Its quick-sort-like recursion uses triangle detection, sampled balance tests, and a triangle-versus-concatenation-loss bound. The same framework leads to the first pp02 FPT linear-time approximation algorithm for Ulam-pp03-Median, with runtime

pp04

and approximation factor pp05 with probability at least pp06 (Jaiswal et al., 11 Feb 2025).

The broader significance of these results is methodological rather than merely technical. Persistent comparison errors force algorithms to work with structure—local neighborhoods, nearly sorted intermediates, error-sensitive repairs, tournament geometry, and concentration in stationary distributions—because repetition alone does not create new information. This suggests that the central organizing principle of the area is not noise reduction by redundancy, but approximation under irrevocable comparator bias.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Sorting with Persistent Comparison Errors.