Computing Equality-Free String Factorisations Markus L. Schmid - - PowerPoint PPT Presentation

computing equality free string factorisations
SMART_READER_LITE
LIVE PREVIEW

Computing Equality-Free String Factorisations Markus L. Schmid - - PowerPoint PPT Presentation

Computing Equality-Free String Factorisations Markus L. Schmid Trier University, Germany CiE 2015 Basic Concepts A finite alphabet = { a , b , c , d } strings w = daabaccabd string factorisations ( daa , b , acca , bd ) daa b acca


slide-1
SLIDE 1

Computing Equality-Free String Factorisations

Markus L. Schmid

Trier University, Germany

CiE 2015

slide-2
SLIDE 2

Basic Concepts

A finite alphabet Σ = {a, b, c, d} strings w = daabaccabd string factorisations (daa, b, acca, bd) daa · b · acca · bd

slide-3
SLIDE 3

String factorisations

Let p = (u1, u2, . . . , uk) be a factorisation. sf(p) = {u1, u2, . . . , uk} set of factors, s(p) = k size, c(p) = | sf(p)| cardinality, w(p) = max{|ui| | 1 ≤ i ≤ k} width.

slide-4
SLIDE 4

String factorisations

Let p = (u1, u2, . . . , uk) be a factorisation. sf(p) = {u1, u2, . . . , uk} set of factors, s(p) = k size, c(p) = | sf(p)| cardinality, w(p) = max{|ui| | 1 ≤ i ≤ k} width.

Central notion of this talk

A factorisation p is equality-free if s(p) = c(p). (p is repetitive ⇔ p is not equality-free).

slide-5
SLIDE 5

String factorisations

Let p = (u1, u2, . . . , uk) be a factorisation. sf(p) = {u1, u2, . . . , uk} set of factors, s(p) = k size, c(p) = | sf(p)| cardinality, w(p) = max{|ui| | 1 ≤ i ≤ k} width.

Central notion of this talk

A factorisation p is equality-free if s(p) = c(p). (p is repetitive ⇔ p is not equality-free).

Example

p = aab · ba · cba · aab · ba · aab. sf(p) = {aab, ba, cba}, s(p) = 6, c(p) = 3 and w(p) = 3, p is not equality-free (i. e., p is repetitive).

slide-6
SLIDE 6

Computing equality-free factorisations

Find equality-free factorisation with large size Can we do better than 6? We need a, b and c as single factors!

slide-7
SLIDE 7

Computing equality-free factorisations

Find equality-free factorisation with large size Can we do better than 6? We need a, b and c as single factors! abbcbaabbc

slide-8
SLIDE 8

Computing equality-free factorisations

Find equality-free factorisation with large size Can we do better than 6? We need a, b and c as single factors! abbc · ba · abbc

slide-9
SLIDE 9

Computing equality-free factorisations

Find equality-free factorisation with large size Can we do better than 6? We need a, b and c as single factors! ab · bc · ba · ab · bc

slide-10
SLIDE 10

Computing equality-free factorisations

Find equality-free factorisation with large size Can we do better than 6? We need a, b and c as single factors! ab · bc · ba · abb · c

slide-11
SLIDE 11

Computing equality-free factorisations

Find equality-free factorisation with large size Can we do better than 6? We need a, b and c as single factors! ab · bc · ba · a · bb · c

slide-12
SLIDE 12

Computing equality-free factorisations

Find equality-free factorisation with large size Can we do better than 6? We need a, b and c as single factors! ab · bc · ba · a · bb · c

slide-13
SLIDE 13

Computing equality-free factorisations

Find equality-free factorisation with large size Can we do better than 6? We need a, b and c as single factors! abbcbaabbc

slide-14
SLIDE 14

Computing equality-free factorisations

Find equality-free factorisation with large size Can we do better than 6? We need a, b and c as single factors! a · b · bcbaabb · c

slide-15
SLIDE 15

Computing equality-free factorisations

Find equality-free factorisation with large size Can we do better than 6? We need a, b and c as single factors! a · b · bc · ba · abb · c

slide-16
SLIDE 16

Computing equality-free factorisations

Find equality-free factorisation with large size Can we do better than 6? No! We need a, b and c as single factors! a · b · bc · ba · abb · c

slide-17
SLIDE 17

Computing equality-free factorisations

Find equality-free factorisation with small width Can we do better than 6? We need a, b and c as single factors! aabbccaabbcc

slide-18
SLIDE 18

Computing equality-free factorisations

Find equality-free factorisation with small width Can we do better than 6? We need a, b and c as single factors! a · abbccaabbcc

slide-19
SLIDE 19

Computing equality-free factorisations

Find equality-free factorisation with small width Can we do better than 6? We need a, b and c as single factors! a · ab · bccaabbcc

slide-20
SLIDE 20

Computing equality-free factorisations

Find equality-free factorisation with small width Can we do better than 6? We need a, b and c as single factors! a · ab · b · ccaabbcc

slide-21
SLIDE 21

Computing equality-free factorisations

Find equality-free factorisation with small width Can we do better than 6? We need a, b and c as single factors! a · ab · b · c · caabbcc

