{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/sketching-and-streaming-for-dictionary","title":"Sketching and Streaming for Dictionary Compression","arxiv_id":"2310.17980","date":"2023-10-27","proceeding":null,"authors":["Ruben Becker","Matteo Canton","Davide Cenzato","Sung-Hwan Kim","Bojana Kodric","Nicola Prezza"],"abstract":"We initiate the study of sub-linear sketching and streaming techniques for estimating the output size of common dictionary compressors such as Lempel-Ziv '77, the run-length Burrows-Wheeler transform, and grammar compression. To this end, we focus on a measure that has recently gained much attention in the information-theoretic community and which approximates up to a polylogarithmic multiplicative factor the output sizes of those compressors: the normalized substring complexity function $\\delta$. We present a data sketch of $O(\\epsilon^{-3}\\log n + \\epsilon^{-1}\\log^2 n)$ words that allows computing a multiplicative $(1\\pm \\epsilon)$-approximation of $\\delta$ with high probability, where $n$ is the string length. The sketches of two strings $S_1,S_2$ can be merged in $O(\\epsilon^{-1}\\log^2 n)$ time to yield the sketch of $\\{S_1,S_2\\}$, speeding up by orders of magnitude tasks such as the computation of all-pairs \\emph{Normalized Compression Distances} (NCD). If random access is available on the input, our sketch can be updated in $O(\\epsilon^{-1}\\log^2 n)$ time for each character right-extension of the string. This yields a polylogarithmic-space algorithm for approximating $\\delta$, improving exponentially over the working space of the state-of-the-art algorithms running in nearly-linear time. Motivated by the fact that random access is not always available on the input data, we then present a streaming algorithm computing our sketch in $O(\\sqrt n \\cdot \\log n)$ working space and $O(\\epsilon^{-1}\\log^2 n)$ worst-case delay per character. We show that an implementation of our streaming algorithm can estimate {\\delta} on a dataset of 189GB with a throughput of 203MB per minute while using only 5MB of RAM, and that our sketch speeds up the computation of all-pairs NCD distances by one order of magnitude, with applications to phylogenetic tree reconstruction.","url_abs":"https://arxiv.org/abs/2310.17980v3","url_pdf":"https://arxiv.org/pdf/2310.17980v3.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"links_only","authors_date_abstract":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license), from the Kaggle arXiv metadata snapshot of 2026-09-12"},"code_links":[{"paper_slug":"sketching-and-streaming-for-dictionary","repo_url":"https://github.com/regindex/substring-complexity","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"none","reach":null}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":null,"mcp":null,"developers":"https://syntology.ai/developers"},"arxiv_metadata":null,"syntology_extracted_results":null}