THE COMPUTATIONAL DIFFICULTY OF ID/LP 
PARSING 
G. Edward Barton, Jr. 
M.I.T. Artificial Intelligence Laboratory 
545 Technology Square 
Caanbridge, MA 02139 
ABSTRACT 
.\lodern linguistic theory attributes surface complexity 
to interacting snbsystems of constraints. \["or instance, the 
ID LP gr,'unmar formalism separates constraints 
on immediate dominance from those on linear order. 
5hieber's (t983) ID/I.P parsing algorithm shows how to 
use ID and LP constraints directly in language process- 
ing, without expandiqg them into an intcrmrdiate "object 
gammar." However, Shieber's purported O(:,Gi 2 .n ~) run- 
time bound underestimates the tlillicnlty of ID/LP parsing. 
ID/LP parsing is actually NP-complete, anti the worst-case 
runtime of Shieber's algorithm is actually exponential in 
grammar size. The growth of parser data structures causes 
the difficulty. So)tie ct)mputational and linguistic implica- 
tions follow: in particular, it is important to note that 
despite its poteutial for combinatorial explosion, Shieber's 
algorithm remains better thau the alternative of parsing 
an expanded object gr~anmar. 
INTRODUCTION 
Recent linguistic theories derive surface complexity 
fr~ml modular subsystems of constraints; Chotusky (1981:5) 
proposes separate theories of bounding, government, 
O-marking, and so forth, while G,'xzdar and \['ullum's GPSG 
fi)rmalism (Shieber. 1983:2ff) use- immediate-donfinance 
¢\[D) rules, linear-precedence (l,P) constraints, and 
,netarules. When modular ctmstraints ,xre involved, rule 
systems that multiply out their surface effects are large 
and clumsy (see Barton. 1984a). "\['he expanded context- 
free %bjeet grammar" that nmltiplies out tile constraints 
in a typical (,PSG system would contain trillions of rules 
(Silieber, 1983:1). 
5bicher (198:1) thus leads it: a welconte direction by 
,.hw.ving how (D,\[.P grammars can be parsed "directly," 
wit hour the combinatorially explosive step of nmltiplying 
mtt the effects of the \[D and LP constraints. Shieber's 
• dqorithm applies ID and LP constraints one step at a 
;ime. ;,s needed, ttowever, some doubts about computa- 
tion;d complexity remain. ~hieber (198.3:15) argates that 
his algorithm is identical to Earley's in time complexity, 
but this result seems almost too much to hope for. An 
ll)/f.I ) grammar G can be much smalhr th;m an equiva- 
lent context-free gr,'umnar G'; for example, if Gt contains 
only the rule ,5 ~to abcde, the corresponding G~t contains 
5! ~- 120 rules. If Shieber's algorithm has the same time 
complexity ~ Earley's. this brevity of exprd~slon comes 
free (up to a constant). 5hieber ~ays little to ;dlay possible 
doubts: 
W,, will t.,r proq,nt a rigor..s (h.lllOtlstr'~..li¢)t) of I'llnP 
c'(,mpt,'xlty. I.,t ~t .I.,.id b~, ch..tr fr.m tiw oh,.',, rc.lation 
h,.t w,',.n ) he l,rt,,,vtlt(',l ;tl~,nt hm ;rod E.rt<.y'~ t hat the 
('+,t.ph'xity Is )h;d of Earh.y'> ;tig,)rltl~tlt \[II t.l.+ worst 
,'.:+,,. wh,,re tl.. I.I" rnh'. ;dw:ty:. +p,'('ffy ;t tllli(llll" ordor- 
t;,~ l'-r t!+(. ri~i~t-imlld :~+'(' ,,l'<,v<."y ID rtih., the l)i'('r~'tlte~l 
;d.,;,with;'. r,,,In."v., t.+ E,trh'y, ;tl~t)rllhlll ~qin,.+, ~ivon 
)h,' ..:ramm.tr. vht.rkm~ :I.. LI) rnh.:.; t;Lk(..., Cl)ll+'r+liillt time. 
rh,,. thin. c,)IJHd,,'.":it y ,,I it.. pre>ented :d~.,rltht. i..., ideo- 
tw;d t() E.ri(.y'+ . That i:.. it ts (it (,' '2 .'t:;). wht.ro :(';: 
t> )1., qzt' ,,f thv gramt,~ar im,ml,vr ,,f \[D ruh'.~) and n 
i. ~ tilt' h'ngth <)f the input. (:i,If) 
Among other questions, it is nnclear why a +ituation of 
maximal constraint shouhl represent the worst case. Mtrd- 
real constraint may mean that there are more possibilities 
to consider. 
.q.h;eber's algorithm does have a time advantage over 
the nse of garley's algorithm on the expanded CF'G. but 
it blows up in tile worst case; tile el;din of (9(G" . r(~) 
time complexity is nustaken. A reduction of the vertex- 
cover l>rt)blenl shows that ID/LP parsing is actually NI )- 
comph.te: hence ti,is bh)wup arises from the inherent diffi- 
culty of ID,'LP parsing ratlter than a defect in $hieber's al- 
gorithm (unless g' = A2). Tile following ~ections explain 
aud discuss this result. LP constraints are neglected be- 
cause it is the ID r.les that make parsing dilficult 
Atte)~tion focuses on unordered contest-free 9rammar~ 
(I ~('F(;s; essentially, ll)/l,P gram,oars aans LIt). A UCFG 
rule ;s like a standard C\[:G rule except that when use(t m a 
derivati,,n, it may have the symbols ,)f its ex\[~ansiolt writ- 
ten in any order. 
SHIEBER'S ALG OIIITHM 
Shiel)er generalizes Earley's algorithm by generalizing 
the dotted-rule representation that Earley uses to track 
progress thro,gh rule expansions. A UCIrG rule differs 
from a CFG rule only in that its right-hand side is un- 
ordered; hence successive accumulation of set elements re- 
places linear ad-.mcement through a sequence. Obvious 
interpretations follow for the operations that the Earley 
par.,er performs on dotted rules: X -. {}.{A, B,C} is a 
78 
typical initial state for a dotted UCFG rule; 
X -- {A,B,C}.{} is a t~'pical completed state; 
Z ---. {W}.{a,X,Y} predicts terminal a and nontermi- 
nail X,Y; and X -- {A}.{B,C,C} should be advanced 
to X -. {A,C}.{B,C} after the predicted C is located, t 
Except for these changes, Shieber's algorithm is identical 
to Earley's. 
As Shieber hoped, direct parsing is better than using 
Earley's algorithm on an expanded gr,-mlmar. If Shieber's 
parser is used to parse abcde according to Ct, the state 
sets of the parser remain small. The first state set con- 
tains only iS -- {}.{a,b,c,d,e},O I, the second state set 
contains only \[S -- {a}.{b,c,d,e},O i, ,'rod so forth. The 
state sets grow lnuch larger if the Earley parser is used to 
parse the string according to G' t with its 120 rules. After 
the first terminal a has been processed, the second state set 
of the Earley parser contain, .1! - 2.t stales spelling out all 
possible orders in which the renmiaing symbols {b,e,d,e} 
may appear: ;S ~ a.bcde,O!, ;S -, ,,.ccdb. Oi and so on. 
Shieber's parser should be faster, since both parsers work 
by successively processing all of tile states in tile state sets. 
Similar examples show that tile 5hieber parser can have 
,-m arbitrarily large advantage over the tlse of the Earley 
parser on tile object gr,'unmar. 
Shieber's parser does not always enjoy such a large ad- 
vantage; in fact it can blow tip in the presence of ambiguity. 
Derive G~. by modifying Gt in two ways. First, introduce 
dummy categories A. tl, C,D,E so that A ~ a and so 
forth, with S -+ ABCDE. Second, !et z be ambiguously 
in any of the categories A, B,C, D,E so that the rule for 
A becomes A ~ a ~, z and so on. What happens when 
the string zzzza is parsed according to G~.? After the first 
three occurrences of z, the state set of the parser will reflect 
the possibility that any three of the phrases A,/3, C, D, E 
might have been seen ,'rod any two of then| might remain to 
be parsed. There will be (~) = t0 states reflecting progress 
through the rule expanding S; iS ~ {A, B,C}.{D,E},0\] 
will be in the state set, a.s will'S ~ {A,C,E}.{B,D},OI, 
etc. There will also be 15 states reflecting the completion 
and prediction of phrases. In cases like this, $hieber's al- 
gorithm enumerates all of the combinations of k elements 
taken i at a tin|e, where k is the rule length and i is the 
number of elements already processed. Thus it can be 
combinatorially explosive. Note, however, that Shieber's 
algorithm is still better than parsing the object grammar. 
With the Earley parser, the state set would reflect the same 
possibilities, but encoded in a less concise representation. 
In place ot the state involving S ~ {A, 13, C}.{D,E}, 
for instance, there would be 3!. 2! = 12 states involving 
S ~ ABC.DE, S ~ 13CA.ED, and so forth. 2 his|end 
IFor mor~. dl.rail~ ~-e Barton (198,1bi ~ld Shi,.hPr (1983}. Shieber'.~ 
rel,re~,ent;ttion ,lilfers in .~mle ways from tilt. reprr.'~,nlatioll de.. 
.a'ribt.,\[ lit.re, wit|ell W~.~ ,h.veh}ped illth'pt, ndeutly by tilt, author. 
The dilft,r,.nces tuft. i~ellPrldly iut.~.'~eutiid, but .~ee |tote 2. 
lln eontrP....t¢ tit t|lt. rr|)rrr4.ntztl.ion .ilht..4tr;tled here. :¢,}:ieber'.., rt.|v. 
£P.~Wl'llt+l+liOll Hl'¢ll;Idl|y .~ulfl.r.~ to POIlI(" eXtt'tlt flOlll Tilt + Y.;tllle |lf\[lil- 
of a total of 25 states, the Earley state set would contain 
135 = 12 • 10 -+- 15 states. 
With G~., the parser could not be sure of the categorial 
identities of the phrases parsed, but at least it was certain 
of the number ,'tad eztent of the phrases. The situation gets 
worse if there is uncertainty in those areas ~ well. Derive 
G3 by replacing every z in G,. with the empty string e so 
that ,an A, for instance, can be either a or nothing. Before 
any input has been read, state set S, in $hieber's parser 
must reflect the possibility that the correct parse may in- 
clude any of the 2 ~ = 32 possible subsets of A, B, C, D, ~' 
empty initial constituents. For example, So must in- 
clude \[..q -- {A, \]3,C, D, E}.{},0i because the input might 
turn out to be the null string. Similarly, S. must include 
:S ~ {A,C, El.{~3, Dt,O~ because the input might be bd 
or db. Counting all possible subsets in addition to other 
states having to do with predictions, con|pie|ions, and the 
parser start symbol that some it||p\[ententatioas introduce, 
there will be .14 states in £,. (There are 3:~8 states ill the 
corresponding state when the object gra, atuar G~ is used.) 
|low call :Shieber's algorithm be exponeatial in grant- 
Inar size despite its similarity to Earh:y's algorithm, 
which is polynontiM in gratnln~tr size7 The answer is that 
Shieber's algorithm involves a leech larger bouad on the 
number of states in a state set. Since the Eariey parser 
successively processes all of the states in each state set 
(Earley, 1970:97), an explosion in the size of the state sets 
kills any small runtime bound. 
Consider the Earley parser. Resulting from each rule 
X ~ At .... 4~ in a gram|oar G,, there are only k - t pos- 
sible dotted rules. The number of possible dotted rules 
is thus bounded by the au~'uber of synibois that it takes 
to write G, down, i.e. by :G,, t. Since an Eariey state 
just pairs a dotted rule with an interword position ranging 
front 0 to the length n of the input string, there are only 
O('~C~; • n) possible states: hence no state set may contain 
more than O(Gai'n) (distinct) states. By an argument 
due to Eartey, this limit allows an O(:G~: . n z) bound to 
be placed on Earley-parser runti,ne. In contrast, the state 
sets of Shieber's parser may grow t|tuch larger relative to 
gr~nmar size. A rule X ~ At... A~ in a UCFG G~ yields 
not k + I ordinary dotted rules, but but 2 ~ possible dot- 
ted UCFC rules tracking accumulation of set elements. \[n 
the worst ca.,e the gr,'uutttar contains only one rule and k 
is on the order of G,,:: hence a bound on the mt,nber of 
possible dotted UCFG rules is not given by O(G,,.), but 
by 0(2 el, ). (Recall tile exponential blowup illustrated for 
granmmr /5:.) The parser someti,,tes blows up because 
there are exponentially more possible ways to to progress 
through an :reordered rule expansion than an through an 
ordered one. in ID/LP parsing, the emits| case occurs 
lem..qhivher {1083:10} um.~ ,~t ordered seqt.,nre in.~tead of a mld- 
tim.t hvfore tilt. dot: ¢ou.~equently. in plltco of the ..,tate invo|ving 
S ~ {A.B.(:}.{D.E}, Sltiei,er wouhJ have tilt, :E = 6 ~t;ttt..~ itl- 
vtdving S -- ~t. {D. E}, where o~ range* over l|te six pernlutlxtion8 of 
ABC. 
77 
ae eb I \["'d 
el I ,, e2 
. / 
e3 
Figure 1: This graph illustrates a trivial inst,ance of the 
vertex cover problem. The set {c,d} is a vertex cover of 
size 2. 
when the LP constraints force a unique ordering for ev- 
ery rule expansion. Given sufficiently strong constraints, 
Shieber's parser reduces to Earley's as Shieber thought, 
but strong constraint represents the best case computa- 
tionally rather than the worst caze. 
NP-COMPLETENESS 
The worst-case time complexity of Shieber's algorithm 
is exponential in grammar size rather than quadratic ,'m 
Shieber (1983:15} believed, l)id Shieber choose a poor al- 
gorithm, or is ID/LP parsing inherently difficult? In fact, 
the simpler problem of recoyn~zzn 9 sentences according to a 
UCFG is NP-complete. Thus, unless P = 3/P, no ID/LP 
parsing algorithm can always run in trine polynomial in 
the combined size of grammar and input. The proof is a 
reduction of the vertex cover problem (Garey and John- 
son, 1979:,16), which involves finding a small set of vertices 
in a graph such that every edge of the graph has an end- 
point in the set. Figure 1 gives a trivial example. 
To make the parser decide whether the graph in Fig- 
ure I has a vertex cover of size 2, take the vertex names a, 
b, c, and d as the alphabet. Take Ht through H4 as special 
symbols, one per edge; also take U and D as dummy sym- 
bols. Next, encode the edges of the graph: for instance, 
edge el runs from a to c, so include the rules itll ---, a and 
Ht ~ c. Rules for the dummy symbols are also needed. 
Dummy symbol D will be used to soak up excess input 
symbols, so D ~ a through D ~ d should be rules. 
Dummy symbol U will also soak up excess input symbols, 
but U will be allowed to match only when there are four 
occurrences in a row of the same symbol {one occurrence 
for each edge). Take U ~ aaaa, U --. bbbb, and U --. cccc, 
and U ---, dddd as the rules expanding U. 
Now, what does it take for the graph to have a vertex 
cover of size k = 2? One way to get a vertex cover is to go 
through the list of edges and underline one endpoint of each 
edge. If the vertex cover is to be of size 2, the nmlerlining 
must be done in such a way that only two distinct vertices 
axe ever touched in the process. Alternatively, since there 
axe 4 vertices in all, the vertex cover will be of size 2 if there 
are 4 - 2 = 2 vertices left untouched in the underlining. 
This method of finding a vertex cover can be translated 
START -~ Hi tI2H3H4UU DDDD 
Hl -.-.aI c 
H2--*ble 
H3 --. c l ,~ H,..-.bl~ 
U ---, aaaa ! bbbb t cccc I dddd 
D~alblcld 
Figure 2: For k = 2, the construction described in the text 
transforms the vertex-cover problem of Figure 1 into this 
UCFG. A parse exists for the string aaaabbbbecccdddd iff 
the graph in the previous figure has a vertex cover of size 
<2. 
into an initial rule for the UCFG, ,as follows: 
START -. Hi II2H~II4UUDDDD 
Each //-symbol will match one of the endpoints of the 
corresponding edge, each /.r-symbol will correspond to a 
vertex that was left untouclted by the H-matching, and 
the D-symbols are just for bookkeeping. (Note that this is 
the only ~ule in the construction that makes essential use 
of the unordered nat,re of rule right-hand sides.} Figure 2 
shows the complete gr,'unmar that encodes the vertex-cover 
problem ,,f Figure I. 
To make all of this work properly, take 
a = aaaabbbbccccdddd 
as the input string to be parsed. (For every vertex name z, 
include in a a contiguous run of occurrences of z, one for 
each edge in the graph.) The gramnlar encodes the under- 
lining procedure by requiring each //-symbol to match one 
of its endpoints in a. Since the expansion of the START 
rx, le is unordered, ,an H-symbol can match anywhere in a, 
hence can match any vertex name (subject to interference 
from previously matched rules). Furthermore, since there 
is one occurrence of each vertex name for every edge, it's 
impossible to run out of vertex-name occurrences. The 
grammar will allow either endpoint of an edge to be "un- 
derlined" -- that is, included in the vertex cover -- so the 
parser must figure out which vertex cover to select. How- 
ever, the gr,-mtmar also requires two occurrences of U to 
match. U can only match four contiguous identical input 
symbols that have not been matched in any other way; 
thus if the parser chooses too iarge a vertex cover, the U- 
symbols will not match and the parse will fail. The proper 
number of D-symbols equals the length of the input string, 
minus t|,e number of edges in the graph (to ~count for the 
//,-matches), minus k times the number of edges (to ac- 
count for the U-matches): in this case, 16 - 4 - (2 • 4) = 4, 
as illustrated in the START rule. 
The result of this construction is that in order to decide 
whether a is in the language generated by the UCFG, the 
78 
START 
U U Ht //2 H3 D //4 D D D A/ IIIIIIII 
a a a a b b b b c c c c d d d d 
Figure 3: The grammar of Figure 2, which encodes the 
vertex-cover problem of Figure I, generates the string 
a = aaaabbbbccccddddaccording to this parse tree. The 
vertex cover {c,d} can be read off from the parse tree a~ 
the set of elements domi,~ated by //-symbols. 
parser nmst search for a vertex cover of size 2 or less. 3 If 
a parse exists, an appropriate vertex cover can be read off 
from beneath the //-symbols in the parse tree; conversely, 
if an appropriate vertex cover exists, it shows how to con- 
struct a parse. Figure 3 shows the parse tree that encodes a 
solution to the vertex-cover problem of Figure 1. The con- 
struction thus reduces Vertex Cover to UCFG recognition, 
and since the c,~nstruction can be carried out in polyno- 
mial time, it follows that UCFG recognition and the more 
general ta.sk of ID/LP parsing nmst be computationally 
difficult. For a more detailed treatment of the reduction, 
see Barton (1984b). 
IMPLICATIONS 
The reduction of Vertex Cover shows that the \[D/LP 
parsing problem is YP-complete; unless P = ~/P, its time 
complexity is not bounded by ,'my polynomial in the size'of 
the grammar and input. Ilence complexity analysis must 
be done carefully: despite sintilarity to Earley's algorithm, 
Shieber's algorithm does not have complexity O(IG\[ 2. n3), 
but can sometimes undergo exponential growth of its in- 
ternal structures. Other computational ,and linguistic con- 
sequences alzo follow. 
Although Shieber's parser sometimes blows up, it re- 
mains better than the alternative of ,~arsing an expanded 
"object ~arnmar." The NP-completeness result shows that 
the general c~e of ID/LP parsing is inherently difficult; 
hence it is not surprising that Shieber's ID/LP parser some- 
times suffers from co,nbinatorial explosion. It is more im- 
portant to note that parsing with the expanded CFG blows 
up in ea~v c~es. It should not be h~d to parse the lan- 
~lf the v#rtex er, ver i.~ t, maller tllall expected, the D-.~y,nbo~ will 
up the extra eonti~mun ntrm that could have been matrhed I~' 
more (f-symbols. 
guage that consists of aH permutations of the string abode, 
but in so doing, the Earley parser can use 24 states or more 
to encode what the Shieber parser encodes in only one (re- 
call Gl). Tile significant fact is not that the Shieber parser 
can blow up; it is that the use of the object grammar blows 
up unnecessarily. 
The construction that reduces the Vertex Cover prob- 
lem to ID/LP P,xrsing involves a grammar and input string 
that both depend on the problem instance; hence it leaves 
it open that a clever programmer ,night concentrate most 
of the contputational dilliculty of ID/LF' parsing into an 
ofll_ine grammar-precompilation stage independent of the 
input -- under optimistic hopes, perhaps reducing the time 
required for parsing ;m input (after precompilation) to a 
polynomial function of grammar size and inpt,t length. 
Shieber's algorithm has no precompilation step, ~ so the 
present complexity results apply with full force; ,'my pos- 
sible precompilation phase remains hyl~othetical. More- 
over, it is not clear that a clever preco,npilation step is 
even possible. For example, ifn enters into the true com- 
plexity of ID/LI ~ parsing ,~ a factor multiplying an expo- 
nential, ,an inpnt-indepemtent precompilation phase can- 
not help enough to make the parsing phase always run in 
polynomial time. On a related note,.~uppo,e the precom- 
pilation step is conversiol, to CF(.; farm ¢md the runtime 
algorithm is the Earley parser. Ahhough the precompila- 
tion step does a potentially exponenti;d amount of work in 
producing G' from G, another expoaential factor shows up 
at runtime because G' in the complexity bound G'2n~ 
is exponentially larger than the original G'. 
The NP-completeness result would be strengthened if 
the reduction used the same grammar for all vertex-cover 
problems, for it woold follow that precompilation could 
not bring runtime down to polynomial time. However, 
unless ,~ = & P, there can be no such reduction. Since 
gr.'Jannlar size would not count as a parameter of a fixed- 
gramm~tr \[D/LP parsing problem, the l,se of the Earley 
parser on the object gr,-ulzmar would already constitute a 
polynomial-time algorithm for solving it. (See the next 
section for discussion.) 
The Vertex Cover reduction also helps pin down the 
computational power of UCFGs. As G, ,'tad G' t illus- 
trated, a UCFG (or an ID/LP gr,'uumar) is sometimes 
tnttch smaller than an equivalent CFG. The NP-complete- 
ness result illuminat,_'s this property in three ways. First, 
th'e reduction shows that enough brevity is gained so that 
an instance of any problem in .~ .~ can be stated in a UCFG 
that is only polyno,nially larger than the original problem 
instance. In contrast, the current polynomial-time reduc- 
tion could not be carried out with a CFG instead of a 
UCFG, since the necessity of spelling out all the orders in 
which symbols lltight appear couhl make the CFG expo- 
nentially larger than the instance. Second, the reduction 
shows that this brevity of expression is not free. CFG 
'Shieber {1983:15 n. 6) mentmn.~ a possible precompilation step. but 
it i~ concerned ~,,,itlt the, \[,P r~'hLrum rather tha.'* tlt~r ID rtth.-~. 
79 
recognition can be solved in cubic time or less, but unless 
P = .~'P, general UCFG recognition cannot be solved in 
polynomial time. Third, the reduction shows that only 
one essential use of the power to permute rule expansions 
is necessary to make the parsing problem NP-comphte, 
though the rule in question may need to be arbitrarily 
long. 
Finally, the ID/LP parsing problem illustrates how 
weakness of constraint c,-m make a problem computation- 
ally difficult. One might perhaps think that weak 
constraints would make a problem emier since weak con- 
straints sound easy to verify, but it often takes ~trong con- 
straints to reduce the number of possibilities that an algo- 
rithm nmst consider. In the present case, the removal of 
constraints on constituent order causes the dependence of 
the runt|me bound on gr,'unmar size to grow from IGI ~ to 
TG',. 
The key factors that cause difficuhy in ID/LP parsing 
are familiar to linguistic theory. GB-theory amt GPSG 
both permit the existence of constituents that are empty 
on the surface, and thus in principle they both allow the 
kind of pathology illustrated by G~, subject to ,-uueliora- 
tion by additional constraints. Similarly, every current 
theory acknowledges lexical ambiguity, a key ingredient of 
the vertex-cover reduction. Though the reduction illumi- 
nates the power of certain u,echanisms and formal devices, 
the direct intplications of the NP-completeness result for 
grammatical theory are few. 
The reduction does expose the weakness of attempts 
to link context-free generative power directly to efficient 
parsability. Consider, for inst,'mce, Gazdar's (1981:155) 
claim that the use of a formalism with only context-free 
power can help explain the rapidity of human sentence 
processing: 
Suppose ... that the permitted class of genera- 
live gl'anllllal'S constituted ,t s,b~ct -f t.h~Jsc phrase 
structure gramni;trs c;qmblc only of generating con- 
text-free lung||ages. Such ;t move w, mld have two 
iz,lportant tuetathcoretical conseqoences, one hav- 
ing to do with lear,mbility, the other with process- 
ability ... We wen|hi have the beginnings of an ex- 
plan:tti~:u for the obvious, but larg~.ly ignored, fact 
thltI hll:llD.ns process the ~ttterance~ they hear very 
rapidly. ."~cnll+llCe+ c+f ;t co;O.exl-frec I;tngu;tge are 
I+r,val>ly l;ar~;tl~h: in ;t l.illn'~ that i>~ i>r,,l>ot'tionitl to 
the ct,bc ,,f the lezlgl h of the ~entenee or less. 
As previously remarked, the use of Earley's algorithm on 
the expanded object grantmar constitutes a parsing method 
for the ILxed-grammar (D/LP parsing problem that is in- 
deed no worse than cubic in sentence length. However, the 
most important, aspect of this possibility is that it is devoid 
of practical significance. The object ~,'mmtar could con- 
tain trillions of rules in practical cases (Shieber, 1983:4). 
If IG'~, z. n ~ complexity is too slow, then it rentains too slow 
when !G'I: is regarded as a constant. Thus it is impossi- 
ble to sustain this particular argument for the advantages 
of such formalisms ,as GPSG over other linguistic theo- 
ries; instead, GPSG and other modern theories seem to 
be (very roughly) in the same boat with respect to com- 
plexity. In such a situation, the linguistic merits of various 
theories are more important than complexity results. (See 
Berwick (1982), Berwick and Weinberg (1984), aJad Ris- 
tad (1985) for further discussion.) 
The reduction does not rule out the use of formalisms 
that decouple ID and LP constraints; note that Shieber's 
direct parsing algorithm wins out over the use of the object 
grammar. However, if we assume that natural languages 
,xre efficiently parsable (EP), then computational difFicul- 
ties in parsing a formalism do indicate that the formalism 
itself fl~ils to capture whatever constraints are responsible 
for making natural languages EP. If the linquistically rel. 
evant ID/LP grammars are EP but the general ID/LP 
gramu,ars ~e not, there must be additional factors that 
guarantee, say, a certain amount of constraint from the LP 
retationJ (Constraints beyond the bare ID, LP formalism 
are reqt, ired on linguistic grounds ,as well.) The subset 
prtnciple ,ff language acqoisition (cf. \[h, rwick and We|n- 
berg, 198.1:233) wouht lead the language learner to initially 
hypothesize strong order constraints, to be weakened only 
in response to positive evidence. 
llowever, there are other potential ways to guarantee 
that languages will be EP. It is possible that the principles 
of grammatical theory permit lunge,ages that are not EP 
in the worst c,'tse, just as ~,'uumatical theory allows sen- 
tences that are deeply center-embedded (Miller and Chom- 
sky, 1963}. Difficuh languages or sentences still wouhl not 
turn up in general use, precisely because they wot, ht be dif- 
ficult to process. ~ The factors making languages EP would 
not be part of grammatical theory because they would 
represent extragrammatical factors, i.e. the resource lim- 
itations of the language-processing mechanisms. In the 
same way, the limitations of language-acquisition mech- 
anisms might make hard-to-parse lunge, ages maccesstble 
to the langamge le,'u'ner in spite of satisfying ~ammatical 
constraints. However, these "easy explanations" are not 
tenable without a detailed account of processing mecha- 
nisms; correct oredictions are necessary about which con- 
structions will be easy to parse. 
ACKNOWLEDGEMENTS 
This report describes research done at the Artificial 
Intelligence Laboratory of the Ma.ssachusetts Institute of 
~|a the (;B-fr~unework of Chom.-ky (1981). for in~tance, the ,~yn- 
tactic expre~..,ion of unnrdered 0-grids at tire X level i'~ constrained 
by tile principlv.~ of C.'~e th~ry, gndocentrieity is anotlmr .~ignifi- 
cant constraint. See aL~o Berwick's ( 1982} discu.-,,-,ion of constraints 
that could be pl;wed ml another gr;unmatie',d form,'dism -- lexic,'d- 
fimetional grammar - to avoid a smfil.'u" intr,'u'tability result. 
nit is often anordotally remarked that lain|rouges that allow relatively 
fre~ word order '.end to m',tke heavy u.-.e of infh~'tions. A rich iattec- 
timln.l system can .-upply parsing constraints that make up for the 
hack of ordering e.,strai,*s: thu~ tile situation we do not find is the 
computationa/ly dill|cult cnse ~ff weak cmmcraint. 
80 
Technology. Support for the Laboratory's artificial intel- 
ligence research has been provided in part by the Ad- 
vanced Research Projects Agency of the Department of 
Defense under Office of Naval Research contract N00014- 
80-C-0505. During a portion of this research the author's 
graduate studies were supported by the Fannie and John 
Hertz Foundation. Useful guidance and commentary dur- 
ing this research were provided by Bob Berwick, Michael 
Sipser, and Joyce Friedman. 
REFERENCES 
Barton, E. (1984a). "Towed a Principle-Based Parser," 
A.I. Menlo No. 788, M.I.T. Artificial Intelligence Lab- 
oratory, Cambridge, Mass. 
Barton, E. (198,1b). "On the Complexity of ID/LP Pars- 
ing," A.I. Menlo No. 812, M.I.T. Artificial Intelligence 
Laboratory, Cambridge, Mass. 
Berwick, R. (1982). "Computational Comphxity and 
Lexical-Functional Grammar," American Journal of 
Compu:ational Linguistica 8.3-4:97-109. 
Berwick, R., and A. Wcinberg (1984). The Grammatical 
Basi~ of Linguistic Performance. Cambridge, Mass.: 
M.I.T. Press. 
Chomsky, N. (1981). Lecture8 on Government and Bind. 
ing. Dordrecht, ttolland: Foris Publications. 
Earley, J. (1970). "An EfFicient Context-Free Parsing Al- 
gorithm," Comm. ACM 13.2:94-102. 
Gaxey, M., and D. Johnson (1979). Computer~ and In- 
tractability. San Francisco: W. H. Freeman and Co. 
Gazdar, Gerald (1981). "Unbounded Dependencies and 
Coordinate Structure," Linguistic Inquiry 12.2:155-184. 
Miller, G., and N. Chomsky (1963). "Finitary Models of 
Language Users." in R. D. Luce, R. R. Bush, and E. 
Galanter, eds., Handbook of Mathematical Psychology, 
vol. II, 419-492. New York: John Wiley and Sons, Inc. 
Ristad, E. (1985). "GPSG-Recognition is NP-Ilard," A.I. 
Memo No. 837, M.I.T. Artificial Intelligence Labora- 
tory, Cambridge, M,xss., forthcoming. 
Shieber, S. (1983). "Direct Parsing of !D/LP Grammars." 
Technical Report 291R, SRI International, Menlo Park, 
California. Also appears in Lingui~tic~ and Philosophy 
7:2. 
81 
