paper

Probabilistic Counting in Generalized Turnstile Models

arXiv:2310.14977

Abstract

Traditionally in the turnstile model of data streams, there is a state vector which is updated through a stream of pairs where and . Upon receiving , . A distinct count algorithm in the turnstile model takes one pass of the stream and then estimates $\norm{x}_0 = |\{i\in[n]\mid x_i\neq 0\}|$ (aka , the Hamming norm). In this paper, we define a finite-field version of the turnstile model. Let be any finite field. Then in the -turnstile model, for each , ; for each update , . The update is then computed in the field . A distinct count algorithm in the -turnstile model takes one pass of the stream and estimates $\norm{x}_{0;F} = |\{i\in[n]\mid x_i\neq 0_F\}|$. We present a simple distinct count algorithm, called -\pcsa{}, in the -turnstile model for any finite field . The new -\pcsa{} algorithm takes bits of memory and estimates $\norm{x}_{0;F}$ with relative error where the hidden constant depends on the order of the field. -\pcsa{} is straightforward to implement and has several applications in the real world with different choices of . Most notably, it makes distinct count with deletions as simple as distinct count without deletions.

Probabilistic Counting in Generalized Turnstile Models · wovepaper