# Algorithm of Rules Application based on Competitiveness of Evolution Rules Speaker: Jorge Aurelio Tejedor Cerbel 8th Workshop on Membrane Computing Natural.

## Presentation on theme: "Algorithm of Rules Application based on Competitiveness of Evolution Rules Speaker: Jorge Aurelio Tejedor Cerbel 8th Workshop on Membrane Computing Natural."— Presentation transcript:

Algorithm of Rules Application based on Competitiveness of Evolution Rules Speaker: Jorge Aurelio Tejedor Cerbel 8th Workshop on Membrane Computing Natural Computing Group

Algorithm of Rules Application based on Competitiveness of Evolution Rules 2 The evolution step time is of the order of square root of the number of membranes that the P system has. The evolution step time is of the order of square root of the number of membranes that the P system has. With a rules application algorithm N times faster, the evolution step time is divided by square root of N. With a rules application algorithm N times faster, the evolution step time is divided by square root of N. It is needed an evolution rules application algorithm which maximum execution time can be known beforehand. It is needed an evolution rules application algorithm which maximum execution time can be known beforehand. T evo ≈ #membranes Related Works: Viable Sw Architecture (I) Bravo[2007], Tejedor[2007]

Algorithm of Rules Application based on Competitiveness of Evolution Rules 3 Related works: [Tejedor2007] Active Rules Elimination Algorithm Maximal applicability benchmark: the maximum number of times that a rule can be applied. Maximal applicability benchmark: the maximum number of times that a rule can be applied. To eliminate one by one the rules of the active rule set. To eliminate one by one the rules of the active rule set. Each step for elimination of a rule A requires the sequential execution of 2 actions: Each step for elimination of a rule A requires the sequential execution of 2 actions: 1.Any rule other than A belonging to the set of active rules is applied a random number of times between 0 and its maximal applicability benchmark. 2.The rule A is applied a number of times that is equal to its maximal applicability benchmark.

Algorithm of Rules Application based on Competitiveness of Evolution Rules 4 { r 1 r 2 r 3 r 4 } R = R = Rule Elimination for r 4 Execution trace of the algorithm Execution trace of the algorithm { r 1 r 2 r 3 } = R { r 1 r 2 } = R { r 1 } = R Related works: [Tejedor2007] Active Rules Elimination Algorithm (II) Rule Elimination for r 1 Rule Elimination for r 2 Rule Elimination for r 3

Algorithm of Rules Application based on Competitiveness of Evolution Rules 5 2 [r 1 ] 0 max [r 2 ] 0 max [r 3 ] 0 max [r 4 ] max [r 1 ] 0 max [r 2 ] 0 max [r 3 ] max [r 1 ] 0 max [r 2 ] max [r 1 ] max #operations = · #rules · (#rules - 1) Execution time of the algorithm Execution time of the algorithm #operations =10 Complexity = O(#rules 2 ) Related works: [Tejedor2007] Active Rules Elimination Algorithm (III)

