Skip to main content

An algorithm for finding the shortest terminal strings which can be produced from non-terminals in context-free grammars

Contributed Papers

Part of the Lecture Notes in Mathematics book series (LNM,volume 452)

Abstract

Properties of individual non-terminal symbols in context-free grammars are of interest in the fields of compiling and artificial intelligence. This paper describes an algorithm which will find, for all the non-terminal symbols in any context-free grammar, the shortest string which consists only of terminal symbols which can be produced from each non-terminal symbol by application of the rules of the grammar.

Keywords

  • Production Rule
  • Derivation Tree
  • Terminal Symbol
  • Short String
  • Null String

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

This is a preview of subscription content, access via your institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (Canada)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   34.99
Price excludes VAT (Canada)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   46.00
Price excludes VAT (Canada)
  • 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

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Seymour Ginsburg, The Mathematical Theory of Context-Free Languages (McGraw-Hill Book Company, New York, London, Sydney, 1966)

    MATH  Google Scholar 

  2. A. T. Berztiss, Data Structures Theory and Practice (Academic Press Inc., London, New York, 1971)

    MATH  Google Scholar 

  3. David Gries, Compiler Construction for Digital Computers (John Wiley & Sons, New York, London, Sydney, Toronto, 1971)

    MATH  Google Scholar 

  4. Patrick A. V. Hall, Equivalence between and/or graphs and context-free grammars, Comm. A.C.M. 16(1973) 444–445.

    MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and Permissions

Copyright information

© 1975 Springer-Verlag

About this paper

Cite this paper

Mclean, M.J., Johnston, D.B. (1975). An algorithm for finding the shortest terminal strings which can be produced from non-terminals in context-free grammars. In: Street, A.P., Wallis, W.D. (eds) Combinatorial Mathematics III. Lecture Notes in Mathematics, vol 452. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0069557

Download citation

  • DOI: https://doi.org/10.1007/BFb0069557

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-07154-9

  • Online ISBN: 978-3-540-37482-4

  • eBook Packages: Springer Book Archive