Simulating EXPSPACE Turing machines using P systems with active membranes

Artiom Alhazov1,2 Alberto Leporati1 Giancarlo Mauri1 Antonio E. Porreca1 Claudio Zandron1

1Dipartimento di Informatica, Sistemistica e Comunicazione Università degli Studi di Milano-Bicocca

2Institute of Mathematics and Computer Science Academy of Sciences of Moldova

13th Italian Conference on Theoretical Computer Science 19–21 September 2012, Varese, Italy Outline

1. P systems 2. and the time-space trade-off 3. Simulating Turing machines 4. Conclusions and open problems

2/16 P systems (with restricted active membranes)

0 + − a a a 0 c b b c c a b

c h3

h2

h1 a b c

h0

3/16 Computation rules

α Object evolution a w

h

α β Communication (send-out) a b

h h

α β Communication (send-in) a b

h h

α β γ Elementary division a b c

h h h

4/16 PSPACE PMC AM PPP includes PH PP NP

I Membrane division is provably needed

Parallelism and efficiency

I The rules are applied in a maximally parallel way I There may be nondeterminism, but we require confluence I Division may create exponentially many processing units in linear time

I So we can solve hard problems in polynomial time by trading space for time

5/16 I Membrane division is provably needed

Parallelism and efficiency

I The rules are applied in a maximally parallel way I There may be nondeterminism, but we require confluence I Division may create exponentially many processing units in linear time

I So we can solve hard problems in polynomial time by trading space for time

PSPACE PMC AM PPP includes PH PP NP

5/16 Parallelism and efficiency

I The rules are applied in a maximally parallel way I There may be nondeterminism, but we require confluence I Division may create exponentially many processing units in linear time

I So we can solve hard problems in polynomial time by trading space for time

PSPACE PMC AM PPP includes PH PP NP

I Membrane division is provably needed 5/16 M1 n N ∈ 1 1 1 yes

aab

M2 n x Σ 0 1 aab ∈ 0 no

input multiset

Uniformity

We decide membership in some language by using a uniform family of P systems

6/16 Uniformity

We decide membership in some language L by using a uniform family of P systems

M1 n N ∈ 1 1 1 yes

aab

M2 n x Σ 0 1 aab ∈ 0 no

input multiset

6/16 space = #membranes + #objects

Formalising the time-space trade-off

What’s the exact meaning of trading space for time?

time = #computation steps

7/16 Formalising the time-space trade-off

What’s the exact meaning of trading space for time?

time = #computation steps

space = #membranes + #objects

7/16 Proof.

I A family of P systems working in space f (n) can be simulated by a TM working in O(f (n) log f (n)) space

I A TM working in space f (n) can be simulated by a family of P systems in space O(f (n)) as long as f is a polynomial

Known results on space complexity

Theorem Polynomial-space P systems and polynomial-space Turing machines solve the same class of decision problems, namely PSPACE

8/16 I A TM working in space f (n) can be simulated by a family of P systems in space O(f (n)) as long as f is a polynomial

Known results on space complexity

Theorem Polynomial-space P systems and polynomial-space Turing machines solve the same class of decision problems, namely PSPACE Proof.

I A family of P systems working in space f (n) can be simulated by a TM working in O(f (n) log f (n)) space

8/16 Known results on space complexity

Theorem Polynomial-space P systems and polynomial-space Turing machines solve the same class of decision problems, namely PSPACE Proof.

I A family of P systems working in space f (n) can be simulated by a TM working in O(f (n) log f (n)) space

I A TM working in space f (n) can be simulated by a family of P systems in space O(f (n)) as long as f is a polynomial

8/16 Simulating polynomial-space TMs

q

a a b b 2 1 3 5 0 4

n

| {z } p(n) | {z }

9/16 Simulating polynomial-space TMs

q

a a b b 2 1 3 5 0 4

0 + + 0 0 − − 0 1 2 3 4 5 q2 h labels provide order and identify cells

9/16 The problem with superpolynomial space bounds

I We cannot use exponentially many labels (polytime uniformity)