slide-22
SLIDE 22

Computing equality-free factorisations

Find equality-free factorisation with small width Can we do better than 6? We need a, b and c as single factors! a · ab · b · c · ca · abbcc

slide-23
SLIDE 23

Computing equality-free factorisations

Find equality-free factorisation with small width Can we do better than 6? We need a, b and c as single factors! a · ab · b · c · ca · abb · cc

slide-24
SLIDE 24

Computing equality-free factorisations

Find equality-free factorisation with small width Can we do better than 3? We need a, b and c as single factors! a · ab · b · c · ca · abb · cc

slide-25
SLIDE 25

Computing equality-free factorisations

Find equality-free factorisation with small width Can we do better than 3? Yes! We need a, b and c as single factors! aa · b · bc · ca · a · bb · cc

slide-26
SLIDE 26

Computing equality-free factorisations

Find equality-free factorisation with small width Can we do better than 6? We need a, b and c as single factors! aabbccaabbccaabbcc

slide-27
SLIDE 27

Computing equality-free factorisations

Find equality-free factorisation with small width Can we do better than 6? We need a, b and c as single factors! aab · bcc · aa · bbc · caa · bb · cc

slide-28
SLIDE 28

Computing equality-free factorisations

Find equality-free factorisation with small width Can we do better than 6? We need a, b and c as single factors! aab · bcc · aa · bbc · caa · bb · cc

Computing equality-free factorisations

Given a string w and m ∈ N ∃ equality-free factorisation p of w with s(p) ≥ m? EF-s ∃ equality-free factorisation p of w with w(p) ≤ m? EF-w

slide-29
SLIDE 29

Computing repetitive factorisations

What is a good measure of repetitiveness?

slide-30
SLIDE 30

Computing repetitive factorisations

What is a good measure of repetitiveness? The cardinality c(p)!

slide-31
SLIDE 31

Computing repetitive factorisations

What is a good measure of repetitiveness? The cardinality c(p)! c(p) = s(p) ⇒ equality-free ⇒ not repetitive at all, c(p) = 1 ⇒ p = u · u · · · u ⇒ very repetitive.

slide-32
SLIDE 32

Computing repetitive factorisations

What is a good measure of repetitiveness? The cardinality c(p)! c(p) = s(p) ⇒ equality-free ⇒ not repetitive at all, c(p) = 1 ⇒ p = u · u · · · u ⇒ very repetitive. c(p) ≤ 3, s(p) ≥ 5 aabcacaaabaab

slide-33
SLIDE 33

Computing repetitive factorisations

What is a good measure of repetitiveness? The cardinality c(p)! c(p) = s(p) ⇒ equality-free ⇒ not repetitive at all, c(p) = 1 ⇒ p = u · u · · · u ⇒ very repetitive. c(p) ≤ 3, s(p) ≥ 5 a · a · b · c · a · c · a · a · a · b · a · a · b

slide-34
SLIDE 34

Computing repetitive factorisations

What is a good measure of repetitiveness? The cardinality c(p)! c(p) = s(p) ⇒ equality-free ⇒ not repetitive at all, c(p) = 1 ⇒ p = u · u · · · u ⇒ very repetitive. c(p) ≤ 2, s(p) ≥ 5 a · a · b · c · a · c · a · a · a · b · a · a · b

slide-35
SLIDE 35

Computing repetitive factorisations

What is a good measure of repetitiveness? The cardinality c(p)! c(p) = s(p) ⇒ equality-free ⇒ not repetitive at all, c(p) = 1 ⇒ p = u · u · · · u ⇒ very repetitive. c(p) ≤ 2, s(p) ≥ 5 aab · ca · ca · aab · aab

slide-36
SLIDE 36

Computing repetitive factorisations

What is a good measure of repetitiveness? The cardinality c(p)! c(p) = s(p) ⇒ equality-free ⇒ not repetitive at all, c(p) = 1 ⇒ p = u · u · · · u ⇒ very repetitive. c(p) ≤ 2, s(p) > 5 ? aab · ca · ca · aab · aab

slide-37
SLIDE 37

Computing repetitive factorisations

What is a good measure of repetitiveness? The cardinality c(p)! c(p) = s(p) ⇒ equality-free ⇒ not repetitive at all, c(p) = 1 ⇒ p = u · u · · · u ⇒ very repetitive. c(p) ≤ 2, w(p) ≤ 2 ? aab · ca · ca · aab · aab

slide-38
SLIDE 38

Computing repetitive factorisations

What is a good measure of repetitiveness? The cardinality c(p)! c(p) = s(p) ⇒ equality-free ⇒ not repetitive at all, c(p) = 1 ⇒ p = u · u · · · u ⇒ very repetitive. c(p) ≤ 2, w(p) ≤ 2 ? aab · ca · ca · aab · aab

Computing repetitive factorisations

Given a string w and m, k ∈ N ∃ factorisation p of w with c(p) ≤ k, s(p) ≥ m? RF-s ∃ factorisation p of w with c(p) ≤ k, w(p) ≤ m? RF-w

slide-39
SLIDE 39

