Research Article

Research on P System with Chain Structure and Application and Simulation in Arithmetic Operation

Algorithm 3

Rule selection algorithm with “competition for resource”.
INPUT: rule set A (the output of Algorithm 2)
OUTPUT: rule set without competition for resource
(1) Select one rule form randomly, adding into , and delete from at the same time.
(2) For every rule in except , if there is competition for resource between and ,
  delete from . If is not null, return (1), else output .