SLIDE 1
Computing Equality-Free String Factorisations Markus L. Schmid - - PowerPoint PPT Presentation
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 2
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Computing repetitive factorisations
What is a good measure of repetitiveness?
SLIDE 30
Computing repetitive factorisations
What is a good measure of repetitiveness? The cardinality c(p)!
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Parameterised Complexity
Parameterised problem K: instances are of the form (x, k), where k is the parameter
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
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
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
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
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
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
Equality-Free Factor Cover (EFFC)
Theorem
EFFC can be solved in time O(|w||F|+1).
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
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
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
Equality-Free Factor Cover (EFFC)
Theorem
The Problem EFFC can be solved in time O(|w| × (2|F| − 1) × |F|!).
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
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
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
Factor Cover (FC)
Theorem
FC can be solved in time O(|F| × |w|2).
SLIDE 64
Factor Cover (FC)
Theorem
FC can be solved in time O(|F| × |w|2).
Proof Sketch
Dynamic programming + KMP.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Max/Min Repetitive Factorisation Size/Width
We have three parameters: |Σ|, m (size/width bound), k (bound on the cardinality).
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
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
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
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
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
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
Max/Min Repetitive Factorisation Size/Width
We know more about computing repetitive factorisations with small width (RF-w)!
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
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
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
Max/Min Repetitive Factorisation Size/Width
Theorem
RF-w is NP-complete even if m ≤ 2.
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
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
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
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
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
Max/Min Repetitive Factorisation Size/Width
T ⊆ U with |T| ≤ q and T ∩ Si = ∅, 1 ≤ i ≤ n ⇒
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
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
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
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
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
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
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
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
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
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
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
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
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