WORD EQUATIONS WITH A FIXED VECTOR OF LENGTHS Ji Skora Department - - PowerPoint PPT Presentation

word equations with a fixed vector of lengths
SMART_READER_LITE
LIVE PREVIEW

WORD EQUATIONS WITH A FIXED VECTOR OF LENGTHS Ji Skora Department - - PowerPoint PPT Presentation

WORD EQUATIONS WITH A FIXED VECTOR OF LENGTHS Ji Skora Department of Algebra Faculty of Mathematics and Physics Charles University in Prague June 20, 2014 Ji Skora WORD EQUATIONS WITH A FIXED VECTOR OF Word equations Two


slide-1
SLIDE 1

WORD EQUATIONS WITH A FIXED VECTOR OF LENGTHS

Jiří Sýkora

Department of Algebra Faculty of Mathematics and Physics Charles University in Prague

June 20, 2014

Jiří Sýkora WORD EQUATIONS WITH A FIXED VECTOR OF

slide-2
SLIDE 2

Word equations

Two alphabets: A – constants, Θ – variables Equation: (u, v) ∈ (A ∪ Θ)∗ × (A ∪ Θ)∗, often denoted u = v Solution: a morphism α : (A ∪ Θ)∗ → A∗ such that α(a) = a for a ∈ A and α(u) = α(v)

Jiří Sýkora WORD EQUATIONS WITH A FIXED VECTOR OF

slide-3
SLIDE 3

Word equations

Two alphabets: A – constants, Θ – variables Equation: (u, v) ∈ (A ∪ Θ)∗ × (A ∪ Θ)∗, often denoted u = v Solution: a morphism α : (A ∪ Θ)∗ → A∗ such that α(a) = a for a ∈ A and α(u) = α(v)

Jiří Sýkora WORD EQUATIONS WITH A FIXED VECTOR OF

slide-4
SLIDE 4

Word equations

Two alphabets: A – constants, Θ – variables Equation: (u, v) ∈ (A ∪ Θ)∗ × (A ∪ Θ)∗, often denoted u = v Solution: a morphism α : (A ∪ Θ)∗ → A∗ such that α(a) = a for a ∈ A and α(u) = α(v)

Jiří Sýkora WORD EQUATIONS WITH A FIXED VECTOR OF

slide-5
SLIDE 5

The problem

Solvability of equations: decidable (Makanin) What if the lengths of variables are prescribed?

Jiří Sýkora WORD EQUATIONS WITH A FIXED VECTOR OF

slide-6
SLIDE 6

The problem

Solvability of equations: decidable (Makanin) What if the lengths of variables are prescribed?

Jiří Sýkora WORD EQUATIONS WITH A FIXED VECTOR OF

slide-7
SLIDE 7

Vector of lenghts

Let Θ = {x1, . . . , xk}. Let (u, v) be an equation and α its solution. The tuple ¯ v = (l1, . . . , lk) of non-negative integers is the vector of lengths of α if |α(xi)| = li for all i ∈ {1, . . . , k}.

Jiří Sýkora WORD EQUATIONS WITH A FIXED VECTOR OF

slide-8
SLIDE 8

Vector of lenghts

Let Θ = {x1, . . . , xk}. Let (u, v) be an equation and α its solution. The tuple ¯ v = (l1, . . . , lk) of non-negative integers is the vector of lengths of α if |α(xi)| = li for all i ∈ {1, . . . , k}.

Jiří Sýkora WORD EQUATIONS WITH A FIXED VECTOR OF

slide-9
SLIDE 9

Vector of lenghts

Let Θ = {x1, . . . , xk}. Let (u, v) be an equation and α its solution. The tuple ¯ v = (l1, . . . , lk) of non-negative integers is the vector of lengths of α if |α(xi)| = li for all i ∈ {1, . . . , k}.

Jiří Sýkora WORD EQUATIONS WITH A FIXED VECTOR OF

slide-10
SLIDE 10

The problem

