07.01.2013 Views

Lecture Notes in Computer Science 3472

Lecture Notes in Computer Science 3472

Lecture Notes in Computer Science 3472

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

590 Therese Berg and Harald Raffelt<br />

• SD, ED ⊆ Σ∗ are nonempty f<strong>in</strong>ite sets of access str<strong>in</strong>gs and suffixes, respectively,<br />

• t is an SD ∪ ED-labeled b<strong>in</strong>ary tree where,<br />

– non-leaf nodes are labeled with suffixes <strong>in</strong> ED, and<br />

– leaves are labeled with access str<strong>in</strong>gs <strong>in</strong> SD.<br />

The <strong>in</strong>formation about whether a str<strong>in</strong>g is accepted or not is conta<strong>in</strong>ed <strong>in</strong><br />

the structure of a discrim<strong>in</strong>ation tree. The computation of the function γ(w)<br />

forastr<strong>in</strong>gw - recall that γ(w) mapsw to the only access str<strong>in</strong>g w is like -<br />

becomes simple with the use of discrim<strong>in</strong>ation trees; traverse the tree on w <strong>in</strong><br />

the follow<strong>in</strong>g manner. Query wv formembership<strong>in</strong>eachnodelabeledv and enter<br />

the right child node on a positive answer and left otherwise. The calculation of<br />

γ(w) stops <strong>in</strong> a leaf which is labeled with an access str<strong>in</strong>g. The function γ is<br />

total s<strong>in</strong>ce the computation can be done for any <strong>in</strong>put str<strong>in</strong>g w. LetSift be the<br />

function that traverses a given discrim<strong>in</strong>ation tree for <strong>in</strong>put str<strong>in</strong>g w <strong>in</strong> the just<br />

described manner, start<strong>in</strong>g at the root.<br />

A discrim<strong>in</strong>ation tree is <strong>in</strong>itialized with the root labeled by ε and two leaves,<br />

one labeled by ε and the other one with a str<strong>in</strong>g which answers the opposite to<br />

ε on a membership query.<br />

The discrim<strong>in</strong>ation tree is always closed and consistent, therefore escap<strong>in</strong>g<br />

str<strong>in</strong>gs can only be obta<strong>in</strong>ed through counterexamples. Given a discrim<strong>in</strong>ation<br />

tree DT , the escap<strong>in</strong>g str<strong>in</strong>g is taken via the shortest prefix ui for<br />

which siaivi+1 ∈ U ⇐⇒ si+1vi+1 �∈ U holds, where si = Sift(ui, DT ), see<br />

Section 19.4.1 on how to handle counterexamples. The leaf si+1 is replaced by<br />

an <strong>in</strong>ternal node labeled vi+1 which will separate the old leaf represent<strong>in</strong>g state<br />

si+1from the new one siai. The algorithm can now start its next iteration with<br />

another equivalence query. Altogether, note that equivalence queries are used to<br />

modify the tree <strong>in</strong> order to derive a hypothesis of the automaton to learn, while<br />

membership queries are used <strong>in</strong> the translation from the tree to an automaton<br />

and for process<strong>in</strong>g a counterexample.<br />

The Learn<strong>in</strong>g Algorithm The discrim<strong>in</strong>ation tree algorithm consists of the<br />

ma<strong>in</strong> function Discrim<strong>in</strong>ation-Tree and auxiliary helper functions; Sift, Hypothesis,<br />

andUpdate-Tree. The complete algorithm is shown <strong>in</strong> Algorithm 17, [KV94,<br />

BDGW97].<br />

The ma<strong>in</strong> function Discrim<strong>in</strong>ation-Tree (l<strong>in</strong>e 1) first <strong>in</strong>itializes the discrim<strong>in</strong>ation<br />

tree. It performs a membership query for ε and if the answer to this query<br />

is positive, mean<strong>in</strong>g ε ∈ U, then the first hypothesis A has one accept<strong>in</strong>g state,<br />

otherwise one non-accept<strong>in</strong>g. This state is the <strong>in</strong>itial state. All the actions from<br />

this state will loop back to this state.<br />

The next step for the Learner is to execute an equivalence query with this<br />

conjecture. With the <strong>in</strong>formation about the counterexample, which the Learner<br />

receives, the discrim<strong>in</strong>ation tree will be <strong>in</strong>itialized, the root labeled with ε and<br />

the leaves labeled with ε and the counterexample, t, fromtheOracle.

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

Saved successfully!

Ooh no, something went wrong!