• No results found

Computational Complexity and Lexical Functional Grammar

N/A
N/A
Protected

Academic year: 2020

Share "Computational Complexity and Lexical Functional Grammar"

Copied!
13
0
0

Loading.... (view fulltext now)

Full text

(1)

Computational Complexity and

LexicaI-Functional Grammar

Robert C. Berwick

Artificial Intelligence Laboratory

Massachusetts Institute of Technology

Cambridge, Massachusetts 02139

1. I n t r o d u c t i o n

An important goal of m o d e r n linguistic t h e o r y is to characterize as narrowly as possible the class of natu- ral languages. One classical approach to this charac- terization has been to investigate the generative capac- ity of grammatical systems specifiable within particular linguistic theories. F o r m a l results along these lines have already been obtained for certain kinds of Trans- formational G e n e r a t i v e Grammars: for example, Peters and Ritchie 1973a showed that the t h e o r y of Transfor- mational G r a m m a r presented in C h o m s k y ' s

Aspects of

the Theory of Syntax

1965 is powerful enough to allow the specification of grammars for generating any re- cursively e n u m e r a b l e language, while R o u n d s 1973,1975 extended this work by demonstrating that m o d e r a t e l y restricted T r a n s f o r m a t i o n a l G r a m m a r s (TGs) can generate languages whose recognition time is provably exponential. 1

These m o d e r a t e l y restricted theories of T r a n s f o r - mational G r a m m a r generate languages whose recogni- tion is widely c o n s i d e r e d to be c o m p u t a t i o n a l l y in- tractable. W h e t h e r this " w o r s t c a s e " complexity anal- ysis has any real import for actual linguistic study has been the subject of some d e b a t e (for discussion, see C h o m s k y 1980, Berwick and Weinberg 1982). Re- suits on generative capacity provide only a worst-case b o u n d on the c o m p u t a t i o n a l resources required to

l In R o u n d s ' s proof, t r a n s f o r m a t i o n s are s u b j e c t to a " t e r m i n a l length n o n - d e c r e a s i n g " condition, as s u g g e s t e d by Peters a n d Myhill (cited in R o u n d s 1975). A similar " t e r m i n a l l e n g t h i n c r e a s i n g " c o n s t r a i n t (to the a u t h o r ' s k n o w l e d g e first p r o p o s e d by Petrick 1965) w h e n coupled with a condition on recoverability of d e l e t i o n s , yields l a n g u a g e s t h a t are r e c u r s i v e b u t n o t n e c e s s a r y recognizable in e x p o n e n t i a l time.

2 Usually, the recognition p r o c e d u r e s p r e s e n t e d actually re- cover the structural description of s e n t e n c e s in the process of rec- ognition, so that in fact t h e y actually parse s e n t e n c e s , rather t h a n simply recognize them.

recognize the sentences specified by a linguistic theo- ry. 2 But a sentence processor might not have to ex- plicitly r e c o n s t r u c t deep structures in an exact (but inverse) mimicry of a t r a n s f o r m a t i o n derivation, or even recognize e v e r y sentence generable by a particu- lar transformational theory. F o r example, as suggested by F o d o r , B e v e r and G a r r e t t 1974, the h u m a n sen- tence processor could simply o b e y a set of heuristic principles and r e c o v e r the right representations speci- fied by a linguistic theory, but not according to the rules of that theory. T o say this much is to simply restate a long-standing view that a t h e o r y of linguistic p e r f o r m a n c e could well differ from a t h e o r y of linguis- tic c o m p e t e n c e - and that the relation b e t w e e n the two could vary from one of near isomorphism to the much weaker i n p u t / o u t p u t equivalence implied by the F o d o r , Bever, and G a r r e t t position. 3

In short, the study of generative capacity furnishes a mathematical characterization of the computational complexity of a linguistic system. W h e t h e r this mathe- matical c h a r a c t e r i z a t i o n is cognitively relevant is a related, but distinct, question. Still, the determination of the computational complexity of a linguistic system is an important undertaking. F o r one thing, it gives a precise description of the class of languages that the

3 T h e phrase " i n p u t / o u t p u t e q u i v a l e n c e " simply m e a n s that the two s y s t e m s - the linguistic g r a m m a r a n d the heuristic princi- ples - p r o d u c e the s a m e (surface string, u n d e r l y i n g s t r u c t u r e ) pairs. Note that the " i n t e r n a l c o n s t i t u t i o n " of the two s y s t e m s could be wildly different. T h e intuitive notion of " e m b e d d i n g a linguistic theory into a m o d e l of l a n g u a g e u s e " as it is generally c o n s t r u e d is m u c h s t r o n g e r t h a n this, since it implies that the parsing s y s t e m follows s o m e ( p e r h a p s all) of the s a m e o p e r a t i n g principles as the linguistic s y s t e m , and m a k e s r e f e r e n c e in its o p e r a t i o n to the s a m e s y s t e m of rules. This intuitive description can be s h a r p e n e d c o n s i d - erably. See Berwick and W e i n b e r g 1983 for a m o r e detailed discus- sion of " t r a n s p a r e n c y " as it relates to the e m b e d d a b i l i t y of a lin- guistic t h e o r y in a model of l a n g u a g e use, in this case, a m o d e l of parsing.

Copyright 1982 by the A s s o c i a t i o n for C o m p u t a t i o n a l Linguistics. P e r m i s s i o n to copy without fee all or part of this material is g r a n t e d provided that the copies are not m a d e for direct c o m m e r c i a l a d v a n t a g e and the Journal r e f e r e n c e a n d this c o p y r i g h t notice are included on the first page. To copy otherwise, or to republish, requires a fee a n d / o r specific permission.

0 3 6 2 - 6 1 3 X / 8 2 / 0 3 0 0 9 7 - 1 3 $03.00

(2)

Robert C. Berwick Computational Complexity and LexicaI-Functional Grammar

s y s t e m can generate, and so can tell us w h e t h e r the linguistic s y s t e m is in principle descriptively adequate. This m e t h o d of a r g u m e n t was used in C h o m s k y ' s orig- inal rejection of finite-state languages as an a d e q u a t e c h a r a c t e r i z a t i o n of h u m a n linguistic c o m p e t e n c e . Sec- ond, as m e n t i o n e d , the resource b o u n d on recognition given b y a c o m p l e x i t y - t h e o r e t i c analysis tells us h o w long recognition will take in the worst possible case.

Since u n r e s t r i c t e d TGs can g e n e r a t e c o m p u t a t i o n a l - ly " h a r d " languages, t h e n plainly, in o r d e r to m a k e TGs e f f i c i e n t l y p a r s a b l e , o n e m u s t s u p p l y additional restrictions. T h e s e could be either modifications to the t h e o r y of TG itself, or c o n s t r a i n t s on the parsing m e c h a n i s m . F o r e x a m p l e , the c u r r e n t t h e o r y of TG (see C h o m s k y 1981) contains several restrictions on the w a y in which displaced c o n s t i t u e n t s such as w h - p h r a s e s m a y be linked to their " c a n o n i c a l " posi- tion in p r e d i c a t e - a r g u m e n t structure. (E.g., W h o in W h o did Bill kiss is a s s u m e d to be linked to a c a n o n i - cal a r g u m e n t position after the v e r b kiss.) As an ex- ample of a c o n s t r a i n t on the parsing m e c h a n i s m , one could p r o c e e d as did M a r c u s 1980, and posit const- raints dictating that T G - g e n e r a t e d languages m u s t h a v e p a r s e r s t h a t m e e t c e r t a i n " l o c a l i t y c o n d i t i o n s " . 4 F o r instance, the M a r c u s c o n s t r a i n t s a m o u n t to an e x t e n - sion of K n u t h ' s 1965 L R ( k ) locality c o n d i t i o n to a (restricted) version of a t w o - s t a c k deterministic push- d o w n a u t o m a t o n . 5

Recently, a new t h e o r y of g r a m m a r has b e e n ad- v a n c e d with the explicitly stated aim of m e e t i n g the dual d e m a n d s of l e a r n a b i l i t y a n d p a r s a b i l i t y - the L e x i c a l - F u n c t i o n a l G r a m m a r s (LFGs) of K a p l a n a n d B r e s n a n 1981. T h e t h e o r y of L e x i c a l - F u n c t i o n a l G r a m m a r is c l a i m e d to b e at least as d e s c r i p t i v e l y a d e q u a t e as T r a n s f o r m a t i o n a l G r a m m a r , if n o t m o r e so. M o r e o v e r , it is claimed to h a v e none of T G ' s c o m -