Motivation: equality-free factorisations with small width

Collision-aware oligo design for gene synthesis

Goal: Construct long DNA strands. Problem: Only very short pieces of DNA can be reliably constructed. Solution: Find short pieces of DNA that will self-assemble.

slide-40
SLIDE 40

Motivation: equality-free factorisations with small width

Collision-aware oligo design for gene synthesis

Goal: Construct long DNA strands. Problem: Only very short pieces of DNA can be reliably constructed. Solution: Find short pieces of DNA that will self-assemble. ⇒ Find a factorisation p of the DNA strand with w(p) is small, no factor is the complement of another, . . . . . .

slide-41
SLIDE 41

Motivation: equality-free factorisations with large size

Pattern matching with variables

Given a string α with variables and a string w, can we uniformly replace the variables in α such that we obtain w? If α is “simple enough”, then this can be decided in poly-time.

slide-42
SLIDE 42

Motivation: equality-free factorisations with large size

Pattern matching with variables

Given a string α with variables and a string w, can we uniformly replace the variables in α such that we obtain w? If α is “simple enough”, then this can be decided in poly-time.

Injective pattern matching with variables

Given a string α with variables and a string w, can we uniformly replace the variables in α such that we obtain w and different variables must be replaced by different strings?

slide-43
SLIDE 43

Motivation: equality-free factorisations with large size

Pattern matching with variables

Given a string α with variables and a string w, can we uniformly replace the variables in α such that we obtain w? If α is “simple enough”, then this can be decided in poly-time.

Injective pattern matching with variables

Given a string α with variables and a string w, can we uniformly replace the variables in α such that we obtain w and different variables must be replaced by different strings? For the “simple” patterns x1x2 . . . xn this is equivalent to finding equality-free factorisations with size n.

slide-44
SLIDE 44

Motivation: repetitive factorisations

Let p be a factorisation with sf(p) = {u1, u2, . . . , uk}, i. e., p = uj1 · uj2 · . . . · ujn, 1 ≤ ji ≤ k, 1 ≤ i ≤ k.

slide-45
SLIDE 45

Motivation: repetitive factorisations

Let p be a factorisation with sf(p) = {u1, u2, . . . , uk}, i. e., p = uj1 · uj2 · . . . · ujn, 1 ≤ ji ≤ k, 1 ≤ i ≤ k. The corresponding word can be represented by j1j2 . . . jn and sf(p)

slide-46
SLIDE 46

Complexity

Theorem (Condon, Maňuch, Thachuk, 2008)

Computing EF-w is NP-complete (even if m ≤ 2 or |Σ| ≤ 2).

Theorem (Fernau, Manea, Mercaş, S., 2015)

EF-s is NP-complete.

slide-47
SLIDE 47

Complexity

Theorem (Condon, Maňuch, Thachuk, 2008)

Computing EF-w is NP-complete (even if m ≤ 2 or |Σ| ≤ 2).

Theorem (Fernau, Manea, Mercaş, S., 2015)

EF-s is NP-complete.

Contribution of this paper

Revisit the complexity of these problems (and RF-s, RF-w), also from the parameterised point of view.

slide-48
SLIDE 48

Parameterised Complexity

Parameterised problem K: instances are of the form (x, k), where k is the parameter

slide-49
SLIDE 49

Parameterised Complexity

Parameterised problem K: instances are of the form (x, k), where k is the parameter K is fixed-parameter tractable (in FPT) ⇐ ⇒ K can be solved in O(f(k) × p(|x|)) (for recursive f and polynomial p).

slide-50
SLIDE 50

Parameterised Complexity

Parameterised problem K: instances are of the form (x, k), where k is the parameter K is fixed-parameter tractable (in FPT) ⇐ ⇒ K can be solved in O(f(k) × p(|x|)) (for recursive f and polynomial p). K is NP-hard even if k ≤ c for constant c ⇒ K / ∈ FPT (unless P = NP).

slide-51
SLIDE 51

Equality-Free Factor Cover (EFFC)

Equality-free factor cover

Given a string w and a set F of strings, ∃ equality-free factorisation p of w with sf(p) ⊆ F? EFFC

slide-52
SLIDE 52

Equality-Free Factor Cover (EFFC)

Equality-free factor cover

Given a string w and a set F of strings, ∃ equality-free factorisation p of w with sf(p) ⊆ F? EFFC

Theorem

EFFC is NP-complete (even for fixed Σ with |Σ| = 2).

slide-53
SLIDE 53

Equality-Free Factor Cover (EFFC)

Equality-free factor cover

Given a string w and a set F of strings, ∃ equality-free factorisation p of w with sf(p) ⊆ F? EFFC

Theorem

EFFC is NP-complete (even for fixed Σ with |Σ| = 2).

Proof Sketch

Let w ∈ Σ∗, F = {v | w = uvu′, |v| ≤ m}.

slide-54
SLIDE 54

Equality-Free Factor Cover (EFFC)

Equality-free factor cover

Given a string w and a set F of strings, ∃ equality-free factorisation p of w with sf(p) ⊆ F? EFFC

Theorem

