Blooming Trees for Minimal Perfect Hashing Author Gianni
Blooming Trees for Minimal Perfect Hashing Author: Gianni Antichi, Domenico Ficara, Stefano Giordano, Gregorio Procissi, Fabio Vitucci Publisher: GLOBECOM 2008 Presenter: Yu-Ping Chiang Date: 2009/07/21 1
Outline n Related work ¨ Huffman spectral bloom filter ¨ Blooming tree n Minimal Perfect Hash Function ¨ Using naïve blooming tree ¨ Using optimized blooming tree and HSBF n Experimental result 2
Related work – Huffman Spectral Bloom Filter n Using Huffman code encode Counting Bloom Filter (CBF) ¨ Encode value δ with (δ+1) bits CBF 0 1 3 0 0 1 0 0 δ” 1 s”, and a trailing 0 HSBF 0 10 1110 0 0 3
Related work – blooming tree item 2 items 3 items 1 item HASH FUNCTION B 0 0 1 1 0 B 1 1 0 0 1 B 2 1 B 3 1 0 1 1 0 0 1 2 1 index Bit string 0 1 0 0 1 1 0 index 3 bits 1 bit index 1 1 4
Outline n Related work ¨ Huffman spectral bloom filter ¨ Blooming tree n Minimal Perfect Hash Function ¨ Using naïve blooming tree ¨ Using optimized blooming tree and HSBF n Experimental result 5
MPHF – using NBT item 1 item 2 items 1 item HASH FUNCTION B 0 0 1 1 0 B 1 1 B 3 0 0 0 1 0 0 B 2 0 0 1 1 1 0 0 1 Bit string 0 0 1 index 1 1 0 3 bits index 1 bit index 1 1 Popcount is final hash number 6
MPHF – using NBT Step 1: 1 item 2 items 1 item 2 B 0 0 1 1 0 B 1 1 B 3 0 0 0 1 0 0 B 2 0 0 0 1 1 0 0 1 1 item 2 1 1 1 001 00 hash 010 10 item 3 111 00 item 4 111 01 Step 2: final hash number = popcount item 1 00 item 2 popcount 01 item 3 10 item 4 11 item 3 item 4 7
MPHF – using OBT and HSBT 1 item B 0 0 1 1 0 B 2 0 0 1 item 1 0 0 1 2 items 1 item 0 0 NBT 1 1 0 0 2 items 1 item 0 0 0 0 1 0 1 1 0 0 0 OBT 8
MPHF – using OBT and HSBT 1 item 0 1 1 0 0 2 items 1 item 0 0 1 item 1 0 0 OBT 10 10 0 0 1 0 0 2 items 1 item 0 0 1 0 0 0 110 0 0 1 0 0 0 OBT with HSBF 9
MPHF – using OBT and HSBT Step 1: 1 item 2 items 1 item 2 0 10 10 0 1 0 0 0 110 0 0 1 0 hash 111 000 item 4 111 010 Step 2: final hash number = zero blocks 0 0 1 0 0 010 100 item 3 … 0 0 001 000 item 1 0 item 2 00 Zero blocks 01 item 3 10 item 4 11 … 10
MPHF – using OBT and HSBT 1 item Y 1 Step 1: Y 2 0 10 10 0 item 1 0 0 0 110 item 2 0 0 1 0 0 001 000 hash 010 100 item 3 111 000 item 4 111 010 … 0 2 items 1 item Step 2: final hash number = zero blocks 0 item 1 item 2 Lookup table : Start addr. Prev. elements Prev. “ 10”s 0 0 Y 2 2 2 Zero blocks 01 item 3 10 item 4 11 … Y 1 00 11
MPHF – using OBT and HSBT 1 item Y 1 Step 1: Y 2 0 10 10 0 item 1 0 0 0 110 item 2 0 0 1 0 0 001 000 hash 010 100 item 3 111 000 item 4 111 010 … 0 2 items 1 item Step 2: final hash number = zero blocks item 1 0 item 2 Lookup table : Start addr. Prev. elements Prev. “ 10”s 0 0 Y 2 2 2 0 Zero blocks 01 item 3 10 item 4 11 … Y 1 00 12
Outline n Related work ¨ Huffman spectral bloom filter ¨ Blooming tree n Minimal Perfect Hash Function ¨ Using naïve blooming tree ¨ Using optimized blooming tree and HSBF n Experimental result 13
Experimental result n Our ¨ Intel 2. 4 Ghz Pentium 4 Core 2 Duo processor, 4 GB RAM, Linux OS 2. 6 14
Experimental result n BPZ ¨ 3. 2 n Ghz XEON, 1 G RAM, Linux 2. 6 BL ¨ Pentium 4 15
16
Bloom Filter ite m 2 ite m 1 ite m 3 S U If present item in U as xxx Item 1 can be 001 Item 2 can be 010 Item 3 can be 110 ite m 3 U There can be at most three items each present with three bits in set S. S can be present as 001 110 000 17
Bloom Filter ite m 2 ite m 1 ite m 3 S U Assume hash function H(x) : H(item 1) = 0 H(item 2) = 1 H(item 3) = 2 U can be present in three bits, No. H(itemi) bit present i U S can be present as 101 18
- Slides: 18