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.

20 Sven Sandberg<br />

1.3.3 Comput<strong>in</strong>g Hom<strong>in</strong>g Sequences for General Mach<strong>in</strong>es<br />

In this section we remove the restriction from Section 1.3.1 that the mach<strong>in</strong>e<br />

has to be m<strong>in</strong>imized. Note that for general mach<strong>in</strong>es, an algorithm to compute<br />

hom<strong>in</strong>g sequences can be used also to compute synchroniz<strong>in</strong>g sequences: just<br />

remove all outputs from the mach<strong>in</strong>e and ask for a hom<strong>in</strong>g sequence. S<strong>in</strong>ce there<br />

are no outputs, hom<strong>in</strong>g and synchroniz<strong>in</strong>g sequences are the same th<strong>in</strong>g. It is<br />

therefore natural that the algorithm unifies Algorithm 1 of Section 1.3.1 and<br />

Algorithm 2 of Section 1.3.2 by comput<strong>in</strong>g separat<strong>in</strong>g or merg<strong>in</strong>g sequences <strong>in</strong><br />

each step.<br />

Recall Lemma 1.10, say<strong>in</strong>g that the quantity �<br />

B∈σ(x )<br />

|B|−|σ(x )| does not<br />

<strong>in</strong>crease as the sequence x is extended. Algorithm 3 repeatedly applies a sequence<br />

that strictly decreases this quantity: it takes two states from the same block<br />

of the current state uncerta<strong>in</strong>ty and applies either a merg<strong>in</strong>g or a separat<strong>in</strong>g<br />

sequence for them. If the sequence is merg<strong>in</strong>g, then the sum of sizes of all blocks<br />

dim<strong>in</strong>ishes. If it is separat<strong>in</strong>g, then the block conta<strong>in</strong><strong>in</strong>g the two states is split.<br />

S<strong>in</strong>ce the quantity is n − 1 <strong>in</strong>itially and 0 when the algorithm f<strong>in</strong>ishes, it f<strong>in</strong>ishes<br />

<strong>in</strong> at most n − 1steps.<br />

If the algorithm does not f<strong>in</strong>d either a merg<strong>in</strong>g or a separat<strong>in</strong>g sequence on<br />

l<strong>in</strong>e 5, then the mach<strong>in</strong>e has no hom<strong>in</strong>g sequence. Indeed, any hom<strong>in</strong>g sequence<br />

that does not take s and t to the same state must give different outputs for them,<br />

so it is either merg<strong>in</strong>g or separat<strong>in</strong>g. This shows correctness of the algorithm.<br />

Algorithm 3 Comput<strong>in</strong>g a hom<strong>in</strong>g sequence for a general mach<strong>in</strong>e.<br />

1 function Hom<strong>in</strong>g(Mealy mach<strong>in</strong>e M)<br />

2 x ← ε<br />

3 while there is a block B ∈ σ(x )with|B| > 1<br />

4 f<strong>in</strong>d two different states s, t ∈ B<br />

5 let y be a separat<strong>in</strong>g or merg<strong>in</strong>g sequence for s and t<br />

(if none exists, return Failure)<br />

6 x ← xy<br />

7 return x<br />

Similar to Theorem 1.14, we have the follow<strong>in</strong>g for hom<strong>in</strong>g sequences.<br />

Theorem 1.17 ([Rys83]). A Mealy mach<strong>in</strong>e has a hom<strong>in</strong>g sequence if and only<br />

if every pair of states either has a merg<strong>in</strong>g sequence or a separat<strong>in</strong>g sequence.<br />

Note that, as we saw already <strong>in</strong> Section 1.3.1, every m<strong>in</strong>imized mach<strong>in</strong>e has a<br />

hom<strong>in</strong>g sequence.<br />

Proof. Assume there is a hom<strong>in</strong>g sequence and let s, t ∈ S be any pair of states.<br />

If the hom<strong>in</strong>g sequence takes s and t to the same f<strong>in</strong>al state, then it is a merg<strong>in</strong>g<br />

sequence. Otherwise, by the def<strong>in</strong>ition of hom<strong>in</strong>g sequence, it must be possible

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

Saved successfully!

Ooh no, something went wrong!