Structural equivalence of context-free grammars

  • Authors:
  • Marvin C. Paull;Stephen H. Unger

  • Affiliations:
  • -;-

  • Venue:
  • Journal of Computer and System Sciences
  • Year:
  • 1968

Quantified Score

Hi-index 0.00

Visualization

Abstract

Two context-free grammars are defined as being structurally-equivalent if they generate the same sentences and assign similar parse trees (differing only in the labelling of the nodes) to each. It is argued that this type of equivalence is more significant than weak equivalence, which requires only that the same sentences be generated. While the latter type of equivalence is in general undecidable, it is shown here that there exists a finite algorithm for determining if two arbitrary context-free grammars are structurally equivalent. A related result is a procedure for converting an arbitrary context-free grammar into a structurally equivalent ''simple'' grammar (S-grammar) where this is possible, or else indicating that no such grammar exists. The question of structural ambiguity is also studied and a procedure is given for determining if an arbitrary context-free grammar can generate the same string in 2 different ways with similar parse trees.