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

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

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

594 Therese Berg and Harald Raffelt<br />

Us<strong>in</strong>g this observation, one can show that it suffices to compare L1 and L2 for<br />

all str<strong>in</strong>gs up to some length l<strong>in</strong>early bounded by the sizes of the two automata.<br />

Vasilevskii and Chow further show that if one automaton is given explicitly, the<br />

number of comparisons can be slightly improved.<br />

Details can be found <strong>in</strong> Chapter 4.7.<br />

A Probabilistic Approach Anglu<strong>in</strong> [Ang87] proposes an equivalence check<br />

that yields a correct answer up to some given failure probability.<br />

An Oracle can be realized as a function pick<strong>in</strong>g str<strong>in</strong>gs randomly and compar<strong>in</strong>g<br />

the mach<strong>in</strong>e and the hypothesis for those. If a mismatch is found, the<br />

correspond<strong>in</strong>g str<strong>in</strong>g is a counterexample. If no mismatch is found, the two systems<br />

are classified as identical. This conclusion might be wrong with a certa<strong>in</strong><br />

probability. However, if we know the probability distribution of str<strong>in</strong>gs be<strong>in</strong>g<br />

accepted, one can compute the number of comparisons needed to guarantee that<br />

this failure probability is below a given limit. See [Ang87] for details.<br />

19.4.6 Query Complexity of the Algorithms<br />

We discuss only the query complexity of the algorithms, i.e., the number of<br />

queries needed to construct a correct model of the SUT’s regular language. Their<br />

time complexity can be estimated with similar arguments.<br />

In this subsection, let n, m, andk be the number of states of M, the length<br />

of the longest counterexample returned <strong>in</strong> a counterexample, and the size of Σ,<br />

respectively.<br />

For all algorithms discussed, the number of equivalence queries is at most n:<br />

each counterexample processed immediately adds at least one new state to the<br />

current hypothesis. Note however, that this number is an upper bound and can<br />

be expected to vary <strong>in</strong> practice for the different algorithms. For example, <strong>in</strong> the<br />

discrim<strong>in</strong>ation tree algorithm one needs exactly n equivalence queries, s<strong>in</strong>ce a<br />

new state can only be found with such a query. In Anglu<strong>in</strong>’s algorithm, on the<br />

other hand, the consistency check that is based on membership queries might<br />

give rise to new states as well.<br />

The algorithms differ <strong>in</strong> the number of membership queries. We first discuss<br />

the complexity of the algorithm based on observation packs.<br />

In the observation pack algorithm membership queries are performed for two<br />

different purposes: to check for closedness and to process a counterexample.<br />

Consider the first type of membership queries. The observation pack is closed<br />

when, for every access str<strong>in</strong>g si and letter a, sia is like some other access str<strong>in</strong>g.<br />

This is easily determ<strong>in</strong>ed with membership queries. If the check fails, it provides<br />

a witness of non-closedness. If it succeeds, a DFA can be built from the answers<br />

of the queries.<br />

Each component conta<strong>in</strong>s an access str<strong>in</strong>g plus at most n − 1 str<strong>in</strong>gs used to<br />

separate it from the other at most n−1 components. Therefore, <strong>in</strong> the worst case,<br />

check<strong>in</strong>g for closedness means ask<strong>in</strong>g at most n queries for each of (n) str<strong>in</strong>gs<br />

si and (n) queriesforeachof(kn) str<strong>in</strong>gssia, giv<strong>in</strong>g a total of O((k +1)n 2 )

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

Saved successfully!

Ooh no, something went wrong!