Local recompression Word Equations and Beyond Artur Je Max Planck - - PowerPoint PPT Presentation

local recompression word equations and beyond
SMART_READER_LITE
LIVE PREVIEW

Local recompression Word Equations and Beyond Artur Je Max Planck - - PowerPoint PPT Presentation

Local recompression Word Equations and Beyond Artur Je Max Planck Institute for Informatics 21 June 2013 21 June 2013 1/32 Word Equations Definition Given equation U = V , where U , V ( X ) . Is there an assignment S : X


slide-1
SLIDE 1

Local recompression Word Equations and Beyond

Artur Jeż

Max Planck Institute for Informatics

21 June 2013 21 June 2013 1/32

slide-2
SLIDE 2

Word Equations

Definition

Given equation U = V , where U, V ∈ (Σ ∪ X)∗. Is there an assignment S : X → Σ∗ satisfying the solution?

21 June 2013 2/32

slide-3
SLIDE 3

Word Equations

Definition

Given equation U = V , where U, V ∈ (Σ ∪ X)∗. Is there an assignment S : X → Σ∗ satisfying the solution? Considered to be important – unification – equations in free semigroup – interesting in general – (helpful in equations in free group) . . . and hard

21 June 2013 2/32

slide-4
SLIDE 4

Word Equations

Definition

Given equation U = V , where U, V ∈ (Σ ∪ X)∗. Is there an assignment S : X → Σ∗ satisfying the solution? Considered to be important – unification – equations in free semigroup – interesting in general – (helpful in equations in free group) . . . and hard Is this decidable at all?

21 June 2013 2/32

slide-5
SLIDE 5

Makanin’s algorithm

Makanin 1977

Rewriting procedure. Difficult termination.

21 June 2013 3/32

slide-6
SLIDE 6

Makanin’s algorithm

Makanin 1977

Rewriting procedure. Difficult termination.

Improved over the years

Jaffar [1990] Schulz [1990] 4-NEXPTIME Kościelski and Pacholski 3-NEXPTIME [1990] Diekert to 2-EXPSPACE [unpublished] Gutiérrez EXPSPACE [1998].

21 June 2013 3/32

slide-7
SLIDE 7

Makanin’s algorithm

Makanin 1977

Rewriting procedure. Difficult termination.

Improved over the years

Jaffar [1990] Schulz [1990] 4-NEXPTIME Kościelski and Pacholski 3-NEXPTIME [1990] Diekert to 2-EXPSPACE [unpublished] Gutiérrez EXPSPACE [1998]. Only NP-hard.

21 June 2013 3/32

slide-8
SLIDE 8

New approach

Theorem (Plandowski and Rytter, 1998)

Length minimal solution of length N is compressible into poly(log N). This yields a poly(n, log N) algorithm.

21 June 2013 4/32

slide-9
SLIDE 9

New approach

Theorem (Plandowski and Rytter, 1998)

Length minimal solution of length N is compressible into poly(log N). This yields a poly(n, log N) algorithm. N is only known to be triply exponential (from Makanin’s algorithm).

21 June 2013 4/32

slide-10
SLIDE 10

New approach

Theorem (Plandowski and Rytter, 1998)

Length minimal solution of length N is compressible into poly(log N). This yields a poly(n, log N) algorithm. N is only known to be triply exponential (from Makanin’s algorithm).

Theorem (Plandowski 1999)

The size N of the minimal solution is at most doubly exponential. This yields a NEXPTIME algorithm.

21 June 2013 4/32

slide-11
SLIDE 11

New approach

Theorem (Plandowski and Rytter, 1998)

Length minimal solution of length N is compressible into poly(log N). This yields a poly(n, log N) algorithm. N is only known to be triply exponential (from Makanin’s algorithm).

Theorem (Plandowski 1999)

The size N of the minimal solution is at most doubly exponential. This yields a NEXPTIME algorithm.

Theorem (Plandowski 1999)

PSPACE algorithm.

21 June 2013 4/32

slide-12
SLIDE 12

