We revisit the classical algorithms for searching over sorted sets to introduce an algorithm refinement, called Adaptive search, that combines the good features of Interpolation search and those of Binary search. W.r.t. Interpolation search, only a constant number of extra comparisons is introduced. Yet, under diverse input data distributions our algorithm shows costs comparable to that of Interpolation search, i.e., O(log log n) while the worst-case cost is always in O(log n), as with Binary search. On benchmarks drawn from large datasets, both synthetic and real-life, Adaptive searchscores better times and lesser memory accesses even than Santoro and Sidney's Interpolation-Binary search.
Adaptive Search over Sorted Sets
BONASERA, BIAGIOPrimo
Membro del Collaboration Group
;FERRARA, EMILIOSecondo
Membro del Collaboration Group
;FIUMARA, GiacomoMembro del Collaboration Group
;PROVETTI, Alessandro
Ultimo
Membro del Collaboration Group
2015-01-01
Abstract
We revisit the classical algorithms for searching over sorted sets to introduce an algorithm refinement, called Adaptive search, that combines the good features of Interpolation search and those of Binary search. W.r.t. Interpolation search, only a constant number of extra comparisons is introduced. Yet, under diverse input data distributions our algorithm shows costs comparable to that of Interpolation search, i.e., O(log log n) while the worst-case cost is always in O(log n), as with Binary search. On benchmarks drawn from large datasets, both synthetic and real-life, Adaptive searchscores better times and lesser memory accesses even than Santoro and Sidney's Interpolation-Binary search.File | Dimensione | Formato | |
---|---|---|---|
adaptive-search-JDA-sub2.pdf
accesso aperto
Tipologia:
Documento in Pre-print (manoscritto inviato all'editore, precedente alla peer review)
Licenza:
Tutti i diritti riservati (All rights reserved)
Dimensione
107.59 kB
Formato
Adobe PDF
|
107.59 kB | Adobe PDF | Visualizza/Apri |
bonasera-adaptive_search-JDA15.pdf
accesso aperto
Tipologia:
Versione Editoriale (PDF)
Licenza:
Tutti i diritti riservati (All rights reserved)
Dimensione
210.72 kB
Formato
Adobe PDF
|
210.72 kB | Adobe PDF | Visualizza/Apri |
Pubblicazioni consigliate
I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.