4 It is i m p o r t a n t not to confuse the requirement that T G - generated languages have parsers that meet certain constraints with the claim that such parsers t r a n s p a r e n t l y e m b e d TGs. As stated, the only requirement is one of weak i n p u t / o u t p u t equivalence - i.e., that the parser construct the same (surface string, underlying repre- sentation) pairs as the TG. Actually, one can s h o w that a modified Marcus parsing system goes beyond this requirement and o p e r a t e s according to the same principles as the recent t r a n s f o r m a t i o n a l theory of Chomsky. That is, such a modified Marcus parser makes reference to the same base constraints and representational units as the linguistic theory. Since it abides by the same rules and repre- sentations as TG, one is justified in claiming that the model e m b e d s a TG. Note that the Marcus parser does not mimic earlier theories of TG (as presented in Aspects o f the Theory o f Syntax); there is no rule-for-rule c o r r e s p o n d e n c e b e t w e e n an Aspects g r a m m a r and the rules of the Marcus parser. But neither is there a r u l e - f o r - r u l e c o r r e s p o n d e n c e b e t w e e n m o d e r n theories of T G and the Aspects

theory. For example, there is no longer a distinct rule of " p a s s i v e " or " d a t i v e m o v e m e n t " . A detailed d e m o n s t r a t i o n of this claim would go far beyond the p u r p o s e of this paper. See Berwick and Weinberg forthcoming.

5 The possible need for L R ( k ) - l i k e restrictions in order to ensure efficient processability was also suggested by R o u n d s 1973.

p u t a t i o n a l unruliness, in the sense t h a t it is c l a i m e d t h a t there is a " n a t u r a l " e m b e d d i n g of an LFG into a p a r s i n g m e c h a n i s m (a p e r f o r m a n c e m o d e l ) t h a t ac- counts for h u m a n s e n t e n c e processing behavior. In LFG, there are no t r a n s f o r m a t i o n s (as classically de- s c r i b e d ) ; the w o r k f o r m e r l y a s c r i b e d to t r a n s f o r m a - tions such as " p a s s i v e " is s h o u l d e r e d b y i n f o r m a t i o n stored in lexical entries a s s o c i a t e d with lexical items. T h e underlying r e p r e s e n t a t i o n of surface strings t h a t is built is also d i f f e r e n t f r o m the d e e p structures of clas- sical t r a n s f o r m a t i o n a l t h e o r y ; the r e p r e s e n t a t i o n m a k e s r e f e r e n c e to functionally d e f i n e d notions of g r a m m a t i - cal t e r m s like " S u b j e c t " , r a t h e r t h a n defining t h e m structurally, as was d o n e in classical t r a n s f o r m a t i o n t h e o r y . T h e e l i m i n a t i o n of t r a n s f o r m a t i o n a l p o w e r and the use of a different kind of underlying r e p r e - s e n t a t i o n f o r sentences naturally gives rise to the h o p e that a lexical-functional s y s t e m would be c o m p u t a t i o n - ally simpler t h a n a t r a n s f o r m a t i o n a l one.

A n interesting question t h e n is to d e t e r m i n e , as has already b e e n d o n e f o r the case of certain b r a n d s of T r a n s f o r m a t i o n a l G r a m m a r , just w h a t the " w o r s t c a s e " c o m p u t a t i o n a l c o m p l e x i t y for the r e c o g n i t i o n of LFG languages is. If the r e c o g n i t i o n time c o m p l e x i t y for languages g e n e r a t e d b y the basic LFG t h e o r y can be as c o m p l e x as t h a t f o r languages g e n e r a t e d b y a m o d e r a t e l y r e s t r i c t e d t r a n s f o r m a t i o n a l s y s t e m , t h e n p r e s u m a b l y LFG will also h a v e to add additional const- raints, b e y o n d those p r o v i d e d in its basic t h e o r y , in o r d e r to e n s u r e e f f i c i e n t parsability. J u s t as with t r a n s f o r m a t i o n a l theories, these could be c o n s t r a i n t s on either the t h e o r y or its p e r f o r m a n c e m o d e l realiza- tion.

T h e m a i n result of this p a p e r is to show t h a t cer- tain L e x i c a l - F u n c t i o n a l G r a m m a r s c a n g e n e r a t e lan- guages w h o s e r e c o g n i t i o n time is v e r y likely c o m p u t a - tionally intractable, at least according to our c u r r e n t u n d e r s t a n d i n g of algorithmic complexity. Briefly, the d e m o n s t r a t i o n p r o c e e d s b y s h o w i n g h o w a p r o b l e m that is widely c o n j e c t u r e d to be c o m p u t a t i o n a l l y diffi- cult - n a m e l y , w h e t h e r there exists an a s s i g n m e n t of l ' s and O's (or " T ' " s a n d " F ' " s ) to the a t o m s of a B o o l e a n f o r m u l a in c o n j u n c t i v e n o r m a l f o r m t h a t m a k e s the f o r m u l a evaluate to " 1 " (or " t r u e " ) - c a n be r e - e x p r e s s e d as the p r o b l e m of recognizing w h e t h e r a particular string is or is not a m e m b e r of the lan- g u a g e g e n e r a t e d b y a c e r t a i n L e x i c a l - F u n c t i o n a l G r a m m a r . This " r e d u c t i o n " shows t h a t in the w o r s t case the r e c o g n i t i o n of LFG languages c a n b e just as h a r d as the original B o o l e a n satisfiability p r o b l e m . Since it is widely c o n j e c t u r e d that there c a n n o t be a p o l y n o m i a l - t i m e algorithm f o r satisfiability (the p r o b - lem is N P - c o m p l e t e ) , there c a n n o t be a p o l y n o m i a l - time r e c o g n i t i o n algorithm for LFGs in general either. N o t e t h a t this results s h a r p e n s t h a t in K a p l a n a n d B r e s n a n 1981; t h e r e it is s h o w n o n l y t h a t L F G s

(3)

Robert C. Berwick Computational Complexity and LexicaI-Functional Grammar

( w e a k l y ) g e n e r a t e s o m e subset of the class of c o n t e x t - sensitive languages, and, therefore, in the worst case, e x p o n e n t i a l time is k n o w n to be sufficient ( t h o u g h not necessary) to recognize a n y LFG language. T h e result in K a p l a n and B r e s n a n 1981 t h e r e f o r e does not ad- dress the q u e s t i o n of h o w m u c h time, in the w o r s t case, is necessary to r e c o g n i z e LFG languages. 6 T h e result of this p a p e r indicates t h a t in the w o r s t case m o r e t h a n p o l y n o m i a l time will probably be necessary. ( T h e r e a s o n for the h e d g e " p r o b a b l y " will b e c o m e a p p a r e n t below; it hinges u p o n the central unsolved c o n j e c t u r e of c u r r e n t c o m p l e x i t y t h e o r y . ) In short then, this result places the LFG languages m o r e pre- cisely in the c o m p l e x i t y hierarchy of languages.

It also turns out to be instructive to inquire into just why a lexical-functional a p p r o a c h can turn out to be c o m p u t a t i o n a l l y difficult, and how c o m p u t a t i o n a l tractability m a y be guaranteed. A d v o c a t e s of lexical- functional theories m a y have t h o u g h t (and s o m e have explicitly stated) that the b a n i s h m e n t of t r a n s f o r m a - tions is a c o m p u t a t i o n a l l y wise m o v e b e c a u s e t r a n s f o r - m a t i o n s are c o m p u t a t i o n a l l y costly. E l i m i n a t e the t r a n s f o r m a t i o n s , so this causal a r g u m e n t goes, and one has eliminated all c o m p u t a t i o n a l p r o b l e m s . Intriguing- ly though, w h e n one examines the p r o o f to be given below, the ability to express c o - o c c u r r e n c e constraints o v e r a r b i t r a r y distances across t e r m i n a l t o k e n s in a string (as in S u b j e c t - V e r b n u m b e r a g r e e m e n t ) , w h e n coupled with the possibility of alternative lexical en- tries, seems to be all that is required to m a k e the rec- ognition of LFG languages intractable.