This talk

A simple and natural technique of local recompression.

21 June 2013 5/32

slide-13
SLIDE 13

This talk

A simple and natural technique of local recompression. Yields a non-deterministic algorithm for word equations linear space (improving Plandowski PSPACE algorithm), NLinSPACE(n) poly(n, log N) time (improving Plandowski and Rytter algorithm) can be used to prove exponential bound on exponent of periodicity can be used to show the doubly-exponential bound on N can be easily generalised to generator of all solutions for one variable becomes deterministic and runs in O(n)

21 June 2013 5/32

slide-14
SLIDE 14

Equality and Compression of Strings

a a a a b b a b c a b b a b c a b a a a a b b a b c a b b a b c a b

21 June 2013 6/32

slide-15
SLIDE 15

Equality and Compression of Strings

a a a a b b a b c a b b a b c a b a a a a b b a b c a b b a b c a b

21 June 2013 6/32

slide-16
SLIDE 16

Equality and Compression of Strings

a3 a b b a b c a b b a b c a b a3 a b b a b c a b b a b c a b

21 June 2013 6/32

slide-17
SLIDE 17

Equality and Compression of Strings

a3 a b b a b c a b2 a b c a b a3 a b b a b c a b2 a b c a b

21 June 2013 6/32

slide-18
SLIDE 18

Equality and Compression of Strings

a3 d b c a b2 c a b a3 b c a b2 c a b d d d d d

21 June 2013 6/32

slide-19
SLIDE 19

Equality and Compression of Strings

a3 d b c a b2 c e a3 b c a b2 c e d d d d d

21 June 2013 6/32

slide-20
SLIDE 20

Equality and Compression of Strings

a3 d b c a b2 c e a3 b c a b2 c e d d d d d

Iterate!

21 June 2013 6/32

slide-21
SLIDE 21

Equality and Compression of Strings

a3 d b c a b2 c e a3 b c a b2 c e d d d d d

Iterate! Intuition: recompression Think of new letters as nonterminals of a grammar We build SLPs for both strings, bottom-up. Everything is compressed in the same way!

21 June 2013 6/32

slide-22
SLIDE 22

Compression

1: P ← all pairs from S(U), L ← all letters from S(U) 2: for each a ∈ L do 3:

replace each maximal block aℓ by aℓ ⊲ A fresh letter

4: for each ab ∈ P do 5:

replace each ab by c ⊲ A fresh letter

21 June 2013 7/32

slide-23
SLIDE 23

Compression

1: P ← all pairs from S(U), L ← all letters from S(U) 2: for each a ∈ L do 3:

replace each maximal block aℓ by aℓ ⊲ A fresh letter

4: for each ab ∈ P do 5:

replace each ab by c ⊲ A fresh letter

Lemma

Each subword shortens by a constant factor (Ui, Vj, S(X), S(U), . . . ).

Proof.

Two consecutive letters: we tried to compress them; fail: one is already compressed.

21 June 2013 7/32

slide-24
SLIDE 24

Idea at work

Working example XbaYb = ba3bab2ab has a solution S(X) = ba3, S(Y ) = b2a

21 June 2013 8/32

slide-25
SLIDE 25

Idea at work

Working example XbaYb = ba3bab2ab has a solution S(X) = ba3, S(Y ) = b2a We want to replace pair ba by a new letter c. Then XbaYb = baaababbab for S(X) = baaa S(Y ) = bba XcYb = caacbcb for S(X) = caa S(Y ) = bc

21 June 2013 8/32

slide-26
SLIDE 26

Idea at work

Working example XbaYb = ba3bab2ab has a solution S(X) = ba3, S(Y ) = b2a We want to replace pair ba by a new letter c. Then XbaYb = baaababbab for S(X) = baaa S(Y ) = bba XcYb = caacbcb for S(X) = caa S(Y ) = bc And what about replacing ab by d? XbaYb = baaababbab for S(X) = baaa S(Y ) = bba

21 June 2013 8/32

slide-27
SLIDE 27

Idea at work

