0% found this document useful (0 votes)
18 views14 pages

Bloom Filters: Presented By: Eman Shafiq (2017-EE-389) Bareera Azhar (2017-EE-379) Ruqia Rubab (2017-EE-383

Bloom filters are a space-efficient probabilistic data structure used to test set membership. A bloom filter represents a set as a bit array and uses multiple hash functions to map elements to bit positions. While bloom filters can report false positives, they never report false negatives. They are useful for filtering out elements that are definitely not in a set before performing more expensive lookups. The presentation provides examples of using bloom filters to check username availability or filter phone numbers not in a database before sending SMS messages.

Uploaded by

ruqia rubab
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views14 pages

Bloom Filters: Presented By: Eman Shafiq (2017-EE-389) Bareera Azhar (2017-EE-379) Ruqia Rubab (2017-EE-383

Bloom filters are a space-efficient probabilistic data structure used to test set membership. A bloom filter represents a set as a bit array and uses multiple hash functions to map elements to bit positions. While bloom filters can report false positives, they never report false negatives. They are useful for filtering out elements that are definitely not in a set before performing more expensive lookups. The presentation provides examples of using bloom filters to check username availability or filter phone numbers not in a database before sending SMS messages.

Uploaded by

ruqia rubab
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 14

Bloom filters

Presented by:
Eman Shafiq (2017-EE-389)
Bareera Azhar (2017-EE-379)
Ruqia Rubab (2017-EE-383)
Definition
 A bloom filter is a space efficient probabilistic data structure that is
used to test whether an element is member of a set

 Query: Is element X in set Y?

 Example: checking availability of a username is set membership


problem, where the set is the list of all registered username
Why called so?
 Developed by Burton Howard bloom in 1970

 Called filters because they are used as first pass to filter out the
segment of dataset that don’t match a query
Hash table and bloom
filters
Bloom filter don’t store data item

Hash function used should independent and uniformly


distributed
Properties
Represent a set with a large number of elements.
Deletion not possible.
Never generate false negative result.
False positive rate increases s elements added.
Structure

 Internally bloom filter use a


Bit array and multiple different
hash function
A Problem
 We had a set of phone number with
5,000,000rows stored in MySQL
 We want to send SMS to a big list of number
Which are not in the table
 We should not use much memory
 What should we do?
Data Structure for represent set
 Self balancing

 Hash tables

 Simple array

 Link list entries


Trade off solution
Bloom filters

 To obtain speed and size improvement,


Allow some probability of error
Example
 N bit array size
 K hash function
0 0 0 0 0 0 0 0
N=8
 Str= Bangalore
 F1(str)=110 110 mod 8 =4
F2(str)=23 23 mod 8 =7
F3(str)=125 125 mod 8=5
0 0 0 0 1 1 0 1
Operations

 The basic bloom filter support two operations : add and query

 Query: to check element is in the set or not

 Add: simply add the element in the set


Time and Space Complexity

 Time complexity is O(K) for both insertion and membership testing

 Space complexity depend upon the potential range of the element


Applications

Google chrome
Bit coin
Medium
Spell checker
Google big Table, Apache HBase
THANK YOU!

You might also like