An equation (u, v) and a vector ¯ v = (l1, . . . , lk) are given. The question: Is there a solution α of (u, v) such that ¯ v is its vector of lengths? The answer: There exists a polynomial-time algorithm that solves the problem. (The vector is given in binary.) Based on ideas and methods by Plandowski and Rytter.

Jiří Sýkora WORD EQUATIONS WITH A FIXED VECTOR OF

slide-11
SLIDE 11

The problem

An equation (u, v) and a vector ¯ v = (l1, . . . , lk) are given. The question: Is there a solution α of (u, v) such that ¯ v is its vector of lengths? The answer: There exists a polynomial-time algorithm that solves the problem. (The vector is given in binary.) Based on ideas and methods by Plandowski and Rytter.

Jiří Sýkora WORD EQUATIONS WITH A FIXED VECTOR OF

slide-12
SLIDE 12

The problem

An equation (u, v) and a vector ¯ v = (l1, . . . , lk) are given. The question: Is there a solution α of (u, v) such that ¯ v is its vector of lengths? The answer: There exists a polynomial-time algorithm that solves the problem. (The vector is given in binary.) Based on ideas and methods by Plandowski and Rytter.

Jiří Sýkora WORD EQUATIONS WITH A FIXED VECTOR OF

slide-13
SLIDE 13

The problem

An equation (u, v) and a vector ¯ v = (l1, . . . , lk) are given. The question: Is there a solution α of (u, v) such that ¯ v is its vector of lengths? The answer: There exists a polynomial-time algorithm that solves the problem. (The vector is given in binary.) Based on ideas and methods by Plandowski and Rytter.

Jiří Sýkora WORD EQUATIONS WITH A FIXED VECTOR OF

slide-14
SLIDE 14

Relation on positions

Let (u, v) be an equation, where u = u1 . . . us and v = v1 . . . vt. (ui, vi ∈ (A ∪ Θ)) Let ¯ v = (l1, . . . , lk) be a vector. Define a morphism L : (A ∪ Θ)∗ → N0: L(a) = 1 for each a ∈ A, L(xi) = li. We may suppose that L(u1 . . . us) = L(v1 . . . vt). For j ∈ {1, . . . , |L(u1 . . . us)|} we define uj = up+1, where |L(u1 . . . up)| < j ≤ |L(u1 . . . up+1)| and l(j) = j − |L(u1 . . . up)|. We define v(j) and r(j) analogically (based on the right-hand side).

Jiří Sýkora WORD EQUATIONS WITH A FIXED VECTOR OF

slide-15
SLIDE 15

Relation on positions

Let (u, v) be an equation, where u = u1 . . . us and v = v1 . . . vt. (ui, vi ∈ (A ∪ Θ)) Let ¯ v = (l1, . . . , lk) be a vector. Define a morphism L : (A ∪ Θ)∗ → N0: L(a) = 1 for each a ∈ A, L(xi) = li. We may suppose that L(u1 . . . us) = L(v1 . . . vt). For j ∈ {1, . . . , |L(u1 . . . us)|} we define uj = up+1, where |L(u1 . . . up)| < j ≤ |L(u1 . . . up+1)| and l(j) = j − |L(u1 . . . up)|. We define v(j) and r(j) analogically (based on the right-hand side).

Jiří Sýkora WORD EQUATIONS WITH A FIXED VECTOR OF

slide-16
SLIDE 16

Relation on positions

Let (u, v) be an equation, where u = u1 . . . us and v = v1 . . . vt. (ui, vi ∈ (A ∪ Θ)) Let ¯ v = (l1, . . . , lk) be a vector. Define a morphism L : (A ∪ Θ)∗ → N0: L(a) = 1 for each a ∈ A, L(xi) = li. We may suppose that L(u1 . . . us) = L(v1 . . . vt). For j ∈ {1, . . . , |L(u1 . . . us)|} we define uj = up+1, where |L(u1 . . . up)| < j ≤ |L(u1 . . . up+1)| and l(j) = j − |L(u1 . . . up)|. We define v(j) and r(j) analogically (based on the right-hand side).