Working example XbaYb = ba3bab2ab has a solution S(X) = ba3, S(Y ) = b2a We want to replace pair ba by a new letter c. Then XbaYb = baaababbab for S(X) = baaa S(Y ) = bba XcYb = caacbcb for S(X) = caa S(Y ) = bc And what about replacing ab by d? XbaYb = baaababbab for S(X) = baaa S(Y ) = bba There is a problem with ‘crossing pairs’. We will fix!

21 June 2013 8/32

slide-28
SLIDE 28

Pair types

Definition (Pair types)

Appearance of ab is explicit it comes from U or V ; implicit comes solely from S(X); crossing in other case. ab is crossing if it has a crossing appearance, non-crossing otherwise.

21 June 2013 9/32

slide-29
SLIDE 29

Pair types

Definition (Pair types)

Appearance of ab is explicit it comes from U or V ; implicit comes solely from S(X); crossing in other case. ab is crossing if it has a crossing appearance, non-crossing otherwise. XbaYb = baaababbab with S(X) = baaa S(Y ) = bba baaababbab [XbaYb] baaababbab [XbaY b] baaababbab [XbaYb]

21 June 2013 9/32

slide-30
SLIDE 30

Pair types

Definition (Pair types)

Appearance of ab is explicit it comes from U or V ; implicit comes solely from S(X); crossing in other case. ab is crossing if it has a crossing appearance, non-crossing otherwise. XbaYb = baaababbab with S(X) = baaa S(Y ) = bba baaababbab [XbaYb] baaababbab [XbaY b] baaababbab [XbaYb]

Lemma (Length-minimal solutions)

If ab has an implicit appearance, then it has crossing or explicit one.

21 June 2013 9/32

slide-31
SLIDE 31

Compression of non-crossing pairs

PairComp

1: let c ∈ Σ be an unused letter 2: replace each explicit ab in U and V by c

21 June 2013 10/32

slide-32
SLIDE 32

Compression of non-crossing pairs

PairComp

1: let c ∈ Σ be an unused letter 2: replace each explicit ab in U and V by c

XbaYa = baaababbaa has a solution S(X) = baaa, S(Y ) = bba ba is non-crossing XcYa = caacbca has a solution S(X) = caa, S(Y ) = bc

21 June 2013 10/32

slide-33
SLIDE 33

Lemma

The PairComp(a, b) properly compresses noncrossing pairs.

21 June 2013 11/32

slide-34
SLIDE 34

Lemma

The PairComp(a, b) properly compresses noncrossing pairs. transforms satisfiable to satisfiable, transforms unsatisfiable to unsatisfiable,

21 June 2013 11/32

slide-35
SLIDE 35

Lemma

The PairComp(a, b) properly compresses noncrossing pairs. transforms satisfiable to satisfiable, transforms unsatisfiable to unsatisfiable,

Proof.

Every ab in S(U) = S(V ) is replaced: explicit pairs replaced explicitly implicit pairs replaced implicitly (in the solution) crossing there are none

21 June 2013 11/32

slide-36
SLIDE 36

Dealing with crossing pairs

ab is a crossing pair There is X such that S(X) = bw and aX appears in U = V (or symmetric).

21 June 2013 12/32

slide-37
SLIDE 37

Dealing with crossing pairs

ab is a crossing pair There is X such that S(X) = bw and aX appears in U = V (or symmetric). replace X with bX (implicitly change solution S(X) = bw to S(X) = w)

21 June 2013 12/32

slide-38
SLIDE 38

Dealing with crossing pairs

ab is a crossing pair There is X such that S(X) = bw and aX appears in U = V (or symmetric). replace X with bX (implicitly change solution S(X) = bw to S(X) = w) If S(X) = ǫ then remove X.

21 June 2013 12/32

slide-39
SLIDE 39

Dealing with crossing pairs

ab is a crossing pair There is X such that S(X) = bw and aX appears in U = V (or symmetric). replace X with bX (implicitly change solution S(X) = bw to S(X) = w) If S(X) = ǫ then remove X.

