Insertion Operations on Deterministic Reversal

Transcription

Insertion Operations on Deterministic Reversal
Insertion Operations on
Deterministic Reversal-Bounded
Counter Machines
Joey Eremondi,
Department of Computing Science, Utrecht University
j.s.eremondi@students.uu.nl
Oscar Ibarra,
Department of Computer Science, University of California, Santa Barbara
ibarra@cs.ucsb.edu
Ian McQuillan,
Department of Computer Science, University of Saskatchewan
Canada,
mcquillan@cs.usask.ca
1 / 38
Background:
Deterministic Reversal-bounded
Counter Machines
2 / 38
DCMs
• Deterministic Finite Automaton with n
unary counters
• Each counter can switch from incrementing
to decrementing or vice versa at most r
times
• DCM(k, l ): set of all languages accepted by
k-counter, l -reversal DCM
3 / 38
DCMs
• Main definition: one-way input head, with a
special “end-of-tape” marker
• Many variants: 2-way, input head reversal
bounded, no end-of-tape marker, etc.
• Notable variant 2DCM(1): 2-way with one
reversal-bounded counter
4 / 38
DCMs
• The F problems are all decidable:
containment, disjointness, emptiness,
finiteness, universe, equivalence
• Any changes (non-deterministic, remove
reversal bounds, etc.) make some
F-problems undecidable
5 / 38
Motivation/Applications
• Frontier of decidability: how far can we push
DCMs while keeping things decidable
• Want to understand relationship between
determinism and insertion
• DCMs can be applied in modelling,
verification of infinite-state systems
6 / 38
Background:
Insertion Operations on
Languages
7 / 38
Insertion Operations
• Different ways of adding symbols to strings
in a language
• Can be viewed as the inverse of
quotient/deletion operations
• Deletion Operations explored at TAMC 2015
8 / 38
Inverse Prefix
• Words having L as a prefix
• pref −1 (L) = {wx | w ∈ L, x ∈ Σ∗ } = LΣ∗
• Inserts on the end of the string
• Specific form of right language
concatenation
9 / 38
Inverse Suffix
• Words having L as a suffix
• suff −1 (L) = {xw | w ∈ L, x ∈ Σ∗ } = Σ∗ L
• Inserts on the beginning of the string
• Specific form of left language concatenation
10 / 38
Inverse Infix
• Words having L as an infix
• inf −1 (L) = {xwy | w ∈ L, x, y ∈ Σ∗ }
= Σ∗LΣ∗
• Inserts on either (possibly both) ends of the
string
11 / 38
Inverse Outfix
• Words having L as an outfix
• outf −1 (L) = {uxv | uv ∈ L, x ∈ Σ∗ }
• Inserts into the middle of the string
• No longer easy to express as concatenation
of languages
12 / 38
Generalized m-Embedding
• emb−1 (L, m) =
{w0x1 · · · wm−1xm wm | w0 · · · wm ∈ L,
wi ∈ Σ∗, 0 ≤ i ≤ m,
xj ∈ Σ∗, 1 ≤ j ≤ m }
• Insert at most m strings at any point into a
word in L
13 / 38
Insertion Operations
• All very simple operations
• Non-deterministic case: closed under these
operations
• How does determinism affect these closure
properties?
14 / 38
Research Questions
15 / 38
Research Questions
• Under which insertion operations is DCM
closed?
• Under which insertion operations is
2DCM(1) closed?
16 / 38
Research Questions
• Which restricted variants of DCM are closed
under these operations?
• Related: is DCM equivalent to a version
with no end-marker
• How does DCM differ from other models,
like deterministic pushdown?
17 / 38
Closure Results
18 / 38
End-markers
• DCM : allows counter and state transitions
after reading the end-marker
• DCMNE languages accepted without
operations on end-marker
• NE → “No End-marker”
• Result: DCM(1, l ) = DCMNE (1, l ) for any l .
19 / 38
Proof Intuition
• Language of accepting counter values for
each state: regular, unary
• Make DFA for accepting counter values
• Product construction, store in state info
which DFA state current counter value is in
20 / 38
Non-Exiting
• If L ∈ DCMNE , R ∈ REG, then
LR ∈ DCMNE
• Track subset of states of R can be in, add
initial of R every time in final of L
• Corollary: DCM(1, k) closed under right
concatenation with REG
21 / 38
Limited Results
• If L1 ∈ DCMNE and prefix-free, L2 ∈ DCM,
then L1L2 ∈ DCM
• Means we always know when to swtich from
L1 to L2
22 / 38
Showing non-closure with
undecidable properties
23 / 38
Abstract Properties
• DCM is closed under boolean operations,
with decidable emptiness
• 2DCM(1), closed under the same properties
• We use this to show that neither class is
closed under inverse-infix
24 / 38
Non-closure under inverse infix
• We show that there is L ∈ DCM(1, 1) such
that Σ∗LΣ∗ 6∈ DCM ∪ 2DCM(1)
25 / 38
A language not in either class
• Turing machine equivalent to a 2-counter
machine (no reversal bounds)
• Take 2-counter machine T accepting RE
language that’s not R.
• Let L0 be the language of valid (partial) runs
of T
26 / 38
A language not in either class
• Suppose L0 ∈ DCM or DCM(1)
• Make R ∈ REG, runs starting starting with
input n, end in final state
• L0 ∩ R = ∅ ⇐⇒ n 6∈ L(T ), contradicts
undecidability
• Same argument for 2DCM(1)
27 / 38
Intuition for non-closure
• Words #I #I 0 where I to I 0 is not a valid
transition of T .
• Easy to accept with DCM(1, 1)
• Take inf −1 , intersect with “structure”
language, complement
• Gives us L0 , set of all valid runs
28 / 38
Non-closure under inverse prefix
• We show that there is
L ∈ DCM(2, 1) ∩ 2DCM(1) such that
LΣ∗ 6∈ DCM ∪ 2DCM(1)
• Notable: different than deterministic
pushdown
29 / 38
Proof Intuition
• Let L = {#w # | |w |a 6= |w |b }
• Take use inverse prefix, complement,
intersect
k k with REGk to kget
m
m
1
1
#a b # · · · #a b # | m > 0
• Intuitive: Can’t compare m + 1 values if
we’re only allowed m reversals
• Proof shows how we can use closure
properties to construct DCM for L0
30 / 38
Easy Corollaries
31 / 38
End-marker matters
• DCMNE closed under right concatenation
with REG
• Showed L ∈ DCM(2, 1) where
pref −1(L) 6∈ DCM
• So L 6∈ DCMNE
• DCM 6= DCMNE
32 / 38
Non-closure under inverse suffix
• This immediately follows from our previous
results
• We know DCM(1, 1) closed under pref −1
• If it were closed under suff −1 , it would be
closed under inf −1
33 / 38
Non-closure under inverse outfix
• Suppose it is closed. Then if L ∈ DCM, then
{%yx | x ∈ L, y ∈ Σ∗} is also
• Take left-quotient with %, gives suff −1 (L)
• Implies non-closure for embedding
34 / 38
Conclusions
• Completely characterized closure of main
insertion operations for DCM, 2DCM(1)
• Determinism ruins insertion closure for DCM
• End-marker operations make DCM strictly
more powerful
• Can construct concatenations in some
special cases
35 / 38
Summary for DCM
The question: For all L ∈ DCM(k, l ):
Operation
pref −1 (L)
is Op(L) ∈ DCM(k, l)?
Yes if k = 1, l ≥ 1
No if k ≥ 2, l ≥ 1
suff −1 (L)
inf −1 (L)
outf −1 (L)
LR
No if k, l ≥ 1
No if k, l ≥ 1
No if k, l ≥ 1
Yes if k = 1, l ≥ 1
Yes if L ∈ DCMNE
No otherwise if k ≥ 2, l ≥ 1
Yes if R prefix-free
No otherwise if k, l ≥ 1
No if k, l ≥ 1
No if k, l ≥ 1
RL
LDCM L
LDCMNE L
is Op(L) ∈ DCM?
Yes if k = 1, l ≥ 1
Yes if L ∈ DCMNE
No otherwise if k ≥ 2, l ≥ 1
No if k, l ≥ 1
No if k, l ≥ 1
No if k, l ≥ 1
Yes if k = 1, l ≥ 1
Yes if L ∈ DCMNE
No otherwise if k ≥ 2, l ≥ 1
Yes if R prefix-free
No otherwise if k, l ≥ 1
No if k, l ≥ 1
Yes if LDCMNE prefix-free
No otherwise if k, l ≥ 1
36 / 38
Summary for 2DCM(1)
• There exists L ∈ DCM(1, 1) (one-way), s.t.
•
•
•
•
•
suff −1 (L) ∈
/ 2DCM(1)
There exists L ∈ DCM(1, 1) (one-way) , R regular, s.t.
RL ∈
/ 2DCM(1)
There exists L ∈ DCM(1, 1) (one-way), s.t.
outf −1 (L) ∈
/ 2DCM(1)
There exists L ∈ DCM(1, 1) (one-way), s.t.
inf −1 (L) ∈
/ 2DCM(1)
There exists L ∈ 2DCM(1), 1 input turn, 1 counter reversal,
s.t. pref −1 (L) ∈
/ 2DCM(1)
There exists L ∈ 2DCM(1), 1 input turn, 1 counter reversal,
R regular, s.t. LR ∈
/ 2DCM(1)
37 / 38
Questions?
38 / 38