The Weak Generative Capacity of Parenthesls-Free Categorial Gramnmrs 
Joyce Friedman, Dawci Dai and Weiguo Wang 
Computer Science Department, Boston University 
Ill Cummlngton Street, Boston, Ma~ssachusetts 02215, U. S. A. 
Abstract: We study the weak generative capacity of a class of 
parenthesis-free categorial grammars derived /torn those of 
Aries and Steedman by varying the set of reduction rules. 
With forward cancellation as the only rule, the grammars are 
weakly equivalent to context-free grammars. When a back- 
ward combination rule is added, it is no longer possible to oh- 
lain all the context-free languages. With suitable restriction 
of the forward partial rule, the languages are still context-free 
and a push-down automaton can be used for recognition. Us- 
ing the unrestricted rule of forward partial combination, a 
context-sensitive language is obtained. 
INTRODUCTION 
The system of categorial grammars, developed ill lnodern 
times from the work of Ajdukiewicz (1935), has recently been 
the attention of renewed interest, hlspired by the use of categori-- 
al notions in Montague gramlnar~ more recent systems, sneh as 
GPSC, have developed related corlccpts and notations. This in 
turn leads to a resurgence of interest in pure catcgorial systems. 
Classically, a categorial grammar is a quadruple 
G(VT, VA,J;,F), where VT is a finite set of morl)hemes , 
and VA is a tinite set of atomic categories, one of which is the 
distinguished category S. The set CA of categories is formed 
from VA as follows: (1) VAisasubset of CA, (2) if X and Y 
are in CA, t.hcJ, (X,"Y)is I CA The grammar also (:md.ain,~ a 
lexicon F, which is a function from words to finite subsets of 
CA. A categorial grammar lacks rules; instead there is a can 
cellation ride mq)lieit ill the formalism: if X and Y are 
categories, then (X/Y) Y -' X. 
The lauguage of a categorial grammar is the set of ter 
minal strings with corresponding category symbol strings 
reducible by cancellation to the sentence symbol S. 
In \[1\] Ades and Steedman offer a form of categorial grammar 
in which some of the notations and concepts of the usual 
categorial grammar are modified. The formalism at first appears 
to be more powerful, because in addition to tile cancellation 
rule there are several other metarutes. IIowever, on closer ex 
amination there are other reasons to suspecl, that tile resulting 
language class (lifters sharply from that of the traditional 
grammars. Among the new rules, the forward partial rule (FI) 
rule) is most interesting, since one may immediately conchlde that 
this rule leads to a very large number of possible parsings of any 
sentence (almost equal to the number of different binary trees of 
n leaves if the length of the sentence is n). But its effects on the 
generative power of categorial grammar are not really obvious and 
immediate. Ades and Steedman raised the question in the foot- 
note 7 in \[1\] and left it unanswered. We will first formally define 
categorial grammar and the associated concepts. Then we analyze 
the generative power of the categoriat gralnmars with different 
interesting combinations of the reduction rnles. 
The categorial gralrnnars considered here consist of both a 
categorial component and a set of reduction rules. The category 
symbols differ from the traditional ones hecause they are 
parenthesis-free. The categorial component Cmlsists as before of 
a set VA of atomic categories including a distinguished symbol 
S, and a lexical function F mapping words to finite sets of 
categories. However, the definition of category differs: (1) VA is 
asubset of CA, (2) ifXisin CA, and Aisin VA, thenX/Ais 
in CA. Notice that the category symbols arc parenthesis free; 
the implicit parenthesization is left to right. Thus the symbol 
(A/(B/C )) of traditiolml categorial grammar is excluded, 
since A/B/C abbreviates ((A/B )/C ). ltoweve.r, some of the 
rules treat A/B/C as though it were, in fact, (A/(B/C )). 
\])EHNITIONS 
Notation. We use A, B, C to denote atomic category symbols, 
and U, V, X, Y to denote arbitrary (complex) category symbols. 
The number of occurrences of atomic category symbols in X is 
I X I' Strings of category symbols are denoted by x, y. Mor 
pheme, s are denoted by a, b; *norpheme strings by u, v, w. 
A categorial grammar under certain reduction rides is a qua 
druple G1¢ : (VT, VA, S, F), where: VT is a finite set of mor- 
phelnes, VA a tinite set of attolnic categories, S E VA a dis 
tinguished elelnent, F a function from VT to 2 cA such that for 
every a E VT, F(a) is finite, where CA is the category set and is 
defined as: i) if A EVA, then A E CA, ii) if X E CA and A C 
VA, then X/A E CA, iii) nothing else is in CA. 
The set, of reduction rules R can include any combination of 
the folh)wing: 
(1) (F Rule) If U/A E CA, A E VA, the string U/A A can be 
replaced by U. We write: U/A A -* U; 
{2) (\]i'P Rule) If U/A, A/V E CA, where A E VA, the string 
U/A A~ V can be replaced by U~ V. We write: U/A A.'V --+ 
U/V; 
(3) (FI'2 Rule) If U//A, A/l\] E CA, where A, 13 E VA, the 
string U/A A/ll Call he replaced by U/B. We write.: U/A 
A/~ ~ U/IJ; 
(4) (FP s Ru e) Same as (2) except that U/A must he headed by 
S; 
(5) (B Rule) If U/A E CA, A EVA, the string A U/A can be 
replaced by U. We write: A U/A ~ U; 
(6) (B s Rule) Same as (5) except that U/A must be headed by 
S. 
When it WOIl~t cause confusion, we write Gf¢ to denote a categori 
al grammar with rule set R, and specify a categorial grammar by 
just spe, cifying its lexicon F. 
The reduce relation > on CA* x CA* is defined as: for all 
oq fl E CA* and all X,Y,Z E CA, o~XYfl -> o~Z\[3 if XY--, Z. 
Let :>* denote the reflexive and transitive closure of relation 
A rnorpheme string W=WlW='''wn, where wi E VT, 
i=1,2,.. • n, is accepted by G,t :-: (VT, VA, S, F) if there is 
X i E F(w i ) for i =1,2, • . . n, such that X 1X= • • • X, ->* S. 
The language accepted by Gn =- (VT, VA, S, F), L(GR) is 
the set of all nmrpheme strings that are accepted by G1¢ • 
The categorial grammar recognition problem is: given a 
categorial gl'amrnar GI? = CGR ( VT, VA, S, F) and a morpheme 
string w E VT*, decide whether w E L(G R ). 
The derivable cateyory set DA c_ CA lmder a set R of reduc- 
tion rules is the set of categories including all the primary 
categories designated by F, and all the reachable categories under 
that set of reduction rules. It is formally defined as: i) X is in DA 
ifthcreisan a E VT such that X E F(a), ii) For allX, Y E DA 
and Z E CA, if X Y -~ Z by some rule in R then Z E DA, and iii) 
Nothing else is in DA. 
GRAMMARS W\[TI1 I,'OItWARD CANCELLATION ONLY 
We begin by looking at the most restricted form of the 
199 
reduction rule set R = {F}. The single cancellation rule is the 
forward combination rule. It is well known that traditional 
categorial grammars are equivalent to context--free grammars. 
We examine the proof to see that it still goes through for 
categorial grammars GR with R = IF}. 
Theorem The categorial grammars GI~, R = {F}, generate 
exactly the context free langnages. 
Proof (1) l,et GR be a eategorial grammar with R = IF}. Gt~ 
becomes a traditional categorial gralnmar once parentheses are 
restored by replacing them from left to right, so that, e.g., 
A/B/C becomes ((A/B)/C). Hence, its language is CF. 
(2) To show that every context- free language can be obtained, 
we begin with the observation that every context free language 
has a grammar in Greibach 2 form, that is, with all rules of the 
three forms A ~> aBC, A -> aB, and A -> a, where A,B, C 
are in VN and a is in VT \[6\]. A corresponding classical 
categorial grammar can be irnmediate\]y constructed: 
~"(~) ~-I((A/C)/B), (A/B), A}. These are the categories 
A/C/B, A/B, and A of a parenthesis free categorial grammar. 
The details of the proof can be easily carried out to show that the 
two languages generated are the same. 
CRAMMARS WITH BACKWARDS CANCELLATION 
:\['he theorem shows that with R = {F} exactly the context 
free languages are obtained. What happens when the addi- 
tional metarules are added? We examine now parenthesis-free 
categorial grammars with R = {F, B} and R = {F, P, s}. Rule 
B s is the version adopted in \[11; B is an obvious generalization. In 
either case we are adding the equivalent of context free rules 
to a grammar; the result must therefore still yield a context 
free language. So one guess might be that categorial gram-- 
mars ol these types will still yield exactly the context free 
languages, perhaps with more structm'es for each sentence. An 
alternative conjecture would be that fewer languages are ob- 
tained, for we have now added some "involuntary" 
context free rules to every grammar. 
Example: Consider the standard context free language L 1 = { 
a" b n \] n>0}.Theea~alestgrammaris S-> aSb, S-> ab. The 
Creibach 2 form grammar is S -> aSH, B ->b, S -> aB. The 
constructed categorial grammar GI~ then has f(a)= {S/B, 
S/B/S} and F (b) = {B }. If R = IF}, this yields exactly I, v 
Ilowever, with R = {F, B} or R = {F, B s}, here equivalent, GR 
yields alanguage L2 = {ab, ba, aabb, abab, bbaa, baba, baab, ... 
}, which contains L1 and other strings as well. It is the 
language of the context free grammar with rule set {S ->bC, S 
-> Cb, C -> aS', C-> Sa, C-> a}. 
Reversible languages. Let x 1¢ be the reverse of string x. 
That is, ifx = ala2" " " an (a, E VT), then x R = a,~ .." a2al. 
Call a language L reversible if x EL iff x n EL. 
Examples: The set of all strings on {a, b} with equal numbers of 
a's and b's is a reversible CF language. {a "b I n >0} is not a 
reversible language. 
Theorem The languages of categorial grammars GR with R = 
IF, B} are reversible. 
Proof if x => *S, then z n => *S by a reduction whose tree is 
the mirror image of the one for x in which rules F and B have 
been interchanged. 
Theorem Let G,~ be a categorial grammar with R contains {F, 
B} or {l", B s }- R may or may not also contaln some form of 
FP rules. If L (G~) contains any sentence of length greater than 
one, then it contains at least one sentence w uv such that vu is 
also in L (GR). 
200 
Proof Let w be a sentence of L (G n ) of length greater than one. 
Suppose the final step of the reduction to S uses rule F. Then w 
u vwhere u -> ~ S/A and v >* A. But then v u >* A 
S/A -> Sby rule B or Bs. No form of FP can be used a~q 
the final step of the reduction to S, so its presence does not affect 
the result. 
Corollary There are context free languages that cannot be 
obtained by any categorial grammar G~, where R contains {F, 
B} or {F, B s}. 
CATBGORIAL GRAMMAR, IS CONTEXT-FREE 1F THE FP 
RULE IS RESTRICTEI) 
Tile method that had been used to construct a context free 
grammar G equivalent to a classical categorial grammar can be 
formally described as following: 
/~ / Foreaehae VT, ifX~ F(a),then put X -> a in G; 
For each derivable category X/Y, put X ~ X/Y Y in G. 
This method remains valid when B s rule is added. We just need 
to put an additional rule X -> Y X/Y in G whenever X is head 
ed by S. But this doesn't work when the FP rule is allowed. We 
might put in the CF rule U/V -> U/A A/V for each derivable 
category U/V and for each atomic category A, but in case there 
is a category like A/B/A, then any category symbol headed by A 
followed by B's and ended by A is a derivable category. There are 
infinitely many of them, so by using this construction method, we 
might have to put in an infinite number of CF rules. Therefore, 
this method does not always find a finite context free grammar 
equivalent to a category grammar with the FP rule. As we shall 
see, there may be no such context free grammar. 
Let's now enf'orce some restrictions on the FP rule so that it 
won't cause an infinite number of derivable categories. Actually, 
using the FP rule sometimes violates the parenthesis convention, 
e.g. applying FP ~n 4 'B t? "(?/D bnplle~ ~hat B/C/D is inter 
preted as (B/(C/D)). tlowever, by the parenthesis convention, 
B/C/D is the abbreviation of ((B/C)/D). Notice, however, 
when the second category symbol ha~ exactly two atomic sym 
bols, i.e., is in form A/B, the FP rule does not violate the con- 
vention. Coincidentally, if the FP rule is accordingly restricted as 
to FP z, the derivable category set becomes finite. 
Lemma For a categorial grammar G~(VA, VT',S,F), let 
RI={F,FP2}, R2={F,FP2, Bs}; and Rz={F,FPe, P,}, 
then DAI~ 1 = DAR2 = DAR3. 
Proof From the definition ii) of DA, we can see that any new 
category Z added to DA by a form of the B rule can be added by 
the F rule. The lemma follows. 
\[\] 
Lemma The derivable category set DA of a eategorial grammar 
GI~ with R = /F, FP 2} is finite and constructible. 
Sketch of Proof We begin with the observation that none of the 
reduction rules in R increases the length of category symbols, and 
the initial lexical category symbols are all of finite length. This 
implies that the length of all the derivable category symbols are 
bounded. So there are only finitely many of them. 
We now give an algorithm for computing DA, to show that, it 
is constructible. 
Algorithm: Compute DA of a Gn with R = {F , FP 2}. 
Input: A categorial grammar G R ( V T, VA, S, f' ) 
R ={F,FP2}. 
Output: DA of Ga. 
Method: 
LetDA = U l"(a); 
aEVT 
Repeat 
For all non atomic categories U/A C DA 
(1) IfA ~ DA Then DA = DA U {U }; 
(2) For all non atomic categories A/B E DA 
w it h 
DA = DA tO {U/B }; 
Until DA was not updated dm'ing the last iteration. 
\]Return DA. 
\[\] 
Theorem For every categorial grammar G R ( V T , VA , S, F ), 
with R ={F,FP2, Bs}, there is a context free grammar 
G (VT, VN, S, P) such that L (G, t)=L (G). 
Sketch of Proof Since DA is finite, the method for converting 
CC to CFG described in last section works. 
\[\] 
Remark The theorem remains true for R being {F , FP 21 and 
IF , FP 2, B }, and can be similarly proved. We choose 
R = {F, FP 2, B s} to state the theorem because it is closest to 
Ades and Steedman's model \[1\]. 
THE FP RULE IS USEFUL ONLY ON S tIEADED 
CATEG ORIES 
Now the next question is what if the I"P rule is not restricted 
to U/A A/B -~ U/B. Intuitively, we can see that the applica- 
tion of the FP rule on a category which is not headed by S is not 
crucial in the sense that it carl be replaced by an application of 
the F rule, because whenever U/A A/V appears in a valid 
derivation to a sentence, the V part nlust be cancelled out sooner 
or later, so we can make a new derivation that cancels the V part 
first and get U/A A on which we can apply the F rule instead of 
the FP rule. But this doesn't hold if U/A is headed by S. For ex 
ample, when we have A S/B B/A, we can't do backward comb| 
nation on A and S/A if we don't combine S/B and B/A first. So, 
~e expect that the weak generative power of categorial grammar 
would remain unchanged if the FP rule is restricted t~, bt used 
only on categories which are headed by S. This in fact follows as 
our next theorem. 
Lemma Given a categorial grammar Gi¢ ( VT , VA , S, F ) with 
R ={F,FP,Bs}, for any w E CA* and A ~VA, if there is a 
reduction w -->* A, then there is a reduction of w to C using FP 
rule only on categories which are headed by S. 
Sketch of Proof Formalize tile idea illustrated abow!. \[\] 
As an almost immediate consequence, we have: 
Theorem The language accepted by categorial grammar 
GIe(VT, VA,S,F) with R = {F,FP,Bs} is the same as 
tImt accepted with R = {F, FP s, B s }. 
Proof It trivially follows the lermna. \[\] 
Corollary FP rule is useless if there is no form of the B rule, i.e., 
any GIe (VT, VA, S, F) with R = {F, FP} will generate the 
same language ~us that germrated with R = {F}. 
A CONTEXT SENSITIVE LANGUAGE GENERATt{D USING 
UNRESTRICTED FP RULE 
This section gives a categorial grammar with unrestricted FP 
rule thai. genera.tes a language which is not context free. Consid 
er categorial grammar G1 = GIe ( V A , V T , S, F ), where V T - 
{a, b, c }, VA -- {A, C, S}, r(a) = {A }, F(b) = {S/A/C/S, 
S/A/IU}, F(c) = {C},andR = {F,Bs,FP}. 
Claim 1 a i b i e' ~L (G1) for i > 0. 
Proof For any i. > O~ we can find a corresponding categorial 
string for a' b' c' : A' (S /A /C /S)i-t(S /A /C )C' . A reduc 
tion to S is straightforward. \[\] 
Let gb~ (a) denote the number of occurrences of a in string 
w. 
Claim 2 For all w ~ V T *, if w E L ( G I) then 
Cw(a) = ~ (b) = ~,0 (c). 
Proof First, it is ea~sy to see that from the lexical categories, we 
cannot get any complex category headed by either A or C, and we 
can get atomic category symbol A or C only directly from the 
lexicon. 
Second, each morpheme b would introduce one A and one C 
within a complex category symbol which must be cancelh~l out 
sooner or later in order to reduce the whole string to S. In gen 
eral, there are two ways for such A and C being cancelled: (1) 
with an A headed or C headed complex category by the FP 
rule, which is impossible in this example; (2) with a single atomic 
category A or C by either the F or P, s rule. We have seen that 
such single A and C can only be introduced by the morpheme a 
and c, respectively. So 4) w (a) ::= q~,0 (b) = ~b w (c). 
\[\] 
To show that L (G 1) is not context free, we take its intersec 
tion with the regtl\]ar language a*b:~c :~ . \]?,y claim 1 and 2, the in 
tersection is exactly the laugu;Lge {an b" c ~' \] n > 0} which is 
well known to be non context free. Since the intersection of a 
context free language with a regular set must be conte.xt free, 
L (GI) cannot be context free. 
tq{OCESSORS 
A categorial grammar is certainly no worse than context 
sensitive. We can verify this by using a noudctermiuistic 
linear bounded auLomatoll to model the reduction process. For 
even in the case of reduction by the unrestricted l,'P rule, the 
category symbol obtained by reduction is shorter than the corn 
biqed length of the two inputs t,o 1he rule. 
Ades and Steedman \[1\] propose a processor that is a push 
down stack automaton and pushdown stack automata are 
known to correspond to the context free languages. Itow can we 
reconcile this with the cnntext sensitive example abow~? The 
contradiction arises because the stack of their processor must be 
able to contain any derived eal~egory symbol of DA, and thus the 
size of the stack symbols is unlimited. The processor is thus not 
a pushdowrl autoulaton in the usual sense. 
Ael~nowh~(lg~;mnt- ~¢V~w-,ould like to thank t~amarathnam Ven 
katesau and Remko Scha for he.lpful discussions o1" lhe material. 
This work wa.s supported in part by National Science Foundation 
Grant No. \]ST 8317736. 

BIBLIOGRAPHY 

\[1\] Ades, A. E., Steedman, M. J. (1982) "On t.he o,'der of words", 
Linguistics and Pkilosophy, vol. 4, pp. 517 558. 

!2\] Ajdukiewicz,' K. (1935) "Die syntaktische konnexitat", Studia 
Philosophica, vol. 1, pp. 1 27, translated into English as "Syntac 
tic Connection" in S. McCall, ed., Polish Logic 1920-1939~ Ox 
ford: Clarendon Press, 1967. 

131 Bar tlillel, Y. (1950) "On syntactical categorie.s", Journal of 
Symbolic Logic, vol. 15 pp. 1 16, reprinted in Bar Hillel (1964), 
pp. 19 37. 

i4\] Bar ltillel, Y. (1953) "A quasi arithmetical notation for syu 
tactic description", Language, vol. 29, pp. 47 58, reprinted in 
Bin" llillel (1964), pp. 61 74. 

15\] Bar llillel, Y. (1964) Language and Information, Reading, 
Mass.: Addison Wesley. 

161 Greibach, S. (1965)"A new normal form theorem for 
context free phrase structure grammars", d. ACM wfl. 12, No. 1, 
pp. 42 52. 

\[7\] Gaifman, tl. 0965) "l)ependency Systems aud Phrase 
Structured Systems", Information and Control, vol. 8, No. 3, pp. 
so4 337. 
