••
Computing with P SystemsA Syropoulos, S Doumanis and KT Sotiriades
Greek Molecular Computing Group
Xanthi, Greece
E-mail: [email protected]
M.I.T
◦••••◦
••
2/15
Recursive Functions & P Systems
Recursive Functions have been encoded as P systems
by Romero-Jiménez and Pérez-Jiménez.
M.I.T
◦••••◦
••
2/15
Recursive Functions & P Systems
Recursive Functions have been encoded as P systems
by Romero-Jiménez and Pérez-Jiménez.
Here we will present an alternative encoding based on
“abacus” computing.
M.I.T
◦••••◦
••
2/15
Recursive Functions & P Systems
Recursive Functions have been encoded as P systems
by Romero-Jiménez and Pérez-Jiménez.
Here we will present an alternative encoding based on
“abacus” computing.
For our encoding it was necessary to introduce new
rewriting rules and to make use of a more “liberal”
membrane structures.
M.I.T
◦••••◦
••
2/15
Recursive Functions & P Systems
Recursive Functions have been encoded as P systems
by Romero-Jiménez and Pérez-Jiménez.
Here we will present an alternative encoding based on
“abacus” computing.
For our encoding it was necessary to introduce new
rewriting rules and to make use of a more “liberal”
membrane structures.
Our encoding provides a “fresh” look at P systems.
M.I.T
◦••••◦
••
3/15
The Basic Functions
The three basic functions.
the zero function z(x1, . . . , xn) = 0,
the successor function S(x) = x+ 1, and
the identity function Uni (x1, . . . , xn) = xi, 1 ≤ i ≤ n.
M.I.T
◦••••◦
••
3/15
The Basic Functions
The three basic functions.
the zero function z(x1, . . . , xn) = 0,
the successor function S(x) = x+ 1, and
the identity function Uni (x1, . . . , xn) = xi, 1 ≤ i ≤ n.
M.I.T
◦••••◦
••
3/15
The Basic Functions
The three basic functions.
the zero function z(x1, . . . , xn) = 0,
the successor function S(x) = x+ 1, and
the identity function Uni (x1, . . . , xn) = xi, 1 ≤ i ≤ n.
M.I.T
◦••••◦
••
3/15
The Basic Functions
The three basic functions.
the zero function z(x1, . . . , xn) = 0,
the successor function S(x) = x+ 1, and
the identity function Uni (x1, . . . , xn) = xi, 1 ≤ i ≤ n.
M.I.T
◦•••◦
••
4/15
Encoding the Zero Function
We assume that each basic function is encoded as a
P system with two membranes.
M.I.T
◦•••◦
••
4/15
Encoding the Zero Function
We assume that each basic function is encoded as a
P system with two membranes.
This function simply discards its arguments and
returns zero. For each argument xi of the function we
pick up an object αi and place xi copies of it in the
outter compartment.
M.I.T
◦•••◦
••
4/15
Encoding the Zero Function
We assume that each basic function is encoded as a
P system with two membranes.
This function simply discards its arguments and
returns zero. For each argument xi of the function we
pick up an object αi and place xi copies of it in the
outter compartment.
Next, we associate to each object αi a multiset rewrite
rule of the form
αi → ε
M.I.T
◦•••◦
••
5/15
Encoding the Zero Function (Cont.)
This is a new kind of rule that simply annihilates all
objects. We can imagine that there is a pipe that is
used to throw the αi’s into the environment.
M.I.T
◦•••◦
••
5/15
Encoding the Zero Function (Cont.)
This is a new kind of rule that simply annihilates all
objects. We can imagine that there is a pipe that is
used to throw the αi’s into the environment.
This rule can be considered to implement a form of
“catharsis” of a compartment.
M.I.T
◦•••◦
••
5/15
Encoding the Zero Function (Cont.)
This is a new kind of rule that simply annihilates all
objects. We can imagine that there is a pipe that is
used to throw the αi’s into the environment.
This rule can be considered to implement a form of
“catharsis” of a compartment.
Thus, the outcome of the computation of this P system
is the number zero as all objects are actually thrown to
the environment.
M.I.T
◦•••◦
••
6/15
Encoding the successor function
Problem: An empty P system encoding the successor
function.
M.I.T
◦•••◦
••
6/15
Encoding the successor function
Problem: An empty P system encoding the successor
function.
This system must place an object to the target
compartment and stop.
M.I.T
◦•••◦
••
6/15
Encoding the successor function
Problem: An empty P system encoding the successor
function.
This system must place an object to the target
compartment and stop.
As there is no rule that can be apllied to an empty
compartment we are obliged to introduce a new one:
ε → (α, ini)
M.I.T
◦••••◦
••
7/15
Encoding the successor function (Cont.)
The rule ε → (α, ini) is applicable only if there are no
objects in a given compartment.
M.I.T
◦••••◦
••
7/15
Encoding the successor function (Cont.)
The rule ε → (α, ini) is applicable only if there are no
objects in a given compartment.
This rule just places an object α to compartment i.
M.I.T
◦••••◦
••
7/15
Encoding the successor function (Cont.)
The rule ε → (α, ini) is applicable only if there are no
objects in a given compartment.
This rule just places an object α to compartment i.
The rationale behind this rule is that at any moment a
cell can absorb matter from its environment that, in
turn, will be consumed.
M.I.T
◦••••◦
••
7/15
Encoding the successor function (Cont.)
The rule ε → (α, ini) is applicable only if there are no
objects in a given compartment.
This rule just places an object α to compartment i.
The rationale behind this rule is that at any moment a
cell can absorb matter from its environment that, in
turn, will be consumed.
This new rule makes the encoding of the successor
function trivial.
M.I.T
◦••••◦
••
8/15
The identity function
This function is similar to the zero function with one
difference: it discards all of its arguments but one.
M.I.T
◦••••◦
••
8/15
The identity function
This function is similar to the zero function with one
difference: it discards all of its arguments but one.
For each xi we place xi copies of αi to the outter
membrane
M.I.T
◦••••◦
••
8/15
The identity function
This function is similar to the zero function with one
difference: it discards all of its arguments but one.
For each xi we place xi copies of αi to the outter
membrane
Assume that the identity function returns its jth
argument, then we associate with αj the following rule:
αj → (αj, in2)
M.I.T
◦••••◦
••
8/15
The identity function
This function is similar to the zero function with one
difference: it discards all of its arguments but one.
For each xi we place xi copies of αi to the outter
membrane
Assume that the identity function returns its jth
argument, then we associate with αj the following rule:
αj → (αj, in2)
The remaing objects are associated with a catharsis
rule: αi → ε, i 6= j
M.I.T
◦••◦
••
9/15
The Three Processes
Composition f is a function of m arguments and each
g1, . . . , gm is a function of n arguments, then their
composition is defined as follows:
h(x1, . . . , xn) = f(g1(x1, . . . , xn), . . . , gm(x1, . . . , xn))
M.I.T
◦••◦
••
9/15
The Three Processes
Composition f is a function of m arguments and each
g1, . . . , gm is a function of n arguments, then their
composition is defined as follows:
h(x1, . . . , xn) = f(g1(x1, . . . , xn), . . . , gm(x1, . . . , xn))
Primitive Recursion A function h of k + 1 arguments is
definable by (primitive) recursion from functions f and g,
with k and k + 2 arguments, respectively, if it is defined as
follows:
h(x1, . . . , xk, 0) = f(x1, . . . , xk)
h(x1, . . . , xk, S(m)) = g(x1, . . . , xk,m, h(x1, . . . , xk,m))
M.I.T
••
10/15
The Three Processes (Cont.)
Minimalization The operation of minimalizationassociates with each total function f of k + 1arguments the function h of k arguments. Givena tuple (x1, . . . , xk), the value of h(x1, . . . , xk) isthe least value of xk+1, if one such exists, forwhich f(x1, . . . , xk, xk+1) = 0. If no such xk+1
exists, then its value is undefined.
M.I.T
••
11/15
Encoding the composition process
αx1βx2γx3
✛✚
✘✙
✄✂ �✁g1 ✛
✚✘✙
✄✂ �✁g2
✛✚
✘✙
f
❈❈❈❈❈❈
❈❈❈❈❈❈
✁✁✁✁✁✁
✁✁✁✁
✁✁
M.I.T
••
14/15
The rules
R1 = {a → (a, to2)(⊕, to3),
b → (b, to2)(⊗, to3))}
R2 = {# → (#, to3)}
R3 = {# → (#, to4),
# → (b, to1),
⊕ → (a, to1),
⊗ → (b, to1)}
M.I.T
Top Related