Word equations and EDT0L languages: from logic to automata - - PowerPoint PPT Presentation

word equations and edt0l languages from logic to automata
SMART_READER_LITE
LIVE PREVIEW

Word equations and EDT0L languages: from logic to automata - - PowerPoint PPT Presentation

Word equations and EDT0L languages: from logic to automata Dedicated to Manfred Kudlek (1940 2012) Volker Diekert 1 Universit at Stuttgart AutoMathA 2015 Leipzig, May 6 - 9, 2015 1 Based on joint work with: Laura Ciobanu and Murray Elder


slide-1
SLIDE 1

Word equations and EDT0L languages: from logic to automata

Dedicated to Manfred Kudlek (1940 – 2012)

Volker Diekert1

Universit¨ at Stuttgart

AutoMathA 2015 Leipzig, May 6 - 9, 2015

1Based on joint work with: Laura Ciobanu and Murray Elder (ICALP 2015);

and with Artur Je˙ z and Wojciech Plandowski (CSR 2014). The corresponding papers are on the arXiv

slide-2
SLIDE 2

Manfred Kudlek (1940 – 2012)

The main result in this paper will be presented at ICALP 2015. The 42nd International Colloquium on Automata, Languages, and Programming (ICALP 2015) will take place in the period 6-10 July 2015 in Kyoto, Japan. Professor Kudlek has the distinction of being the only person to have attended all ICALP conferences during his lifetime. He worked

  • n Lindenmayer systems, visited Kyoto several times, and taught

the speaker that bikes are the best means of transport inside Kyoto.

1

slide-3
SLIDE 3

PART I

2

slide-4
SLIDE 4

MORE THAN 1700 YEARS OF WORD EQUATIONS

Diophantus of Alexandria. Greek mathematician before 364 AD. 1900: Hilbert’s address at the International Congress of Mathematicians in Paris leading 1901 to a list 23 published

  • problems. The Tenth Problem is:

“Given a Diophantine equation with any number of unknown quantities and with rational integral numerical coefficients: To devise a process according to which it can be determined in a finite number of operations whether the equation is solvable in rational integers.”

3

slide-5
SLIDE 5

History

1960’s: WordEquations is a special instance of Hilbert 10. 1970 Matiyasevich: Hilbert 10 is undecidable based on previous work by Davis, Putnam, and Robinson. 1977 Makanin: WordEquations is decidable. 1982/84 Makanin: Existential and positive theories of free groups are decidable. 1987 Razborov: Description of all solutions for an equation in a free group via “Makanin-Razborov” diagrams. 1998 – 2006: Tarski’s conjectures: Kharlampovich and Myasnikov and independent work of Sela

4

slide-6
SLIDE 6

Complexity of Makanin’s algorithms

  • WordEquations. Complexity (first published estimation):

DTIME

  • 22222poly(n)
  • GroupEquations. The scheme of Makanin is not primitive
  • recursive. (Ko´

scielski/Pacholski 1990) 1999 Plandowski: WordEquations is in PSPACE. 2000 Guti´ errez: GroupEquations is in PSPACE. 2001 D., Guti´ errez, Hagenah: GroupEquations with rational constraints is PSPACE-complete.

5

slide-7
SLIDE 7

From Lempel-Ziv Compression to recompression

ICALP 1998. Plandowski and Rytter: Application of Lempel-Ziv Encodings to the Solution of Word Equations. New conjecture: WordEquations is NP-complete. Compression became a main tool in solving equations. STACS 2013. Artur Je˙ z applied recompression to WordEquations and simplified all known proofs (!!!) for decidability.

  • Consequence. A full proof can lectureed in about 2 hours.

6

slide-8
SLIDE 8

PART II

All Solutions

7

slide-9
SLIDE 9

From logic to automata

Let Φ be some formula, say written in MSO, FO, LTL, . . . Models are sets in some domain, say words, trees, graphs, . . .

  • Question. How to check satisfiability of Φ?
  • AutoMathA. Construct a trim nondeterministic finite automaton

