Two-Way Languages

In this paper we investigate further the effects of placing restrictions on the derivations of unrestricted rewriting systems (Matthews, 1964). DEFrNITION 1. A grammar is a 4-tuple (VN, V~, Z, R) where VN, VT are disjoint vocabularies called the nonterminal and the terminal vocabularies, respectively (we use the symbol V to represent V~ U V~l; Z E VN* -{AI called the axiom, where A is the null string; and R is a finite set of productions--here called rules--each of which is either of of the type X -~ Y called nonterminal rules, or of the type A -~ a called terminal rules, where X, Y C VN*, A E VN, a ~ Vr, and A X ~ Y (we use the notation X --~ w to represent an arbitrary rule of either type). DEFINITION 2. A derivation of a grammar is a sequence of s t r ings (71, • • • , ~ ) such t h a t ? l = Z and for e a c h i ( 1 _i < n) the re are s t r ings X , ~1, ¢2 , ~ such t h a t X * ~ ~ R, ~ = ¢1 X ¢2, and ?i+1 =