File Information
File: 05-lr/acl_arc_1_sum/cleansed_text/xml_by_section/intro/99/j99-3002_intro.xml
Size: 11,601 bytes
Last Modified: 2025-10-06 14:06:49
<?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="4" start_page="347" end_page="353" type="intro"> <SectionTitle> 3. The Algorithm </SectionTitle> <Paragraph position="0"> The input to the recognition algorithm is given by the string ala2.. * an, where n is the length of the input. Integers i such that 0 < i < n will be used to indicate &quot;positions&quot; in the input string. Where we refer to the input between positions i and j we mean the string ai+l ... aj.</Paragraph> <Paragraph position="1"> The algorithm operates by means of least fixed-point iteration: a table is gradually filled with elements derived from other elements, until no more new ones can be found. A number of &quot;steps&quot; indicate how table elements are to be derived from others. 3 For the description of the steps we use a pseudoformal notation. Each step consists of a list of antecedents and a consequent. The antecedents are the conditions under which an incarnation of the step is executed. The consequent is a new table element that the step then adds to the parse table, unless of course it is already present. An antecedent may be a table element, in which case the condition that it represents is membership in the table.</Paragraph> <Paragraph position="2"> The main table elements, or items, are 6-tuples \[h, N --* c~ * t, i, j, fl, f2\]. Here, N is a node from some elementary tree t, and o~fl is the list of the daughter nodes of N. The daughters in o~ together generate the input between positions i and j. The whole elementary tree generates input from position h onwards.</Paragraph> <Paragraph position="3"> Internal to the elementary tree, there may be adjunctions; in fact, the traversal of the tree (implying (nil-)adjunctions at all nodes) has been completed up to the end of c~. Furthermore, tree t may itself be an auxiliary tree, in which case it is adjoined in another tree. Then, the foot may be dominated by one of the daughters in a, and the foot generates the part of the input between positions fl and f2. When the tree is not an auxiliary tree, or when the foot is not dominated by one of the daughters in c~, then fl and f2 both have the dummy value &quot;-&quot; Whether t is an initial or an auxiliary tree, it is part of a derived tree of which everything to the left of the end of c~ generates the input between positions 0 and j.</Paragraph> <Paragraph position="4"> The traversal has been completed up to the end of c~.</Paragraph> <Paragraph position="5"> See Figure 3 for an illustration of the meaning of items. We assume Rt and Ft are the root and foot of the elementary tree t to which N belongs; Ft may not exist, as explained above. R is the root of some initial tree. The solid lines indicate what has been established; the dashed lines indicate what is merely predicted. If Ft exists, the subtree below Ft indicates the lower half of the derived tree in which t was adjoined.</Paragraph> <Paragraph position="6"> The shaded areas labeled by I, II, and III have not yet been traversed. In particular it has not yet been established that these parts of the derived tree together generate the input between positions j and n.</Paragraph> <Paragraph position="7"> For technical reasons, we assume an additional node for each elementary tree t, which we denote by T. This node has only one daughter, viz. the actual root node Rt.</Paragraph> <Paragraph position="8"> We also assume an additional node for each auxiliary tree t, which we denote by 3_.</Paragraph> <Paragraph position="9"> This is the unique daughter of the actual foot node Ft; we set children(Ft) = _1_.</Paragraph> <Paragraph position="10"> In summary, an item indicates how a part of an elementary tree contributes to the recognition of some derived tree.</Paragraph> <Paragraph position="11"> Figure 4 illustrates the items needed for recognition of the derived tree from the running example. We have simplified the notation of items by replacing the names of leaves (other than foot nodes) by their labels.</Paragraph> <Paragraph position="12"> 3 A &quot;step&quot; is more accurately called an &quot;inference rule&quot; in the literature on deductive parsing (Shieber, Schabes, and Pereira 1995). For the sake of convenience we will apply the shorter term. 15: \[1, Rbl ~ N~I &quot; Fbl, 1, 3, --, -1 = yFb2 d b 16: \[1, Fbl -+ * 3_, 3, 3, --, --1 = 8-!-111 17: \[0, Nil --+ * b, 3, 3, , \] = 1 Nbl 18: \[0, Nail -+ b *, 3, 4, -, -\] = 19: \[1,Ybl ~ +- *, 3,4,3,4\] = 20: \[1, Rbl --+ Nil Fbl *, 1, 4, 3, 4\] = C 21: \[1, T --+ Rbl *, 1, 4, 3, 4\] = a c d b 22a: \[Nil -+ b *, 1, 4,-, -\] = 22: \[0, R~I --+ a N~I *, 0,4,-,-\] = The items needed for recognition of a derived tree.</Paragraph> <Paragraph position="13"> There is one special kind of item, with only five fields instead of six. This is used as an intermediate result in the adjunctor steps to be discussed in Section 3.5.</Paragraph> <Section position="1" start_page="349" end_page="349" type="sub_section"> <SectionTitle> 3.1 Initializer </SectionTitle> <Paragraph position="0"> The initializer step predicts initial trees t starting at position 0; see Figure 5.</Paragraph> <Paragraph position="1"> tC/I \[0, 7----~ .Rt, O, O, , \] (Init) For the running example, item 1 in Figure 4 results from this step.</Paragraph> </Section> <Section position="2" start_page="349" end_page="350" type="sub_section"> <SectionTitle> 3.2 Scanner </SectionTitle> <Paragraph position="0"> The scanner steps try to shift the dot rightward in case the next node in line is labeled with a terminal or C/, which means the node is a leaf but not a foot. Figure 6 sketches the situation with respect to the input positions mentioned in the step. The depicted structure is part of at least one derived tree consistent with the input between positions 0 and j + 1, as explained earlier.</Paragraph> <Paragraph position="1"> \[h, N Mg, i, j, A, ;Ca\],</Paragraph> <Paragraph position="3"> \[h, N --* aM. fl, i, j, A, f2\] (Scan 2) For the running example in Figure 4, Scan 1 derives, among others, item 3 from item 2, and item 13 from item 12.</Paragraph> <Paragraph position="4"> from adjunction at the current node M. The third predicts the lower half of a tree in which the present tree t was adjoined.</Paragraph> <Paragraph position="5"> \[h, N --~ a. Mfl, i, j, fl, f2\],</Paragraph> <Paragraph position="7"> \[h, M--+ .&quot;7, k, k, -, -\] For the running example, Pred 1 derives item 4 from item 3 and item 6 from item 5. Pred 2 derives, among others, item 5 from item 4. Pred 3 derives item 9 from items 8 and 5, and item 17 from items 16 and 3.</Paragraph> </Section> <Section position="3" start_page="350" end_page="351" type="sub_section"> <SectionTitle> 3.4 Completer </SectionTitle> <Paragraph position="0"> The first completer step completes recognition of the lower half of a tree in which an auxiliary tree t was adjoined, and asserts recognition of the foot of t; see Figure 8. The second and third completer steps complete recognition of a list of daughter nodes '7, and initiate recognition of the list of nodes fl to the right of the mother node of % \[h, M--*'7., k, l,f~,fd\], t E Adj(M), ~, Ft--~ ,_L, k, k, -, -\], \[h, N-+a.Mfl, i, j, f~, f2\] ~, F t ---+ l., k, l, k, I\] (Comp 1) \[h, M--*3&quot;deg, j, k, fl, f2\], \[h, N --~ c~oMfl, i, j, -, -\], M dominates foot of tree \[h, N--,c~Mdegfl, i, k, fl, f2\] (Comp 2) \[h, M--~',/., j, k, -, -\], \[h, N---~c~degMfl, i, j, fl, f2\] \[h, N -* c~M deg fl, i, k, A, f2\] (Comp 3) See Figure 4 for use of these three steps in the running example.</Paragraph> </Section> <Section position="4" start_page="351" end_page="353" type="sub_section"> <SectionTitle> 3.5 Adjunctor </SectionTitle> <Paragraph position="0"> The adjunctor steps perform the actual recognition of an adjunction of an auxiliary tree t in another tree at some node M. The first adjunctor step deals with the case in which the other tree is again adjoined in a third tree (the two darkly shaded areas in Figure 9) and M dominates the foot node. The second adjunctor step deals with the case in which the other tree is either an initial tree, or has its foot elsewhere, i.e., not dominated by M.</Paragraph> <Paragraph position="1"> The two respective cases of adjunction are realized by step Adj 0 plus step Adj 1, and by step Adj 0 plus step Adj 2. The auxiliary step Adj 0 introduces items of a somewhat different form than those considered up to now, viz. \[M ~ 3' o, j, k, f~, f~\]. The interpretation is suggested in Figure 10: at M a tree has been adjoined. The adjoined tree and the lower half of the tree that M occurs in together generate the input from j to k. The depicted structure is part of at least one derived tree consistent with the input between positions 0 and k. In the case in which M dominates a foot node, as suggested in the figure, f~ and fd have a value other than &quot;-&quot; ~, T---~ Rt., j, k, fl, f2\], \[h, M--*3&quot;,, f~, f2, f~, fd\],</Paragraph> <Paragraph position="3"> \[M--* 7deg, j, k,f~,fd\], M dominates foot of tree t', \[h, F t, --+ +- o, f~, f~, f~, f~\], \[h, N--+ c~oMfl, i, j, -, -\] \[h, N--.c~Mdegfl, i, k, f~, f~\] (Adj 1) \[M ~-yo, j, k, -, -\], \[h, N--*c~.Mfl, i, j, f~, f~\] \[h, N --~ aM. fl, i, k, f~, f~\] (Adj 2) For the running example, Adj 0 derives the intermediate item 15a from items 14 and 10 and from this and item 5, Adj 2 derives item 15. Similarly, Adj 0 and Adj 2 together derive item 22. There are no applications of Adj 1 in this example. An alternative formulation of the adjunctor steps, without Adj 0, could be the following: ~, T--* Rt., j, k, fl, d2\], \[h, M~,, fl, fa, f~, fd\], t C Adj(M), M dominates foot of tree t', \[h, Ft, ~ +-., f~, fd, f~, f~l, \[h, N--~ c~ degMfl, i, j, -, -1 \[h, N --* aM deg fl, i, k, f~, fd\] (Adj 1') ~, T&quot;+ atdeg, j, k, f~, fal, \[h, M--~7,, fl, f2, -, -1, t 6 Adj(M), \[h, N---~a,Mfl, i, j, f~, fd\] \[h, N ~ aM,fl, i, k, f~, f~\] (Adj 2') That this formulation is equivalent to the original combination of the three steps Adj 0, Adj 1, and Adj 2 can be argued in two stages. First, the h in \[h, M --~ &quot;7 ,, A, f2, f~, f~\] or \[h, M --+ 31 ,, A, f2, -, -\] occurring as second antecedent of Adj I t or Adj 2 ~, respectively, can be replaced by a fresh variable h ~ without affecting the correctness of the algorithm. In particular, the occurrence of h in the second antecedent of Adj 1 ~ is redundant because of the inclusion of the fifth antecedent \[h, Ft, --+ J-,, f~, f~, f~, f~\]. Note that, conversely, this fifth antecedent is redundant with respect to the second antecedent, since existence of an item \[h, M --+ &quot;7 &quot;, fl, f2, f~, fd\], such that M dominates the foot of a tree t', implies the existence of an item \[h, Ft, ~ _L ,, f~, f~, f~, f~\]. For further explanation, see Section 4. Second, the first three antecedents of Adj 1 ~ and Adj 2 ~ can be split off to obtain Adj 0, Adj 1, and Adj 2, justified by principles that are the basis for optimization of database queries (Ullman 1982).</Paragraph> <Paragraph position="4"> The rationale for the original formulation of the adjunction steps as opposed to the alternative formulation by Adj 1 ~ and Adj 2 ~ lies in the consideration of time complexity, as will be discussed in Section 5.</Paragraph> </Section> </Section> class="xml-element"></Paper>