Lemma

After performing this for all variables, ab is no longer crossing.

21 June 2013 12/32

slide-40
SLIDE 40

Dealing with crossing pairs

ab is a crossing pair There is X such that S(X) = bw and aX appears in U = V (or symmetric). replace X with bX (implicitly change solution S(X) = bw to S(X) = w) If S(X) = ǫ then remove X.

Lemma

After performing this for all variables, ab is no longer crossing. Compress the pair!

21 June 2013 12/32

slide-41
SLIDE 41

Example

XbaYb = baaababbab for S(X) = baaa S(Y ) = bba ab is a crossing pair

21 June 2013 13/32

slide-42
SLIDE 42

Example

XbaYb = baaababbab for S(X) = baaa S(Y ) = bba ab is a crossing pair replace X with Xa, Y with bYa (new solution: S(X) = baa, S(Y ) = b) XababYab = baaababbab for S(X) = baa S(Y ) = b

21 June 2013 13/32

slide-43
SLIDE 43

Example

XbaYb = baaababbab for S(X) = baaa S(Y ) = bba ab is a crossing pair replace X with Xa, Y with bYa (new solution: S(X) = baa, S(Y ) = b) XababYab = baaababbab for S(X) = baa S(Y ) = b ab is not longer crossing, we replace it by c XccY c = baaccbc for S(X) = baa S(Y ) = b

21 June 2013 13/32

slide-44
SLIDE 44

Maximal blocks

Definition (maximal block of a)

When aℓ appears in S(U) = S(V ) and cannot be extended. Block appearance can be explicit, implicit or crossing. Letter a has crossing block if there is a crossing ℓ-block of a.

21 June 2013 14/32

slide-45
SLIDE 45

Maximal blocks

Definition (maximal block of a)

When aℓ appears in S(U) = S(V ) and cannot be extended. Block appearance can be explicit, implicit or crossing. Letter a has crossing block if there is a crossing ℓ-block of a. Equivalents of pairs. Compress them similarly. Pop whole prefixes/suffixes, not single letters

21 June 2013 14/32

slide-46
SLIDE 46

Maximal blocks

Definition (maximal block of a)

When aℓ appears in S(U) = S(V ) and cannot be extended. Block appearance can be explicit, implicit or crossing. Letter a has crossing block if there is a crossing ℓ-block of a. Equivalents of pairs. Compress them similarly. Pop whole prefixes/suffixes, not single letters

Lemma (Length-minimal solutions)

For maximal aℓ block: ℓ ≤ 2cn.

21 June 2013 14/32

slide-47
SLIDE 47

Blocks compression

Definition (Crossing block)

maximal block is crossing iff it is contained in S(U) (S(V )) but not in explicit words nor in any S(X).

21 June 2013 15/32

slide-48
SLIDE 48

Blocks compression

Definition (Crossing block)

maximal block is crossing iff it is contained in S(U) (S(V )) but not in explicit words nor in any S(X).

When a has no crossing block

1: for all maximal blocks aℓ of a do 2:

let aℓ ∈ Σ be a unused letter

3:

replace each explicit maximal aℓ in U = V by aℓ

21 June 2013 15/32

slide-49
SLIDE 49

What about crossing blocks?

Idea

change the equation X defines aℓX warX : change it to w replace X in equation by aℓX XarX

21 June 2013 16/32

slide-50
SLIDE 50

What about crossing blocks?

Idea

change the equation X defines aℓX warX : change it to w replace X in equation by aℓX XarX

CutPrefSuff(a)

1: for X ∈ X do 2:

guess and remove a-prefix aℓi and a-suffix arX of S(X)

3:

replace each X in rules bodies by aℓX XarX

21 June 2013 16/32

slide-51
SLIDE 51

What about crossing blocks?

Idea

change the equation X defines aℓX warX : change it to w replace X in equation by aℓX XarX

CutPrefSuff(a)

1: for X ∈ X do 2:

guess and remove a-prefix aℓi and a-suffix arX of S(X)

