• Nie Znaleziono Wyników

The transition relation h q, S i →I h q0, S0i holds1 • for I of type (1), when S1⊆ S, S0 = S ∪ S2, and q0 = p

N/A
N/A
Protected

Academic year: 2021

Share "The transition relation h q, S i →I h q0, S0i holds1 • for I of type (1), when S1⊆ S, S0 = S ∪ S2, and q0 = p"

Copied!
3
0
0

Pełen tekst

(1)

P.U., 26 marca 2019, godzina 15: 38 strona1

Monotonic automata

A monotonic automaton is defined as M = h Q, R, f, I i, where

• Q is a finite set of states, with f ∈ Q as the final state.

• R is a finite set of registers;

• I is a finite set of instructions of the form:

(1) I = q : check S1; set S2; jmp p, or (2) I = q : jmp p1 and p2,

where p, p1, p2∈ Q and S1, S2 ⊆ R.

We define a configuration of M as a pair h q, S i, where q ∈ Q and S ⊆ R. The transition relation h q, S i →I h q0, S0i holds1

• for I of type (1), when S1⊆ S, S0 = S ∪ S2, and q0 = p;

• for I of type (2), when S0⊆ S = S0, and q0 = p1 or q0 = p2. A configuration h q, S i is accepting when either q = f , or

• h q, S i →Ih q0, S0i, where I is of type (1), and h q0, S0i is accepting, or

• h q, S i →Ih q0, S i, h q00, S i, where I is of type (2), and both h q0, S i, h q00, S i are accepting.

The halting problem for monotonic automata is

“Given M, q, S, is h q, S i an accepting configuration of M?”

Example 1 Consider a finite automaton A, with states {0, ..., k}, the initial state 0, and the final state k. Given a word w = a1...an, we define a monotonic M such that A accepts w if and only if the initial configuration h q0, r00i is accepting.2

States of M are q0, q1, ..., qn, f where q0 is initial and f is final. Registers are rit, for t ≤ n and i ≤ k. For all t = 0, ..., n − 1, we have an instruction

qt: check rti; set rjt+1; jmp qt+1,

whenever A, reading at+1 in state i, can enter state j. For t = n, we take qn: check rnk; set ∅; jmp f .

Then an accepting computation of A, consisting of states 0, s1, s2, ..., sn = k, is represented by a computation of M, ending in h f, r00, ri11, ..., rinni. Note that the instructions of M are all of type (1), i.e., there is no alternation.

Correctness: By induction with respect to n − t one shows that a configuration of the form h qt, r00, ..., rtiti is accepting if and only if A accepts the suffix at+1...an of w from state it.

1Note that states are not classified as existential or universal, only instructions.

2We write sets without { } whenever it is convenient.

(2)

P.U., 26 marca 2019, godzina 15: 38 strona2

Lemma 2 The halting problem for monotonic automata is Pspace-hard.

Proof: We encode an alternating TM working in polynomial time p(n). Suppose there are k states, and let the input word be w = a1...an. Assume for simplicity that the TM does not write nor move in universal states, and that an accepting computation takes exactly p(n) steps. Define an M with registers

stants, littia, pozti,

where 1 ≤ s ≤ k, 0 ≤ t ≤ p(n), 1 ≤ i ≤ p(n), and a is any symbol of TM. The registers represent, respectively, the state, symbol and machine head at time t in position i. States of M are loopti, splitts

1s2, and gots (for appropriate t, i, s), and the final state f . The initial ID of TM is represented by the configuration

C0 = h loop01, {lit01a1, ..., lit0nan, lit0n+1B, ..., lit0p(n)B, stan00, poz00} i, where B is blank. For any universal state s of TM, we have these instructions:

loopti : check stants, littia, pozjt; set litt+1ia , pozt+1j ; jmp loopti+1; looptp(n) : check stants, littp(n)a, poztj; set litt+1p(n)a, pozt+1j ; jmp splitst +11s2;

splitt+1s1s2 : jmp got+1s1 and got+1s2 ; got+1s1 : check ∅; set stant+1s1 ; jmp loopt+11 ; got+1s2 : check ∅; set stant+1s2 ; jmp loopt+11 ,

for 1 ≤ i < p(n), and 1 ≤ j ≤ p(n), and 0 ≤ t < p(n), and the appropriate a, s, s1, s2.

Now suppose that s is an existential state; then any move of the form (s, a) ⇒ (u, b, +ε) yields the following instructions, where 1 ≤ i < p(n), and 0 ≤ t < p(n), and j 6= i:

loopti: check stants, pozti, littia; set stant+1u , pozt+1i+ε, litt+1ib ; jmp loopti+1; loopti: check stants, poztj, littia; set litt+1ia ; jmp loopti+1;