EFFC is NP-complete (even for fixed Σ with |Σ| = 2).

Proof Sketch

Let w ∈ Σ∗, F = {v | w = uvu′, |v| ≤ m}. w has equality-free factorisation p with w(p) ≤ m ⇐ ⇒ w has equality-free factorisation p′ with sf(p′) ⊆ F.

slide-55
SLIDE 55

Equality-Free Factor Cover (EFFC)

Theorem

EFFC can be solved in time O(|w||F|+1).

slide-56
SLIDE 56

Equality-Free Factor Cover (EFFC)

Theorem

EFFC can be solved in time O(|w||F|+1).

Proof Sketch

Let w ∈ Σ∗ and let p be an equality-free factorisation for w with sf(p) ⊆ F.

slide-57
SLIDE 57

Equality-Free Factor Cover (EFFC)

Theorem

EFFC can be solved in time O(|w||F|+1).

Proof Sketch

Let w ∈ Σ∗ and let p be an equality-free factorisation for w with sf(p) ⊆ F. s(p) ≤ |w| s(p) ≤ |F|

slide-58
SLIDE 58

Equality-Free Factor Cover (EFFC)

Theorem

EFFC can be solved in time O(|w||F|+1).

Proof Sketch

Let w ∈ Σ∗ and let p be an equality-free factorisation for w with sf(p) ⊆ F. s(p) ≤ |w| s(p) ≤ |F| Enumerate all equality-free factorisations with sf(p) ⊆ F and s(p) ≤ min{|w|, |F|}.

slide-59
SLIDE 59

Equality-Free Factor Cover (EFFC)

Theorem

The Problem EFFC can be solved in time O(|w| × (2|F| − 1) × |F|!).

slide-60
SLIDE 60

Equality-Free Factor Cover (EFFC)

Theorem

The Problem EFFC can be solved in time O(|w| × (2|F| − 1) × |F|!).

Proof Sketch

w ∈ Σ∗, F = {u1, u2, . . . , uℓ} Γ = {1, 2, . . . , ℓ}, h : Γ∗ → Σ∗, h(i) = ui, i ∈ Γ

slide-61
SLIDE 61

Equality-Free Factor Cover (EFFC)

Theorem

The Problem EFFC can be solved in time O(|w| × (2|F| − 1) × |F|!).

Proof Sketch

w ∈ Σ∗, F = {u1, u2, . . . , uℓ} Γ = {1, 2, . . . , ℓ}, h : Γ∗ → Σ∗, h(i) = ui, i ∈ Γ w has equality-free factorisation p with sf(p) ⊆ F ⇐ ⇒ ∃v ∈ Γ∗ with |v|i ≤ 1, i ∈ Γ, h(v) = w.

slide-62
SLIDE 62

Equality-Free Factor Cover (EFFC)

Theorem

The Problem EFFC can be solved in time O(|w| × (2|F| − 1) × |F|!).

Proof Sketch

w ∈ Σ∗, F = {u1, u2, . . . , uℓ} Γ = {1, 2, . . . , ℓ}, h : Γ∗ → Σ∗, h(i) = ui, i ∈ Γ w has equality-free factorisation p with sf(p) ⊆ F ⇐ ⇒ ∃v ∈ Γ∗ with |v|i ≤ 1, i ∈ Γ, h(v) = w. There are at most (2|F| − 1) × |F|! such words v.

slide-63
SLIDE 63

Factor Cover (FC)

Theorem

FC can be solved in time O(|F| × |w|2).

slide-64
SLIDE 64

Factor Cover (FC)

Theorem

FC can be solved in time O(|F| × |w|2).

Proof Sketch

Dynamic programming + KMP.

slide-65
SLIDE 65

Factor Cover (FC)

Theorem

FC can be solved in time O(|F| × |w|2).

Proof Sketch

Dynamic programming + KMP. Remark: We shall need this algorithm later for computing repetitive factorisations with large size or small width.

slide-66
SLIDE 66

Max/Min Equality-Free Fact. Size/Width

Theorem (Condon, Maňuch, Thachuk, 2008)

EF-w is NP-complete (even if m ≤ 2 or |Σ| ≤ 2).

slide-67
SLIDE 67

Max/Min Equality-Free Fact. Size/Width

Theorem (Condon, Maňuch, Thachuk, 2008)

EF-w is NP-complete (even if m ≤ 2 or |Σ| ≤ 2).

Theorem

EF-w can be solved in time O(mm2×|Σ|m+2 × |Σ|m).

slide-68
SLIDE 68

Max/Min Equality-Free Fact. Size/Width

Theorem (Condon, Maňuch, Thachuk, 2008)

EF-w is NP-complete (even if m ≤ 2 or |Σ| ≤ 2).

Theorem

EF-w can be solved in time O(mm2×|Σ|m+2 × |Σ|m).

Proof Sketch

Let p be equality-free factorisation of w with w(p) ≤ m.

slide-69
SLIDE 69

Max/Min Equality-Free Fact. Size/Width

Theorem (Condon, Maňuch, Thachuk, 2008)

EF-w is NP-complete (even if m ≤ 2 or |Σ| ≤ 2).