This leaves the question p o s e d in the o p e n i n g p a r a - graph: just w h a t sorts of constraints on natural lan- guages are required in order to ensure efficient p a r s a - bility? As it turns out, e v e n though general LFGs m a y well be c o m p u t a t i o n a l l y intractable, it is e a s y to imag- ine a variety of additional constraints f o r LFG t h e o r y that provide a w a y to avoid this p r o b l e m . All of these additional restrictions a m o u n t to m a k i n g the LFG the- ory m o r e restricted, in such a w a y that the reduction a r g u m e n t c a n n o t b e m a d e to work. F o r e x a m p l e , one effective restriction is to stipulate that there can only be a finite stock of f e a t u r e s with which to label lexical items. In any case, the m o r a l of the story is an unsur- prising one: specificity and constraints can absolve a t h e o r y of g r a m m a r f r o m c o m p u t a t i o n a l intractability. W h a t m a y be m o r e surprising is t h a t the requisite locality constraints s e e m to be useful for a variety of theories of g r a m m a r , f r o m T r a n s f o r m a t i o n a l G r a m m a r to L e x i c a l - F u n c t i o n a l G r a m m a r .

2. A R e v i e w of R e d u c t i o n A r g u m e n t s

T h e d e m o n s t r a t i o n of the c o m p u t a t i o n a l c o m p l e x i t y of LFGs relies u p o n the s t a n d a r d c o m p l e x i t y - t h e o r e t i c technique of reduction. Because this m e t h o d m a y be unfamiliar to m a n y readers, a short review is p r e s e n t e d i m m e d i a t e l y below; this is followed b y a sketch of the reduction proper.

T h e idea behind the reduction technique is to take a difficult p r o b l e m , in this case the p r o b l e m of d e t e r - mining the satisfiability of B o o l e a n f o r m u l a s in c o n - junctive n o r m a l f o r m (CNF), a n d show that the p r o b - lem can be quickly t r a n s f o r m e d into the p r o b l e m w h o s e c o m p l e x i t y r e m a i n s to be d e t e r m i n e d , in this case the p r o b l e m of deciding w h e t h e r a given string is in the l a n g u a g e g e n e r a t e d b y a given L e x i c a l - F u n c t i o n a l G r a m m a r . B e f o r e the reduction p r o p e r is reviewed, s o m e definitional g r o u n d w o r k must be pres- ented. A B o o l e a n f o r m u l a in conjunctive n o r m a l f o r m is a c o n j u n c t i o n or d i s j u n c t i o n of literals, w h e r e a literal is just an a t o m (like Xi) or the n e g a t i o n of an a t o m (Xi). A f o r m u l a is satisfiable just in case there exists s o m e assignment of T ' s and F ' s (or l ' s a n d O's) to the a t o m s of a f o r m u l a that forces the evaluation of the entire f o r m u l a to be T (true); otherwise, the for- mula is said to be unsatisfiable. F o r example, the fol- lowing f o r m u l a is satisfiable:

( X 2 V X 3 V X 7 ) A ( X 1 V X 2 V X 4 ) A ( X 3 V X 1 V X 7 )

since the assignment of X 2 = T , X 3 = F , X 7 = F , X I = T , and X 4 = F m a k e s the whole f o r m u l a evaluate to " T " . T h e r e d u c t i o n in the p r o o f b e l o w uses a s o m e w h a t m o r e restricted f o r m a t where e v e r y t e r m comprises the disjunction of e x a c t l y t h r e e literals, so-called 3 - C N F (or " 3 - S A T " ) . 7

H o w does a reduction show t h a t the LFG recogni- tion p r o b l e m m u s t be at least as hard ( c o m p u t a t i o n a l l y speaking) as the original p r o b l e m of B o o l e a n satisfia- bility? T h e answer is that a n y decision p r o c e d u r e for LFG recognition could be used as a c o r r e s p o n d i n g l y fast decision p r o c e d u r e for 3-CNF, as follows:

(1) G i v e n an instance of a 3-CNF p r o b l e m (the ques- tion of w h e t h e r there exists a satisfying assignment for a given f o r m u l a in 3-CNF), apply the t r a n s f o r - m a t i o n a l algorithm p r o v i d e d b y the reduction; this algorithm is itself a s s u m e d to e x e c u t e quickly, in p o l y n o m i a l time or less. T h e algorithm o u t p u t s a c o r r e s p o n d i n g LFG decision p r o b l e m , namely: (i) a L e x i c a l - F u n c t i o n a l G r a m m a r and (ii) a string to be tested for m e m b e r s h i p in the language g e n e r a t - ed b y the LFG. T h e LFG recognition p r o b l e m r e p r e s e n t s or mimics the decision p r o b l e m f o r 3-CNF in the sense that the " y e s " and " n o " an- swers to b o t h satisfiability p r o b l e m and m e m b e r -

6 This result can also be established by showing that LFGs can generate at least all the indexed languages as defined by Aho 1968. See Berwick 1981 for details.

7 This restriction entails no loss of generality (see Hopcroft and Ullman 1979, Chapter 12), since this restricted format can be easily shown to have the power to express any CNF formula.

(4)

Robert C. Berwick Computational Complexity and LexicaI-Functional Grammar

ship p r o b l e m must coincide (if there is a satisfy- ing assignment, t h e n the c o r r e s p o n d i n g LFG deci- sion p r o b l e m should give a " y e s " answer, etc.). (2) Solve the LFG decision p r o b l e m - the string-LFG

pair - o u t p u t b y Step 1. If the string is in the LFG language, the original f o r m u l a is satisfiable; if not, it is unsatisfiable. 8

T o see h o w a reduction can tell us s o m e t h i n g a b o u t the " w o r s t c a s e " time or space c o m p l e x i t y required to recognize w h e t h e r a string is or is n o t in an LFG lan- guage, s u p p o s e for e x a m p l e that the decision p r o c e - dure f o r d e t e r m i n i n g w h e t h e r a string is in an L F G language t o o k only p o l y n o m i a l time (that is, takes time n k on a deterministic Turing machine, f o r s o m e integer k, where n is the length of the input string). Then, since the c o m p o s i t i o n of t w o p o l y n o m i a l algorithms c a n be readily s h o w n to t a k e only p o l y n o m i a l time (see H o p c r o f t a n d U l l m a n 1979, C h a p t e r 12), the entire process s k e t c h e d a b o v e , f r o m input of the CNF f o r m u l a to the decision a b o u t its satisfiability, will take only p o l y n o m i a l time.

H o w e v e r , CNF (or 3-CNF) has no k n o w n p o l y n o m i - al t i m e algorithm, a n d indeed, it is c o n s i d e r e d

exceedingly unlikely t h a t o n e could exist. T h e r e f o r e , it is just as unlikely that LFG recognition could be done (in general) in p o l y n o m i a l time. W h a t the r e d u c t i o n shows is that LFG recognition is at least as hard as the p r o b l e m of CNF. Since the latter p r o b l e m is widely considered to be difficult, the f o r m e r inherits the diffi- culty.

T h e t h e o r y of c o m p u t a t i o n a l c o m p l e x i t y has a m u c h m o r e c o m p a c t t e r m for p r o b l e m s like CNF: CNF is N P - c o m p l e t e . This label is easily deciphered: (1) CNF satisfiability is in the class NP. T h a t is, the

p r o b l e m of d e t e r m i n i n g w h e t h e r an a r b i t r a r y CNF f o r m u l a is satisfiable c a n be c o m p u t e d b y a

n o n - d e t e r m i n i s t i c T u r i n g m a c h i n e in p o l y n o m i a l time. ( H e n c e the a b b r e v i a t i o n " N P " , for " n o n - deterministic p o l y n o m i a l " . T o see that CNF is indeed in the class NP, n o t e that one can simply

guess all p o s s i b l e c o m b i n a t i o n s of t r u t h assign- m e n t s to literals, a n d check e a c h guess in p o l y n o - mial time.)