Jiří Sýkora WORD EQUATIONS WITH A FIXED VECTOR OF

slide-17
SLIDE 17

Relation on positions

Let (u, v) be an equation, where u = u1 . . . us and v = v1 . . . vt. (ui, vi ∈ (A ∪ Θ)) Let ¯ v = (l1, . . . , lk) be a vector. Define a morphism L : (A ∪ Θ)∗ → N0: L(a) = 1 for each a ∈ A, L(xi) = li. We may suppose that L(u1 . . . us) = L(v1 . . . vt). For j ∈ {1, . . . , |L(u1 . . . us)|} we define uj = up+1, where |L(u1 . . . up)| < j ≤ |L(u1 . . . up+1)| and l(j) = j − |L(u1 . . . up)|. We define v(j) and r(j) analogically (based on the right-hand side).

Jiří Sýkora WORD EQUATIONS WITH A FIXED VECTOR OF

slide-18
SLIDE 18

Relation on positions

Let (u, v) be an equation, where u = u1 . . . us and v = v1 . . . vt. (ui, vi ∈ (A ∪ Θ)) Let ¯ v = (l1, . . . , lk) be a vector. Define a morphism L : (A ∪ Θ)∗ → N0: L(a) = 1 for each a ∈ A, L(xi) = li. We may suppose that L(u1 . . . us) = L(v1 . . . vt). For j ∈ {1, . . . , |L(u1 . . . us)|} we define uj = up+1, where |L(u1 . . . up)| < j ≤ |L(u1 . . . up+1)| and l(j) = j − |L(u1 . . . up)|. We define v(j) and r(j) analogically (based on the right-hand side).

Jiří Sýkora WORD EQUATIONS WITH A FIXED VECTOR OF

slide-19
SLIDE 19

Relation on positions

Let (u, v) be an equation, where u = u1 . . . us and v = v1 . . . vt. (ui, vi ∈ (A ∪ Θ)) Let ¯ v = (l1, . . . , lk) be a vector. Define a morphism L : (A ∪ Θ)∗ → N0: L(a) = 1 for each a ∈ A, L(xi) = li. We may suppose that L(u1 . . . us) = L(v1 . . . vt). For j ∈ {1, . . . , |L(u1 . . . us)|} we define uj = up+1, where |L(u1 . . . up)| < j ≤ |L(u1 . . . up+1)| and l(j) = j − |L(u1 . . . up)|. We define v(j) and r(j) analogically (based on the right-hand side).

Jiří Sýkora WORD EQUATIONS WITH A FIXED VECTOR OF

slide-20
SLIDE 20

Relation on positions II

Definition Put left(j) =

  • (l(j), u(j))

if u(j) is a variable, (j, u(j))

  • therwise;

right(j) =

  • (r(j), v(j))

if v(j) is a variable, (j, v(j))

  • therwise.

Definition Define a relation R′: iR′j iff left(i) = left(j) or right(i) = right(j) or left(i) = right(j) or right(i) = left(j). Finally, define an equivalence R as the transitive closure of R′.

Jiří Sýkora WORD EQUATIONS WITH A FIXED VECTOR OF

slide-21
SLIDE 21

Relation on positions II

Definition Put left(j) =

  • (l(j), u(j))

if u(j) is a variable, (j, u(j))

  • therwise;

right(j) =

  • (r(j), v(j))

if v(j) is a variable, (j, v(j))

  • therwise.

Definition Define a relation R′: iR′j iff left(i) = left(j) or right(i) = right(j) or left(i) = right(j) or right(i) = left(j). Finally, define an equivalence R as the transitive closure of R′.

Jiří Sýkora WORD EQUATIONS WITH A FIXED VECTOR OF

slide-22
SLIDE 22

Relation on positions II

Definition Put left(j) =

  • (l(j), u(j))