Theorem

EF-w can be solved in time O(mm2×|Σ|m+2 × |Σ|m).

Proof Sketch

Let p be equality-free factorisation of w with w(p) ≤ m. ⇒ s(p) ≤ m × |Σ|m ⇒ |w| ≤ m2 × |Σ|m.

slide-70
SLIDE 70

Max/Min Equality-Free Fact. Size/Width

Theorem (Condon, Maňuch, Thachuk, 2008)

EF-w is NP-complete (even if m ≤ 2 or |Σ| ≤ 2).

Theorem

EF-w can be solved in time O(mm2×|Σ|m+2 × |Σ|m).

Proof Sketch

Let p be equality-free factorisation of w with w(p) ≤ m. ⇒ s(p) ≤ m × |Σ|m ⇒ |w| ≤ m2 × |Σ|m. Check |w| ≤ m2 × |Σ|m, if yes, enumerate all factorisations with width

  • f at most m.
slide-71
SLIDE 71

Max/Min Equality-Free Fact. Size/Width

Dichotomy for EF-w w.r.t. parameters m and |Σ|: m ≤ c and |Σ| unbounded: NP-complete if and only if c ≥ 2.

slide-72
SLIDE 72

Max/Min Equality-Free Fact. Size/Width

Dichotomy for EF-w w.r.t. parameters m and |Σ|: m ≤ c and |Σ| unbounded: NP-complete if and only if c ≥ 2. |Σ| ≤ c and m unbounded: NP-complete if and only if c ≥ 2.

slide-73
SLIDE 73

Max/Min Equality-Free Fact. Size/Width

Dichotomy for EF-w w.r.t. parameters m and |Σ|: m ≤ c and |Σ| unbounded: NP-complete if and only if c ≥ 2. |Σ| ≤ c and m unbounded: NP-complete if and only if c ≥ 2. |Σ| ≤ c and m ≤ c′: poly-time.

slide-74
SLIDE 74

Max/Min Equality-Free Fact. Size/Width

Dichotomy for EF-w w.r.t. parameters m and |Σ|: m ≤ c and |Σ| unbounded: NP-complete if and only if c ≥ 2. |Σ| ≤ c and m unbounded: NP-complete if and only if c ≥ 2. |Σ| ≤ c and m ≤ c′: poly-time. What about equality-free factorisations with large size (EF-s)??

slide-75
SLIDE 75

Max/Min Equality-Free Fact. Size/Width

Open Problem

Is EF-s NP-complete for fixed alphabets? Reminder: In the real world, there are only fixed alphabets!

slide-76
SLIDE 76

Max/Min Equality-Free Fact. Size/Width

Open Problem

Is EF-s NP-complete for fixed alphabets? Reminder: In the real world, there are only fixed alphabets! At least, poly-time (fpt) if m is bounded:

Theorem

EF-s can be solved in time O(( m2+m

2

− 1)m).

slide-77
SLIDE 77

Max/Min Equality-Free Fact. Size/Width

Open Problem

Is EF-s NP-complete for fixed alphabets? Reminder: In the real world, there are only fixed alphabets! At least, poly-time (fpt) if m is bounded:

Theorem

EF-s can be solved in time O(( m2+m

2

− 1)m).

Proof Sketch

|w| ≥ Σm

i=1i = m2+m 2

⇒ split w into factors of different lengths.

slide-78
SLIDE 78

Max/Min Equality-Free Fact. Size/Width

Open Problem

Is EF-s NP-complete for fixed alphabets? Reminder: In the real world, there are only fixed alphabets! At least, poly-time (fpt) if m is bounded:

Theorem

EF-s can be solved in time O(( m2+m

2

− 1)m).

Proof Sketch

|w| ≥ Σm

i=1i = m2+m 2

⇒ split w into factors of different lengths. |w| ≤ m2+m

2

− 1 ⇒ enumerate all factorisations of size m.

slide-79
SLIDE 79

Max/Min Repetitive Factorisation Size/Width

We have three parameters: |Σ|, m (size/width bound), k (bound on the cardinality).

slide-80
SLIDE 80

Max/Min Repetitive Factorisation Size/Width

We have three parameters: |Σ|, m (size/width bound), k (bound on the cardinality).

Open Problem

Is RF-s NP-complete?

slide-81
SLIDE 81

Max/Min Repetitive Factorisation Size/Width

We have three parameters: |Σ|, m (size/width bound), k (bound on the cardinality).

Open Problem

Is RF-s NP-complete? However, if |Σ|, m or k is a constant, then we can solve it in poly-time.

slide-82
SLIDE 82

Max/Min Repetitive Factorisation Size/Width

Theorem

RF-s can be solved in time O(k2 × |w|2k+3), O(|Σ|2 × |w|2|Σ|+1), O(m2 × |w|2m+1).

slide-83
SLIDE 83

Max/Min Repetitive Factorisation Size/Width

Theorem

RF-s can be solved in time O(k2 × |w|2k+3), O(|Σ|2 × |w|2|Σ|+1), O(m2 × |w|2m+1).

Proof Sketch

Let Fw = {u | u is a factor of w}.

