Information Technology Reference
In-Depth Information
The algorithm solves this problem if its application leads from the initial to the
final state. This problem may be solved by two algorithms cooperating through the
environment in the following way (Fig. 2.10 ):
Let us accept that a problem which has to be solved is modelled with the use of the
state of the environment X 0 and that the solution to the problem has to be achieved
by two cooperating algorithms Al g 1
.
It is necessary to adjust the problem in such a way that it could be solved by the
algorithms that cooperate with each other by the appropriate encoding the problem
(task) in the form of the chosen state of the environment x 0
= (
X 0 ×
X 1 ,
f 1 )
and Al g 2
= (
X 0 ×
X 2 ,
f 2 )
X 0 .
Further, it is necessary to prepare the cooperating algorithms for an action properly
choosing the initial internal states of the algorithms, which for Al g 1 may be denoted
by x 1 , and x 2 for the algorithm Al g 2 . These states should be chosen in such a way
that there would be a situation in which either the pair
x 0 ,
x 1 )
belongs to the
domain of the function f 1 , and then the algorithm Al g 1 starts the “action”, or the
pair
(
x 0 ,
x 2 )
) belongs to the domain of the function f 2 , which makes the algorithm
Al g 2 perform the first “move”.
(
Cooperation in problem solving involves transformation of the state of the environ-
ment from the initial into the final state in the appropriate order made either by the
algorithm Al g 1 or the algorithm Al g 2 . For example, in Fig. 2.10 we may observe
a situation in which during the cooperation of the algorithms we have the state of
the environment x 0 , and the pair
x 0 ,
x 1 )
belongs to the domain of the function f 1 ,
which makes the algorithm Al g 1 undertake an “action” and transform the environ-
ment into the state x 0 . However, the state
(
x 0 and x 2 )
(
belongs to the domain of the
function f 2 , whichmakes the algorithm Al g 2 transform the state of the environment.
Synchronization of cooperation between the algorithms takes place as a result
of appropriate states absorbed by the environment and algorithms. In practice,
cooperating algorithms may not only be used for describing of different kinds of
cooperation between algorithms, but also for decomposing more complex algorithms
into autonomous component algorithms, which will be presented further in later
chapters.
2.5.1.2 The Relationship and Equivalence
of Cooperating Algorithms
We may consider the decomposition of an algorithm into cooperating component
algorithms, presented in the previous chapter, in three basic cases:
The algorithms Al g 1 = (
cooperate through
the environment, however, some changes in the environment are realized by one
algorithm and then by the other one (Fig. 2.10 ), as they are both necessary for
solving a task.
X 0 ×
X 1 ,
f 1 )
and Al g 2 = (
X 0 ×
X 2 ,
f 2 )
The algorithms Al g 1 = (
, similar to the previ-
ous case, can affect the environment but each of them is able to make some changes
independently in the environment and solve a given problem. It means there are
X 0 ×
X 1 ,
f 1 )
and Al g 2 = (
X 0 ×
X 2 ,
f 2 )
Search WWH ::




Custom Search