(2) CNF is complete. T h a t is, all other p r o b l e m s in the class N P c a n be quickly r e d u c e d to s o m e CNF formula. (Roughly, one shows that B o o l e a n f o r -

8 Note that the grammar and string so constructed depend upon just what formula is under analysis; that is, for each different CNF formula, the procedure presented above outputs a different

LFG grammar and string combination. In the L F G case it is important to remember that "grammar" really means "grammar plus lexicon" - as one might expect in a lexically-based theory. S. Peters has observed that a slightly different reduction allows one to keep most of the grammar fixed across' all possible input formulas, constructing only different-sized lexicons for each different CNF formula. Details are provided below.

mulas can be used to " s i m u l a t e " a n y valid c o m p u - tation of a n o n - d e t e r m i n i s t i c T u r n i n g m a c h i n e . )

Since the class of p r o b l e m s solvable in p o l y n o m i a l time on a deterministic Turing m a c h i n e ( c o n v e n t i o n a l - ly n o t a t e d , P) is trivially c o n t a i n e d in the class so solved b y a n o n - d e t e r m i n i s t i c T u r i n g m a c h i n e , the class P m u s t be a subset of the class NP. A well- known, well-studied, and still o p e n question is w h e t h e r the class P is a proper subset of the class NP. In o t h e r w o r d s , are t h e r e p r o b l e m s s o l v a b l e in n o n - deterministic p o l y n o m i a l time t h a t c a n n o t be solved in d e t e r m i n i s t i c p o l y n o m i a l t i m e ? B e c a u s e all of the s e v e r a l t h o u s a n d N P - c o m p l e t e p r o b l e m s n o w c a t a - logued h a v e so far p r o v e d r e c a l c i t r a n t to deterministic p o l y n o m i a l time solution, it is widely held t h a t P m u s t indeed be a p r o p e r subset of N P , a n d t h e r e f o r e t h a t the b e s t possible algorithms for solving N P - c o m p l e t e p r o b l e m s m u s t take m o r e t h a n p o l y n o m i a l time. (In general, the algorithms n o w k n o w n for such p r o b l e m s involve e x p o n e n t i a l c o m b i n a t o r i a l search, in one fash- ion or a n o t h e r ; these are essentially m e t h o d s t h a t do no b e t t e r t h a n to brutally simulate - deterministically, of c o u r s e - a n o n - d e t e r m i n i s t i c m a c h i n e t h a t " g u e s s e s " possible answers.)

T o r e p e a t the force of the r e d u c t i o n a r g u m e n t then, if all L F G r e c o g n i t i o n p r o b l e m s w e r e solvable in p o - lynomial time, t h e n the ability to quickly reduce CNF f o r m u l a s to L F G r e c o g n i t i o n p r o b l e m s w o u l d i m p l y t h a t all N P - c o m p l e t e p r o b l e m s w o u l d be s o l v a b l e in p o l y n o m i a l time, and t h a t the class P = the class NP. This possibility seems e x t r e m e l y r e m o t e . H e n c e , o u r a s s u m p t i o n that there is a fast (general) p r o c e d u r e for recognizing w h e t h e r a string is or is not in the lan- guage g e n e r a t e d b y an a r b i t r a r y LFG m u s t be false. In the t e r m i n o l o g y of c o m p l e x i t y t h e o r y , LFG r e c o g n i t i o n m u s t be N P - h a r d - " a s h a r d a s " a n y o t h e r N P p r o b - lem, including the N P - c o m p l e t e p r o b l e m s . This m e a n s only that LFG recognition is at least as hard as o t h e r N P - c o m p l e t e p r o b l e m s - it could still be m o r e difficult (lie in s o m e class that contains the class N P ) . If one could also show t h a t the languages g e n e r a t e d b y LFGs are in the class NP, t h e n LFGs would be s h o w n to be N P - c o m p l e t e . This p a p e r stops short of p r o v i n g this last claim, b u t simply c o n j e c t u r e s t h a t LFGs are in the class NP.

3. A S k e t c h of t h e R e d u c t i o n

T o carry out this d e m o n s t r a t i o n in detail o n e m u s t explicitly d e s c r i b e the t r a n s f o r m a t i o n p r o c e d u r e t h a t takes as input a f o r m u l a in CNF a n d o u t p u t s a c o r r e - sponding LFG decision p r o b l e m - a string to be t e s t e d for m e m b e r s h i p in a LFG language a n d the LFG itself. O n e m u s t also show t h a t this can be d o n e quickly, in a n u m b e r of steps p r o p o r t i o n a l to (at m o s t ) the length of the original f o r m u l a to s o m e p o l y n o m i a l power.

(5)

Robert C. B e r w i c k C o m p u t a t i o n a l C o m p l e x i t y and LexicaI-Functional G r a m m a r

O n e c a v e a t is in order b e f o r e e m b a r k i n g on a p r o o f sketch of this reduction. T h e g r a m m a r that is o u t p u t b y the r e d u c t i o n p r o c e d u r e will not l o o k v e r y m u c h like a g r a m m a r for a natural language, although the g r a m m a t i c a l devices that will be e m p l o y e d will in ev- ery w a y be those that are an essential part of the LFG theory.9 In other words, although it is m o s t unlikely that a n y natural language would encode the satisfiabil- ity p r o b l e m ( a n d h e n c e be i n t r a c t a b l e ) in just the m a n n e r outlined below, no " e x o t i c " LFG m a c h i n e r y is used in the reduction. Indeed, s o m e of the m o r e p o w - erful LFG notational formalisms - long-distance bind- ing, existential and negative f e a t u r e o p e r a t o r s - h a v e not b e e n exploited. ( A n earlier p r o o f m a d e use of an existential o p e r a t o r in the f e a t u r e m a c h i n e r y of LFG, but the reduction p r e s e n t e d here does not.)

T o m a k e good this d e m o n s t r a t i o n one must set out just w h a t the satisfiability p r o b l e m is a n d w h a t the decision p r o b l e m for m e m b e r s h i p in an LFG language is. Recall that a f o r m u l a in conjunctive n o r m a l f o r m is satisfiable just in case e v e r y conjunctive t e r m evalu- ates to true, that is, at least one literal in each t e r m is true. T h e satisfiability p r o b l e m is to find an assign- m e n t of T ' s and F ' s to the a t o m s at the b o t t o m (note that c o m p l e m e n t s of a t o m s are also p e r m i t t e d ) such that the r o o t node at the top gets the value " T " (for true). H o w can we get a L e x i c a l - F u n c t i o n a l G r a m m a r to r e p r e s e n t this p r o b l e m ? W h a t we w a n t is f o r satisfying a s s i g n m e n t s to c o r r e s p o n d to well-formed s e n t e n c e s of s o m e c o r r e s p o n d i n g L e x i c a l - F u n c t i o n a l G r a m m a r , and non-satisfying a s s i g n m e n t s to c o r r e - spond to sentences that are not well-formed, according to the LFG, as indicated in Figure 1. Since one wants the s a t i s f y i n g / n o n - s a t i s f y i n g assignments of ahay p a r - ticular f o r m u l a to m a p o v e r into w e l l - f o r m e d / i l l - f o r m e d sentences, one must obviously exploit the LFG m a c h i n e r y for capturing w e l l - f o r m e d n e s s conditions on sentences. To m a k e the discussion clear to the reader will require a brief a c c o u n t of the LFG t h e o r y itself.

satisfiable non-satisfiable

f o r m u l a f o r m u l a

sentence w IS sentence w IS NOT

[image:5.612.53.272.542.617.2]

in LFG language L(G) in LFG language L(G)

Figure 1. A reduction p r e s e r v e s solutions to the original problem.

Just as in a t r a n s f o r m a t i o n a l t h e o r y , a L e x i c a l - F u n c t i o n a l G r a m m a r a s s o c i a t e s with e a c h g e n e r a b l e surface string (sentence) a n u m b e r of distinct r e p r e -

9 T h e s e include feature a g r e e m e n t , the lexical analog of Sub- ject or Object " c o n t r o l " , lexical ambiguity, a n d a garden variety c o n t e x t - f r e e b a s e g r a m m a r .