A such that L(A) = { w | w | = Φ } . The NFA A tells us: The formula Φ is not satisfiable if L(A) is empty. The formula Φ has only finitely many models if L(A) is finite. The formula Φ has infinitely many models if L(A) is infinite.

8

slide-10
SLIDE 10

The existential theory of equations for a monoid M

Let A be a finite set of generators and π : A∗ → M be the canonical representation. Consider a first order sentence over atomic formulas U = V , where U, V ∈ (A ∪ Ω)∗ are words over the constants A and variables Ω. The interpretation is in M. This leads to the existential theory of equations in M, positive theory of equations in M, theory of equations in M. free monoids free groups Existential theory Makanin 1977 Makanin 1982 Positive theory undecidable Makanin/Razborov 1984 Theory undecidable Kharlampovich/Myasnikov 2004

9

slide-11
SLIDE 11

The existential theory with rational constraints

We allow additional atomic formulas of the form X ∈ L, where L ⊆ M is rational. For simplicity, M = A∗ a free monoid with involution. a = a and xy = y x. So in this case being rational means we can specify L by some NFA A with L = L(A) ⊆ A∗ and the truth value of X ∈ L for σ : Ω → A∗ becomes σ(X) ∈ (L(A)).

10

slide-12
SLIDE 12

NFAs and rational subsets

Let M be any monoid, eg. either M = F(A) or M = C∗ or M = End(C∗). A nondeterministic finite automaton (NFA) over M is a finite directed graph A with initial and final states where the arcs are labeled with elements of M. Reading the labels of paths from initial to final states defines the accepted language L(A) ⊆ M. Definition L ⊆ M is rational if L = L(A) for some NFA. Rational = regular for f.g. free monoids. In general, rational sets are not closed under intersection. Benois (1969): Rational sets in free groups form a Boolean algebra.

11

slide-13
SLIDE 13

Automata theoretical approach

Consider a Boolean formula Φ of equations with rational constraints. The models of Φ are σ : Ω → A∗ such that σ(Φ) is true. (For a free group we wish that σ(X) is a (freely) reduced word.) We have the logic, now we need an NFA! This leads us to EDT0L and Lindenmayer systems.a

aLindenmayer (1925 – 1989)

12

slide-14
SLIDE 14

Ciobanu, D., Elder (ICALP 2015). The result is an

easy to understand algorithm for the following problem.

  • Input. An equation U = V in variables X1, . . . , Xk with rational

constraints in free groups (resp. free monoids with involution).

  • Ouput. An NFA A such that

