New Results for Adaptive and Approximate Counting of Inversions
Abstract
Counting inversions is a classic and important problem in databases. The number of inversions, , in a list is defined as the number of pairs with . In this paper, new results for this problem are presented: (1) In the I/O-model, an adaptive algorithm is presented for calculating . The algorithm performs I/Os. When , then the algorithm takes only I/Os. This algorithm can be modified to match the state of the art for the comparison based model and the RAM model. (2) In the RAM model, a linear-time algorithm is presented to obtain a tight estimate of ; specifically, a value which lies with high probability in the range . The state of the art linear-time algorithm works for the special case where is a permutation, i.e., each is a distinct integer in the range . In this paper, we handle a general case where each is a real number.
Keywords
Cite
@article{arxiv.1612.08097,
title = {New Results for Adaptive and Approximate Counting of Inversions},
author = {Saladi Rahul},
journal= {arXiv preprint arXiv:1612.08097},
year = {2016}
}