if u(j) is a variable, (j, u(j))

  • therwise;

right(j) =

  • (r(j), v(j))

if v(j) is a variable, (j, v(j))

  • therwise.

Definition Define a relation R′: iR′j iff left(i) = left(j) or right(i) = right(j) or left(i) = right(j) or right(i) = left(j). Finally, define an equivalence R as the transitive closure of R′.

Jiří Sýkora WORD EQUATIONS WITH A FIXED VECTOR OF

slide-23
SLIDE 23

Solvability

Proposition If α is a solution of the equation such that ¯ v is the vector of lengths

  • f α, it holds iRj ⇒ α(u)[i] = α(u)[j].

Proposition The following are equivalent:

1 there is a solution α of the equation such that ¯

v is its vector of lengths;

2 (a) L(u1 . . . us) = L(v1 . . . vt) and

(b) for all iRj such that u(i) = a ∈ A, u(j) = b ∈ A or u(i) = a ∈ A, v(j) = b ∈ A or v(i) = a ∈ A, u(j) = b ∈ A or v(i) = a ∈ A, v(j) = b ∈ A , it holds a = b.

Jiří Sýkora WORD EQUATIONS WITH A FIXED VECTOR OF

slide-24
SLIDE 24

Solvability

Proposition If α is a solution of the equation such that ¯ v is the vector of lengths

  • f α, it holds iRj ⇒ α(u)[i] = α(u)[j].

Proposition The following are equivalent:

1 there is a solution α of the equation such that ¯

v is its vector of lengths;

2 (a) L(u1 . . . us) = L(v1 . . . vt) and

(b) for all iRj such that u(i) = a ∈ A, u(j) = b ∈ A or u(i) = a ∈ A, v(j) = b ∈ A or v(i) = a ∈ A, u(j) = b ∈ A or v(i) = a ∈ A, v(j) = b ∈ A , it holds a = b.

Jiří Sýkora WORD EQUATIONS WITH A FIXED VECTOR OF

slide-25
SLIDE 25

Solvability

Proposition If α is a solution of the equation such that ¯ v is the vector of lengths

  • f α, it holds iRj ⇒ α(u)[i] = α(u)[j].

Proposition The following are equivalent:

1 there is a solution α of the equation such that ¯

v is its vector of lengths;

2 (a) L(u1 . . . us) = L(v1 . . . vt) and

(b) for all iRj such that u(i) = a ∈ A, u(j) = b ∈ A or u(i) = a ∈ A, v(j) = b ∈ A or v(i) = a ∈ A, u(j) = b ∈ A or v(i) = a ∈ A, v(j) = b ∈ A , it holds a = b.

Jiří Sýkora WORD EQUATIONS WITH A FIXED VECTOR OF

slide-26
SLIDE 26

Example

Example Let Θ = {x, y, z}. Then the equation (axzxb, yxy) has no solution with the vector of lengths (2, 3, 2). In this case, we have 8R′3R′7R′2R′6R′1, because right(8) = (3, y) = right(3), left(3) = (2, x) = left(7), right(7) = (2, y) = right(2), left(2) = (1, x) = left(6), right(6) = (1, y) = right(1). Thus 1R8, but we have u(1) = a and u(8) = b. Example However, the same equation (axzxb, yxy) has a solution with the vector of lengths (2, 4, 4). We have [1]R = {1, 7} and [10]R = {4, 10}. Hence, we may define a solution α as follows: α(x) = aa, α(y) = aaab, α(z) = baaa.

Jiří Sýkora WORD EQUATIONS WITH A FIXED VECTOR OF

slide-27
SLIDE 27

Example

