140 likes | 158 Views
Learn how to restrict the resulting inferred language in clearing restarting automata by increasing the length of contexts or incorporating delta rules.
E N D
Peter Černo Incorporating Delta Rules
About • Suppose we have a sample computation for (delta) clearing restarting automata. • Suppose that the inferred automaton accepts some wrong words. • There are two ways how to restrict the resulting inferred language: • We can increase k – the length of contexts. • We can change the sample computation by incorporating some delta rules.
Example 1 • Consider the following sample computation: ¢abababababababab$ ⊢M¢abababababababb$ ⊢M ¢abababababbabb$ ⊢M¢abababbabbabb$ ⊢M ¢abbabbabbabb$ ⊢M¢abbabbabbab$ ⊢M ¢abbabbabab$ ⊢M¢abbababab$ ⊢M ¢abababab$ ⊢M¢abababb$ ⊢M ¢abbabb$ ⊢M¢abbab$ ⊢M ¢abab$ ⊢M¢abb$ ⊢M¢ab$ ⊢M¢ λ$ accept. • We can collect 15 reductions.
Example 1 • For k = 4 we get the following instructions: • ({¢ab, abab}, a, {b$, babb}), • ({¢a, abba}, b, {b$, bab$, baba}), • (¢, ab, $). • For the resulting 4-cl-RA-automaton M the following holds: L(M)∩ {(ab)n | n>0} = {(ab)2m | m≥0}. • However, this does not work for smaller k.
Example 1 • For k = 3 we get the following instructions: • ({¢ab, bab}, a, {b$, bab}), • ({¢a, bba}, b, {b$, bab}), • (¢, ab, $). • Now the resulting 3-cl-RA-automaton Maccepts the wrong word ababab: • ababab ⊢Mabbab ⊢Mabab ⊢Mabb ⊢Mab ⊢Mλ. • We blame the instruction(¢ab, a, bab) which caused the reduction: ababab ⊢Mabbab.
Idea • Why? The instruction reduced the wrong word ababab to the correct word abbab. • abbab is ok– it is in the sample computation. • Idea: Let us replace the instruction: • ({¢ab, bab}, a, {b$, bab}) by the delta instruction: • ({¢ab, bab}, a→ Δ, {b$, bab}). • How does the sample computation change?
Idea • The modified sample computation is now: ¢abababababababab$ ⊢M¢abababababababΔb $ ⊢M ¢abababababΔbabΔb $ ⊢M¢abababΔbabΔbabΔb $ ⊢M ¢abΔbabΔbabΔbabΔb $ ⊢M¢abΔbabΔbabΔbab$ ⊢M ¢abΔbabΔbabab$ ⊢M¢abΔbababab$ ⊢M ¢abababab$ ⊢M¢abababΔb $ ⊢M ¢abΔbabΔb $ ⊢M¢abΔbab$ ⊢M ¢abab$ ⊢M¢abΔb $ ⊢M¢ab$ ⊢M¢ λ$ accept. • Unfortunately, it does not help us if k = 3.
Idea • Consider the following sample reduction: • abababΔb ⊢MabΔbabΔb • As you can see, this reduction also works with the word ababab: • ababab ⊢MabΔbab because the length of contexts is k = 3. • Is there any other way how to modify the instruction ({¢ab, bab}, a, {b$, bab}) ? • Yes, it is.
Revised Idea • It is not enough to replace a single letter a : • ({¢ab, bab}, a→ Δ, {b$, bab}). • We have two simple choices for two letters: • ({¢ab, bab}, ab→ Δ, {$, ab}), • ({¢a, ba}, ba→ Δ, {b$, bab}). • We move one letter from the contextto the rule and thus extend the context horizon. • In the following we show how does the sample computation change in both cases.
Case 1 • If we use ({¢ab, bab}, ab→ Δ, {$, ab}) we get the following new sample computation: ¢abababababababab$ ⊢M¢abababababababΔ$ ⊢M ¢abababababΔabΔ$ ⊢M¢abababΔabΔabΔ$ ⊢M ¢abΔabΔabΔabΔ$ ⊢M¢abΔabΔabΔab$ ⊢M ¢abΔabΔabab$ ⊢M¢abΔababab$ ⊢M ¢abababab$ ⊢M¢abababΔ$ ⊢M ¢abΔabΔ$ ⊢M¢abΔab$ ⊢M¢abab$ ⊢M ¢abΔ$ ⊢M¢ab$ ⊢M¢ λ$ accept.
Case 1 • For k = 3 we get the following instructions: • ({¢ab, Δab}, Δ, {$, ab$, aba}), • ({¢ab, bab}, ab→ Δ, {$, abΔ}), • (¢, ab, $). • For the resulting 3-cl-RA-automaton M the following holds: L(M) = {(ab)2m | m≥0} ∪ {λ}. • Note that the symbol Δcodes the letter b from the original sample computation.
Case 2 • If we use ({¢a, ba}, ba→ Δ, {b$, bab}) we get the following new sample computation: ¢abababababababab$ ⊢M¢ababababababaΔb $ ⊢M ¢ababababaΔbaΔb $ ⊢M¢ababaΔbaΔbaΔb $ ⊢M ¢aΔbaΔbaΔbaΔb $ ⊢M¢aΔbaΔbaΔbab$ ⊢M ¢aΔbaΔbabab$ ⊢M¢aΔbababab$ ⊢M ¢abababab$ ⊢M¢ababaΔb $ ⊢M ¢aΔbaΔb $ ⊢M¢aΔbab$ ⊢M¢abab$ ⊢M ¢aΔb $ ⊢M¢ab$ ⊢M¢ λ$ accept.
Case 2 • For k = 3 we get the following instructions: • ({¢a, Δba}, Δ, {b$, bab}), • ({¢a, aba}, ba→ Δ, {b$, baΔ}), • (¢, ab, $). • For the resulting 3-cl-RA-automaton M the same formula holds: L(M) = {(ab)2m | m≥0} ∪ {λ} . • Again the symbol Δcodes the letter b from the original sample computation.
Some Remarks • Note that the for k < 3 the previous algorithm does not work. • It is also not obvious how to replace more letters or even more instructions without disturbing the sample computation. • The question is whether we can do these replacements in some automated way? • Is this idea applicable to other examples?