Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Blooming Trees: Space-Efficient Structures for Data Representation Author: Domenico Ficara, Stefano Giordano, Gregorio Procissi, Fabio Vitucci Publisher:

Similar presentations


Presentation on theme: "1 Blooming Trees: Space-Efficient Structures for Data Representation Author: Domenico Ficara, Stefano Giordano, Gregorio Procissi, Fabio Vitucci Publisher:"— Presentation transcript:

1 1 Blooming Trees: Space-Efficient Structures for Data Representation Author: Domenico Ficara, Stefano Giordano, Gregorio Procissi, Fabio Vitucci Publisher: ICC 2008 Presenter: Yu-Ping Chiang Date: 2009/05/20

2 2 Outline Blooming Tree  Lookup  Insert  Delete Optimized Blooming Tree  Lookup  Insert  Delete Simulations

3 3 Blooming Tree B0 B1 B2 B3 0 11110000 121111 11110000 11111100 000 00 1 111 3 items 2 items 1 item item Bit string HASH FUNCTION 3 bits 1 bit index

4 4 Blooming Tree n items, k0 hash functions, L+2 layers  Layer0 (B0) : m = nk0/ln2 bits  Layer1~L (B1~BL) : bits/block ( b=1 in following examples ) Block numbers is modified  LayerL+1 (BL+1) : Composed c-bits counters Hash function  k0 hash functions  log m + L*b bits output log m bit for layer0 B bits for layer1~layerL+1

5 5 Blooming Tree - lookup Algorithm:  Using first log m bits as layer0 index.  Compute a popcount on layer i, that gives index of the couple in layer i+1.  Checking the bit string output by hash function, the bit for layer i. 0 for first bit. 1 for second bit.  If processing bit is 0, result NOT FOUND. Otherwise continue search in next layer. Time complexity:  k0 [ hash + L ( popcount + 2 * check ) ] B0 B1 B2 B3 11110000 121111 11110000 11111100 item1 bit string: 01010 hash

6 6 Blooming Tree - lookup Algorithm:  Using first log m bits as layer0 index.  Compute a popcount on layer i, that gives index of the couple in layer i+1.  Checking the bit string output by hash function, the bit for layer i. 0 for first bit. 1 for second bit.  If processing bit is 0, result NOT FOUND. Otherwise continue search in next layer. Time complexity:  k0 [ hash + L ( popcount + 2 * check ) ] B0 B1 B2 B3 11110000 121111 1 1 110 0 00 11111100 1 item1 bit string: 01010 hash

7 7 Blooming Tree - lookup Algorithm:  Using first log m bits as layer0 index.  Compute a popcount on layer i, that gives index of the couple in layer i+1.  Checking the bit string output by hash function, the bit for layer i. 0 for first bit. 1 for second bit.  If processing bit is 0, result NOT FOUND. Otherwise continue search in next layer. Time complexity:  k0 [ hash + L ( popcount + 2 * check ) ] B0 B1 B2 B3 11110000 121111 11110000 11 1 111 0 0 0 1 item1 bit string: 01010 hash Match !!

8 8 Blooming Tree - lookup Algorithm:  Using first log m bits as layer0 index.  Compute a popcount on layer i, that gives index of the couple in layer i+1.  Checking the bit string output by hash function, the bit for layer i. 0 for first bit. 1 for second bit.  If processing bit is 0, result NOT FOUND. Otherwise continue search in next layer. Time complexity:  k0 [ hash + L ( popcount + 2 * check ) ] B0 B1 B2 B3 11110000 121111 11110000 11111100 item2 bit string: 10000 hash NOT FOUND !!

9 9 Blooming Tree - insert Algorithm:  Using first log m bits as layer0 index.  In layer1~layerL+1, using popcount of layer0~layerL and bit for each layer as index.  If bit in layer I already set (means COLLOSION), directly set bit in layer i+1. else, allocate a new block and insert it into original layer i+1 blocks.  Increase count at layer L+1. Time complexity:  k0 [ hash + L ( popcount + shift + bitset ) ] B0 B1 B2 B3 01000000 10 10 1 item1 bit string: 01010 hash allocate a new block (2^b bits) allocate a new block (2^b bits) allocate a new block (2^b bits)