Example Let Θ = {x, y, z}. Then the equation (axzxb, yxy) has no solution with the vector of lengths (2, 3, 2). In this case, we have 8R′3R′7R′2R′6R′1, because right(8) = (3, y) = right(3), left(3) = (2, x) = left(7), right(7) = (2, y) = right(2), left(2) = (1, x) = left(6), right(6) = (1, y) = right(1). Thus 1R8, but we have u(1) = a and u(8) = b. Example However, the same equation (axzxb, yxy) has a solution with the vector of lengths (2, 4, 4). We have [1]R = {1, 7} and [10]R = {4, 10}. Hence, we may define a solution α as follows: α(x) = aa, α(y) = aaab, α(z) = baaa.

Jiří Sýkora WORD EQUATIONS WITH A FIXED VECTOR OF

slide-28
SLIDE 28

Relation on intervals

Definition leftn(j) =

  • (l(j), u(j))

if l(j) < l(j + 1) < · · · < l(j + n − 1), (j, u(j))

  • therwise;

rightn(j) =

  • (r(j), v(j))

if r(j) < r(j + 1) < · · · < r(j + n − 1), (j, v(j))

  • therwise.

Definition Define Rn as the transitive closure of the relation R′

n defined as

follows: iR′

nj iff leftn(i) = leftn(j) or rightn(i) = rightn(j) or

leftn(i) = rightn(j) or rightn(i) = leftn(j).

Jiří Sýkora WORD EQUATIONS WITH A FIXED VECTOR OF

slide-29
SLIDE 29

Relation on intervals

Definition leftn(j) =

  • (l(j), u(j))

if l(j) < l(j + 1) < · · · < l(j + n − 1), (j, u(j))

  • therwise;

rightn(j) =

  • (r(j), v(j))

if r(j) < r(j + 1) < · · · < r(j + n − 1), (j, v(j))

  • therwise.

Definition Define Rn as the transitive closure of the relation R′

n defined as

follows: iR′

nj iff leftn(i) = leftn(j) or rightn(i) = rightn(j) or

leftn(i) = rightn(j) or rightn(i) = leftn(j).

Jiří Sýkora WORD EQUATIONS WITH A FIXED VECTOR OF

slide-30
SLIDE 30

Relation on intervals II

Definition Define Rn in the following way: iRnj iff iRj, (i + 1)R(j + 1), . . . , (i + n − 1)R(j + n − 1). Remark For each n, we have Rn ⊆ Rn and for n = 1, we obtain R1 = R = R1.

Jiří Sýkora WORD EQUATIONS WITH A FIXED VECTOR OF

slide-31
SLIDE 31

Relation on intervals II

Definition Define Rn in the following way: iRnj iff iRj, (i + 1)R(j + 1), . . . , (i + n − 1)R(j + n − 1). Remark For each n, we have Rn ⊆ Rn and for n = 1, we obtain R1 = R = R1.

Jiří Sýkora WORD EQUATIONS WITH A FIXED VECTOR OF

slide-32
SLIDE 32

Cuts

Definition A cut is an ordered pair (i, i + 1), i ∈ {0, . . . , L(u)}, such that either i = 0 or i + 1 = L(u) + 1 or l(i) ≥ l(i + 1) or r(i) ≥ r(i + 1). Definition Let β = (i, i + 1) be a cut. The intervals lk(β) = [i − 2k + 1, i] and rk(β) = [i + 1, i + 2k] are called characteristic intervals of rank k belonging to β. We define the active interval of rank k belonging to β as the interval

  • max
  • i − 2k + 1, 1
  • , min
  • i + 2k, L(u)
  • and denote it AIk(β).

Definition Denote by Sn (Sn) the relation R2n (R2n) restricted to positions i such that the whole interval [i, i + 2n − 1] lies in AIk(β) for some cut β.

Jiří Sýkora WORD EQUATIONS WITH A FIXED VECTOR OF

slide-33
SLIDE 33

Cuts

Definition A cut is an ordered pair (i, i + 1), i ∈ {0, . . . , L(u)}, such that either i = 0 or i + 1 = L(u) + 1 or l(i) ≥ l(i + 1) or r(i) ≥ r(i + 1). Definition Let β = (i, i + 1) be a cut. The intervals lk(β) = [i − 2k + 1, i] and rk(β) = [i + 1, i + 2k] are called characteristic intervals of rank k belonging to β. We define the active interval of rank k belonging to β as the interval

  • max
  • i − 2k + 1, 1
  • , min
  • i + 2k, L(u)
  • and denote it AIk(β).