3:

replace each X in rules bodies by aℓX XarX

Lemma

After CutPrefSuff(a) letter a has no crossing block.

21 June 2013 16/32

slide-52
SLIDE 52

What about crossing blocks?

Idea

change the equation X defines aℓX warX : change it to w replace X in equation by aℓX XarX

CutPrefSuff(a)

1: for X ∈ X do 2:

guess and remove a-prefix aℓi and a-suffix arX of S(X)

3:

replace each X in rules bodies by aℓX XarX

Lemma

After CutPrefSuff(a) letter a has no crossing block. So a’s blocks can be easily compressed.

21 June 2013 16/32

slide-53
SLIDE 53

What about crossing blocks?

Idea

change the equation X defines aℓX wbrX : change it to w replace X in equation by aℓX XbrX

CutPrefSuff

1: for X ∈ X do 2:

let X begin with a and end with b

3:

calculate and remove a-prefix aℓX and b-suffix brX of X

4:

replace each X in rules bodies by aℓX XbrX

Lemma

After CutPrefSuff no letter has a crossing block. So all blocks can be easily compressed.

21 June 2013 16/32

slide-54
SLIDE 54

Algorithm

while U / ∈ Σ and V / ∈ Σ do L ← letters from U = V uncross the blocks for a ∈ L do compress a blocks

21 June 2013 17/32

slide-55
SLIDE 55

Algorithm

while U / ∈ Σ and V / ∈ Σ do L ← letters from U = V uncross the blocks for a ∈ L do compress a blocks P ← noncrossing pairs of letters from U = V ⊲ Guess P′ ← crossing pairs of letters from U = V ⊲ Guess, only O(n) for ab ∈ P do compress pair ab for ab ∈ P′ do uncross and compress pair ab

21 June 2013 17/32

slide-56
SLIDE 56

Crucial property

Theorem (Main property: shortens the solution)

Let ab be a string in U = V or in S(X) (for a length-minimal S). At least one of a, b is compressed in one phase.

21 June 2013 18/32

slide-57
SLIDE 57

Crucial property

Theorem (Main property: shortens the solution)

Let ab be a string in U = V or in S(X) (for a length-minimal S). At least one of a, b is compressed in one phase.

Proof.

a = b By block compression. a = b Pair compression tries to compress ab. Fails, when one was compressed already.

21 June 2013 18/32

slide-58
SLIDE 58

Crucial property

Theorem (Main property: shortens the solution)

Let ab be a string in U = V or in S(X) (for a length-minimal S). At least one of a, b is compressed in one phase.

Proof.

a = b By block compression. a = b Pair compression tries to compress ab. Fails, when one was compressed already.

Corollary (Running time)

The algorithm has O(log N) phases.

21 June 2013 18/32

slide-59
SLIDE 59

Space consumption

Corollary (Space consumption)

The equation has length O(n2).

21 June 2013 19/32

slide-60
SLIDE 60

Space consumption

Corollary (Space consumption)

The equation has length O(n2).

Proof.

we introduce O(n) letters per uncrossing O(n) uncrossings in one phase: O(n2) new letters and we shorten it by a constant factor in each phase. |U′| + |V ′| ≤ 2 3(|U| + |V |) + cn2 Gives quadratic upper bound on the whole equation.

21 June 2013 19/32

slide-61
SLIDE 61

Solution upper bound

Idea Running time is at most (cn2)cn2. there are O(log N) phases So log N ∼ (cn2)cn2.

21 June 2013 20/32

slide-62
SLIDE 62

Solution upper bound

Idea Running time is at most (cn2)cn2. there are O(log N) phases So log N ∼ (cn2)cn2.

Lemma

There are Ω(log N)/poly(n) phases

21 June 2013 20/32

slide-63
SLIDE 63

Solution upper bound

Idea Running time is at most (cn2)cn2. there are O(log N) phases So log N ∼ (cn2)cn2.

Lemma

There are Ω(log N)/poly(n) phases

Proof.