slide-84
SLIDE 84

Max/Min Repetitive Factorisation Size/Width

Theorem

RF-s can be solved in time O(k2 × |w|2k+3), O(|Σ|2 × |w|2|Σ|+1), O(m2 × |w|2m+1).

Proof Sketch

Let Fw = {u | u is a factor of w}. Problem FC: Does w have a factorisation p with sf(p) ⊆ F for given F? Solve FC on every F ⊆ Fw with |F| ≤ k.

slide-85
SLIDE 85

Max/Min Repetitive Factorisation Size/Width

Theorem

RF-s can be solved in time O(k2 × |w|2k+3), O(|Σ|2 × |w|2|Σ|+1), O(m2 × |w|2m+1).

Proof Sketch

Let Fw = {u | u is a factor of w}. Problem FC: Does w have a factorisation p with sf(p) ⊆ F for given F? Solve FC on every F ⊆ Fw with |F| ≤ k. k ≥ |Σ| ⇒ split w into factors of size 1. k ≥ m ⇒ any factorisation of size m is fine.

slide-86
SLIDE 86

Max/Min Repetitive Factorisation Size/Width

We know more about computing repetitive factorisations with small width (RF-w)!

slide-87
SLIDE 87

Max/Min Repetitive Factorisation Size/Width

We know more about computing repetitive factorisations with small width (RF-w)! If |Σ| or k is a constant, then we can solve it in poly-time.

Theorem

RF-w can be solved in time O(k2 × mk × |w|k+3), O(|Σ|2 × m(|Σ|−1) × |w||Σ|+2).

slide-88
SLIDE 88

Max/Min Repetitive Factorisation Size/Width

We know more about computing repetitive factorisations with small width (RF-w)! If |Σ| or k is a constant, then we can solve it in poly-time.

Theorem

RF-w can be solved in time O(k2 × mk × |w|k+3), O(|Σ|2 × m(|Σ|−1) × |w||Σ|+2).

Proof Sketch

Analogous to the proofs for RF-s.

slide-89
SLIDE 89

Max/Min Repetitive Factorisation Size/Width

We know more about computing repetitive factorisations with small width (RF-w)! If |Σ| or k is a constant, then we can solve it in poly-time.

Theorem

RF-w can be solved in time O(k2 × mk × |w|k+3), O(|Σ|2 × m(|Σ|−1) × |w||Σ|+2).

Proof Sketch

Analogous to the proofs for RF-s. However, k cannot be bounded by m (the width bound), only by ⌈ |w|

m ⌉.

slide-90
SLIDE 90

Max/Min Repetitive Factorisation Size/Width

Theorem

RF-w is NP-complete even if m ≤ 2.

slide-91
SLIDE 91

Max/Min Repetitive Factorisation Size/Width

Theorem

RF-w is NP-complete even if m ≤ 2. Hitting Set (HS) Instance: U = {x1, . . . , xℓ}, S1, . . . , Sn ⊆ U and q ∈ N. Question: ∃ T ⊆ U with |T| ≤ q and T ∩ Si = ∅, 1 ≤ i ≤ n?

slide-92
SLIDE 92

Max/Min Repetitive Factorisation Size/Width

Theorem

RF-w is NP-complete even if m ≤ 2. Hitting Set (HS) Instance: U = {x1, . . . , xℓ}, S1, . . . , Sn ⊆ U and q ∈ N. Question: ∃ T ⊆ U with |T| ≤ q and T ∩ Si = ∅, 1 ≤ i ≤ n? HS instance: (U, S1, . . . , Sn, q) with Si = {yi,1, yi,2, . . . , yi,r}, 1 ≤ i ≤ n.

slide-93
SLIDE 93

Max/Min Repetitive Factorisation Size/Width

Theorem

RF-w is NP-complete even if m ≤ 2. Hitting Set (HS) Instance: U = {x1, . . . , xℓ}, S1, . . . , Sn ⊆ U and q ∈ N. Question: ∃ T ⊆ U with |T| ≤ q and T ∩ Si = ∅, 1 ≤ i ≤ n? HS instance: (U, S1, . . . , Sn, q) with Si = {yi,1, yi,2, . . . , yi,r}, 1 ≤ i ≤ n. RF-w instance: Σ = U ∪ {$i,j | 1 ≤ i ≤ n, 1 ≤ j ≤ r − 1} ∪ {¢},

slide-94
SLIDE 94

Max/Min Repetitive Factorisation Size/Width

Theorem

RF-w is NP-complete even if m ≤ 2. Hitting Set (HS) Instance: U = {x1, . . . , xℓ}, S1, . . . , Sn ⊆ U and q ∈ N. Question: ∃ T ⊆ U with |T| ≤ q and T ∩ Si = ∅, 1 ≤ i ≤ n? HS instance: (U, S1, . . . , Sn, q) with Si = {yi,1, yi,2, . . . , yi,r}, 1 ≤ i ≤ n. RF-w instance: Σ = U ∪ {$i,j | 1 ≤ i ≤ n, 1 ≤ j ≤ r − 1} ∪ {¢}, w = ¢¢ v1 ¢ v2 ¢ . . . ¢ vn ¢,