Definition Denote by Sn (Sn) the relation R2n (R2n) restricted to positions i such that the whole interval [i, i + 2n − 1] lies in AIk(β) for some cut β.

Jiří Sýkora WORD EQUATIONS WITH A FIXED VECTOR OF

slide-34
SLIDE 34

Cuts

Definition A cut is an ordered pair (i, i + 1), i ∈ {0, . . . , L(u)}, such that either i = 0 or i + 1 = L(u) + 1 or l(i) ≥ l(i + 1) or r(i) ≥ r(i + 1). Definition Let β = (i, i + 1) be a cut. The intervals lk(β) = [i − 2k + 1, i] and rk(β) = [i + 1, i + 2k] are called characteristic intervals of rank k belonging to β. We define the active interval of rank k belonging to β as the interval

  • max
  • i − 2k + 1, 1
  • , min
  • i + 2k, L(u)
  • and denote it AIk(β).

Definition Denote by Sn (Sn) the relation R2n (R2n) restricted to positions i such that the whole interval [i, i + 2n − 1] lies in AIk(β) for some cut β.

Jiří Sýkora WORD EQUATIONS WITH A FIXED VECTOR OF

slide-35
SLIDE 35

The algorithm

1 Put l = ⌊log(L(u)⌋. 2 While l > 0 do:

(a) For each i that is the beginning of a characteristic interval

  • f rank l, construct a set [i]l. This construction is based on

the sets [j]l+1 and occurrences of variables x such that 2l ≤ |x| < 2l+1. Moreover [i]Sl ⊆ [i]l ⊆ [i]Sl. (b) Reduce l by one.

3 For each pair of constants a = b in the equation, verify that

their corresponding positions are not in the same set [i]0. If this is true, return solvable; otherwise return not solvable.

Jiří Sýkora WORD EQUATIONS WITH A FIXED VECTOR OF

slide-36
SLIDE 36

The algorithm

1 Put l = ⌊log(L(u)⌋. 2 While l > 0 do:

(a) For each i that is the beginning of a characteristic interval

  • f rank l, construct a set [i]l. This construction is based on

the sets [j]l+1 and occurrences of variables x such that 2l ≤ |x| < 2l+1. Moreover [i]Sl ⊆ [i]l ⊆ [i]Sl. (b) Reduce l by one.

3 For each pair of constants a = b in the equation, verify that

their corresponding positions are not in the same set [i]0. If this is true, return solvable; otherwise return not solvable.

Jiří Sýkora WORD EQUATIONS WITH A FIXED VECTOR OF

slide-37
SLIDE 37

The algorithm

1 Put l = ⌊log(L(u)⌋. 2 While l > 0 do:

(a) For each i that is the beginning of a characteristic interval

  • f rank l, construct a set [i]l. This construction is based on

the sets [j]l+1 and occurrences of variables x such that 2l ≤ |x| < 2l+1. Moreover [i]Sl ⊆ [i]l ⊆ [i]Sl. (b) Reduce l by one.

3 For each pair of constants a = b in the equation, verify that

their corresponding positions are not in the same set [i]0. If this is true, return solvable; otherwise return not solvable.

Jiří Sýkora WORD EQUATIONS WITH A FIXED VECTOR OF

slide-38
SLIDE 38

Key fact

Fact The set of the beginnings of occurences of a word w inside a word z such that |w| ≤ |z| ≤ 2 · |w| forms an arithmetic progression.

Jiří Sýkora WORD EQUATIONS WITH A FIXED VECTOR OF

slide-39
SLIDE 39

Thank you for your attention!

Jiří Sýkora WORD EQUATIONS WITH A FIXED VECTOR OF