Skip to main content

Reducing Simple Grammars: Exponential Against Highly-Polynomial Time in Practice

  • Conference paper
Implementation and Application of Automata (CIAA 2006)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 4094))

Included in the following conference series:

  • 411 Accesses

Abstract

The simple grammar reduction is an important component in the implementation of Concatenation State Machines (a hardware version of stateless pushdown automata designed for wire-speed network packet classification). We present a comparison and experimental analysis of the best-known algorithms for the grammar reduction. There are two classes of algorithms: the ones that process compressed strings without decompression (polynomial time) and the ones which process strings explicitely. The second category, though exponential time in pessimistic case, is more efficient in the considered practical scenario. There are two approaches to this problem: one processing compressed strings without decompression and another one which processes strings explicitely. It turns out that the second approach is more efficient in the considered practical scenario despite having worst-case exponential time complexity (while the first one is polynomial). The study has been conducted in the context of network packet classification, where simple grammars are used for representing the classification policies.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Bastien, C., Czyzowicz, J., Fraczak, W., Rytter, W.: Prime normal form and equivalence of simple grammars. In: Farré, J., Litovsky, I., Schmitz, S. (eds.) CIAA 2005. LNCS, vol. 3845, pp. 78–89. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  2. Bastien, C., Czyzowicz, J., Fraczak, W., Rytter, W.: Equivalence of Functions Represented by Simple Context-Free Grammars with Output. In: H. Ibarra, O., Dang, Z. (eds.) DLT 2006. LNCS, vol. 4036, pp. 71–82. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  3. Caucal, D.: A fast algorithm to decide on simple grammars equivalence. In: Djidjev, H.N. (ed.) Optimal Algorithms. LNCS, vol. 401, pp. 66–85. Springer, Heidelberg (1989)

    Google Scholar 

  4. Debski, W., Fraczak, W.: Concatenation state machines and simple functions. In: Domaratzki, M., Okhotin, A., Salomaa, K., Yu, S. (eds.) CIAA 2004. LNCS, vol. 3317, pp. 113–124. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  5. Harrison, M.A.: Introduction to formal language theory. Addison Wesley, Reading (1978)

    MATH  Google Scholar 

  6. Hirshfeld, Y., Jerrum, M., Moller, F.: A polynomial algorithm for deciding bisimilarity of normed context-free processes. Theoretical Computer Science 158(1-2), 143–159 (1996)

    Article  MATH  MathSciNet  Google Scholar 

  7. Korenjak, A.J., Hopcroft, J.E.: Simple deterministic languages. In: Proc. IEEE 7th Annual Symposium on Switching and Automata Theory, IEEE Symposium on Foundations of Computer Science, pp. 36–46 (1966)

    Google Scholar 

  8. Miyazaki, M., Shinohara, A., Takeda, M.: An improved pattern matching for strings in terms of straight-line programs. Journal of Discrete Algorithms 1(1), 187–204 (2000)

    MathSciNet  Google Scholar 

  9. Rytter, W.: Grammar Compression, LZ-Encodings, and String Algorithms with Implicit Input. In: Díaz, J., Karhumäki, J., Lepistö, A., Sannella, D. (eds.) ICALP 2004. LNCS, vol. 3142, pp. 15–27. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2006 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Bastien, C., Czyzowicz, J., Fraczak, W., Rytter, W. (2006). Reducing Simple Grammars: Exponential Against Highly-Polynomial Time in Practice. In: Ibarra, O.H., Yen, HC. (eds) Implementation and Application of Automata. CIAA 2006. Lecture Notes in Computer Science, vol 4094. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11812128_10

Download citation

  • DOI: https://doi.org/10.1007/11812128_10

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-37213-4

  • Online ISBN: 978-3-540-37214-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics