Date post: | 21-Dec-2015 |
Category: |
Documents |
View: | 220 times |
Download: | 0 times |
1
Efficient Packet Classification using Splay Tree Models
Author:
Srinivasan.T, Nivedita.M, Mahadevan.VPublisher:
IJCSNS International Journal of Computer Science and Network Security 2006
Presenter:
Hsin-Mao Chen
Date:2010/05/19
4
Splay Trees
Splay trees are self-balancing or self-adjusting binary search trees.
When we access a node of the tree (retrieval, insertion, deletion), it performs radical surgery on the tree.
Splay trees does not require height or balance factors as in AVL trees and colors as in Red-Black trees.
6
Splay Trees
There are six rotations possible in a splay tree:
1. Zig Rotation2. Zag Rotation3. Zig-Zig Rotation4. Zag-Zag Rotation5. Zig-Zag Rotation6. Zag-Zig Rotation
15
Search
[17 ,31]
[0 ,15]
[33 ,47]
[16 ,16] [32,32]
[48 ,63][0 ,15]
[16 ,16]
[17 ,31]
[33 ,63]
F5, F6
[32 ,32]
16
Complexity Analysis
Binary Trie:
All the prefix are distinct: 2k+1-1
All k bits of each of the r rules are distinct: (k * r)+1 Splay Tree:
All the prefix: 2k
All rule are distinct: 2*r
19
Complexity Analysis
m unique accesses
Binary Trie: m*log(2n)
Splay Tree: m*log(n)
(m-t) unique accesses
Binary Trie: m*log(2n)
Splay Tree: ((m-t)log(n)) + t*log(β)