solutions of twisted word equations, edt0l languages, and context-free groups Volker Diekert, Universität Stuttgart Murray Elder, University of Technology Sydney ICALP 2017
equations Let A = A−1 , X = X −1 be finite sets. An equation in the free group ∗ F(A) is an expression U = V where U, V ∈ (X ∪ A) . Eg: baYX = aXYb
2
equations Let A = A−1 , X = X −1 be finite sets. An equation in the free group ∗ F(A) is an expression U = V where U, V ∈ (X ∪ A) . Eg: baYX = aXYb ∗
An A-map is a map σ : (X ∪ A) −→ A∗ with σ|A = idA . A solution to an equation is an A-map σ such that σ(U) =F(A) σ(V).
2
equations Let A = A−1 , X = X −1 be finite sets. An equation in the free group ∗ F(A) is an expression U = V where U, V ∈ (X ∪ A) . Eg: baYX = aXYb ∗
An A-map is a map σ : (X ∪ A) −→ A∗ with σ|A = idA . A solution to an equation is an A-map σ such that σ(U) =F(A) σ(V). Eg: X −→
Y −→
2
application
Defn: H is malnormal in G if yxy−1 ̸∈ H for all x ∈ H \ {1}, y ̸∈ H.
3
application
Defn: H is malnormal in G if yxy−1 ̸∈ H for all x ∈ H \ {1}, y ̸∈ H. Deciding malnormality is an equation with constraints: Z = YXY−1 ;
Z ∈ H,
X ∈ H \ {1},
Y ̸∈ H
3
application
Defn: H is malnormal in G if yxy−1 ̸∈ H for all x ∈ H \ {1}, y ̸∈ H. Deciding malnormality is an equation with constraints: Z = YXY−1 ;
Z ∈ H,
X ∈ H \ {1},
Y ̸∈ H
Eg: let H be a finitely generated subgroup of a free group. Then Z ∈ H, Y ̸∈ H are rational constraints (thanks to Stallings graphs).
3
free groups to monoids Step 1. Triangulate
4
free groups to monoids Step 1. Triangulate Step 2. XY =F(A) Z iff X = PQ, Y = QR, Z = PR; X, Y, Z, P, Q, R reduced 1 P Q X
R Y
Z
4
twisted equations Let A, X be finite sets with involution, and G ≤ Aut(A∗ ). A twisted ∗ equation is an expression U = V where U, V ∈ (G × (X ∪ A)) .
5
twisted equations Let A, X be finite sets with involution, and G ≤ Aut(A∗ ). A twisted ∗ equation is an expression U = V where U, V ∈ (G × (X ∪ A)) . Eg: (1, Z)(g, Y) = (h, X)(f, Z)
5
twisted equations Let A, X be finite sets with involution, and G ≤ Aut(A∗ ). A twisted ∗ equation is an expression U = V where U, V ∈ (G × (X ∪ A)) . Eg: (1, Z)(g, Y) = (h, X)(f, Z) An A-map σ : (X ∪ A)∗ −→ A∗ extends to σ ˜ : (G × (X ∪ A))∗ −→ A∗ by defining σ ˜ ((f, x)) = f(σ(x)) for all x ∈ X ∪ A.
5
twisted equations Let A, X be finite sets with involution, and G ≤ Aut(A∗ ). A twisted ∗ equation is an expression U = V where U, V ∈ (G × (X ∪ A)) . Eg: (1, Z)(g, Y) = (h, X)(f, Z) An A-map σ : (X ∪ A)∗ −→ A∗ extends to σ ˜ : (G × (X ∪ A))∗ −→ A∗ by defining σ ˜ ((f, x)) = f(σ(x)) for all x ∈ X ∪ A. A solution to a twisted equation is an A-map σ with σ(X) = σ(X) and σ ˜ (U) =A∗ σ ˜ (V)
5
example
(1, Z)(g, Y) = (h, X)(f, Z)
Z
Y
↓1
↓g
↑h
↑f
X
Z
6
example
(1, Z)(g, Y) = (h, X)(f, Z)
Z
Y
↓1
↓g
↑h
↑f
X
Z
G is a finite group, so f, f2 , f3 , . . . will repeat.
6
example
(1, Z)(g, Y) = (h, X)(f, Z)
Z
Y
↓1
↓g
↑h
↑f
X
Z
G is a finite group, so f, f2 , f3 , . . . will repeat. σ(Z) = ((rs)f(rs) · · · f|G|−1 (rs))e f0 (rs) · · · fj−1 (rs)fj (r)
6
result
Theorem (Diekert, Elder) The full solution set for twisted equations with rational constraints is an EDT0L language and can be computed in PSPACE. Moreover it is decidable (in PSPACE) whether or not the solution set is finite.
7
structure of the proof
We define moves (pop and compress) which preserve the set of solutions. Soundness: if we can apply these moves, within a certain space bound, to get an equation without variables, we recover a correct solution.
8
structure of the proof
We define moves (pop and compress) which preserve the set of solutions. Soundness: if we can apply these moves, within a certain space bound, to get an equation without variables, we recover a correct solution. Completeness: given a fixed solution, we give a deterministic algorithm which finds it using our moves within our space bound. Thus we find all solutions.
8
structure of the proof
We define moves (pop and compress) which preserve the set of solutions. Soundness: if we can apply these moves, within a certain space bound, to get an equation without variables, we recover a correct solution. Completeness: given a fixed solution, we give a deterministic algorithm which finds it using our moves within our space bound. Thus we find all solutions. EDT0L: moves and modified equations form an NFA
8
preprocessing Input: twisted equation U = V where U, V ∈ (G × (A ∪ X ))∗
9
preprocessing Input: twisted equation U = V where U, V ∈ (G × (A ∪ X ))∗ • triangulate: write U = V as a system of equations of the form X
Y
↓r
↓s ↑h
Z
9
preprocessing Input: twisted equation U = V where U, V ∈ (G × (A ∪ X ))∗ • triangulate: write U = V as a system of equations of the form X
Y
↓r
↓s ↑h
Z • rewrite maps: X ↓f=
Y
h−1 r
↓ g = h−1 s ↑1
Z
9
preprocessing • pop moves: apply X −→ uXv for |u| = |v| = L to all variables at once x1
X
x2
y1
Y
y2
↓ f
↓f
↓ f
↓ g
↓g
↓ g
↑ 1 z1
↑1
Z
↑ 1 z2
10
preprocessing • pop moves: apply X −→ uXv for |u| = |v| = L to all variables at once x1
X
x2
y1
Y
y2
↓ f
↓f
↓ f
↓ g
↓g
↓ g
↑1
↑ 1 z1
↑ 1 z2
Z
• Check f(x1 ) = z1 and g(y2 ) = z2 . If no, reject this move. Else throw ends away, and put w = f(x2 )g(y1 ) X ↓f
w ↓1
Y ↓g
↑1
Z 10
preprocessing
So, we assume our system of equations always looks like X ↓f
w ↓1
Y ↓g
↑1
Z We can pop constants left and right as long as we want, but the word in the middle will get too long. So eventually, we need to compress.
11
pair compression Say we want to compress ab inside w: X ↓f
ab ↓1
Y ↓g
↑1
Z
12
pair compression Say we want to compress ab inside w: X ↓f
ab ↓1
Y ↓g
↑1
Z Then inside Z we must compress ab as well.
12
pair compression Say we want to compress ab inside w: X
ab ↓1
↓f
Y ↓g
↑1
Z Then inside Z we must compress ab as well. But maybe another equation in the system is: Z
P
↓h
↓p ↑1 cd
Q 12
what goes wrong? X ↓f
ab ↓1
Y
Z
P
↓g
↓h
↓p ↑1
↑1
Z
cd
Q
13
what goes wrong? X ↓f
ab ↓1
Y
Z
P
↓g
↓h
↓p ↑1
↑1 cd
Z R
de
Q
S ↓q
↓h ↑1
Q
dc
13
what goes wrong? X ↓f
ab ↓1
Y
Z
P
↓g
↓h
↓p ↑1
↑1
R
Q
cd
Z de
S ↓q
↓h
Q
↓q
↑1
Q
S
cd
↓r ↑1
dc
ea
Z
13
what goes wrong? X ↓f
ab ↓1
Y
Z
P
↓g
↓h
↓p ↑1
↑1
R
Q
cd
Z de
S ↓q
↓h
Q
↓q
↑1
Q
S
cd
↓r ↑1
dc
ea
Z
• ab might be linked to an overlap — if so, don’t compress
13
what goes wrong? X ↓f
ab ↓1
Y
Z
P
↓g
↓h
↓p ↑1
↑1
R
Q
cd
Z de
S ↓q
↓h
Q
↓q
↑1
Q
S
cd
↓r ↑1
dc
ea
Z
• ab might be linked to an overlap — if so, don’t compress • some variable Z may contain eab with ab linked to ea — if so, can’t compress
13
what goes wrong? X ↓f
ab ↓1
Y
Z
P
↓g
↓h
↓p ↑1
↑1
R
Q
cd
Z de
S ↓q
↓h
Q
↓q
↑1
Q
S
cd
↓r ↑1
dc
ea
Z
• ab might be linked to an overlap — if so, don’t compress • some variable Z may contain eab with ab linked to ea — if so, can’t compress • ab might be linked to ba, and σ(Z) might contain ababababa . . . 13
key fact
We say that a word w is δ-periodic if it has some period less or equal to than δ. Lemma Let w be a δ-periodic word and w = pe r = qf s such that p, q are primitive, |p| ≤ |q| ≤ δ, 1 ̸= r ≤ p, 1 ̸= s ≤ q, and |w| ≥ 2δ. Then p = q, e = f ≥ 1, and r = s.
14
key fact
We say that a word w is δ-periodic if it has some period less or equal to than δ. Lemma Let w be a δ-periodic word and w = pe r = qf s such that p, q are primitive, |p| ≤ |q| ≤ δ, 1 ̸= r ≤ p, 1 ̸= s ≤ q, and |w| ≥ 2δ. Then p = q, e = f ≥ 1, and r = s. This means that if some periodic factor (with bounded period) appears on both sides of an equation, then the factors is identical.
14
δ-periodic compression
The lemma allows us to do the following subroutine. Step 1: pop L letters left and right of all variables.
15
δ-periodic compression
The lemma allows us to do the following subroutine. Step 1: pop L letters left and right of all variables. Step 2: check if any δ-periodic factors are partially visible. If so, compress these factors. The lemma ensures this is done in a consistent way everywhere.
15
δ-periodic compression
The lemma allows us to do the following subroutine. Step 1: pop L letters left and right of all variables. Step 2: check if any δ-periodic factors are partially visible. If so, compress these factors. The lemma ensures this is done in a consistent way everywhere. Step 3: reduce the set of current letters to only those in use.
15
completeness algorithm Step 1: deal with periodic factors — use δ-periodic compression to compress them in a consistent way.
16
completeness algorithm Step 1: deal with periodic factors — use δ-periodic compression to compress them in a consistent way. Step 2: if compressing periodic factors reduces length a lot, repeat step 1. Else there weren’t many, and step 1 might have actually increased length. But in this case not too many pairs will be linked to a periodic factor, and pair compression has a chance of working.
16
completeness algorithm Step 1: deal with periodic factors — use δ-periodic compression to compress them in a consistent way. Step 2: if compressing periodic factors reduces length a lot, repeat step 1. Else there weren’t many, and step 1 might have actually increased length. But in this case not too many pairs will be linked to a periodic factor, and pair compression has a chance of working. Step 3: do a careful version of pair compression — count how many pairs are not connected to overlap with variables or periodic factors, and prove that pair compression reduces the equation length.
16
completeness algorithm Step 1: deal with periodic factors — use δ-periodic compression to compress them in a consistent way. Step 2: if compressing periodic factors reduces length a lot, repeat step 1. Else there weren’t many, and step 1 might have actually increased length. But in this case not too many pairs will be linked to a periodic factor, and pair compression has a chance of working. Step 3: do a careful version of pair compression — count how many pairs are not connected to overlap with variables or periodic factors, and prove that pair compression reduces the equation length. Step 4: iterate steps 1-3. Length of the equations and number of new symbols in use stays bounded, and each iteration pops letters, so if there is a solution (of finite length) it will be found. 16
why twisted equations?
17
virtually free There are many different characterisations. TFAE: • H has a finite index free subgroup • the set of all words over a finite generating set equal to the identity element in H is a context-free language
18
virtually free There are many different characterisations. TFAE: • H has a finite index free subgroup • the set of all words over a finite generating set equal to the identity element in H is a context-free language • the Cayley graph of H has finite treewidth • the Cayley graph of H has decidable monadic second-order theory • H is the fundamental group of a finite graphs of finite groups
18
virtually free There are many different characterisations. TFAE: • H has a finite index free subgroup • the set of all words over a finite generating set equal to the identity element in H is a context-free language • the Cayley graph of H has finite treewidth • the Cayley graph of H has decidable monadic second-order theory • H is the fundamental group of a finite graphs of finite groups • there exists a finite directed labeled graph Y = (V(Y), E(Y)) • Y contains a distinguished vertex ⋆ ∈ V(Y), • G ≤ Aut(Y) is a finite group of graph automorphisms, • F(E(Y)) ⋊ G is a semi-direct product of a free group with free basis E(Y) and G, with elements written as [x, g] with x ∈ F(E(Y)), g ∈ G, • H is the subgroup of F(E(Y)) ⋊ G consisting of elements of the form [w, g] where w ∈ F(E(Y)) labels a path from ⋆ to g⋆ in Y. 18
virtually free Using the last characterisation, an equation (with rational constraints) of size n over H gives a system of twisted equations with rational constraints over the free monoid with involution F(E), linear in n, with the same (reduced normal form) solution set.
19
virtually free Using the last characterisation, an equation (with rational constraints) of size n over H gives a system of twisted equations with rational constraints over the free monoid with involution F(E), linear in n, with the same (reduced normal form) solution set. Thus, solving equations over virtually free groups reduces to solving systems of twisted equations with rational constraints.
19
virtually free Using the last characterisation, an equation (with rational constraints) of size n over H gives a system of twisted equations with rational constraints over the free monoid with involution F(E), linear in n, with the same (reduced normal form) solution set. Thus, solving equations over virtually free groups reduces to solving systems of twisted equations with rational constraints. Theorem (Diekert, Elder) The full solution set for equations with rational constraints in a virtually free group is an EDT0L language and can be computed in PSPACE. Moreover it is decidable (in PSPACE) whether or not the solution set is finite. 19
Thank you
20
references
F. Dahmani and V. Guirardel. Foliations for solving equations in groups: free, virtually free, and hyperbolic groups. J. Topol., 3(2):343–404, 2010. M. Lohrey and G. Sénizergues. Theories of HNN-extensions and amalgamated products. In Automata, languages and programming. Part II, volume 4052 of Lecture Notes in Comput. Sci., pages 504–515. Springer, Berlin, 2006.
21