Algorithm of Rules Application based on Competitiveness of Evolution Rules 6 To eliminate one by one the rules of the active rule set. To eliminate one by one the rules of the active rule set. Each step for elimination of a rule A requires the sequential execution of 2 actions: Each step for elimination of a rule A requires the sequential execution of 2 actions: 1.Any rule other than A proposes in an independent manner, a multiset to be consumed from the membrane multiset. If the addition of all the proposed multisets by the rules is smaller than the membrane multiset, then the proposed multiset is subtracted from the membrane multiset. 2.The rule A is applied a number of times that is equal to its maximal applicability benchmark. Complexity = O(#rules·log(#rules)) Complexity = O(#rules·log(#rules)) Related works: [Gil2007] Delimited Massively Parallel Algorithm

Algorithm of Rules Application based on Competitiveness of Evolution Rules 7 Goals To develop a faster rules Application algorithm using the ideas of Active Rules Elimination Algorithm and taking into account the rules competitiveness. To develop a faster rules Application algorithm using the ideas of Active Rules Elimination Algorithm and taking into account the rules competitiveness. This new algorithm must have sequential and parallel versions. This new algorithm must have sequential and parallel versions.

Algorithm of Rules Application based on Competitiveness of Evolution Rules 8 Active Rules Elimination Improvement Competitiveness Graph Competitiveness Graph r 1 : ab … r 2 : a 2 … r 3 : cd 3 … r 4 : c 2 d … r1r1 r2r2 a r3r3 r4r4 c, d

Algorithm of Rules Application based on Competitiveness of Evolution Rules 9 Active Rules Elimination 1 st Improvement (I) [r 1 ] 0 max [r 2 ] max [r 1 ] max [r 3 ] 0 max [r 4 ] max [r 3 ] max [r 3 ] 0 max [r 4 ] max [r 3 ] max [r 1 ] 0 max [r 2 ] max [r 1 ] max #operations = 3 w = {a x b y } + {c w d z } ParallelSequential w = {a x b y } #operations = 6 w = {c w d z } +

Algorithm of Rules Application based on Competitiveness of Evolution Rules 10 Active Rules Elimination 2 nd Improvement (II) A rule is an articulation if and only if the subgraph resulting from the elimination of this rule has more connected components than the competitiveness graph. A rule is an articulation if and only if the subgraph resulting from the elimination of this rule has more connected components than the competitiveness graph. r1r1 r3r3 r2r2 r4r4 r1r1 r2r2 r4r4

Algorithm of Rules Application based on Competitiveness of Evolution Rules 11 Active Rules Elimination 2 nd Improvement (III) [r 1 ] 0 max [r 2 ] max [r 1 ] max [r 4 ] max [r 4 ] max [r 1 ] 0 max [r 2 ] max [r 1 ] max #operations = 7 ParallelSequential #operations = 8 [r 1 ] 0 max [r 2 ] max [r 4 ] 0 max [r 3 ] max [r 1 ] 0 max [r 2 ] max [r 4 ] 0 max [r 3 ] max 00

Algorithm of Rules Application based on Competitiveness of Evolution Rules 12 Active Rules Elimination 2 nd Improvement (IV) SequentialParallel SCR / ARE DMP / PCR First example Pǎun(2000) 66%60% 1 st Generating:n 2, n ≥ 1 Pǎun (2000) 66%60% Decidability: n mod k ≥ 0 Pǎun (2000) 100%100% 2 nd Generating:n 2, n ≥ 1 Pǎun (2000) 66%60% L={a n b n c n | n≥1} Pǎun(2000) 60%37% Maximum of Array Ciobanu(2004) 50%37% Recursive Sum Ciobanu(2004) 66%60%

Algorithm of Rules Application based on Competitiveness of Evolution Rules 13 Active Rules Elimination 3 rd Improvement (I) In the elimination step for rule A, another rule B may be also eliminated. There are two reasons for this: In the elimination step for rule A, another rule B may be also eliminated. There are two reasons for this: 1.Rules applied before B in the elimination step of A consume the objects necessary for B to be no longer applicable. 2.The random value which defines the number of times that rule B is applied is equal to its maximal applicability benchmark.

Algorithm of Rules Application based on Competitiveness of Evolution Rules 14 [r 1 ] Active Rules Elimination 3 rd Improvement (II) 1.Do not execute the elimination step for rule B that has been eliminated 2.Rule B is not to be applied 3.To change the composition and order of the next elimination steps r1r1 r2r2 r5r5 r4r4 r3r3 [r 4 ] 0 max [r 3 ] 0 max [r 2 ] 0 max [r 5 ] 0 max [r 5 ][r 3 ] 0 max [r 2 ] 0 max [r 3 ] max [r 2 ] max

Algorithm of Rules Application based on Competitiveness of Evolution Rules 15 Active Rules Elimination 3 rd Improvement (III) Execution of the algorithm of application of competitiveness rules is a loop that ends when it reaches a state with no active rules. In each iteration, there are 3 steps: Execution of the algorithm of application of competitiveness rules is a loop that ends when it reaches a state with no active rules. In each iteration, there are 3 steps: 1.The elimination steps associated to the state are executed. 2.Active rules are calculated. 3.The state represented by active rules is transited.

Algorithm of Rules Application based on Competitiveness of Evolution Rules 16 Active Rules Elimination 3 rd Improvement (IV) Experimental data Experimental data r1r1 r2r2 r3r3 r4r4 r5r5 r6r6 r7r7 r9r9 r8r8 r 10

Algorithm of Rules Application based on Competitiveness of Evolution Rules 17 Active Rules Elimination 3 rd Improvement (V) Experimental data Experimental data

Algorithm of Rules Application based on Competitiveness of Evolution Rules 18 Conclusions Based on this concept of a competitiveness relationship, a new way of parallelism has been opened towards the massively parallel character needed in rules application in P systems. Based on this concept of a competitiveness relationship, a new way of parallelism has been opened towards the massively parallel character needed in rules application in P systems. The sequential version of this algorithm is the fast until now. The sequential version of this algorithm is the fast until now. Both the sequential and the parallel versions of the algorithm thus allowing for determination of execution time beforehand. Both the sequential and the parallel versions of the algorithm thus allowing for determination of execution time beforehand.

Download ppt "Algorithm of Rules Application based on Competitiveness of Evolution Rules Speaker: Jorge Aurelio Tejedor Cerbel 8th Workshop on Membrane Computing Natural."

Similar presentations