looptp(n) : check stants, poztp(n), littp(n)a; set stant+1u , pozt+1p(n)+ε, litt+1p(n)b; jmp loopt+11 ; looptp(n): check stants, poztj, littp(n)a; set litt+1p(n)a; jmp loopt+11 .

To complete a computation we use

loopp(n)1 : check stanp(n)f ; set ∅; jmp f , where f is the accepting state of TM.

Correctness: Suppose that our TM, after t steps of computation, scans a on the i-th tape cell in an existential state s. Let (s, a) ⇒ (u, b, +ε) be an applicable move.

This ID of TM corresponds to a configuration h loopt1, S i, where S consists all registers stanur, litujb, pozuj that correctly represent the computation steps u ≤ t. In particular, registers stants, littia, pozti are already set. From state loopt1our M collects the information about the next ID:

moving from looptj to looptj+1 it sets the register corresponding to the j-th tape cell. For i = j, it also updates the TM state and head position. The loop is completed by a return to loopt+11 . In the universal case the tape is unchanged and the head is not moved, yet a round of p(n)

(3)

P.U., 26 marca 2019, godzina 15: 38 strona3

steps is needed to write this information into memory using states looptj. After that the universal step of TM is implemented using state splitt+1s1s2.

In the opposite direction we can observe that any computation of M must essentially obey the above pattern: the choice of registers to set is determined by TM transitions.

To make the above fully precise one should define what it means that “a set S ⊆ R encodes an ID of the form J = x1...xjqxj+1...xp(n)of TM at time t” and prove that in this case h loopt1, S i is accepting iff the TM accepts J in time p(n) − t. This pleasure is left to the reader. 

Corollary 3 Propositional intutionistic logic is Pspace-hard.

Proof: Consider a monotonic automaton M and an ID of the form C0 = h q0, S0i. Using states and registers of M as propositional atoms, we define a set of axioms Γ so that Γ ` q0 if and only if C0 is accepting. The set Γ contains the atoms S0∪ {f }; the other axioms represent instructions of M.

An axiom for q : check S1; set S2; jmp p, where S1 = {s11, ..., sk1} and S2= {s12, ..., s`2}, is:

(1) s11→ · · · → sk1 → (s12→ · · · s`2→ p) → q.

And for every instruction q : jmp p1 and p2, there is axiom

(2) p1→ p2 → q.

For every S ⊆ R, we prove that Γ, S ` q if and only if C = h q, S ∪ S0i is accepting. We think of Γ as of a type environment where each axiom is a declaration of a variable.

(⇒) Induction with respect to proofs. Any normal proof T of an atom q must be a variable or an application, say T = x ~N , The case of x : f (i.e., q = f ) is obvious; otherwise the type of x corresponds to an instruction. There are two possibilities:

(1) If x : s11 → · · · → sk1 → (s12 → · · · s`2 → p) → q, then T = xD1...Dk(λu1:s12...λu`:s`2. P ).

Terms D1, ..., Dk are of types s11, ..., sk1 respectively, and they must be variables declared in S, as there is no other assumption with target s11, ..., sk1. This means that S0 ⊆ S. Hence the instruction corresponding to x is applicable at C = h q, S i and yields C0 = h p, S ∪ S0i. In addition we have Γ0, S ∪ S0 ` P : p, whence C0 is accepting by the induction hypothesis.

(2) If x has type p1 → p2→ q then T = xT1T2. The appropriate universal instruction leads to two IDs: C1 = h p1, S i and C2 = h p2, S i. The judgments Γ0, S ` T1 : p1 and Γ0, S ` T2 : p2 obey the induction hypothesis. Thus C1, C2 are accepting and so is C.

(⇒) Induction with respect to computations. 

Cytaty

Powiązane dokumenty

Extending this idea we will introduce Hadamard matrices: such a matrix (of order q) gives sequences which can be generated by finite automata and which satisfy (2) where M 2 is

We say that a bipartite algebra R of the form (1.1) is of infinite prin- jective type if the category prin(R) is of infinite representation type, that is, there exists an

Schinzel [1] also note that the main term, but not the error term, can be derived from Theorem 1.3 of P..

p: It is snowing q: The roads are open r: We will go skiing (a) Write the following compound statement in symbolic form.. “It is snowing and the roads are

The aim of this work is to propose a new method for spectro-temporal analysis and filtering of finite duration signals having non-stationary fre- quency characteristics, which is

Our re- sult is relevant to the study of adaptive control problems and approxima- tion problems in the theory of discrete-time Markov decision processes and stochastic games.. Let

aug(H % ), which is the closure of the class of all well- founded posets with antichain rank ≤ % under inversion, lexicographic sums, and augmentation, contains the class of

This upper bound of ours for π(x, y) is somewhat less precise than the upper bound in Corollary 2 of Hildebrand and Tenenbaum [12], but our result is more explicit, has an easier