Abstract
We give tight cell-probe bounds for the time to compute convolution, multiplication and Hamming distance in a stream. The cell probe model is a particularly strong computational model and subsumes, for example, the popular word RAM model. • We first consider online convolution where the task is to output the inner product between a fixed n-dimensional vector and a vector of the n most recent values from a stream. One symbol of the stream arrives at a time and the each output must be computed before the next symbols arrives. • Next we show bounds for online multiplication where the stream consists of pairs of digits, one from each of two n digit numbers that are to be multiplied. One pair arrives at a time and the task is to output a single new digit from the product before the next pair of digits arrives. • Finally we look at the online Hamming distance problem where the Hamming distance is outputted instead of the inner product. For each of these three problems, we give a lower bound of Ω ( δ w log n ) time on average per output, where δ is the number of bits needed to represent an input symbol and w is the cell or word size. We argue that these bound are in fact tight within the cell probe model.
Highlights
We consider the complexity of three related and fundamental problems: computing the convolution of two vectors, multiplying two integers, and computing the Hamming distance between two strings
We look at the online Hamming distance problem where the Hamming distance is computed instead of the inner product
For each of these three problems, we give a lower bound of Ω ((δ /w) log n) time on average per output symbol, where δ is the number of bits needed to represent an input symbol and w is the cell or word size. We argue that these bounds are tight within the cell probe model
Summary
We consider the complexity of three related and fundamental problems: computing the convolution of two vectors, multiplying two integers, and computing the Hamming distance between two strings We study these problems in an online or streaming context and provide matching upper and lower bounds in the cell-probe model. In the cell-probe model with w bits per cell, for any positive integers q and n, and any randomised algorithm solving the online multiplication problem in base q, there exist instances such that computing the n least significant digits of the product takes Ω((δ /w)n log n) expected time, where δ = log q. In the cell-probe model with w bits per cell, for any positive integers q and n, and any randomised algorithm solving the online Hamming distance problem, there exist instances such that the expected amortised time is Ω((δ /w) log n) per arriving value, where δ = min{log q, log n}. These methods have been extended to allow searching for patterns in rapidly processed data streams [6, 9]
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have