We do not shorten too much (at most 2cn letters into one).

21 June 2013 20/32

slide-64
SLIDE 64

Solution upper bound

Idea Running time is at most (cn2)cn2. there are O(log N) phases So log N ∼ (cn2)cn2.

Lemma

There are Ω(log N)/poly(n) phases

Proof.

We do not shorten too much (at most 2cn letters into one). log N/poly(n) ≤ (cn2)cn2

21 June 2013 20/32

slide-65
SLIDE 65

Linear space consumption

Aim at O(n) space consumption O(1) pair-uncrossing per variable smarter block compression

21 June 2013 21/32

slide-66
SLIDE 66

Improving pair compression

Partition of pairs

Σℓ and Σr are disjoint: we can compress pairs from ΣℓΣr in parallel

21 June 2013 22/32

slide-67
SLIDE 67

Improving pair compression

Partition of pairs

Σℓ and Σr are disjoint: we can compress pairs from ΣℓΣr in parallel choose partition that covers many appearances: think of random partition, it covers half of pairs in equation

  • nly O(1) uncrossing per pair

21 June 2013 22/32

slide-68
SLIDE 68

Improving pair compression

Partition of pairs

Σℓ and Σr are disjoint: we can compress pairs from ΣℓΣr in parallel choose partition that covers many appearances: think of random partition, it covers half of pairs in equation

  • nly O(1) uncrossing per pair

This given O(n) long equation.

21 June 2013 22/32

slide-69
SLIDE 69

Block compression

Idea

when we replace a blocks, only equality matters, not length pop aℓX and brX from X but treat them as parameters

21 June 2013 23/32

slide-70
SLIDE 70

Block compression

Idea

when we replace a blocks, only equality matters, not length pop aℓX and brX from X but treat them as parameters guess the equal blocks check if they can be equal replace them

21 June 2013 23/32

slide-71
SLIDE 71

Block compression

Idea

when we replace a blocks, only equality matters, not length pop aℓX and brX from X but treat them as parameters guess the equal blocks check if they can be equal replace them

Length of a block

b Y X b c c d a a a a X b c c d a a a a a a a a a a a a a

21 June 2013 23/32

slide-72
SLIDE 72

Block compression

Idea

when we replace a blocks, only equality matters, not length pop aℓX and brX from X but treat them as parameters guess the equal blocks check if they can be equal replace them

Length of a block

b Y X b c c d X b c c d a a a a a a a a a a a a a a a a a

Linear combination of {ℓX, rX}X∈X and constants.

21 June 2013 23/32

slide-73
SLIDE 73

Verification

Guessed equalities ⇐ ⇒ system of linear Diophantine equations in {ℓX, rX}X∈X

21 June 2013 24/32

slide-74
SLIDE 74

Verification

Guessed equalities ⇐ ⇒ system of linear Diophantine equations in {ℓX, rX}X∈X has size proportional to equation – encode variables as in the equation – encode constants in unary

21 June 2013 24/32

slide-75
SLIDE 75

Verification

Guessed equalities ⇐ ⇒ system of linear Diophantine equations in {ℓX, rX}X∈X has size proportional to equation – encode variables as in the equation – encode constants in unary can be verified in linear space (nondeterministically) – iteratively guess parity

21 June 2013 24/32

slide-76
SLIDE 76

Verification

Guessed equalities ⇐ ⇒ system of linear Diophantine equations in {ℓX, rX}X∈X has size proportional to equation – encode variables as in the equation – encode constants in unary can be verified in linear space (nondeterministically) – iteratively guess parity Linear space.

21 June 2013 24/32

slide-77
SLIDE 77

Linear Space

Equation is of length O(n). each letter may be different, so O(n log n) bits want true linear space

21 June 2013 25/32

slide-78
SLIDE 78

Linear Space

Equation is of length O(n). each letter may be different, so O(n log n) bits want true linear space

Tools

special encoding of letters: represented by fragments of the

  • riginal equation

– letters representing only original letters: appropriate tree – those representing other letters: depend only on XwY , encode them