I We must create the tape-membranes at runtime via membrane division

I But the new membranes are indistinguishable from the outside (they have the same label)

I Solution: order and identify membranes according to their contents

10/16 Encoding exponential space configurations

q a a b b 100 011 101 111 010 110

n

| {z } 2p(n) | {z } 11/16 Encoding exponential space configurations

q a a b b 100 011 101 111 010 110

0 0 0 0 0 0 0 02 11 00 02 11 10 12 01 00 12 01 10 12 11 00 12 11 10 b a a b t0 t1 t t t t t t

+ + 0 0 q 0 0 0 2 1 0 e a b t s

11/16 Simulating a computation step of the TM

δ(q, ) = (, b,/) t

0 0 0 0 0 0 0 02 11 00 02 11 10 12 01 00 12 01 10 12 11 00 12 11 10 b a a b t0 t1 t t t t t t

+ + 0 0 q 0 0 0 2 1 0 e a b t s

12/16 Simulating a computation step of the TM

δ(q, ) = (r, b,/) t

0 0 0 0 0 0 0 02 11 00 02 11 10 12 01 00 12 01 10 12 11 00 12 11 10 b q1 a a b t0 t1 t t t t t t

+ + 0 0 0 0 0 2 1 0 e a b t s

12/16 Simulating a computation step of the TM

δ(q, ) = (r, b,/) t

0 0 + 0 0 0 0 02 11 00 02 11 10 12 01 00 12 01 10 12 11 00 12 11 10 b a a b t0 t1 t t t t t t

+ + 0 0 0 0 0 q2 2 1 0 e a b t s

12/16 Simulating a computation step of the TM

δ(q, ) = (r, b,/) t

0 0 + 0 0 0 0 02 11 00 0200 1100 1000 12 01 00 12 01 10 12 11 00 12 11 10 b 00 10 10 a b t0 2 1 0 t1 t t t t t t a + + 0 0 0 0 0 q3 2 1 0 e a b t s

12/16 Simulating a computation step of the TM

δ(q, ) = (r, b,/) t

0 0 + 0 0 0 0 02 11 00 0200 1100 1000 12 01 00 12 01 10 12 11 00 12 11 10 b 00 10 a b t0 2 0 t1 t t t t t t

110 + + 0 0 + 0 0 q4 a 2 1 0 e a b t s

12/16 Simulating a computation step of the TM

δ(q, ) = (r, b,/) t

0 0 + 0 0 0 0 02 11 00 0200 1100 1000 12 01 00 12 01 10 12 11 00 12 11 10 b 10 a b t0 0 t1 t t t t t t

020 + + 0 0 q + 0 0 10 5 a 2 1 1 0 e a b t s

12/16 Simulating a computation step of the TM

δ(q, ) = (r, b,/) t

0 0 + 0 0 0 0 02 11 00 0200 1100 1000 12 01 00 12 01 10 12 11 00 12 11 10 b a b t0 t1 t t t t t t

10 + + 0 0 q + 0 0 00 6 a 2 2 1 0 e a b t s

12/16 Simulating a computation step of the TM

δ(q, ) = (r, b,/) t

0 0 + 0 0 0 0 02 11 00 0200 1100 1000 12 01 00 12 01 10 12 11 00 12 11 10 b a b t0 t1 t t t t t t e + + 0 0 q + 0 0 10 7 a 2 1 0 0 e a b t s

12/16 Simulating a computation step of the TM

δ(q, ) = (r, b,/) t

0 0 + 0 0 0 0 02 11 00 0200 1100 1000 12 01 00 12 01 10 12 11 00 12 11 10 b a b t0 t1 t t t t t t e + + 0 + + 0 0 e q8 a 2 1 0 e a b t s

12/16 Simulating a computation step of the TM

δ(q, ) = (r, b,/) t

0 0 + 0 0 0 0 02 11 00 0200 1100 1000 12 01 00 12 01 10 12 11 00 12 11 10 b a b t0 t1 t t t t t t

+ + 0 + + 0 0 e q9 a 2 1 0 e a b t s

