1 / 57

Δ - Clearing Restarting Automata and CFL

Δ - Clearing Restarting Automata and CFL. Peter Černo and František Mráz. Introduction. Δ -Clearing Restarting Automata : Restricted model of Restarting Automata . In one step (based on a limited context ): Delete a substring , R eplace a substring by Δ . The main result :

maitland
Download Presentation

Δ - Clearing Restarting Automata and CFL

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Δ-Clearing Restarting Automata and CFL Peter Černoand František Mráz

  2. Introduction • Δ-Clearing Restarting Automata: • Restrictedmodel of Restarting Automata. • In one step (based on a limited context): • Delete a substring, • Replace a substring by Δ. • Themain result: • Δ-clearing restarting automatarecognizeall context-free languages.

  3. Example

  4. Restarting Automata • Restarting Automata: • Tool for modeling some techniques for natural language processing. • Analysis by Reduction: • Method for checking [non-]correctness of a sentence. • Iterative application of simplifications. • Until the input cannot be simplified anymore.

  5. Organization • Δ-clearing restarting automata. • Δ*-clearing restarting automata. • Δ*-clearing restarting automata recognize CFL. • Special coding. • Reduction: Δ*- to Δ-clearing restarting automata.

  6. Δ-Clearing Restarting Automata • Let kbea positiveinteger. • k-Δ-clearing restartingautomaton(k-Δcl-RA) • Is a coupleM = (Σ, I) : • Σ… input alphabet, ¢, $, Δ∉ Σ, • Γ… working alphabet, Γ = Σ ∪ {Δ} • I… finite set of instructions(x, z→ t, y): • x ∊ {¢, λ}.Γ*, |x|≤k (left context) • y ∊ Γ*.{λ, $}, |y|≤k(right context) • z ∊ Γ+, t ∊ {λ, Δ}. • ¢and $… sentinels.

  7. Rewriting • uzv⊢Mutviff∃ φ= (x, z → t, y) ∊ I : • xis a suffix of ¢.u andy is a prefixof v.$ . • L(M) = {w ∊ Σ* | w ⊢*M λ}. • LC (M) = {w ∊ Γ* | w ⊢*M λ}.

  8. Empty Word • Note: For every Δcl-RA M: λ ⊢*M λhence λ∊ L(M). • Whenever we say that Δcl-RA Mrecognizesa languageL, we always mean that L(M) = L ∪ {λ}.

  9. Example 1 • L1= {anbn | n > 0}∪ {λ} : • 1-Δcl-RAM = ({a, b}, I) , • InstructionsI are: • R1 = (a, ab → λ, b), • R2 = (¢, ab → λ, $). • Note: • We did not use Δ.

  10. Example 2 • L2= {ancbn| n > 0} ∪ {λ}: • 1-Δcl-RAM = ({a, b, c}, I), • Instructions I are: • R1 = (a, c→ Δ, b), • R2 = (a, aΔb→ Δ, b) , • R3 = (¢, aΔb→ λ, $). • Note: • We must use Δ.

  11. Organization • Δ-clearing restarting automata. • Δ*-clearing restarting automata. • Δ*-clearing restarting automata recognize CFL. • Special coding. • Reduction: Δ*- to Δ-clearing restarting automata.

  12. Δ*-Clearing Restarting Automata • Δ*-clearing restarting automata • Similar to Δ-clearing restarting automata. • We allowinstructions (x, z → Δk, y), where k ≤|z|.

  13. Organization • Δ-clearing restarting automata. • Δ*-clearing restarting automata. • Δ*-clearing restarting automata recognize CFL. • Special coding. • Reduction: Δ*- to Δ-clearing restarting automata.

  14. Δ*cl-RA and CFL • Theorem: For each context-free language L there exists a 1-Δ*cl-RAM recognizing L. • Idea. • M works in a bottom-up manner. • If the input is small, M may “clear” the whole input. • If the input is long, M may “replace”some subword by the “code” of nonterminal.

  15. Δ*cl-RA and CFL • If the input is small:

  16. Δ*cl-RA and CFL • If the input is long:

  17. Δ*cl-RA and CFL • Proof. • L … context-free language over Σ. • G = (VN , VT , S, P)… context-free grammar : • G is in: Chomsky normal form, • G generates: L(G) = L – {λ}, • Nonterminals: VN= {N1 , N2 , …, Nm }, • Terminals: VT= Σ , Γ = Σ ∪ {Δ}, • Start: S = N1 , ¢, $, Δ∉ VN ∪ VT.

  18. Δ*cl-RA and CFL • Proof (Continued). • AuxiliaryG’ = (VN , V’T , S, P’) obtained from G : • By adding symbol Δ to VT , • V’T= VT∪ {Δ} = Γ, • By adding productions Ni → aΔib to P, • P’ = P ∪ { Ni→ aΔib | i = 1, …, m; a, b∊ VT }. • Our goal: 1-Δ*cl-RA M : LC (M) = L(G’) ∪{λ}. • Then: L(M)= LC (M) ∩ Σ* = L(G) ∪{λ}.

  19. Δ*cl-RA and CFL • Proof (Continued). • aΔibcodefor Ni(∀ a, b ∊ VT). • a, b ∊ VTseparators(between codes).

  20. Δ*cl-RA and CFL • Proof (Continued). • Idea: • Ifzcan be derived from Ni (in G’ ), • ThenM can replace z by a “code” for Ni. • M replaces only the inner part of z by Δi . • M leaves firstandlast letter of z as separator.

  21. Δ*cl-RA and CFL • Idea:

  22. Δ*cl-RA and CFL • Proof (Continued). • Two problems: • |Inner part|≥ |Δi|. • Finite many instructions. • Proposition: • For any w ∊L(G’): • If |w| > c = |VN | + 2, thenw = x z y: • c < |z| ≤ 2c , • S ⇒* x Ni y ⇒* x z y for some Ni.

  23. Δ*cl-RA and CFL • Proof (Continued). • Construction: • I1 … set of all instructions: (¢, w → λ, $) • Wherew ∊ L(G’)and|w| ≤ c . • This resolves the “small” inputs.

  24. Δ*cl-RA and CFL • Proof (Continued). • Construction: • For everyNi⇒* z1… zs, wherec < s ≤ 2c: (z1, z2… zs-1→ Δi, zs ) • I2… set of all such instructions. • I1 , I2 … finite sets of instructions. • M = (Σ, I1 ∪I2 ) … required automaton. Q.E.D.∎

  25. Generalization • We can choose:

  26. Generalization • Observation: • For everyt ≥ 1 … ∃ m1, k: • z contains v∊ Σ≥ t… empty space.

  27. Trivial Reduction • Whyempty space? • Trivial simulation:

  28. Trivial Reduction • Whyempty space? • Partial Δ-instructions: • φ1 = (x, z1→ Δ, z2 z3 … zsy), • φ2 = (x Δ, z2→ Δ, z3 … zsy), • … • φr = (xΔr-1, zr … zs→ Δ, y). • Problem: • The equivalence is not guaranteed.

  29. Avoiding Conflicts • How to avoid conflicts? • We can encode some extra informationinto z.

  30. Organization • Δ-clearing restarting automata. • Δ*-clearing restarting automata. • Δ*-clearing restarting automata recognize CFL. • Special coding. • Reduction: Δ*- to Δ-clearing restarting automata.

  31. Coding • We require: • Coding by means of Δ-clearing restarting automata. • Ability to recover the original word at any time.

  32. Alice and Bob • Consider the following game:

  33. Alice and Bob

  34. Alice and Bob

  35. Alice and Bob

  36. Protocol • We assume: • fixed alphabet Σ , • fixed length of all initial messages given to Alice. • Is there any such protocol? • Yes.Basic intuition: • Alice adds information by choosing a position of Δ. • Alice loses information by deleting one letter.

  37. Coding • Idea: Length of | messages | = |Σ| . • For Σ = {a, b, c}:

  38. Example – 3-Letter Alphabet Perfect matching for Σ = {a, b, c} :

  39. Coding – Encoding Example • Consider word w over Σ = {a, b, c} : • w = accbabccacaabbcabcbcacaa . • Let us factorize w into groups of |Σ| = 3letters: • w = acc |bab|cca|caa|bbc|abc|bca|caa . • We want to encode information i into w: • i = 11001000 .

  40. Coding – Encoding Example i = 11001000 : w = acc|bab|cca|caa|bbc|abc|bca|caa , w' = aΔc|bΔb|cca|caa|Δbc|abc|bca|caa .

  41. Coding – Major Drawback • The major drawback: • If w does not start with left sentinel ¢ then we cannot factorize w into groups of |Σ| letters. • Word w can be factorized as: • acc|bab|cca|caa|bbc|abc|bca|caa , • ac|cba|bcc|aca|abb|cab|cbc|aca|a , • a|ccb|abc|cac|aab|bca|bcb|cac|aa.

  42. Coding – Fixed Points • Simple trick: • To factorize wwe need some “fixed point”. • The left sentinel ¢ is one example. • In the first phase we distribute fixed points throughout the whole input tape.

  43. Coding – Fixed Points • Suppose that we have: • w = abaccΔaccbabccacaabbcabcbcacaa. • The symbol Δ in w is our fixed point: • w = abaccΔ|acc|bab|cca|caa|bbc|abc|bca|caa. • Now we can place the next fixed point: • w = abaccΔ|acc|bab|cca|caa|bbc|abc|bca|cΔa .

  44. Organization • Δ-clearing restarting automata. • Δ*-clearing restarting automata. • Δ*-clearing restarting automata recognize CFL. • Special coding. • Reduction: Δ*- to Δ-clearing restarting automata.

  45. Algorithmic Viewpoint • Imagine a Δ-clearing restarting automatonas a nondeterministic machine N, which repeatedly executes the following two steps: • “Choosing Step”: Nchoosesa subwordwof the input ¢u$, |w| ≤ K . (K is a fixed constant) • “Solving Step”: N runs a computationon w, which either rejects, or replaces a subword of w by λ or Δ. • Nacceptsuiff it can “clear” the whole word u.

  46. Algorithmic Viewpoint • Illustration:

  47. Algorithmic Viewpoint • To define anyΔ-clearing restarting automaton: • Define the solving algorithm S, called the solver. • Show the existence of a suitable limit K. • We put no resource limitson the solving algorithm.

  48. Idea of the Algorithm • Consider Δ*cl-RAMwhose [generalized] construction was based on a context-free grammar G in ChNF. • We want thesolving algorithm Simitating M. • We do not preserve the original representation of M.

  49. Idea of the Algorithm • First,we distribute fixed points throughout the whole input tape in approximately equal distances:

  50. Idea of the Algorithm • Suppose that walready contains fixed points. • We [internally] translate Δ symbols occurring in w. • We find an instruction φ = (x, z → Δr, y)of the original Δ*cl-RAMapplicable inside w. • If there is no such instruction, reject.

More Related