Counting inversions adaptively

Counting inversions adaptively

0.00 Avg rating0 Votes
Article ID: iaor201527234
Volume: 115
Issue: 10
Start Page Number: 769
End Page Number: 772
Publication Date: Oct 2015
Journal: Information Processing Letters
Authors:
Keywords: subsequence
Abstract:

Consider a sequence X of n elements, where the number of inversions in X is Inv. We give a simple linear‐time transformation that reduces the problem of counting the inversions in X to that of counting inversions within disjoint subsequences of X of O ( 1 + ( Inv / n ) 2 ) equ1 elements each. In accordance, we can apply our transformation for counting inversions adaptively in O ( n lg ( Inv / n ) ) equ2 time. Alternatively, if the elements are integers, we achieve a running time of O ( n lg ( Inv / n ) ) equ3 in the Word‐RAM model of computation.

Reviews

Required fields are marked *. Your email address will not be published.