14.03.2014 Views

Towards a Logical Description of Trees in Annotation Graphs - JLCL

Towards a Logical Description of Trees in Annotation Graphs - JLCL

Towards a Logical Description of Trees in Annotation Graphs - JLCL

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Michaelis, Mönnich<br />

For 0 ≤ p < q < K, explore A p,q is def<strong>in</strong>ed as follows:<br />

explore A p,q<br />

1 if A p,q ≠ ∅ then<br />

2 choose a ∈ A p,q<br />

3 A r ← A r ∪ {a} % add a to partition set A r<br />

4 A p,q ← A p,q \ {a} % remove a from set A p,q<br />

5 fi<br />

6 i ← 0<br />

7 j ← 1<br />

8 while p + i < q − j and A p+i,q−j = ∅ repeat % search<strong>in</strong>g a leftmost “child”<br />

9 if p + i < q − j − 1 then % explor<strong>in</strong>g “top-down” <strong>in</strong>terval [p+i,q-j]<br />

10 j ← j + 1 % reduc<strong>in</strong>g right <strong>in</strong>terval value by 1<br />

11 else<br />

12 i ← i + 1 % <strong>in</strong>creas<strong>in</strong>g left <strong>in</strong>terval value by 1<br />

13 j ← 0 % right <strong>in</strong>terval value back to q<br />

14 fi<br />

15 i p,q ← i<br />

16 j p,q ← j<br />

17 if p + i p,q < q − j p,q then % there is no “child” at all iff p+i p,q<br />

=q-j p,q<br />

18 explore A p+ip,q,q−jp,q % explor<strong>in</strong>g leftmost “child” —- nonempt<strong>in</strong>ess<br />

<strong>of</strong> A p+ip,q ,q-j p,q<br />

is guaranteed by WHILE-loop<br />

19 if j p,q > 0 then<br />

20 explore A q−jp,q,q % search<strong>in</strong>g for right “sibl<strong>in</strong>g” <strong>of</strong> leftmost<br />

“child”<br />

21 fi<br />

22 fi<br />

Fact 3.4 For p, q < K with p < q, i p,q and j p,q (depend<strong>in</strong>g on i p,q) are m<strong>in</strong>imal, i.e.,<br />

A p+i,q−j = ∅ for all j < q − (p + i) <strong>in</strong> case i < i p,q, and for all j < j p,q <strong>in</strong> case i = i p,q.<br />

Remark. Note that for p, q < K with p < q, the while-loop for potentially f<strong>in</strong>d<strong>in</strong>g<br />

m<strong>in</strong>imal i and m<strong>in</strong>imal j, depend<strong>in</strong>g on i, with<strong>in</strong> the subprocedure explore A p,q is a<br />

“left-to-right, top-down” search along the “rows” left-to and below matrix entry A p,q (cf.<br />

Figure 3). In particular, we have A p+i,q−j = ∅ if i < i p,q and q−(p+i p,q) ≤ j < q−(p+i).<br />

Hence explore A p,p+ip,q would yield no contribution to the partition set A r, if it were<br />

part <strong>of</strong> the subprocedure explore A p,q.<br />

Proposition 3.5 The time complexity <strong>of</strong> partition A is <strong>in</strong> O(K 2 m), m be<strong>in</strong>g the<br />

card<strong>in</strong>ality <strong>of</strong> A.<br />

Proposition 3.6 Let k ∈ N. Then for K = 2k, the label set L = {l 0, l 1, . . . , l k−1 } and<br />

the arc set A = {〈p, p + k, l p〉 | 0 ≤ p < k} the time complexity <strong>of</strong> partition A is at<br />

least <strong>in</strong> O(K 2 m) (as before, m be<strong>in</strong>g the card<strong>in</strong>ality <strong>of</strong> A, i.e., m = k <strong>in</strong> this case).<br />

76 LDV-FORUM

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!