^{1,2}

^{1}

^{3}

^{1}

^{1}

^{2}

^{3}

Fraction reduction is a basic computation for rational numbers. P system is a new computing model, while the current methods for fraction reductions are not available in these systems. In this paper, we propose a method of fraction reduction and discuss how to carry it out in cell-like P systems with the membrane structure and the rules with priority designed. During the application of fraction reduction rules, synchronization is guaranteed by arranging some special objects in these rules. Our work contributes to performing the rational computation in P systems since the rational operands can be given in the form of fraction.

Membrane computing (also called P systems) is a branch of natural computing introduced by Pǎun in 1998 which abstracts computing models from the architecture and the functioning of living cells [

Based on cell-like P systems which are one kind of common systems in membrane computing, Atanasiu firstly constructs arithmetic P systems to implement arithmetic operations [

However, [

Our work in this paper is based on cell-like P systems, and such system (of degree

Beside the above rules, we also consider rules for membrane creation, which is of the form

In each membrane, rules are applied according to the following principles.

Nondeterminism. Suppose

Maximal parallelism. All of the rules that can be applied must be applied simultaneously.

From now on we only deal with cell-like P systems with membrane creation and call them P systems for brevity.

Reference [

Fraction operands are converted into the format which the integer arithmetic requires when the operation is processed. The process of initialization makes the fraction operand be represented in a unified form and it simplifies the operation rules since different operands can be represented by the same objects in the P systems. After initialization, [

The computation results obtained by the systems in [

The goal of fraction reduction is to obtain the simplest fraction, and it means the numerator and denominator are coprimes. Generally, fractions can be reduced by the following methods.

Numerator and denominator are divided by the prime factors that they share until their common factor is 1.

Numerator and denominator are divided directly by their greatest common factor.

These two methods are simple, but both of them are not suitable for being implemented in P systems owing to the following.

For the first one, we need to enumerate the primes, such as 2, 3, 5,7,

For the second one, the greatest common factor of the numerator and denominator should be calculated by Euclidean algorithm, but it cannot be performed efficiently in P systems.

For designing a set of generally universal rules to implement fraction reduction in P systems, we present a new fraction reduction method, based on which the designed system works independently on the size of the input. In this section, some theories on the new method are given and the corresponding algorithm is proposed subsequently with its correctness ensured by the present theories.

Assume that we have integers

Integer sequence

(i) Obviously,

(ii) Assume that

It is easy to see that

From (

The sequence

Generally,

So,

Generally, for

Specifically,

let

According to the construction of

The proofs of the above theories show that the proposed method is feasible for fraction reduction; namely, the simplest proper fraction can be obtained by this method for any fraction.

Assume that we want to reduce the fraction

input

compute

compute

output

We can present an algorithm for fraction reduction in Algorithm

//calculate

repeat

until

//calculate

while

}

In this algorithm, the complexity of the algorithm is

In this section, a kind of P systems is designed for fraction reduction based on the algorithm proposed in Section

The P systems for fraction reduction can be defined as the form of (

Figure

The initial configuration of P system for fraction reduction.

The algorithm proposed in Section

Schematic diagrams for the algorithm in Section

Calculating

Calculating

As shown in Figure

In membrane

When

Generally, in membrane

Finally,

As shown in Figure

In membrane

When

Generally, membrane

When membrane

For convenience, we have some conventions in the rest of the paper as follows.

The rules should have priority, and they are described as the form (

The created membranes named

The objects appearing in the rest of the paper have the same meaning, so they will not be explained any more once they are introduced previously.

In this subsection the rules in the P systems for fraction reduction will be discussed in detail. There are two kinds of rules: one is in membrane 1 and the other is in membranes

According to Section

The rules for calculating

If

If

If

Concerning (

The rules for the operations of multiplication and addition can be designed as follows:

Rule

Except for the rules

There is only one rule in membrane 1 and it is responsible for keeping the final results and dissolving the objects coming from membrane

Owing to maximal parallelism, the complexity of the P systems for fraction reduction must be not more than

In this subsection, we will give an instance to show how to implement the fraction reduction in the P system designed previously. For example, 6/10 can be reduced by the P system as shown in Figure

Schematic diagram for reducing 6/10 by the P system.

The rules in this P system can be applied as follows.

Firstly multiset

The procedure of reducing 6/10 in the designed P system.

Initial configuration

Moves new denominator and numerator to membrane

Moves new denominator and numerator to membrane

Division is performed in membrane

Rule

Membrane

Rules are applied in membranes

Rules are applied in membranes 1,

Membrane

System halts and the final result can be obtained

In Figure

At this moment, there is multiset

There is multiset

There is multiset

There is multiset

There is multiset

There are multisets

There are multisets

There are multisets

There is multiset

Fraction (rational number) computing is foundational in most of the computing models and systems, and the computation results of the fractions often need to be reduced to lighten the load of the subsequent computations. This paper proposes and proves a new suitable reduction method and implements it in P systems. Furthermore, we give an instance to illustrate how to carry out the fraction reduction effectively in this system. For the fact that the rational number can be given by the form of fraction, whose numerator and denominator can be represented by multisets, respectively, our work will contribute to implementing the computation of the rational numbers in P systems. Further, we will research the signed fraction reduction in P systems and the fraction reduction in the case that the denominator or numerator is 0.

The authors declare that there is no conflict of interests regarding the publication of this paper.

This paper is supported by the Fundamental Research Funds for the Central Universities (no. CDJZR13185502), the National Science Foundation for Young Scholars of China (Grant no. 61201347), and Natural Science Foundation Project of CQ CSTC (2012jjA40022, 2011jjA40027).