Loglog Algorithm

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Probabilisitc Counting

Algorithms
PRATIKSHYA MISHRA
What are Counting Algorithms?

The approximate counting algorithm was invented by Robert Morris in 1977.


Also Called as randomized algorithms.
The algorithm makes use of probabilistic techniques.
An algorithm Where the result obtained depend on chance.
An algorithm that allows one to count a large number of events using a small
amount of memory.

Why Counting Algorithms?


Work by maintaining a data structure that uses a fixed amount of memory to


store information about the elements in the dataset.
Useful when the memory aspect for a program, application, etc. in terms of
usage and complexity has to be minimal.
Used for investigating large data sets/streams for patterns.

Loglog Algorithm:

A probabilistic algorithm that makes use of a hashing function in order to


randomize data and then convert them to a form that resembles random binary
data
The loglog algorithm makes use of n small bytes of auxiliary memory to
estimate the number of unique elements of a list in a single pass with an
accuracy that is of the order of 1/√n.

Loglog Algorithm:

Improvement to the earlier HyperLogLog algorithm.


It can be useful in many scenarios, such as to count the number of different
words and their cardinality from a whole book very quickly, etc.
In terms of space complexity, the loglog algorithm consumes O(log(logn)) bits
of storage.

Loglog Algorithm:

It has been widely used in distributed systems, data analytics, and machine
learning applications where the cardinality of large datasets needs to be
estimated quickly and accurately.
The LogLog algorithm provides an efficient way to estimate the cardinality of
a large set or dataset using a small amount of memory.

References:
https://algo.inria.fr/flajolet/Publications/DuFl03-LNCS.pdf
THANK YOU!

You might also like