Join Our Newsletter

Free Online Productivity Tools
i2Speak
i2Symbol
i2OCR
iTex2Img
iWeb2Print
iWeb2Shot
i2Type
iPdf2Split
iPdf2Merge
i2Bopomofo
i2Arabic
i2Style
i2Image
i2PDF
iLatex2Rtf
Sci2ools

SODA

2003

ACM

2003

ACM

In a recent paper, Ajtai et al. [1] give a streaming algorithm to count the number of inversions in a stream Ä ¾ Ñ Ò using two passes and Ç´¯ ½ ÔÒÐÓ Ò´ÐÓ Ñ·ÐÓ Òµµspace. Here, we present a simple randomized streaming algorithm for the same problem that uses one pass and Ç´¯ ¿ ÐÓ ¾ ÒÐÓ Ñµ space. Our algorithm is based on estimating quantiles of the items already seen in the stream, and using that to estimate the number of inversions involving each element. 1 Preliminaries Let Ä be the list of elements appearing as a stream with the ’th element being denoted by Ä . The quantity we want to approximate is Ã´Äµ, the number of inversions in Ä; this is the number of pairs such that Ä Ä . In order to simplify our notation, we restate this in an equivalent form, that of counting non-inversions in the list when the total order, and thus the results of all strict comparisons, has been reversed. Thus, all comparisons between list elements in what fol...

Related Content

Added |
01 Nov 2010 |

Updated |
01 Nov 2010 |

Type |
Conference |

Year |
2003 |

Where |
SODA |

Authors |
Anupam Gupta, Francis Zane |

Comments (0)