like that

21 June 2013 25/32

slide-79
SLIDE 79

Linear Space

Equation is of length O(n). each letter may be different, so O(n log n) bits want true linear space

Tools

special encoding of letters: represented by fragments of the

  • riginal equation

– letters representing only original letters: appropriate tree – those representing other letters: depend only on XwY , encode them

like that

improve the pair compression (special pairing by Sakamoto) quite technical

21 June 2013 25/32

slide-80
SLIDE 80

Exponent of periodicity

Definition

per(w) = k ⇐ ⇒ uk is a substring of w but u′k+1 is not. perΣ(w) = k ⇐ ⇒ ak is a substring of w but bk+1 is not.

21 June 2013 26/32

slide-81
SLIDE 81

Exponent of periodicity

Definition

per(w) = k ⇐ ⇒ uk is a substring of w but u′k+1 is not. perΣ(w) = k ⇐ ⇒ ak is a substring of w but bk+1 is not. We do not fully use per(S(U)), only perΣ(S(U)). perΣ(S(U)) is the length of maximal block.

21 June 2013 26/32

slide-82
SLIDE 82

Exponent of periodicity

Definition

per(w) = k ⇐ ⇒ uk is a substring of w but u′k+1 is not. perΣ(w) = k ⇐ ⇒ ak is a substring of w but bk+1 is not. We do not fully use per(S(U)), only perΣ(S(U)). perΣ(S(U)) is the length of maximal block. Those are (components of) solution of a Diophantine system in {ℓX, rX}X∈X They are at most exponential (standard algebra and analysis). So perΣ(S(U)) is at most exponential.

21 June 2013 26/32

slide-83
SLIDE 83

Reducing per to perΣ

Lemma

Consider S(U) and S(U′) obtained by compression of pairs (or blocks). Let uk be a substring of S(U). Then either

21 June 2013 27/32

slide-84
SLIDE 84

Reducing per to perΣ

Lemma

Consider S(U) and S(U′) obtained by compression of pairs (or blocks). Let uk be a substring of S(U). Then either u ∈ a∗ or u′k−1 is a substring of S′(U′) (for some u′)

21 June 2013 27/32

slide-85
SLIDE 85

Reducing per to perΣ

Lemma

Consider S(U) and S(U′) obtained by compression of pairs (or blocks). Let uk be a substring of S(U). Then either u ∈ a∗ or u′k−1 is a substring of S′(U′) (for some u′)

Proof.

If uk is not a block then compression does not affect uk too much, u′k−1 can be chosen.

21 June 2013 27/32

slide-86
SLIDE 86

Reducing per to perΣ

Lemma

Consider S(U) and S(U′) obtained by compression of pairs (or blocks). Let uk be a substring of S(U). Then either u ∈ a∗ or u′k−1 is a substring of S′(U′) (for some u′)

Proof.

If uk is not a block then compression does not affect uk too much, u′k−1 can be chosen. There are O((cn)cn) compression steps. In each of them per(U = V ) = perΣ(U = V ) (exponential) or it drops by a constant. So per(U = V ) is at most exponential.

21 June 2013 27/32

slide-87
SLIDE 87

Univariate equations

Form of the equation A = B

A0XA1 . . . Ak−1XAk = XB1 . . . Bk−1XBk, where Ai, Bi ∈ Σ∗, A0 = ǫ.

21 June 2013 28/32

slide-88
SLIDE 88

Univariate equations

Form of the equation A = B

A0XA1 . . . Ak−1XAk = XB1 . . . Bk−1XBk, where Ai, Bi ∈ Σ∗, A0 = ǫ.

Nondeterminism dissappears

  • nly S(X) = ǫ

first (last) letter of S(X) is known S(X) ∈ a∗ are easy to check;

  • therwise a-prefix of S(X) and A0 have the same length

21 June 2013 28/32

slide-89
SLIDE 89

Univariate equations

Form of the equation A = B

A0XA1 . . . Ak−1XAk = XB1 . . . Bk−1XBk, where Ai, Bi ∈ Σ∗, A0 = ǫ.