12/16 Simulating a computation step of the TM

δ(q, ) = (r, b,/) t

0 0 + 0 0 0 0 02 11 00 0200 1100 1000 12 01 00 12 01 10 12 11 00 12 11 10 b a b t0 t1 t t t t t t

+ + 0 + + 0 0 q10 a 2 1 0 e a b t s

12/16 Simulating a computation step of the TM

δ(q, ) = (r, b,/) t

0 0 + 0 0 0 0 02 11 00 0200 1100 1000 12 01 00 12 01 10 12 11 00 12 11 10 b a b t0 t1 t t t t t t

q110 + + + 0 0 a 0 0 2 1 0 e a b t s

12/16 Simulating a computation step of the TM

δ(q, ) = (r, b,/) t

0 0 + 0 0 0 0 02 11 00 0200 1100 1000 12 01 00 12 01 10 12 11 00 12 11 10 b a b t0 t1 t t t t t t

+ + 0 0 0 0 a q0 − 2 1 0 e 12 a b t s

12/16 Simulating a computation step of the TM

δ(q, ) = (r, b,/) t

0 0 + 0 0 0 0 02 11 00 0200 1100 1000 12 01 00 12 01 10 12 11 00 12 11 10 b a b t0 t1 t t t t t t

a0 + + 0 0 0 0 q0 − 2 1 0 e 13 a b t s

12/16 Simulating a computation step of the TM

δ(q, ) = (r, b,/) t

0 0 0 0 0 0 02 11 00 0200 1100 1000 − 12 01 00 12 01 10 12 11 00 12 11 10 b a a b t0 t1 t t t t t t

q140 + + 0 0 0 0 0 2 1 0 e a b t s

12/16 Simulating a computation step of the TM

δ(q, ) = (r, b,/) t

0 0 0 0 0 0 02 11 00 02 11 10 − 12 01 00 12 01 10 12 11 00 12 11 10 b a a b t0 t1 t t t t t t

+ + 0 0 q 0 0 0 2 1 0 e a b t s

12/16 Simulating a computation step of the TM

δ(q, ) = (r, b,/) t

0 0 0 0 02 11 00 − 02 11 10 − 12 01 00 12 01 10 12 11 00 12 11 10 − b a a b t0 t1 t t t t t t

+ + 0 0 q 0 0 0 2 1 0 e a b t s

12/16 Simulating a computation step of the TM

δ(q, ) = (r, b,/) t

0 0 0 0 02 11 00 − 02 11 10 − 12 01 00 12 01 10 12 11 00 12 11 10 − b a a b q1 t0 t1 t t t t t t

+ + 0 0 0 0 0 2 1 0 e a b t s

12/16 Simulating a computation step of the TM

δ(q, ) = (r, b,/) t

0 0 0 + 02 11 00 − 02 11 10 − 12 01 00 12 01 10 12 11 00 12 11 10 − b a a b t0 t1 t t t t t t

+ + 0 0 0 0 0 q2 2 1 0 e a b t s

12/16 Simulating a computation step of the TM

δ(q, ) = (r, b,/) t

0 0 0 + 02 11 00 − 02 11 10 − 12 01 00 12 01 10 1200 1100 0000 12 11 10 − b a a b 10 10 00 t0 t1 t t 2 1 0 t t t

+ + 0 0 0 0 t 0 q3 2 1 0 e a b t s

12/16 Simulating a computation step of the TM

δ(q, ) = (r, b,/) t

0 0 0 + 02 11 00 − 02 11 10 − 12 01 00 12 01 10 1200 1100 0000 12 11 10 − b a a b 10 00 t0 t1 t t 1 0 t t t

120 + + 0 0 0 0 + q4 2 1 0 e a b t t s

12/16 Simulating a computation step of the TM

δ(q, ) = (r, b,/) t

0 0 0 + 02 11 00 − 02 11 10 − 12 01 00 12 01 10 1200 1100 0000 12 11 10 − b a a b 10 t0 t1 t t 1 t t t

00 + + 0 0 q 0 0 + 10 5 2 2 1 0 e a b t t s