sentations. F o r our p u r p o s e s here we need to focus on just t w o of these: the c o n s t i t u e n t structure of a sen- tence (its " c - s t r u c t u r e " , roughly, a labeled b r a c k e t i n g of the s u r f a c e string, a n n o t a t e d with c e r t a i n f e a t u r e c o m p l e x e s ) ; and the functional structure of a s e n t e n c e (its " f - s t r u c t u r e " , roughly, a r e p r e s e n t a t i o n of the underlying p r e d i c a t e - a r g u m e n t structure of a sentence, d e s c r i b e d in t e r m s of g r a m m a t i c a l relations such as S u b j e c t a n d O b j e c t . ) Unlike a T r a n s f o r m a t i o n a l G r a m m a r , h o w e v e r , a L e x i c a l - F u n c t i o n a l G r a m m a r does n o t g e n e r a t e surface sentences b y first specifying an explicit, c o n t e x t - f r e e deep structure followed b y a series of c a t e g o r i a l l y - b a s e d t r a n s f o r m a t i o n s . " C a - t e g o r i a l l y - b a s e d " simply m e a n s t h a t the t r a n s f o r m a - tions m o v e constituents d e f i n e d in t e r m s of categories, like N P or PP.) R a t h e r , p r e d i c a t e - a r g u m e n t structure is m a p p e d directly into c - s t r u c t u r e , on the basis of p r e d i c a t e s t h a t are g r o u n d e d u p o n g r a m m a t i c a l rela- tions (like Subject and O b j e c t ) . T h e conditions for this m a p p i n g are p r o v i d e d by a set of so-called func- tional equations associated with the c o n t e x t - f r e e rules f o r g e n e r a t i n g p e r m i s s i b l e c - s t r u c t u r e s , along with a set of c o n v e n t i o n s that in e f f e c t c o n v e r t the functional e q u a t i o n s into w e l l - f o r m e d n e s s p r e d i c a t e s f o r c- structures.

In m o r e detail, an LFG c-structure is g e n e r a t e d b y a base c o n t e x t - f r e e ~rammar. A n e c e s s a r y condition for a s e n t e n c e (considered as a string) to be in the language g e n e r a t e d b y a L e x i c a l - F u n c t i o n a l G r a m m a r is that it can be g e n e r a t e d by this base g r a m m a r ; such a s e n t e n c e is then said to h a v e a w e l l - f o r m e d constitu- ent structure. F o r example, if the b a s e rules included S = > N P VP; V P = > V NP, t h e n (glossing o v e r details of N o u n P h r a s e rules) the s e n t e n c e J o h n kissed the b a b y would be w e l l - f o r m e d but J o h n the b a b y kissed would not. N o t e that this assumes, as usual, the exist- e n c e of a lexicon t h a t p r o v i d e s a c a t e g o r i z a t i o n f o r each terminal item, e.g., that b a b y is of the c a t e g o r y N, kissed is a V, etc. I m p o r t a n t l y then, this well- f o r m e d n e s s c o n d i t i o n requires us to p r o v i d e at least o n e legitimate p a r s e tree f o r the c a n d i d a t e s e n t e n c e that shows h o w it m a y be derived f r o m the underlying LFG b a s e c o n t e x t - f r e e g r a m m a r . ( T h e r e could be m o r e than one legitimate tree if the underlying g r a m - m a r is a m b i g u o u s . ) N o t e f u r t h e r that the choice of c a t e g o r i z a t i o n for a lexical item m a y be crucial. If b a b y was a s s u m e d to be of c a t e g o r y V, t h e n b o t h sentences a b o v e would be ill-formed.

Since the base g r a m m a r is c o n t e x t - f r e e , there are w e l l - k n o w n algorithms for c h e c k i n g the well- f o r m e d n e s s of the strings it can g e n e r a t e in p o l y n o m i a l time. Intractability c a n n o t arise on this score, then.

A L e x i c a l - F u n c t i 0 n a l G r a m m a r consists of m o r e than just a base c o n t e x t - f r e e g r a m m a r , however. As m e n t i o n e d , a s e c o n d m a j o r c o m p o n e n t of the L F G t h e o r y is the provision for adding a set of so-called

(6)

Robert C. Berwick Computational Complexity and LexicaI-Functional Grammar

f u n c t i o n a l e q u a t i o n s to the b a s e c o n t e x t - f r e e rules. T h e functional equations define an implicit f - s t r u c t u r e associated with e v e r y c-structure, and this f - s t r u c t u r e must itself be well-formed. P a r t of the linguistic role of f - s t r u c t u r e s is to a c c o u n t for the c o - o c c u r r e n c e r e s t r i c t i o n s t h a t are an o b v i o u s p a r t of n a t u r a l lan- guages (e.g., S u b j e c t - V e r b a g r e e m e n t ) .

H o w e x a c t l y do the f u n c t i o n a l e q u a t i o n s w o r k ? Their job is to specify h o w the f - s t r u c t u r e of a sen- tence gets built. This is done b y associating possibly c o m p l e x f e a t u r e s with lexical entries and with the n o n - terminals of specified c o n t e x t - f r e e rules; these f e a t u r e s h a v e values. T h e f e a t u r e s are p a s t e d t o g e t h e r u n d e r the direction of the f u n c t i o n a l e q u a t i o n s to f o r m f- structures associated with the s u b - c o n s I i t u e n t s of the s e n t e n c e ; these ( n o w p o s s i b l y c o m p l e x ) f - s t r u c t u r e s are in turn a s s e m b l e d to f o r m a m a s t e r f - s t r u c t u r e associated with the r o o t n o d e of the sentence.

N o t e t h e n that in this t h e o r y a " f e a t u r e " can be s o m e t h i n g as simple as an atomic o b j e c t that is b i n a r y valued; for example, a Subiect f e a t u r e could be either plural or singular in value. But d e n o m i n a t o r s can also h a v e a r a n g e of values, a n d - m o r e crucial f o r the p u r p o s e s of the d e m o n s t r a t i o n h e r e - a f e a t u r e c a n itself be a c o m p l e x , h i e r a r c h i c a l l y s t r u c t u r e d o b j e c t that contains other f e a t u r e s as s u b - c o n s t i t u e n t s . F o r e x a m p l e , the " f e a t u r e " t h a t eventually b e c o m e s associ- ated with the r o o t node of a s e n t e n c e is in fact an f - s t r u c t u r e t h a t r e p r e s e n t s the full p r o p o s i t i o n a l struc- ture of the sentence. T h u s if the surface string was the sentence, T h e girl p r o m i s e d to kiss the b a b y , t h e n the f - s t r u c t u r e a s s o c i a t e d with the r o o t n o d e of the s e n t e n c e is a c o m p l e x " f e a t u r e " t h a t itself contains an e m b e d d e d f - s t r u c t u r e c o r r e s p o n d i n g to the e m b e d d e d p r o p o s i t i o n the girl to kiss the baby.

As m e n t i o n e d , w e l l - f o r m e d n e s s is also d e t e r m i n e d b y functional equations, dictating (according to certain c o n v e n t i o n s ) h o w f e a t u r e c o m p l e x e s are to be a s s e m - bled. By and large the f - s t r u c t u r e c o m p l e x at a n o d e X is a s s e m b l e d c o m p o s i t i o n a l l y in t e r m s of the f- structure c o m p l e x e s of the nodes b e l o w it in the c o n - stituent structure tree. F o r example, the r o o t node of a s e n t e n c e will h a v e an a s s o c i a t e d f - s t r u c t u r e with Subject and Predicate s u b - f e a t u r e s . T h e s e structures are t h e m s e l v e s c o m p l e x - the entire Subject NP a n d V e r b - V e r b C o m p l e m e n t structures, respectively. F o r instance, the S u b j e c t N P in t u r n has a s u b - f e a t u r e N u m b e r ; the Predicate contains c o m p l e x s u b - f e a t u r e s c o r r e s p o n d i n g to the V e r b a n d V e r b C o m p l e m e n t s . T h e basic a s s e m b l y directive is the n o t a t i o n ( 4 = 4 ) . 1° W h e n a t t a c h e d to a particular node X, it states that the f - s t r u c t u r e of the node a b o v e X is to share all the f - s t r u c t u r e of the n o d e s b e l o w X . T h e e f f e c t is to m e r g e and " p a s s u p " all the f - s t r u c t u r e values of the nodes below X to the node a b o v e X. O n e c a n also pass along just particular subfields of the f - s t r u c t u r e