A accepts a rational language R of endomorphisms over C∗. A ⊆ C. The alphabet C is of linear size in the input. The set of all solutions σ in reduced words is { (σ(X1), . . . , σ(Xk)) ∈ A∗ × · · · × A∗ | σ(U) = σ(V ) } = { (h(c1), . . . , h(ck)) ∈ C∗ × · · · × C∗ | h ∈ R } where c1, . . . , ck ∈ C are letters. Hence, { (σ(X1)# · · · #σ(Xk)) ∈ (A ∪ #)∗ | σ(U) = σ(V ) } is an EDT0L language of reduced words. This was previously known only for quadratic word equations by Fert´ e, Marin, S´ enizergues (2014).

13

slide-15
SLIDE 15

The finite monoid N keeping the words reduced

Define N = {1, 0} ∪ A × A to “remember first and last letters” (a, b) · (c, d) = if b = c (a, d) b = c. The monoid N has an involution by (a, b) = (b, a). Fix the morphism µ0 : A∗ → N given by µ0(#) = 0 and µ0(a) = (a, a) otherwise. µ0 respects the involution. µ0(w) = 0 if and only if either w is not reduced or contains #.

14

slide-16
SLIDE 16

A single word

Starting point: Define # = #. Replace U = V by a single word – almost a palindrome. Winit = #X1 · · · #Xk#U#V #U#V #Xk # · · · X1 #. Introduce rational constraints σ(X) / ∈

a∈A A∗aaA∗ via a

morphism µ : A∗ → N where N is the finite monoid above with zero 0 = µ(#). This ensures that solutions are in reduced words and do not use #. Definition A solution of a word W ∈ (A ∪ Ω)∗ is a morphism σ : Ω → A∗ such that σ(W) = σ(W). That is a palindrome! µσ(X) = 0 for all X ∈ Ω, ie. σ(X) is reduced without #.

15

slide-17
SLIDE 17

Preludium

The guiding example is a

linear Diophantine system

Solve AX = b, where A ∈ Zn×n, X = (X1, . . . , Xn)T , b ∈ Zn×1. The Xi are variables over natural numbers. We measure the complexity w.r.t to: n, b1 =

  • i

|bi|, A1 =

  • i,j

|aij|.

16

slide-18
SLIDE 18

How to solve linear Diophantine systems by compression?

We let V 1 be the 1-norm for vectors and matrices V . In particular, b1 =

  • i

|bi|, A1 =

  • i,j

|aij|. Without restriction we assume that b1 ≤ A1. We define the compression method with respect to a given solution x ∈ Nn×1. Attention: Of course the algorithm does not know the

  • solution. We do nondeterministic guesses! Think of a finite graph

where the vertices are all linear Diophantine systems satisfying a certain a priori space bound. The arcs transform the these systems. The space bound will depend on the system, but not on the

  • solution. If there is no solution then the algorithm cannot
  • terminate. This is soundness.

Fix any given solution x ∈ NX. If x = 0 we do nothing. Otherwise we repeat the following rounds until x = 0. Then we stop. Each round consists of the following steps.

17

slide-19
SLIDE 19

While x = 0 do

1 For all i define x′

i = xi − 1 if xi is odd and x′ i = xi otherwise.

Thus, all x′

i are even. Rewrite the system with a new vector b′

such that Ax′ = b′. Note that b′1 ≤ b1 + A1.

2 Now, all b′

i must be even. Otherwise we made a mistake and x

was not a solution.

3 Define b′′

i = b′ i/2 and x′′ i = x′ i/2. We obtain a new system

AX = b′′ with solution Ax′′ = b′′.

4 The clou: since b1 ≤ A1 we obtain

  • b′′
  • 1 =
  • b′
  • 1 /2 ≤ b1 /2 + A1 /2 ≤ A1 .

5 Rename b′′ and x′′ as b and x.

18

slide-20
SLIDE 20

Why does it work?

The compression method defines a path in the finite set of systems b + AX = Y where A is fixed and b1 ≤ A1 . There are at most An

1 such systems.

19

slide-21
SLIDE 21

Block compression in word equations

Equation (U, V ). Solution σ(U) = σ(V ) with m huge.

X Y X P

  • b2

b2 a b b2 a b2 a b4 b b2m+3 a b5 a

  • Y

Z Q

Maximal visible blocks from left to right: b4, b3, b2, b2m+8. Replace all b in these blocks by c.

X Y X P

  • c2

c2 a c c2 a c2 a c4 c c2m+3 a b5 a

  • Y

Z Q

Split Y = Y ′Y , P = P ′P, Q = Q′Q. Type θ(X) = θ(Y ′) = θ(P ′) = θ(Q′) = c.

X Y ′ Y X P ′ P

  • c2

c2 a c c2 a c2 a c4 c c2m+3 a b5 a

  • Y ′

Y Z Q′ Q

20

slide-22
SLIDE 22

Type means Xc = cX, Y ′c = cY ′, P ′c = cP ′,Q′c = cQ′

X Y ′ Y X P ′ P

  • c2

c2 a c c2 a c2 a c4 c c2m+3 a b5 a

  • Y ′

Y Z Q′ Q

Pop c2 from typed variables. Thus, Y ′ vanishes.

X Y X P ′ P

  • c2

c2 a c c2 a c2 a c2 c2 c3 c2m+1 a b5 a

  • Y

Z Q′ Q

Use Y = a and let c4,c3,c2,cµ fresh letters.

X X P ′ P

  • c4 c

c2 a c3 c2 a c2 c a cµ c2 c4 c2m+1 a b5 a

  • Z

Q′ Q

21

slide-23
SLIDE 23

Make everything even

X X P ′ P

  • c4 c

c2 a c3 c2 a c2 c a cµ c2 c4 c2m+1 a b5 a

  • Z

Q′ Q

Pop P ′ = cP ′. Compress c4c → c4, c2c → c2, cµc → cµ.

X X P ′ P

  • c4

c2 a c3 c2 a c2 a cµ c2 c4 c2m a b5 a

  • Z

Q′ Q

Compress c2 → c. This halves the exponents!

X X P ′ P

  • c4

c a c3 c a c2 a cµ c c2 cm a b5 a

  • Z

Q′ Q

Repeat until the red c vanish . . .

22

slide-24
SLIDE 24

Solving word equations

1 Forget the involution and the rational constraints. 2 Construct the NFA A using simple rules. 3 Prove soundness. 4 Prove completeness using (a modified) Je˙

z compression.

5 Modification uses the compression method for linear

Diophantine system for “block compression”.

23

slide-25
SLIDE 25

Types

Let C be a fixed extended alphabet with A ⊆ C and |C| ∈ O(|Winit|). A ⊆ B ⊆ C and X ⊆ Ω. A type is a partial mapping θ : (B ∪ X) \ A → B which defines a free partially commutative monoid M(B ∪ X, θ) = (B ∪ X)∗/ { θ(x)x = xθ(x) | x ∈ B ∪ X } . M(B) denotes the submonoid of M(B ∪ X, θ) generated by B. We have A∗ ⊆ M(B) since θ(a) is not defined for a ∈ A. M(B) and M(B ∪ X, θ) are trace monoids in the sense of Mazurkiewicz.

24

slide-26
SLIDE 26

The NFA

States are (W, B, X, θ) W = equation, the solution σ is a “palindrome” σ(W) = σ(W). B = constants with # ∈ A ⊆ B = B ⊆ C. X = variables in W. θ = partial commutation Arcs change these parameters. Following arcs allows to find all solutions.

25

slide-27
SLIDE 27

Arcs changing variables: substitution arcs

1 τ(X) = 1, remove X from W. Potentially removes partial

commutation.

2 τ(X) = aX, where a is a constant. 3 τ(X) = Y X, split X as Y X and define a type θ(Y ) = a,

where a is a constant. After that Y commutes with a. This commuting relation is used for compressing blocks aℓ into a single fresh letter aℓ.

4 There are symmetric rules for the right side.

26

slide-28
SLIDE 28

Arcs changing constants: compression arcs

Two rules, only.

1 Rename a as b. 2 Compress ab into a single letter c. This includes compressions

ab → a, ab → b, aa → a. Arcs (h(W ′), B, X, θ)

h

− → (W ′, B′, X, θ′) change the constants. Compression ab → c yields label h ∈ End(C∗) with h(c) = ab which induces a morphism h : M(B′) → M(B).

27

slide-29
SLIDE 29

The states of the NFA A of endomorphisms

Definition A state of A is a tuple P = (W, B, X, θ) such that: W ∈ M(B ∪ X, θ). |W| ∈ O(|Winit|). W is called the equation at P. Initial states (Winit, A, Ω, ∅) Final states (W, B, ∅, ∅) with W = W and #c1 · · · #ck is a prefix of W.

28

slide-30
SLIDE 30

A contains all substitution and compression arcs

Soundness of A Let h1 · · · ht be the labels of a path from an initial state P0 = (Winit, A, Ω, ∅) to a final state (W, B, ∅, ∅). Then σ(Xi) = h1 · · · ht(ci) defines a solution at P0.

29

slide-31
SLIDE 31

Complexity

Theorem The graph A can be constructed deterministically in singly exponential time via some NSPACE(n log n) algorithm which

  • utputs states and arcs which appear on paths between initial and

final vertices. The NFA A satisfies the soundness property, i.e., the corresponding EDT0L language is a subset of solutions in reduced words. Proof. The complexity statement is trivial by standard methods. Soundness was stated above.

30

slide-32
SLIDE 32

“Then a miracle occurs” (cf. S. Harris): completenes

By soundness of the NFA A it remains to prove the following purely existential statement Theorem Let (idA∗, σ) be a solution at an initial vertex (Winit, A, Ω, ∅). Then there exists a path inside A to a some final vertex. Proof. Iterate block compression and pair compression based on the method of Je˙ z presented at STACS 2013. Details are on arXiv.

31

slide-33
SLIDE 33

“Then a miracle occurs” (cf. S. Harris): completenes

By the soundness of the NFA A it remains to prove the following purely existential statement: Theorem Let (idA∗, σ) be a solution at an initial vertex (Winit, A, Ω, ∅). Then there exists a path inside A to some final vertex. Proof. Iterate block compression and pair compression based on the method of Je˙ z presented at STACS 2013. Details are on arXiv.

This is the end. Thank you.

slide-34
SLIDE 34

Related Literature.

  • A. V. Aho.

Indexed grammars—an extension of context-free grammars.

  • J. Assoc. Comput. Mach., 15:647–671, 1968.
  • P. R. Asveld.

Controlled iteration grammars and full hyper-AFL’s. Information and Control, 34(3):248 – 269, 1977.

  • M. Benois.

Parties rationelles du groupe libre.

  • C. R. Acad. Sci. Paris, S´
  • er. A, 269:1188–1190, 1969.
  • V. Diekert, C. Guti´

errez, and Ch. Hagenah. The existential theory of equations with rational constraints in free groups is PSPACE-complete. Information and Computation, 202:105–140, 2005. Conference version in STACS 2001.

slide-35
SLIDE 35
  • V. Diekert, A. Je˙

z, and W. Plandowski. Finding all solutions of equations in free groups and monoids with involution.

  • Proc. CSR 2014 LNCS8476: 1–15, 2014.
  • A. Ehrenfeucht and G. Rozenberg.

On some context free languages that are not deterministic ET0L languages. RAIRO Theor. Inform. Appl., 11:273–291, 1977.

  • S. Eilenberg.

Automata, Languages, and Machines, Vol A.

  • Acad. Press, 1974.
  • J. Fert´

e, N. Marin, and G. S´ enizergues. Word-mappings of level 2. Theory Comput. Syst., 54:111–148, 2014.

  • R. H. Gilman.

Personal communication, 2012.

slide-36
SLIDE 36
  • A. Je˙

z. Recompression: a simple and powerful technique for word equations.

  • Proc. STACS. LIPIcs, 20:233–244, 2013. Journal version to

appear in JACM

  • O. Kharlampovich and A. Myasnikov.

Elementary theory of free non-abelian groups.

  • J. of Algebra, 302:451–552, 2006.
  • A. G. Myasnikov and V. Roman’kov.

On rationality of verbal subsets in a group. Theory Comput. Syst., 52:587–598, 2013.

  • W. Plandowski.

An efficient algorithm for solving word equations.

  • Proc. STOC’06: 467–476. ACM Press, 2006.
  • W. Plandowski.

personal communication, 2014.

slide-37
SLIDE 37
  • W. Plandowski and W. Rytter.

Application of Lempel-Ziv encodings to the solution of word equations.

  • Proc. ICALP’98. LNCS1443: 731–742, 1998.
  • A. A. Razborov.

On systems of equations in free groups. In Combinatorial and Geometric Group Theory, pages 269–283. Cambridge University Press, 1994.

  • G. Rozenberg and A. Salomaa.

The Book of L. Springer, 1986.

  • G. Rozenberg et al. (Eds.)

Handbook of Formal Languages, Vol 1. Springer, 1997.

  • Z. Sela.

Diophantine geometry over groups VIII: Stability. Annals of Math., 177:787–868, 2013.