slide-95
SLIDE 95

Max/Min Repetitive Factorisation Size/Width

Theorem

RF-w is NP-complete even if m ≤ 2. Hitting Set (HS) Instance: U = {x1, . . . , xℓ}, S1, . . . , Sn ⊆ U and q ∈ N. Question: ∃ T ⊆ U with |T| ≤ q and T ∩ Si = ∅, 1 ≤ i ≤ n? HS instance: (U, S1, . . . , Sn, q) with Si = {yi,1, yi,2, . . . , yi,r}, 1 ≤ i ≤ n. RF-w instance: Σ = U ∪ {$i,j | 1 ≤ i ≤ n, 1 ≤ j ≤ r − 1} ∪ {¢}, w = ¢¢ v1 ¢ v2 ¢ . . . ¢ vn ¢, vi = yi,1$i,1yi,2$i,2 . . . $i,r−1yi,r, 1 ≤ i ≤ n.

slide-96
SLIDE 96

Max/Min Repetitive Factorisation Size/Width

T ⊆ U with |T| ≤ q and T ∩ Si = ∅, 1 ≤ i ≤ n ⇒

slide-97
SLIDE 97

Max/Min Repetitive Factorisation Size/Width

T ⊆ U with |T| ≤ q and T ∩ Si = ∅, 1 ≤ i ≤ n ⇒ w = ¢ · ¢ · v1 · ¢ · v2 · ¢ · . . . · ¢ · vn · ¢,

slide-98
SLIDE 98

Max/Min Repetitive Factorisation Size/Width

T ⊆ U with |T| ≤ q and T ∩ Si = ∅, 1 ≤ i ≤ n ⇒ w = ¢ · ¢ · v1 · ¢ · v2 · ¢ · . . . · ¢ · vn · ¢, vi = yi,1$i,1 · yi,2$i,2 · . . . · yi,ji−1$i,ji−1 · yi,ji · $i,jiyi,ji+1 · . . . · $i,r−1yi,r, i, 1 ≤ i ≤ n, yi,ji ∈ T,

slide-99
SLIDE 99

Max/Min Repetitive Factorisation Size/Width

T ⊆ U with |T| ≤ q and T ∩ Si = ∅, 1 ≤ i ≤ n ⇒ w = ¢ · ¢ · v1 · ¢ · v2 · ¢ · . . . · ¢ · vn · ¢, vi = yi,1$i,1 · yi,2$i,2 · . . . · yi,ji−1$i,ji−1 · yi,ji · $i,jiyi,ji+1 · . . . · $i,r−1yi,r, i, 1 ≤ i ≤ n, yi,ji ∈ T, has width 2 and c(p) ≤ 1 + q + n(r − 1).

slide-100
SLIDE 100

Max/Min Repetitive Factorisation Size/Width

Let p be a factorisation of w with w(p) ≤ 2 and c(p) ≤ 1 + q + n(r − 1).

slide-101
SLIDE 101

Max/Min Repetitive Factorisation Size/Width

Let p be a factorisation of w with w(p) ≤ 2 and c(p) ≤ 1 + q + n(r − 1). Split every x¢ and ¢x, x ∈ U ∪ {¢}, into x · ¢ and ¢ · x, respectively. ⇒ w = ¢ · ¢ · v1 · ¢ · v2 · ¢ · . . . · ¢ · vn · ¢,

slide-102
SLIDE 102

Max/Min Repetitive Factorisation Size/Width

Let p be a factorisation of w with w(p) ≤ 2 and c(p) ≤ 1 + q + n(r − 1). Split every x¢ and ¢x, x ∈ U ∪ {¢}, into x · ¢ and ¢ · x, respectively. ⇒ w = ¢ · ¢ · v1 · ¢ · v2 · ¢ · . . . · ¢ · vn · ¢, w(p) ≤ 2 and c(p) ≤ 1 + q + n(r − 1) is maintained.

slide-103
SLIDE 103

Max/Min Repetitive Factorisation Size/Width

Let p be a factorisation of w with w(p) ≤ 2 and c(p) ≤ 1 + q + n(r − 1). Split every x¢ and ¢x, x ∈ U ∪ {¢}, into x · ¢ and ¢ · x, respectively. ⇒ w = ¢ · ¢ · v1 · ¢ · v2 · ¢ · . . . · ¢ · vn · ¢, w(p) ≤ 2 and c(p) ≤ 1 + q + n(r − 1) is maintained. vi = yi,1$i,1yi,2$i,2yi,3$i,3 . . . $i,r−1yi,r has odd length ⇒

slide-104
SLIDE 104

Max/Min Repetitive Factorisation Size/Width

Let p be a factorisation of w with w(p) ≤ 2 and c(p) ≤ 1 + q + n(r − 1). Split every x¢ and ¢x, x ∈ U ∪ {¢}, into x · ¢ and ¢ · x, respectively. ⇒ w = ¢ · ¢ · v1 · ¢ · v2 · ¢ · . . . · ¢ · vn · ¢, w(p) ≤ 2 and c(p) ≤ 1 + q + n(r − 1) is maintained. vi = yi,1$i,1yi,2$i,2yi,3$i,3 . . . $i,r−1yi,r has odd length ⇒ vi = . . . · $i,j−1 · yi,j · $i,j . . . (call yi,j isolated)

