Cover of Probabilistic Data Structures and Algorithms for Big Data Applications

Andrii Gakhov · 2019

Probabilistic Data Structures and Algorithms

for Big Data Applications

A technical book about popular space-efficient data structures and fast algorithms that are extremely useful in modern Big Data applications.

Author
Andrii Gakhov
Published
2019, Books on Demand (BoD)
Paperback
ISBN 978-3-7481-9048-6, 220 pages
E-book
Kindle, ASIN B07MYKTY8W
Editions
English, Russian, Ukrainian, Simplified Chinese

Where to buyFree preview

BookAuthority: Best Probabilistic Algorithms eBooks of All Time — Winner

About the book

Probabilistic data structures is a common name for data structures based mostly on different hashing techniques. Unlike regular (or deterministic) data structures, they always provide approximated answers but with reliable ways to estimate possible errors. Fortunately, the potential losses or errors are fully compensated for by extremely low memory requirements, constant query time, and scaling, three factors that become important in Big Data applications.

While it is impossible to cover all the existing amazing solutions, this book is to highlight their common ideas and important areas of application, including membership querying, counting, stream mining, and similarity estimation.

The purpose of this book is to introduce technology practitioners, including software architects and developers, as well as technology decision makers to probabilistic data structures and algorithms. Reading this book, you will get a theoretical and practical understanding of probabilistic data structures and learn about their common uses.

  • Learn how to solve practical issues of massive data handling
  • Master the theoretical aspects of probabilistic data structures
  • Identify the right data structures for your particular problems

This is not a book for scientists, but to gain the most out of it you will need to have basic mathematical knowledge and an understanding of the general theory of data structures and algorithms.

Table of contents

  1. Hashing

    A brief overview of popular hash functions and hash tables that are widely used in probabilistic data structures.

    • Cryptographic hash functions
    • Non-cryptographic hash functions
    • Hash tables
  2. Membership

    The most well-known probabilistic data structures that are used to answer approximate membership queries.

    • Bloom filter
    • Counting Bloom filter
    • Quotient filter
    • Cuckoo filter
  3. Cardinality

    Data structures that allow to estimate the number of unique elements in a dataset.

    • Linear Counting
    • Probabilistic Counting
    • LogLog and HyperLogLog
  4. Frequency

    Solutions for common problems in streaming applications, such as finding the frequency of an element, filtering the most frequent elements in the stream, detecting trending elements.

    • Majority algorithm
    • Frequent algorithm
    • Count Sketch
    • Count–Min Sketch
  5. Rank

    Data structures to estimate quantiles and percentiles in a data stream using only one pass through the data.

    • Random sampling
    • q-digest
    • t-digest
  6. Similarity

    How to efficiently solve the nearest neighbor problem for large datasets using sub-linear in time solutions.

    • Locality-sensitive hashing
    • MinHash
    • SimHash

Editions

Where to buy

The English edition.

Free preview

Read the first pages: the preface, the table of contents and the beginning of the first chapter.

Download the preview (PDF, 0.8 MB)Google Books

Russian edition: ознакомительный фрагмент (PDF, 3.4 MB): title pages, contents, foreword and the beginning of chapter 1.

About the author

Portrait of Andrii Gakhov

Andrii Gakhov is a mathematician and software engineer holding a Ph.D. in mathematical modeling and numerical methods. He has been a teacher in the School of Computer Science at V. N. Karazin Kharkiv National University in Ukraine for a number of years and currently works as CTO at ferret go GmbH, where he leads the development of engagently and conversario, the leading platforms for online community building and management in the DACH region. His fields of interest include machine learning, stream mining, data analysis, and distributed systems. He is also the author of “Beyond Clocks: Time, Causality, and State in Distributed Systems”.

gakhov.comOther bookspdsa library on GitHubLinkedInXAmazon Author

Errata

Found an error that is not in the list below? Please write to pdsa@gakhov.com. Once it is confirmed and fixed, it appears here.

EditionLocationOriginal textCorrected text
1st, 2019p. viifootnote “What Is Big Data? https://www.ibm.com/software/data/bigdata/what-is-big-data.html”[removed]
1st, 2019p. 31“… by bitwise XOR, however …”“… by bitwise AND, however …”
1st, 2019p. 38, Algorithm 2.8QF[i]←prev[i]QF[i]←prev
1st, 2019p. 41, Example 2.9… 16-bit fingerprints …… 32-bit fingerprints …
1st, 2019p. 41, Example 2.9h(x)=MurmurHash3(x)mod16h(x)=MurmurHash3(x)
1st, 2019p. 41, Example 2.9p=13p=29
1st, 2019pp. 41, 43, Example 2.9213229
1st, 2019pp. 42–45… remainder fq …… remainder fr …
1st, 2019p. 62, Example 3.1“… of unique elements is 23 GB.”“… of unique elements is 2.3 GB.”
1st, 2019p. 65, Algorithm 3.2Add(e,LINEARCOUNTER)Add(x,LINEARCOUNTER)
1st, 2019p. 66, Example 3.3V=916=0.5625V=716=0.4375
1st, 2019p. 66, Example 3.3“… which is pretty close to …”“… which is close but overestimates …”
1st, 2019p. 66, Example 3.3n≈−16·ln0.5625≈9.206n≈−16·ln0.4375≈13.22
1st, 2019p. 67… a fixed constant O(N), where N is the total number of elements, including duplicates. Thus, the algorithm has O(N) time complexity.… a fixed constant, and thus the algorithm has O(N) time complexity, where N is the total number of elements, including duplicates.
1st, 2019p. 81, Formula 3.12n̂≈αm·m2·(∑j=0m−12−COUNTER[j])n̂≈αm·m2·(∑j=0m−12−COUNTER[j])−1
1st, 2019p. 96, Example 4.2“… 500 billion …”“… 500 million …”
1st, 2019p. 109, Example 4.5s1(4)=1,s2(4)=1,s2(4)=−1s1(4)=1,s2(4)=1,s3(4)=−1
1st, 2019p. 135, Example 5.3“… remaining empty buffer B2.”“… remaining empty buffer B4.”
1st, 2019p. 159, Example 5.10q(c3)+120=6+11+120+120=0.95q(c3)−120=6+11+120−120=0.85
1st, 2019p. 173, Example 6.8c(d1,d4)=255·0+0·191+0·255255·255=0c(d1,d4)=255·0+0·191+0·2552552+02+02·02+1912+2552=0