File Information
File: 05-lr/acl_arc_1_sum/cleansed_text/xml_by_section/metho/99/j99-3002_metho.xml
Size: 13,457 bytes
Last Modified: 2025-10-06 14:15:20
<?xml version="1.0" standalone="yes"?> <Paper uid="J99-3002"> <Title>The Computational Complexity of the Correct-Prefix Property for TAGs Mark-Jan Nederhof* German Research Center for Artificial Intelligence</Title> <Section position="5" start_page="353" end_page="356" type="metho"> <SectionTitle> 4. Properties </SectionTitle> <Paragraph position="0"> The first claim we make about the algorithm pertains to its correctness as a recognizer: Claim After completion of the algorithm, the item \[0, T --* a t e, 0, n, -, -\], for some t E L is in the table if and only if the input is in the language described by the grammar. Note that the input is in the language if and only if the input is the yield of a derived tree.</Paragraph> <Paragraph position="1"> The idea behind the proof of the &quot;if&quot; part is that for any derived tree constructed from the grammar we can indicate a top-down and left-to-right tree traversal that is matched by corresponding items that are computed by steps of the algorithm. The tree traversal and the corresponding items are exemplified by the numbers 1 .... ,23 in Figure 4.</Paragraph> <Paragraph position="2"> For the &quot;only if&quot; part, we can show for each step separately that the invariant suggested in Figure 3 is preserved. To simplify the proof one can look only at the last five fields of items \[h, N --+ c~, fl, i, j, fl, f2\], h being irrelevant for the above claim. We do, however, need h for the proof of the following claim: The algorithm satisfies the correct-prefix property, provided the grammar is reduced. A TAG is reduced if it does not contain any elementary trees that cannot be part of any derived tree. (One reason why an auxiliary tree might not be a part of any derived tree is that at some node it may have obligatory adjunction of itself, leading to &quot;infinite adjunction.&quot;) Again, the proof relies on the invariant sketched in Figure 3. The invariant can be proven correct by verifying that if the items in the antecedents of some step satisfy the invariant, then so does the item in the consequent.</Paragraph> <Paragraph position="3"> A slight technical problem is caused by the obligatory adjunctions. The shaded areas in Figure 3, for example, represent not merely subtrees of elementary trees, but subtrees of a derived tree, which means that at each node either adjunction or nil-adjunction has been performed.</Paragraph> <Paragraph position="4"> This issue arises when we prove that Pred 1 preserves the invariant. Figure 11(a) represents the interpretation of the first antecedent of this step, \[h, N --+ e~ * Mfl, i, j, fl, f2\]; without loss of generality we only consider the case that fl = f2 = -. We may assume that below M some subtree exists, and that at M itself either adjunction with auxiliary tree t ~ or nil-adjunction has been applied; the figure shows the former case. In order to justify the item from the consequent, ~, T --* * Rt, j, j, -, -\], we construct the tree in Figure 11(b), which is the same as that in Figure 11(a), except that t ~ is replaced by auxiliary tree t, which has been traversed so that at all nodes either adjunction or nil-adjunction has been applied, including the nodes introduced recursively through adjunctions. Such a finite traversal must exist since the grammar is reduced.</Paragraph> <Paragraph position="5"> For the other steps we do not need the assumption that the grammar is reduced in order to prove that the invariant is preserved. For example, for Adj 1 we may reason as follows: The item \[M --+ ~, *, j, k, f~, f~\], the first antecedent, informs us of the existence of the structure in the shaded area of Figure 12(a). Similarly, the items \[h, Ft, --~ /*, jc~, jcd, f~, fd\] and \[h, N ~ c~ * Mfl, i, j, -, -\] provide the shaded areas of Figures 12(b) and 12(c). Note that in the case of the first or third item, we do not use all the information that the item provides. In particular, the information that the structures are part of a derived tree consistent with the input between positions 0 and k (in the case of (a)) or j (in the case of (c)) is not needed.</Paragraph> <Paragraph position="6"> The combined information from these three items ensures the existence of the derived tree depicted in Figure 12(d), which justifies the consequent of Adj 1, viz. \[h, N --* aM. fl, i, k, f~, fd\].</Paragraph> <Paragraph position="7"> The other steps can be proven to preserve the invariant in similar ways.</Paragraph> <Paragraph position="8"> Now the second claim follows: if the input up to position j has been read resulting in an item of the form \[h, N --* aa * fl, i, j, fl, f2\], then there is a string y such that al... ajy is in the language. This y is the concatenation of the yields of the subtrees labeled I, II, and III in Figure 3.</Paragraph> <Paragraph position="9"> The full proofs of the two claims above are straightforward but tedious. Furthermore, our new algorithm is related to many existing recognition algorithms for TAGs (Vijay-Shankar and Joshi 1985; Schabes and Joshi 1988; Lang 1988; Vijay-Shanker and Weir 1993; Schabes and Shieber 1994; Schabes 1994), some of which were published</Paragraph> <Section position="1" start_page="356" end_page="356" type="sub_section"> <SectionTitle> Nederhof Correct-Prefix Property for TAGs </SectionTitle> <Paragraph position="0"> together with proofs of correctness. Therefore, including full proofs for our new algorithm does not seem necessary.</Paragraph> </Section> </Section> <Section position="6" start_page="356" end_page="357" type="metho"> <SectionTitle> 5. Complexity </SectionTitle> <Paragraph position="0"> The steps presented in pseudoformal notation in Section 3 can easily be composed into an actual algorithm (Shieber, Schabes, and Pereira 1995). This can be done in such a way that the order of the time complexity is determined by the maximal number of different combinations of antecedents per step. If we restrict ourselves to the order of the time complexity expressed in the length of the input, this means that the complexity is given by O(nP), where p is the largest number of input positions in any step.</Paragraph> <Paragraph position="1"> However, a better realization of the algorithm exists that allows us to exclude the variables for input positions that occur only once in a step, which we will call irrelevant input positions. This realization relies on the fact that an intermediate step I may be applied that reduces an item I with q input positions to another item I' with q' < q input positions, omitting those that are irrelevant. That reduced item I' then takes the place of I in the antecedent of the actual step. This has a strong relationship to optimization of database queries (Ullman 1982).</Paragraph> <Paragraph position="2"> For example, there are nine variables in Comp 1, of which i,fl,f2,f~,f~ are all irrelevant, since they occur only once in that step. An alternative formulation of this step is therefore given by the combination of the following three steps: \[h, M~'),., k, l, f{, f~\] \[h, M--*'y., k, l, ?, ?\] (Omit 5-6) \[h, N ---* c~. Mfl, i, j, A, f2\] \[h, N--* o~ .Mfl, ?, j, ?, ?\] (Omit 3-5-6) \[h, M--~'y ., k, 1, ?, ?\], t E Adj(M), ~,Ft---+ -+-, k, k,-, -\], \[h, N--* o~. Mfl, ?, j, ?, ?1 ~, Ft--~l., k, l, k, I\] (Comp 1') The question marks indicate omitted input positions. Items containing question marks are distinguished from items without them, and from items with question marks in different fields.</Paragraph> <Paragraph position="3"> In Comp 1' there are now only four input positions left. The contribution of this step to the overall time complexity is therefore O(n 4) rather than C9(n9). The contribution of Omit 5-6 and Omit 3-5-6 to the time complexity is O(n5). For the entire algorithm, the maximum number of relevant input positions per step is six. Thereby, the complexity of left-to-right recognition for TAGs under the constraint of the correct-prefix property is CO(n6). There are five steps that contain six relevant input positions, viz. Comp 2, Comp 3, Adj 0, Adj 1, and Adj 2. Computational Linguistics Volume 25, Number 3 In terms of the size of the grammar G, the complexity is (Q(IG\[2), since at most two elementary trees are simultaneously considered in a single step. Note that in some steps we address several parts of a single elementary tree, such as the two parts represented by the items \[h, Ft, ---+ 3_., fi, f~, f~, f~\] and \[h, N ~ c~, Mfl, i, j, -, -\] in Adj 1. However, the second of these items uniquely identifies the second field of the first item, and therefore this pair of items amounts to only one factor of IG\] in the time complexity.</Paragraph> <Paragraph position="4"> The complexity of (.9(n 6) that we have achieved depends on two ideas: first, the use of Adj 0, Adj 1, and Adj 2 instead of Adj 1 / and Adj 2 I, and second, the exclusion of irrelevant variables above. Both are needed. The exclusion of irrelevant variables alone, in combination with Adj 1 t and Adj 2 t, leads to a complexity of O(n8). Without excluding irrelevant variables, we obtain a complexity of 0(//9) due to Comp 1, which uses nine input positions.</Paragraph> <Paragraph position="5"> The question arises where the exact difference lies between our algorithm and that of Schabes and Joshi (1988), and whether their algorithm could be improved to obtain the same time complexity as ours, using techniques similar to those discussed above. This question is difficult to answer precisely because of the significant difference between the types of items that are used in the respective algorithms. However, some general considerations suggest that the algorithm from Schabes and Joshi (1988) is inherently more expensive.</Paragraph> <Paragraph position="6"> First, the items from the new algorithm have five input positions, which implies that storage of the parse table requires a space complexity of O(n5). The items from the older algorithm have effectively six input positions, which leads to a space complexity of 0(/76).</Paragraph> <Paragraph position="7"> Second, the &quot;Right Completor&quot; from Schabes and Joshi (1988), which roughly corresponds with our adjunctor steps, has nine relevant input positions. This step can be straightforwardly broken up into smaller steps that each have fewer relevant input positions, but it seems difficult to reduce the maximal number of positions to six. A final remark on Schabes and Joshi (1988) concerns the time complexity in terms of the size of the grammar that they report, viz. O(\]GI2). This would be the same upper bound as in the case of the new algorithm. However, the correct complexity seems to be O(\]G\]3), since each item contains references to two nodes of the same elementary tree, and the combination in &quot;Right Completor&quot; of two items entails the simultaneous use of three distinct nodes from the grammar.</Paragraph> </Section> <Section position="7" start_page="357" end_page="358" type="metho"> <SectionTitle> 6. Further Research </SectionTitle> <Paragraph position="0"> The algorithm in the present paper operates in a top-down manner, being very similar to Earley's algorithm (Earley 1970), which is emphasized by the use of the &quot;dotted&quot; items. As shown by Nederhof and Satta (1994), a family of parsing algorithms (topdown, left-corner, PLR, ELR, and LR parsing \[Nederhof 1994\]) can be carried over to head-driven parsing. An obvious question is whether such parsing techniques can also be used to produce variants of left-to-right parsing for TAGs. Thus, one may conjecture, for example, the existence of an LR-like parsing algorithm for arbitrary TAGs that operates in (_9(n 6) and that has the correct-prefix property.</Paragraph> <Paragraph position="1"> Note that LR-like parsing algorithms were proposed by Schabes and Vijay-Shanker (1990) and Nederhof (1998). However, for these algorithms the correct-prefix property is not satisfied.</Paragraph> <Paragraph position="2"> Development of advanced parsing algorithms for TAGs with the correct-prefix property is not at all straightforward. In the case of context-free grammars, the additional benefit of LR parsing, in comparison to, for example, top-down parsing, lies in</Paragraph> <Section position="1" start_page="358" end_page="358" type="sub_section"> <SectionTitle> Nederhof Correct-Prefix Property for TAGs </SectionTitle> <Paragraph position="0"> the ability to process multiple grammar rules simultaneously. If this is to be carried over to TAGs, then multiple elementary trees must be handled simultaneously. This is difficult to combine with the mechanism we used to satisfy the correct-prefix property, which relies on filtering out hypotheses with respect to &quot;left context.&quot; Filtering out such hypotheses requires detailed investigation of that left context, which, however, precludes treating multiple elementary trees simultaneously. An exception may be the case when a TAG contains many, almost identical, elementary trees. It is not clear whether this case occurs often in practice.</Paragraph> <Paragraph position="1"> Therefore, further research is needed not only to precisely define advanced parsing algorithms for TAGs with the correct-prefix property, but also to determine whether there are any benefits for practical grammars.</Paragraph> </Section> </Section> class="xml-element"></Paper>