Nondeterminism dissappears

  • nly S(X) = ǫ

first (last) letter of S(X) is known S(X) ∈ a∗ are easy to check;

  • therwise a-prefix of S(X) and A0 have the same length

Whenever we pop, we test some solution.

21 June 2013 28/32

slide-90
SLIDE 90

Generating all solutions

We want a finite (graph-like) representation of all solutions. Not all solutions are length minimal.

21 June 2013 29/32

slide-91
SLIDE 91

Generating all solutions

We want a finite (graph-like) representation of all solutions. Not all solutions are length minimal.

Lemma (Plandowski)

It is enough to consider minimal solutions. Minimal under homomorphism.

21 June 2013 29/32

slide-92
SLIDE 92

Generating all solutions

We want a finite (graph-like) representation of all solutions. Not all solutions are length minimal.

Lemma (Plandowski)

It is enough to consider minimal solutions. Minimal under homomorphism.

Lemma (Minimal solutions)

If ab has an implicit appearance in S(U) for a minimal S then ab has crossing or explicit one.

21 June 2013 29/32

slide-93
SLIDE 93

Transforming solutions

Definition (Transforming solutions)

An operation changing U = V to U′ = V ′ transforms solutions if we can associate an operator H with it such that when S′ is a solution of U′ = V ′ then S = H[S′] each S is of this form

21 June 2013 30/32

slide-94
SLIDE 94

Transforming solutions

Definition (Transforming solutions)

A nondeterministic operation changing U = V to U′ = V ′ transforms solutions if we can associate a family of operators H depending on choices with it such that when S′ is a solution of U′ = V ′ then S = H[S′] for each H ∈ H each S is of this form for some nondeterministic choices and some H ∈ H

21 June 2013 30/32

slide-95
SLIDE 95

Transforming solutions

Definition (Transforming solutions)

An operation changing U = V to U′ = V ′ transforms solutions if we can associate an operator H (depending on choices) with it such that when S′ is a solution of U′ = V ′ then S = H[S′] each S is of this form

21 June 2013 30/32

slide-96
SLIDE 96

Transforming solutions

Definition (Transforming solutions)

An operation changing U = V to U′ = V ′ transforms solutions if we can associate an operator H (depending on choices) with it such that when S′ is a solution of U′ = V ′ then S = H[S′] each S is of this form

Lemma

All our operations transform solutions. Operators are easy to define (morphisms).

21 June 2013 30/32

slide-97
SLIDE 97

Representation of solutions

Definition (G)

nodes: equations, edges: U = V is transformed to U′ = V ′ label: operator H transforming the solution

21 June 2013 31/32

slide-98
SLIDE 98

Representation of solutions

Definition (G)

nodes: equations, edges: U = V is transformed to U′ = V ′ label: operator H transforming the solution trivial equations have simple solutions each solution corresponds to a path in G and vice-versa

21 June 2013 31/32

slide-99
SLIDE 99

Representation of solutions

Definition (G)

nodes: equations, edges: U = V is transformed to U′ = V ′ label: operator H transforming the solution trivial equations have simple solutions each solution corresponds to a path in G and vice-versa

Construction

Verify the nodes’ existance. Verify edges’ existance. Labels are natural to deduce from the algorithm. PSPACE [Matching Plandowski’s construction]

21 June 2013 31/32

slide-100
SLIDE 100

Open questions, related research, etc.

Also used for fully compressed membership problem for NFAs [in NP] fully compressed pattern matching [quadratic algorithm] approximation of the smallest grammar [simpler algorithm] . . . ?

21 June 2013 32/32

slide-101
SLIDE 101

Open questions, related research, etc.

Also used for fully compressed membership problem for NFAs [in NP] fully compressed pattern matching [quadratic algorithm] approximation of the smallest grammar [simpler algorithm] . . . ? Open questions what about two variables (it is in P, but quite complicated)? is it in NP? is the solution at most exponential?

21 June 2013 32/32