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.

1.3.2 Comput<strong>in</strong>g Synchroniz<strong>in</strong>g Sequences<br />

1 Hom<strong>in</strong>g and Synchroniz<strong>in</strong>g Sequences 15<br />

Synchroniz<strong>in</strong>g sequences are computed <strong>in</strong> a way similar to hom<strong>in</strong>g sequences. The<br />

algorithm also concatenates many short sequences <strong>in</strong>to one long, but this time<br />

the sequences take two states to the same f<strong>in</strong>al state. Analogously to separat<strong>in</strong>g<br />

sequences, we def<strong>in</strong>e merg<strong>in</strong>g sequences:<br />

Def<strong>in</strong>ition 1.13. A merg<strong>in</strong>g sequence for two states s, t ∈ S is a sequence<br />

x ∈ I ∗ such that δ(s, x )=δ(t, x ). ⊓⊔<br />

The Algorithm. Algorithm 2 first f<strong>in</strong>ds a merg<strong>in</strong>g sequence y for two states.<br />

This ensures that |δ(S, y)| < |S|, because each state <strong>in</strong> S gives rise to at most one<br />

state <strong>in</strong> δ(S, y), but the two states for which the sequence is merg<strong>in</strong>g give rise to<br />

the same state. This process is repeated, <strong>in</strong> each step append<strong>in</strong>g a new merg<strong>in</strong>g<br />

sequence for two states <strong>in</strong> δ(S, x )totheresultx , thus decreas<strong>in</strong>g |δ(S, x )|.<br />

If at some po<strong>in</strong>t the algorithm f<strong>in</strong>ds two states that do not have a merg<strong>in</strong>g<br />

sequence, then there is no synchroniz<strong>in</strong>g sequence: if there was, it would merge<br />

them. And if the algorithm term<strong>in</strong>ates by f<strong>in</strong>ish<strong>in</strong>g the loop, the sequence x is<br />

clearly synchroniz<strong>in</strong>g. This shows correctness. S<strong>in</strong>ce |δ(S, x )| is n <strong>in</strong>itially and 1<br />

on successful term<strong>in</strong>ation, the algorithm needs at most n − 1 iterations.<br />

Algorithm 2 Comput<strong>in</strong>g a synchroniz<strong>in</strong>g sequence.<br />

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

2 x ← ε<br />

3 while |δ(S, x )| > 1<br />

4 f<strong>in</strong>d two different states s0, t0 ∈ δ(S, x )<br />

5 let y be a merg<strong>in</strong>g sequence for s0 and t0<br />

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

6 x ← xy<br />

7 return x<br />

As a consequence of this algorithm, we have (see, e.g., Starke [Sta72]):<br />

Theorem 1.14. A mach<strong>in</strong>e has a synchroniz<strong>in</strong>g sequence if and only if every<br />

pair of states has a merg<strong>in</strong>g sequence.<br />

Proof. If the mach<strong>in</strong>e has a synchroniz<strong>in</strong>g sequence, then it is merg<strong>in</strong>g for every<br />

pair of states. If every pair of states has a merg<strong>in</strong>g sequence, then Algorithm 2<br />

computes a synchroniz<strong>in</strong>g sequence. ⊓⊔<br />

To conv<strong>in</strong>ce yourself, it may be <strong>in</strong>structive to go back and see how this<br />

algorithm works on Exercise 1.1.

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

Saved successfully!

Ooh no, something went wrong!