b e l o w X b y s p e c i f y i n g a subfield o n the r i g h t - h a n d side of the e x p a n s i o n rule. As an e x a m p l e , the notion ( + = + N u m b e r ) a t t a c h e d to a n o d e X states t h a t the f - s t r u c t u r e of the n o d e a b o v e X is to c o n t a i n at least the value of the N u m b e r feature. (This " v a l u e " m a y itself be an f - s t r u c t u r e . ) Similarly, a particular sub- field of the f - s t r u c t u r e a b o v e a n o d e X m a y be speci- fied b y providing a subfield label o n the l e f t - h a n d side of the a r r o w n o t a t i o n . F o r e x a m p l e , the n o t a t i o n , ( + S u b j e c t = 4 ) m e a n s t h a t the Subject subfield of the f - s t r u c t u r e built at the n o d e a b o v e X m u s t c o n t a i n the f - s t r u c t u r e built b e l o w X.

A basic c o n s t r a i n t on f - s t r u c t u r e s is t h a t the f- structure a s s e m b l e d at X m u s t be uniquely d e t e r m i n e d ; that is, it c a n n o t c o n t a i n a f e a t u r e F 1 with conflicting values. This entails, f o r e x a m p l e , t h a t the S u b j e c t s u b - f - s t r u c t u r e that is built at a r o o t - S n o d e c a n n o t h a v e a N u m b e r s u b - f i e l d t h a t is filled in f r o m o n e place b e n e a t h with the value Singular and f r o m a n o t h - er place with the value Plural. M o r e generally, this r e s t r i c t i o n m e a n s t h a t t w o or m o r e f - s t r u c t u r e s t h a t are " p a s s e d u p " f r o m b e l o w according to the dictates of an a r r o w n o t a t i o n at a single n o d e a b o v e m u s t be

u n i f i a b l e - a n y c o m m o n s u b - f i e l d s , no m a t t e r h o w h i e r a r c h i c a l l y c o m p l e x , m u s t b e m e r g e a b l e w i t h o u t conflict.

F o r e x a m p l e , consider S u b j e c t - V e r b a g r e e m e n t and the s e n t e n c e t h e b a b y is kissin~ J o h n . T h e lexical e n t r y for b a b y ( c o n s i d e r e d as a N o u n ) might h a v e the N u m b e r feature, with the value singular. T h e lexical e n t r y for is might assert t h a t the n u m b e r f e a t u r e of the Subiect a b o v e it in the parse tree m u s t h a v e the value singular, via the a n n o t a t i o n ( + S u b j e c t = s i n g u l a r ) a t t a - ched to the verb. M e a n w h i l e , the f e a t u r e values f o r S u b j e c t are a u t o m a t i c a l l y f o u n d b y the a n n o t a t i o n ( + S u b j e c t = 4 ) associated with the N o u n P h r a s e p o r - tion of S = > N P VP) t h a t grabs w h a t e v e r f e a t u r e s it finds b e l o w the NP n o d e and copies t h e m up a b o v e to the S node. Thus the S n o d e gets the Subject f e a t u r e with w h a t e v e r value it has p a s s e d f r o m b a b y b e l o w - n a m e l y , the value singular; this a c c o r d s with the dic- tates of the v e r b is___z, a n d all is well. In contrast, in the sentence, th_.__~e b o y s in the b a n d is kissin~ J o h n , b o y s p a s s e s up the n u m b e r value plural, a n d this clashes with the v e r b ' s constraint; as a result this s e n t e n c e is judged ill-formed, as Figure 2 shows.

10 More generally, the assembly directive is specified via the n o t a t i o n (+featl=Sfeat2), w h e r e feat1 and feat2 are m e t a - variables specifying a subfield of the f-structure immediately above or below the node to which the the a n n o t a t i o n is attached. If no field is given, then the entire f-structure is assumed. F o r example, the notation ( + Subject N u m b e r = 4 ) attached to a node X m e a n s that the N u m b e r subfield of the Subject subfield of the f-structure associated with the node above X is to be filled in with the value of the entire f-structure below X.

(7)

Robert C. Berwick Computational Complexity and LexicaI-Functional Grammar

S Subject [Number:Singular or Plural?]

/ \ =

N P VP

[Number:plural] [Number: singular]

L -

/

[image:7.612.127.442.54.147.2]

the boys in the band is kissing John

Figure 2. Co-occurrence restrictions are enforced by feature checking in a Lexical-Functional Grammar.

It is important to note that the feature compatibili- ty check requires (1) a particular constituent structure tree (a parse tree); and (2) an assignment of terminal items (words) to lexical categories - e.g., in the first S u b j e c t - V e r b a g r e e m e n t example above, b a b y was assigned to the category N, a Noun. The tree is obvi- ously required because the feature-checking machinery propagates values according to the links specified by the derivation tree; the assignment of terminal items to categories is crucial because in most cases the values of features are derived from those listed in the lexical e n t r y for an item (as the value of the n u m b e r feature was derived from the lexical e n t r y for the N o u n form of baby). One and the same terminal item can have two distinct lexical entries, c o r r e s p o n d i n g to distinct lexical categorizations; for example, b a b y can be b o t h a N o u n and a Verb. If we had picked b a b y to be a Verb, and h e n c e had a d o p t e d w h a t e v e r f e a t u r e s are associated with the Verb entry for b a b y to be propa- gated up the tree, then the string that was previously well-formed, th.__~e b a b y is kissin 8 John, would n o w be considered deviant. If a string is ill-formed u n d e r all possible derivation trees and assignments of features from possible lexical categorizations, than that string is not in the language generated by the LFG. The ability to have multiple derivation trees and lexical categori- zations for one and the same terminal item plays a crucial role in the reduction proof: it is intended to capture the satisfiability problem of deciding w h e t h e r to given an atom X i a value of " T " or " F " .

Finally, LFG also provides a way to express the familiar p a t t e r n i n g of grammatical relations (e.g., " S u b j e c t " and " O b j e c t " ) f o u n d in natural language. F o r example, transitive verbs must have objects. This fact of life (expressed in an Aspects-style T r a n s f o r m a - tional G r a m m a r by s u b c a t e g o r i z a t i o n restrictions) is captured in LFG by specifying a so-called P R E D (for predicate) feature with a Verb; the P R E D can describe what grammatical relations like " S u b j e c t " and " O b j e c t " must be filled in after feature passing has t a k e n place in o r d e r for the analysis to be well- formed. F o r instance, a transitive verb like kiss might have the pattern, k i s s < ( S u b j e c t ) ( O b i e c t ) > , and thus demand that the Subject and Object (now considered to be " f e a t u r e s " ) have some value in the final analysis. The values for Subject and O b j e c t might of course be

provided from some o t h e r b r a n c h of the parse tree, as p r o v i d e d by the f e a t u r e p r o p a g a t i o n m a c h i n e r y ; for example, the O b j e c t feature could be filled in from the N o u n Phrase part of the VP expansion. See Figure 3. But if the O b j e c t were not filled in, t h e n the analysis is declared functionally incomplete, and is ruled out. This device is used to cast out sentences such as th._ee b a b y kissed.

So much for the LFG machinery that is required for the reduction proof. ( T h e r e are additional capabilities in the LFG theory, such as long-distance binding, but these will not be called u p o n in the d e m o n s t r a t i o n below.)

What then does the LFG r e p r e s e n t a t i o n of the CNF satisfiability problem look like? Basically, there are three parts to the satisfiability problem that must be mimicked by the LFG: (1) the assignment of values to atoms, e.g., X 2 = > " T " ; X 4 = > " F " ; (2) the consisten- cy of value assignments in the formula; e.g., the atom X 2 can appear in several different terms, but one is not allowed to assign it the value " T " in one term and the value " F " in another; and (3) the preservation of CNF satisfiability, in that a string will be in the LFG language to be defined just in case its associated CNF formula is satisfiable. L e t us now go over how these c o m p o n e n t s m a y be r e p r o d u c e d in an LFG, one by one.

(1) Assignments: The input string to be tested for membership in the LFG will simply be the original formula, sans parentheses and the operators A and V; the terminal items are thus just a string of Xi's. Recall that the job of checking the string for well-formedness involves finding a derivation tree for the string, solving the ancillary c o - o c c u r r e n c e equations (by feature pro- p a g a t i o n ) , and checking for f u n c t i o n a l completeness. Now, the c o n t e x t - f r e e g r a m m a r c o n s t r u c t e d b y the transformation p r o c e d u r e will be set up so as to gener- ate a virtual copy of the associated formula, down to the point where literals X i are assigned their value of " T " or " F " . If the original 3-CNF form had n terms, then denoting each by the symbol Ep, p = l , ..., n, this part of the grammar would look like the following:U