10 10 Blooming Tree - insert Algorithm:  Using first log m bits as layer0 index.  In layer1~layerL+1, using popcount of layer0~layerL and bit for each layer as index.  If bit in layer I already set (means COLLOSION), directly set bit in layer i+1. else, allocate a new block and insert it into original layer i+1 blocks.  Increase count at layer L+1. Time complexity:  k0 [ hash + L ( popcount + shift + bitset ) ] B0 B1 B2 B3 11000000 11 10 110 10 0 item2 bit string: 00101 hash allocate a new block (2^b bits) allocate a new block (2^b bits) allocate a new block (2^b bits)

11 11 Blooming Tree - insert Algorithm:  Using first log m bits as layer0 index.  In layer1~layerL+1, using popcount of layer0~layerL and bit for each layer as index.  If bit in layer I already set (means COLLOSION), directly set bit in layer i+1. else, allocate a new block and insert it into original layer i+1 blocks.  Increase count at layer L+1. Time complexity:  k0 [ hash + L ( popcount + shift + bitset ) ] B0 B1 B2 B3 11110000 21 10 110 10 0 item3 bit string: 00101 hash Collision occur

12 12 Blooming Tree - delete Algorithm:  Trace to the last layer, decrease count.  If counter isn’t equal to 0, terminal processing. else, remove the block and checking upper layer if there only this item in the block, if yes, remove that block too. recursive processing upper layers. B0 B1 B2 B3 11110000 21 10 110 10 item1 bit string: 00100 hash 1 1 0 Remove empty block 0

13 13 Blooming Tree - delete Algorithm:  Trace to the last layer, decrease count.  If counter isn’t equal to 0, terminal processing. else, remove the block and checking upper layer if there only this item in the block, if yes, remove that block too. recursive processing upper layers. B0 B1 B2 B3 11110000 2 1 10 110 10 item2 bit string: 01001 hash 0 1

14 14 Outline Blooming Tree  Lookup  Insert  Delete Optimized Blooming Tree  Lookup  Insert  Delete Simulations

15 15 Optimized Blooming Tree B0 B1 B2 B3 11110000 1211 1 00 10 00 0 1111 01 11 1100 01 3 items 2 items 1 item 01 10 0011 bitmap Hash substrings 11

16 16 Optimized Blooming Tree - lookup Algorithm:  Access B0  Checking bitmap If there’s 1 in bitmap, directly compare last L*b bits of hashed bit string, and terminate processing. Else, lookup method is same as previous defined.  Recursively repeat at each level.

17 17 Optimized Blooming Tree - lookup 1211 B0 B1 B2B2 B3 11110000 1 00 10 00 0 1111 01 10 0011 bitmap Hash substrings Algorithm:  Access B0  Checking bitmap If there’s 1 in bitmap, directly compare last L*b bits of hashed bit string, and terminate processing. Else, lookup method is same as previous defined.  Recursively repeat at each level. item1bit string : 10001 hash Popcount = 3 Popcount = 2

18 18 Optimized Blooming Tree - insert Without collision  Add a zero-block  Set bit string and hash substring B0 B1 B2 B3 11110000 1211 1 00 10 00 0 1111 01 10 0011 bitmap Hash substrings item1bit string : 01101 hash 1 0 0 01 10 Hash substrings 0 1 1 1 bitmap 0 01

19 19 Optimized Blooming Tree - insert With collision  Set corresponding branches B0 B1 B2 B3 11110000 1211 1 0 10 0 0 1111 0 0 01 10 0011 bitmap Hash substrings item2bit string : 01001 hash 1 0 0 0 0 01 0 1 1 0 0 010 11 0 01 0001

20 20 Optimized Blooming Tree - delete B0 B1 B2 B3 11110000 1211 1 0 10 0 0 1111 item2bit string : 01001 hash 0 0 1 1 0 0 01 0 11 0 01 0001 0 0 1 0 0

21 21 Outline Blooming Tree  Lookup  Insert  Delete Optimized Blooming Tree  Lookup  Insert  Delete Simulations

22 22 Simulation Size comparison

23 23 Simulation Build on NP Intel IXP2800


Download ppt "1 Blooming Trees: Space-Efficient Structures for Data Representation Author: Domenico Ficara, Stefano Giordano, Gregorio Procissi, Fabio Vitucci Publisher:"

Similar presentations


Ads by Google