Matching Integer Intervals by Minimal Sets of Binary Words with don't cares

  • Authors:
  • Wojciech Fraczak;Wojciech Rytter;Mohammadreza Yazdani

  • Affiliations:
  • Dépt d'informatique, Université du Québec en Outaouais, Gatineau, Canada and Dept. of Systems and Computer Eng., Carleton University, Ottawa, Canada;Inst. of Informatics, Warsaw University, Warsaw, Poland and Department of Mathematics and Informatics, Copernicus University, Torun, Poland;Dept. of Systems and Computer Eng., Carleton University, Ottawa, Canada

  • Venue:
  • CPM '08 Proceedings of the 19th annual symposium on Combinatorial Pattern Matching
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

An interval [p,q], where 0 ≤ p≤ qn, can be considered as the set Xof n-bit binary strings corresponding to encodings of all integers in [p,q]. A word wwith don't caresymbols is matchingthe set L(w) of all words of the length |w| which can differ only on positions containing a don't care. A set Yof words with don't caresis matchingXiff X= 茂戮驴 w茂戮驴 YL(w). For a set Xof codes of integers in [p,q] we ask for a minimal size set Yof words with don't caresmatching X. Such a problem appears in the context of network processing engines using Ternary Content Addressable Memory(TCAM) as a lookup table for IP packet header fields. The set Yis called a templatein this paper, and it corresponds to a TCAM representation of an interval. It has been traditionally calculated by a heuristic called "prefix match", which can produce a result of the size approximately twice larger than the minimal one. In this paper we present two fast (linear time in the size of the input and the output) algorithms for finding minimal solutions for two natural encodings of integers: the usual binary representation (lexicographic encoding) and the reflected Gray code.