S = > E 1 E 2 ... E n E p = > Y i Y j Y k

(8)

Robert C. Berwiek Computational Complexity and LexicaI-Functional Grammar

S ~ features:

NP VP

I

/ N

Sue V NP

I

I

kiss J o h n

Subject : Sue

[image:8.612.196.554.73.173.2]

P r e d • ' k i s s < (Subject) ( O b j e c t ) > ' O b j e c t : J o h n

Figure 3. Predicate templates can demand that a subject or object be filled in.

( p = 1,2,...,n)

T h e subscripts i, j, and k c o r r e s p o n d to the actual subscripts in the original formula. F u r t h e r , the Yi are

n o t terminal items, but are n o n - t e r m i n a l s that will be e x p a n d e d into o n e of the n o n - t e r m i n a l s T i o r Fi.12

N o t e that so far there are no rules to e x t e n d the parse tree d o w n to the level of terminal items, n a m e the X i. T h e next step does this and at the s a m e time adds the p o w e r to choose b e t w e e n " T " and " F " as- s i g n m e n t s to a t o m s . O n e adds to the c o n t e x t - f r e e b a s e g r a m m a r t w o p r o d u c t i o n s deriving e a c h terminal item X i, n a m e l y , T i = > X i and F i - - > X i , c o r r e s p o n d i n g to an a s s i g n m e n t of " T " or " F " to the a t o m s of the f o r m u l a (it is i m p o r t a n t not to get c o n f u s e d here b e - t w e e n the a t o m s of the f o r m u l a - these are terminal e l e m e n t s in the L e x i c a l - F u n c t i o n a l G r a m m a r - and the n o n - t e r m i n a l s of the g r a m m a r . ) Plainly, one m u s t also add the rules Y i = > T i ] Fi, for each i, and rules corre- sponding to the assignment of t r u t h - v a l u e s to the neg- ations of literals, T i = > X i a n d F i - - - > X i. N o t e t h a t these are n o t " e x o t i c " L F G rules: e x a c t l y the s a m e sort of rule is r e q u i r e d in the b a b y case, i.e., N = > b a b y or V = > b a b y , c o r r e s p o n d i n g to w h e t h e r b a b y is a N o u n or a Verb. N o w , the lexical entries for the " T i " c a t e g o r i z a t i o n of X i will look very different f r o m the " F i " c a t e g o r i z a t i o n of Xi, just as one might e x p e c t the N and V f o r m s for b a b y to be different. H e r e is w h a t the entries for the t w o c a t e g o r i z a t i o n s of X i look like:

Xi: T i ( + T r u t h - a s s i g n m e n t ) = T ( + A s s i g n X i) = T

11 The context-free base that is built depends u p o n the origi- nal C N F formula that is input, since the n u m b e r of terms, n, varies from formula to formula. In Stanley Peters's improved version of the reduction p r o o f [personal communication], the context-free base is fixed for all formulas with the rules:

S = > S S"

S ' = > T T T or T T F or T F F or T F T or ... (remaining twelve triples containing at least one " T " )

The Peters g r a m m a r works by recursing until the right n u m b e r of terms is generated (any sentences that are too long or too short cannot be matched to the input formula). Thus, the n u m b e r of terms in the original C N F formula need not be explicitly encoded into the base grammar.

Xi: F i ( + A s s i g n Xi) = F

Putting aside for the m o m e n t the " T r u t h - a s s i g n m e n t " f e a t u r e in this entry, the f e a t u r e a s s i g n m e n t s for the n e g a t i o n of the literal X i m u s t be the c o m p l e m e n t of this entry:

Xi: T i ( + T r u t h - a s s i g n m e n t ) = T ( + A s s i g n X i) = F

Xi: F i ( + A s s i g n X i) = T

T h e u p w a r d - d i r e c t e d a r r o w s in the e n t r i e s r e f l e c t the LFG f e a t u r e p r o p a g a t i o n machine. R e m e m b e r that T i and F i are just n o n - t e r m i n a l categories, like N o u n and Verb. F o r e x a m p l e , if the T i c a t e g o r i z a t i o n f o r X i is selected, the e n t r y says to " m a k e the T r u t h - a s s i g n m e n t f e a t u r e of the n o d e a b o v e T i h a v e the value T, and m a k e the X i p o r t i o n of the Assign f e a t u r e of the n o d e a b o v e h a v e the value T . " This f e a t u r e p r o p a g a t i o n device r e p r o d u c e s the a s s i g n m e n t of T ' s and F ' s to the CNF literals. If we h a v e a triple of such elements, a n d at least o n e of t h e m is e x p a n d e d out to Ti, t h e n the f e a t u r e p r o p a g a t i o n m a c h i n e r y of LFG will m e r g e the c o m m o n f e a t u r e n a m e s into one large structure for the n o d e a b o v e , reflecting the as- signments m a d e ; m o r e o v e r , the t e r m will get a filled-in truth assignment value just in case at least o n e of the expansions selected a T i path. This is d e p i c t e d in Fig- ure 4. F e a t u r e s are p a s s e d t r a n s p a r e n t l y t h r o u g h the i n t e r v e n i n g Yi n o d e s via the L F G " c o p y " device, (+ = +); this simply m e a n s that all the f e a t u r e s of the n o d e b e l o w the n o d e to which the " c o p y " u p - a n d - d o w n arrows are a t t a c h e d are to be the s a m e as those of the n o d e a b o v e the u p - a n d - d o w n arrows.

It should be plain t h a t this m e c h a n i s m mimics the a s s i g n m e n t of values to literals required b y the satisfi- ability p r o b l e m .

(2) C o o r d i n a t i o n of assignments: O n e m u s t also g u a r a n t e e t h a t the X i value assigned at o n e place in the tree is not c o n t r a d i c t e d b y the value of an X i or X i elsewhere. T o e n s u r e this, we use the L F G c o -

12 This g r a m m a r will have to be slightly modified in order for the reduction to work, as will b e c o m e a p p a r e n t shortly

(9)

Robert C. B e r w i c k C o m p u t a t i o n a l C o m p l e x i t y and LexicaI-Functional G r a m m a r

terminal string:

ures:

Yi

i i

~J

~ k

X i

Xj

X k

I T r u t h - A s s i g n m e n t _=T [ X i = T ] l ]

