DMP-tree: A dynamic M-way prefix tree data structure for strings matching

  • Authors:
  • Nasser Yazdani;Hossein Mohammadi

  • Affiliations:
  • Router Laboratory, ECE Department, University of Tehran, Tehran, Iran;Router Laboratory, ECE Department, University of Tehran, Tehran, Iran

  • Venue:
  • Computers and Electrical Engineering
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

We propose DMP-tree, a dynamic M-way prefix tree, data structure for the string matching problem in general and prefix matching in particular. DMP-tree has been initially devised for fast and efficiently handling prefix matching which constitutes the building block of some applications in the computer realm and related area. It is assumed there are strings of an alphabet @S which are ordered. The data strings can have different lengths and some of them can be prefixes of others. Two well known applications of prefix matching are layers 3 and 4 switching in TCP/IP protocols. In layer 3 switching, routers forward an IP packet by checking its destination address and finding the longest matching prefix from a database. In layer 4 switching, the source and destination addresses are used to classify packets for differentiated service and Quality of Services (QoS). DMP-tree is a superset of B-tree. When none of the data strings are a prefix of each other, DMP-tree is the same as B-tree. In DMP-tree, no data string can be in a higher level than another data string which is its prefix. This requires a special procedure for node splitting. Indeed, node splitting differentiates DMP-tree from B-tree. The proposed data structure is simple, well defined, easy to implement in hardware or software and efficient in terms of memory usages and search time compared to other data structures proposed for prefix matching. We have implemented DMP-tree and the experimental results for simulated IP prefixes from the {0,1} character set show an average search time of Log"M^N for a large number of N, number of data elements, when the internal node branching factor M is big enough (=5).