12/16 Simulating a computation step of the TM

δ(q, ) = (r, b,/) t

0 0 0 + 02 11 00 − 02 11 10 − 12 01 00 12 01 10 1200 1100 0000 12 11 10 − b a a b t0 t1 t t t t t

110 + + 0 0 q 0 0 + 00 6 2 1 0 0 e a b t t s

12/16 Simulating a computation step of the TM

δ(q, ) = (r, b,/) t

0 0 0 + 02 11 00 − 02 11 10 − 12 01 00 12 01 10 1200 1100 0000 12 11 10 − b a a b t0 t1 t t t t t

+ + 0 0 q 0 0 + 10 7 2 1 1 0 e a b t t s

12/16 Simulating a computation step of the TM

δ(q, ) = (r, b,/) t

0 0 0 + 02 11 00 − 02 11 10 − 12 01 00 12 01 10 1200 1100 0000 12 11 10 − b a a b t0 t1 t t t t t

+ + 0 0 0 0 + q8 2 1 0 e a b t t s

12/16 Simulating a computation step of the TM

δ(q, ) = (r, b,/) t

0 0 0 + 02 11 00 − 02 11 10 − 12 01 00 12 01 10 1200 1100 0000 12 11 10 − b a a b t0 t1 t t t t t

+ + 0 0 0 0 + q9 2 1 0 e a b t t s

12/16 Simulating a computation step of the TM

δ(q, ) = (r, b,/) t

0 0 0 + 02 11 00 − 02 11 10 − 12 01 00 12 01 10 1200 1100 0000 12 11 10 − b a a b t0 t1 t t t t t

+ + 0 0 0 0 + q10 2 1 0 e a b t t s

12/16 Simulating a computation step of the TM

δ(q, ) = (r, b,/) t

0 0 0 + 02 11 00 − 02 11 10 − 12 01 00 12 01 10 1200 1100 0000 12 11 10 − b a a b t0 t1 t t t t t

q11 + + 0 0 0 0 + 2 1 0 e a b t t s

12/16 Simulating a computation step of the TM

δ(q, ) = (r, b,/) t

0 0 0 + 02 11 00 − 02 11 10 − 12 01 00 12 01 10 1200 1100 0000 12 11 10 − b a a b t0 t1 t t t t t

+ + 0 0 0 0 0 q12 2 1 0 e a b t t s

12/16 Simulating a computation step of the TM

δ(q, ) = (r, b,/) t

0 0 0 + 02 11 00 − 02 11 10 − 12 01 00 12 01 10 1200 1100 0000 12 11 10 − b a a b t0 t1 t t t t t

+ + 0 0 0 0 0 b0 q13 2 1 0 e a b t s

12/16 Simulating a computation step of the TM

δ(q, ) = (r, b,/) t

0 0 0 + 02 11 00 − 02 11 10 − 12 01 00 12 01 10 1200 1100 0000 12 11 10 − b a a b t0 t1 t t t t t

b0 + + 0 0 0 0 0 q14 2 1 0 e a b t s

12/16 Simulating a computation step of the TM

δ(q, ) = (r, b,/) t

0 0 0 02 11 00 − 02 11 10 − 12 01 00 12 01 10 1200 1100 0000 − 12 11 10 − b a a b b t0 t1 t t t t t

q0t + + 0 0 0 0 0 2 1 0 e a b t s

12/16 Simulating a computation step of the TM

δ(q, ) = (r, b,/) t

0 0 0 02 11 00 − 02 11 10 − 12 01 00 12 01 10 12 11 00 − 12 11 10 − b a a b b t0 t1 t t t t t

+ + 0 0 0 0 0 qt 2 1 0 0 e a b t s

12/16 Simulating a computation step of the TM

δ(q, ) = (r, b,/) t

0 0 0 02 11 00 − 02 11 10 − 12 01 00 12 01 10 12 11 00 − 12 11 10 − b a a b b t0 t1 t t t t t

q1t + + + 0 0 0 0 2 1 0 e a b t s

12/16 Simulating a computation step of the TM