slide-105
SLIDE 105

Max/Min Repetitive Factorisation Size/Width

Let p be a factorisation of w with w(p) ≤ 2 and c(p) ≤ 1 + q + n(r − 1). Split every x¢ and ¢x, x ∈ U ∪ {¢}, into x · ¢ and ¢ · x, respectively. ⇒ w = ¢ · ¢ · v1 · ¢ · v2 · ¢ · . . . · ¢ · vn · ¢, w(p) ≤ 2 and c(p) ≤ 1 + q + n(r − 1) is maintained. vi = yi,1$i,1yi,2$i,2yi,3$i,3 . . . $i,r−1yi,r has odd length ⇒ vi = . . . · $i,j−1 · yi,j · $i,j . . . (call yi,j isolated) Let T be the set of all isolated elements.

slide-106
SLIDE 106

Max/Min Repetitive Factorisation Size/Width

Let p be a factorisation of w with w(p) ≤ 2 and c(p) ≤ 1 + q + n(r − 1). Split every x¢ and ¢x, x ∈ U ∪ {¢}, into x · ¢ and ¢ · x, respectively. ⇒ w = ¢ · ¢ · v1 · ¢ · v2 · ¢ · . . . · ¢ · vn · ¢, w(p) ≤ 2 and c(p) ≤ 1 + q + n(r − 1) is maintained. vi = yi,1$i,1yi,2$i,2yi,3$i,3 . . . $i,r−1yi,r has odd length ⇒ vi = . . . · $i,j−1 · yi,j · $i,j . . . (call yi,j isolated) Let T be the set of all isolated elements. T ∩ Si = ∅, 1 ≤ i ≤ n.

slide-107
SLIDE 107

Max/Min Repetitive Factorisation Size/Width

Let p be a factorisation of w with w(p) ≤ 2 and c(p) ≤ 1 + q + n(r − 1). Split every x¢ and ¢x, x ∈ U ∪ {¢}, into x · ¢ and ¢ · x, respectively. ⇒ w = ¢ · ¢ · v1 · ¢ · v2 · ¢ · . . . · ¢ · vn · ¢, w(p) ≤ 2 and c(p) ≤ 1 + q + n(r − 1) is maintained. vi = yi,1$i,1yi,2$i,2yi,3$i,3 . . . $i,r−1yi,r has odd length ⇒ vi = . . . · $i,j−1 · yi,j · $i,j . . . (call yi,j isolated) Let T be the set of all isolated elements. T ∩ Si = ∅, 1 ≤ i ≤ n. sf(p) = {¢} ∪ {all n(r − 1) factors with $i,j} ∪ T.

slide-108
SLIDE 108

Max/Min Repetitive Factorisation Size/Width

Let p be a factorisation of w with w(p) ≤ 2 and c(p) ≤ 1 + q + n(r − 1). Split every x¢ and ¢x, x ∈ U ∪ {¢}, into x · ¢ and ¢ · x, respectively. ⇒ w = ¢ · ¢ · v1 · ¢ · v2 · ¢ · . . . · ¢ · vn · ¢, w(p) ≤ 2 and c(p) ≤ 1 + q + n(r − 1) is maintained. vi = yi,1$i,1yi,2$i,2yi,3$i,3 . . . $i,r−1yi,r has odd length ⇒ vi = . . . · $i,j−1 · yi,j · $i,j . . . (call yi,j isolated) Let T be the set of all isolated elements. T ∩ Si = ∅, 1 ≤ i ≤ n. sf(p) = {¢} ∪ {all n(r − 1) factors with $i,j} ∪ T. c(p) = | sf(p)| = 1 + n(r − 1) + |T| ≤ 1 + n(r − 1) + q ⇒

slide-109
SLIDE 109

Max/Min Repetitive Factorisation Size/Width

Let p be a factorisation of w with w(p) ≤ 2 and c(p) ≤ 1 + q + n(r − 1). Split every x¢ and ¢x, x ∈ U ∪ {¢}, into x · ¢ and ¢ · x, respectively. ⇒ w = ¢ · ¢ · v1 · ¢ · v2 · ¢ · . . . · ¢ · vn · ¢, w(p) ≤ 2 and c(p) ≤ 1 + q + n(r − 1) is maintained. vi = yi,1$i,1yi,2$i,2yi,3$i,3 . . . $i,r−1yi,r has odd length ⇒ vi = . . . · $i,j−1 · yi,j · $i,j . . . (call yi,j isolated) Let T be the set of all isolated elements. T ∩ Si = ∅, 1 ≤ i ≤ n. sf(p) = {¢} ∪ {all n(r − 1) factors with $i,j} ∪ T. c(p) = | sf(p)| = 1 + n(r − 1) + |T| ≤ 1 + n(r − 1) + q ⇒ |T| ≤ q.

slide-110
SLIDE 110

Thank you very much for your attention.