[Xj=F1 II

l Assign

[image:9.612.102.448.77.195.2]

[Xg=F]JJ

Figure 4. The LFG feature propagation machinery is used to percolate feature assignments from the lexicon.

o c c u r r e n c e agreement machinery: the Assign feature- bundle is passed up f r o m each term to the highest node in the parse tree (one simply adds the ( + = 4 , ) notation to each E i rule in order to indicate this). The Assign feature at this node will contain the union of all assign feature bundles passed up by all terms. If any X i values conflict, t h e n the resulting structure is judged ill-formed. Thus, only compatible X i assign- ments are well-formed. Figure 5 depicts this situation. (3) Preservation of satisfying assignments: Final- ly, one has to reproduce the conjunctive character of the 3-CNF problem - that is, a sentence is satisfiable (well-formed) if and only if each term has at least one literal assigned the value " T " . Part of the disjunctive character of the problem has already been e n c o d e d in the feature propagation machinery p r e s e n t e d so far; if at least one X i in a term E 1 expands to the lexical c a t e g o r i z a t i o n Ti, then the T r u t h - a s s i g n m e n t f e a t u r e gets the value T. This is just as desired. If one, two, or three of the literals X i in a term select Ti, then El'S Truth-assignment feature is T, and the analysis is well- formed. But how do we rule out the case where all three Xi's in a term select the " F " path, Fi? A n d how do we ensure that all terms have at least one T below them?

Both of these problems can be solved by resorting to the LFG functional completeness constraint. The trick is to add a Pred feature to a " d u m m y " node atta- ched to each term; the sole purpose of this feature will be to refer to the feature T r u t h - a s s i s n m e n t , just as the predicate template for the transitive verb kiss mentions the f e a t u r e Obiect. Since an analysis is not well- f o r m e d if the "grammatical r e l a t i o n s " a Pred mentions are not filled in from somewhere, this will have the e f f e c t of forcing the Truth-assignment feature to get filled in every term. Since the " F " lexical e n t r y does not have a Truth-assignment value, if all the Xi's in a term triple select the F i path (all the literals are " F " ) , t h e n no T r u t h - a s s i g n m e n t f e a t u r e is ever picked up f r o m the lexical entries, and that term n e v e r gets a value for the Truth-assignment feature. This violates what the predicate t e m p l a t e demands, and so the whole analysis is t h r o w n out. (The ill-formedness is exactly analogous to the case where a transitive verb never gets an Object.) Since this condition is applied to each term, we have now g u a r a n t e e d that each term must have at least one literal below it that selects the " T " path - just as desired. T o actually add the new predicate template, one simply adds a new (but dum- my) b r a n c h to each term El, with the a p p r o p r i a t e predicate constraint attached to it. See Figure 6.

S features:

/ \

~1

Ejk

~7

~7

7 F7

\

X7 X7

~Axssign

1

7 = T or F? d Clash!

(+Assign X T = T ) (+Assign X T = F )

Figure 5. The feature compatibility machinery of LFG can force assignments to be co-ordinated across terms.

[image:9.612.174.403.570.721.2]
(10)

Robert C. Berwick Computational Complexity and LexicaI-Functional Grammar

lexical entry for ' d u m m y 2 ' : ( ÷ Pred) =

' d u m m y 2 < ( ÷ T r u t h - a s s i g n m e n t ) > '

E l

D u m m y 2

y, y~ y<

~

i

Fj

F k

Xi

features: [ P r e d = ' d u m m y 2 < ( ÷ T r u t h - a s s i g n m e n t ) > ']" [ T r u t h - a s s i g n m e n t = T]

[image:10.612.75.557.73.200.2]

( + T r u t h - a s s i g n m e n t ) = T

Figure

6. Predicates can be used to force at least one "T" per term. T h e r e is one final subtle point here: one m u s t also

prevent the P r e d and T r u t h - a s s i g n m e n t f e a t u r e s for each t e r m f r o m being passed up to the h e a d " S " node. T h e r e a s o n is that if these f e a t u r e s were passed up, then, since the LFG m a c h i n e r y a u t o m a t i c a l l y merges the values of a n y f e a t u r e s with the s a m e n a m e at the t o p m o s t node of the parse tree, the LFG m a c h i n e r y would force the union of the f e a t u r e values f o r P r e d a n d T r u t h - a s s i g n m e n t o v e r all t e r m s in the analysis tree. T h e result would be that if any t e r m had at least one " T " (hence satisfying the T r u t h - a s s i g n m e n t predi- cate t e m p l a t e in at least one term), t h e n the P r e d and T r u t h - a s s i g n m e n t f e a t u r e s would get filled in at the t o p m o s t n o d e as well. T h e string b e l o w would be w e l l - f o r m e d if at least one t e r m were " T " , and this would a m o u n t to a d i s j u n c t i o n of disjunctions (an " O R " of " O R ' s ) , not quite w h a t is sought. T o elimi- nate this possibility, one m u s t add a final trick: each t e r m E 1 is given s e p a r a t e Pred, T r u t h - a s s i g n m e n t , and Assign features, but only the Assign f e a t u r e is p r o p a - gated to the highest node in the parse tree as such. In contrast, the P r e d and T r u t h - a s s i g n m e n t f e a t u r e s for each t e r m are kept " p r o t e c t e d " f r o m m e r g e r b y storing t h e m under separate f e a t u r e headings labeled E 1 ... E n. T h e m e a n s by which just the Assign f e a t u r e bundle is lifted out is the LFG analogue of the natural language p h e n o m e n o n of Subject or O b j e c t " c o n t r o l " , w h e r e b y just the f e a t u r e s of the Subject or O b j e c t of a lower clause are lifted out of the lower clause to b e c o m e the Subject of O b j e c t of a matrix sentence; the remaining f e a t u r e s stay u n m e r g e a b l e b e c a u s e they stay p r o t e c t e d behind the individually labeled terms.

T o actually " i m p l e m e n t " this in an LFG, one can add two new b r a n c h e s to each t e r m e x p a n s i o n in the base c o n t e x t - f r e e g r a m m a r , as well as two " c o n t r o l " e q u a t i o n specifications that do the actual w o r k of lift- ing the f e a t u r e s f r o m a lower clause to the matrix sen- tence. A natural language e x a m p l e of this p h e n o m e - n o n is the following ( f r o m K a p l a n and B r e s n a n 1981, pp. 4 3 - 4 5 ) :

T h e girl p e r s u a d e d the b a b y to go.

(part of the) lexical e n t r y for

persuaded: V (÷ V c o m p Subject) = (÷ O b j e c t )

A c c o r d i n g to this lexical e n t r y , the O b j e c t f e a t u r e s t r u c t u r e of a r o o t s e n t e n c e c o n t a i n i n g a v e r b like p e r s u a d e is to be the same as the f e a t u r e structure of the S u b j e c t of the C o m p l e m e n t of p e r s u a d e - a " c o n t r o l " equation. Since this S u b j e c t is the b a b y , this m e a n s that the f e a t u r e s associated with the N P the b a b y are shared with the f e a t u r e s of the O b j e c t of the matrix sentence.

T h e satisfiability a n a l o g u e of this m a c h i n e r y is quite similar to this; see Figure 7.

As Figure 7 shows, a " c o n t r o l e q u a t i o n " should be a t t a c h e d to the A i n o d e t h a t forces the Assign f e a t u r e bundle f r o m the C i side to be lifted up a n d ultimately m e r g e d into the Assign f e a t u r e bundle of the E 1 n o d e (and then, in turn, to b e c o m e m e r g e d at the t o p m o s t n o d e of the tree b y the usual full c o p y u p - a n d - d o w n arrows):

( + CiAssign ) = ÷ Assign)

T h e satisfiability analogue is just like the sharing of the Subject f e a t u r e s of a V e r b C o m p l e m e n t with the O b j e c t position of a matrix clause.

T o finish o f f the r e d u c t i o n a r g u m e n t , it m u s t be s h o w n that, given a n y 3-CNF formula, the c o r r e s p o n d - ing LFG g r a m m a r and string as just described can be c o n s t r u c t e d in a time that is a p o l y n o m i a l f u n c t i o n of the length of the original input formula. This is not a difficult task, and only an i n f o r m a l sketch of h o w it can be d o n e will be given. All o n e has to do is scan the original f o r m u l a f r o m left to right, o u t p u t t i n g an a p p r o p r i a t e cluster of b a s e rules as e a c h triple of liter- als is s c a n n e d : E i = > A i C i ; C i = > D u m m y 2 YiYjYk; Y i = > T i l F i (similarly f o r Yj a n d Yk); T i = > X i , F i = > X i (similarly for Tj and Tk). N o t e that f o r e a c h triple of literals in the original input f o r m u l a the ap- p r o p r i a t e g r a m m a r rules can be o u t p u t in an a m o u n t of time that is just a c o n s t a n t times n. In addition, o n e m u s t also m a i n t a i n a c o u n t e r to k e e p t r a c k of the

Figure

Figure 1. A reduction preserves solutions to the original problem.
Figure 2. Co-occurrence restrictions are enforced by feature checking in a Lexical-Functional Grammar
Figure 3. Predicate templates can demand that a subject or object be filled in.
Figure 4. The LFG feature propagation machinery is used to percolate feature assignments from the lexicon
+3

References

Related documents

Schotten-Baumann method of amide synthesis with carboxylic acid activating reagent such as thionyl chloride and Phosphine- halogen reagents have been

(iv) Injection of more accumulated rural capital and price incentives to farmers on farm products for increasing farm income and profitability for creation of home

International Research Journal of Human Resources and Social

Generalizing the notion of a ϕ-Lagrange manifold, the present authors recently studied the geometry of an almost ϕ-Lagrange space APL space briefly and obtained the

As previous research has mainly focused on the devel- opment of pre-screening outcome tools [12], the tempo- ral aspect of potential predictors has remained largely unknown.

Results: In Stage 1 of the study (vertebroplasty of the porcine vertebral body in the absence of cement leakage), the average maximal temperature at the anterior cortex was 42.4

We therefore evaluated a series of patients 60 years old or younger who received a partial neck-retaining femoral short-stem with ceramic - on - ceramic bearings to determine

(Also included were data for the two respective states, New York and California.) The data on fatal crashes came from the Fatal Analysis Reporting Systems, and the data on all