δ(q, ) = (r, b,/) t

0 0 0 02 11 00 − 02 11 10 − 12 01 00 12 01 10 12 11 00 − 12 11 10 − b a a b b t0 t1 t t t t t

+ + + 0 0 0 0 qt 2 1 1 0 e a b t s

12/16 Simulating a computation step of the TM

δ(q, ) = (r, b,/) t

0 0 0 02 11 00 − 02 11 10 − 12 01 00 12 01 10 12 11 00 − 12 11 10 − b a a b b t0 t1 t t t t t

q3t + 0 + 0 0 0 0 2 1 0 e a b t s

12/16 Simulating a computation step of the TM

δ(q, ) = (r, b,/) t

0 0 0 02 11 00 − 02 11 10 − 12 01 00 12 01 10 12 11 00 − 12 11 10 − b a a b b t0 t1 t t t t t t0 t1 c2

+ 0 + 0 0 0 0 q4t 2 1 0 e a b t s

12/16 Simulating a computation step of the TM

δ(q, ) = (r, b,/) t

0 0 0 0 0 02 11 00 02 11 10 12 01 00 12 01 10 12 11 00 − 12 11 10 − t0 b t1 a a b b t0 t1 t t t t t c1 c1

+ 0 + 0 0 0 0 q5t 2 1 0 e a b t s

12/16 Simulating a computation step of the TM

δ(q, ) = (r, b,/) t

0 0 0 0 0 02 11 00 02 11 10 12 01 00 12 01 10 12 11 00 − 12 11 10 − b a a b b t0 t1 t t t t t c0 c0 c0 c0

+ 0 + 0 0 0 0 q6t 2 1 0 e a b t s

12/16 Simulating a computation step of the TM

δ(q, ) = (r, b,/) t

0 0 0 0 0 0 0 02 11 00 02 11 10 12 01 00 12 01 10 12 11 00 12 11 10 b a c0 a c0 b c0 b c0 t0 t1 t t t t t

+ 0 + 0 0 0 0 q7t 2 1 0 e a b t s

12/16 Simulating a computation step of the TM

δ(q, ) = (r, b,/) t

0 0 0 0 0 0 02 11 00 02 11 10 12 01 00 12 01 10 12 11 00 12 11 10 b a a b b t0 t1 t t t t t

+ 0 + 0 r 0 0 0 2 1 0 e a b t s

12/16 Initialising the system

qinit a b 100 011 101 111 010 110

0 0 0 0 02 11 00 02 11 10 12 d1 d0 t0 t1 t t b0 a1

0 0 0 0 0 0 0 + z2 2 1 0 e a b t s

13/16 Initialising the system

qinit a b 100 011 101 111 010 110

0 0 0 0 0 02 11 00 02 11 10 12 d1 00 12 d1 10 b a t0 t1 t t t t + 0 + 0 0 0 0 0 z1 2 1 0 e a b t s

13/16 Initialising the system

qinit a b 100 011 101 111 010 110

0 0 0 0 0 0 0 02 11 00 02 11 10 12 01 00 12 11 00 12 01 10 12 11 10 b a t0 t1 t t t t t t t t

0 + 0 0 0 0 0 qinit 2 1 0 e a b t s

13/16 Main result

Theorem Let M be a single-tape deterministic working in time t(n) and space s(n), where s(n) n + 2p(n) for some polynomial p. Then there exists a uniform≤ family of confluent P systems with restricted elementary active membranes Π operating in time O t(n)s(n) log s(n) and space O s(n) log s(n) such that L(Π) = L(M)   Corollary Both exponential-space TMs and exponential-space P systems solve exactly the problems in EXPSPACE

14/16 Conclusions and open problems

I P systems and TMs have identical computing power both in polynomial and in exponential space I Preliminary results for sub-polynomial space

I A weaker uniformity condition is needed I Is there a general equivalence in power wrt all space bounds?

I Probably, though the simulation must be improved I Possible solution: unary encoding of tape cell numbers

15/16 Grazie per l’attenzione! Thanks for your attention!