**4. Conclusion**

**Example 6.** Let scheme *R* ¼ f g *r*1,*r*<sup>2</sup> , where *r*<sup>1</sup> is

*Computational Optimization Techniques and Applications*

*i* <sup>1</sup>, … , *j i ki*

**Statement 1.** Let *ai*<sup>1</sup> h i , *N*<sup>1</sup> , … , *aip* , *Np*

D E n o

n o D E

<sup>1</sup> � *a <sup>j</sup>* 1 , … , *n <sup>j</sup>*

*a j* 1 , … , *a <sup>j</sup> s* � �⊆ *a <sup>j</sup>*

rule *r*, and signs *fi* before multiplicities *ni <sup>j</sup>* of objects *ai <sup>j</sup>*

computation of tuple *ni*<sup>1</sup> , … , *nit* h i, where *nj* ¼ *n <sup>j</sup>* þ *f <sup>j</sup>*

query *Q* ¼ f g h i *a*1, ≤*n*<sup>1</sup> , … ,h i *am*, ≤*nm* , corresponding to multiset *v* ¼

and *r*<sup>2</sup> is

case rules *r <sup>j</sup>*

selection of couples *ai*, *j*

f g *n*<sup>1</sup> � *a*1, … , *nm* � *am* , and *n <sup>j</sup>*

may be applicable to *v*, if

current multiset.

�*n* þ *n*<sup>0</sup>

**224**

multi-agent technology.

the right part of rule *r*).

h i 2, 5, 15 , and, thus, result of *v* )

*i* 1 , … ,*r <sup>j</sup> i ki* f g 9 � ð Þ *eur* ! f g 10 � ð Þ *usd* ,

f5 � ð Þ *eur* , 3 � ð Þ *rur* g ! f g 7 � ð Þ *usd :*

Database *L* has such internal organization, that there exists associative index, providing direct selection of couple h i *a*, *w* for object name *a*. To reduce search in the selected list of couples h i *i*, *n* , it may be created as ordered by increase of multiplicities *<sup>n</sup>*. Let *<sup>v</sup>* <sup>¼</sup> f g *<sup>n</sup>*<sup>1</sup> � *<sup>a</sup>*1, … , *nm* � *am* be a current multiset processed by agent *<sup>G</sup>*<sup>∗</sup> , and *Q* ¼ f g h i *a*1, ≤ *n*<sup>1</sup> , … ,h i *am*, ≤ *nm* is set of queries to database *L*, each providing

those rules, in which all multiobjects from their left parts have multiplicities hot greater than those of the same objects having place in *v*. So there is an evident criterion for selection of rules, which may be applicable to the current multiset *v*.

, such that *ni*

*<sup>s</sup>* � *a <sup>j</sup> s*

> 1 , … , *a <sup>j</sup> p*

As seen, proposed associative organization of set of left parts of rules entering scheme *R* provides fast selection of sets of rules, which may be applied to the

Let us consider further enhancement of *FMG* application engine, based on the

First of all, it is evident, that it is not necessary to send all multiobjects of multiset *v*, to which rule*ri* is applicable, to agent *ri*, because replacement of left part of this rule by its right part is local operation, regarding in general case relatively small number of multiobjects in the processed multiset *v*, while all the rest *MO* remain unchanged. So it is sufficient to send to agent *ri* only tuple *f* <sup>1</sup>*ni*<sup>1</sup> , … , *ft*

of multiplicities of objects *ai*<sup>1</sup> , … , *ait* , in *MS v*, such that tuple *A* ¼ *ai*<sup>1</sup> , … , *ait* h i is ordered lexicographically set of objects, having place in both left and right parts of

be particular case, when some objects do enter both left and right parts but this singularity is simply handled by positioning to the *j*th place of tuple *A* number

rule *r*, are "–", while all other are "+". Receiving this tuple, agent *r* provides

, where *n* is multiplicity of object *ai <sup>j</sup>* in the left part, and *n*<sup>0</sup>

*r*

**Example 7.** Let *v* ¼ f g 5 � ð Þ *eur* , 10 � ð Þ *usd* , 7 � ð Þ *rur* , 18 � ð Þ *pound* , and *r* is f g 3 � ð Þ *eur* , 2 � ð Þ *rur* ! f g 5 � ð Þ *usd* . Because set of lexemes, entering this rule, is ordered lexicographically as h i *eur*,*rur*, *usd*, so tuple, sent by agent *<sup>G</sup>*<sup>∗</sup> to agent *<sup>r</sup>*, would be 5, 7, 10, h i and agent *<sup>r</sup>* would sent to agent *<sup>G</sup>*<sup>∗</sup> tuple 5h i � 3, 7 � 2, 10 <sup>þ</sup> <sup>5</sup> <sup>¼</sup>

n o

may have opportunity to be applied to *MS v*, and, totally, only

� � be the left part of rule *r*. Then *r*

*ni j* � �

*v*<sup>0</sup> would be *v*<sup>0</sup> ¼ f2 � ð Þ *eur ;* 15 � ð Þ *usd ;* 5 � ð Þ *rur ;*

*<sup>p</sup>* ≤*ni*. It is clear, that only in this

be a set, selected from database *L* by

*:*∎ (27)

*nit*

� �

, having place in left side of

, *j* ¼ 1, … , *t*. (There may

–its multiplicity in

Then *L* ¼ f g <ð Þ *eur* , f g <1, 9>, <2, 5> > , < ð Þ *rur* , f g <2, 3> > *:*∎

Proposed techniques of application of multi-agent technology to the highparallel generation of sets of multisets, defined by filtering multiset grammars, provides essential growth of speed of creation of *STMS*. However, there are some evident ways of further enhancement of *FMG* implementation upon this background:

