Decomposition of Task Speci cation Problems Hung Son Nguyen & Sinh Hoa Nguyen & Andrzej Skowron Institute of Mathematics, Warsaw University, Banacha str. 2, 02-095, Warsaw, Poland
Abstract. We consider a synthesis of complex objects by multi-agent
system based on rough mereological approach. Any agent can produce complex objects from parts obtained from his sub-agents using some composition rules. Agents are equipped with decision tables describing (partial) speci cations of their synthesis tasks. We investigate some problems of searching for optimal task speci cations for sub-agents having task speci cation for a super-agent. We propose a decomposition scheme consistent with given composition rules. The computational complexity of decomposition problems is discussed by showing that these problems are equivalent to some well known graph problems. We also propose some heuristics for considered problems. An illustrative example of decomposition and synthesis scheme for object assembling by multi{agent system is included. We show an upper bound of an error rate in synthesis process of our system. A preliminary results related to the presented approach have been reported in [6, 11]. Keywords: multiagent system, decomposition, rough mereology
1 Introduction Multiagent systems (MAS) considered in the paper are simple tree structures with nodes labeled by agents and task speci cations for agents. The aim of the decomposition it to nd for a given speci cation A at ag such speci cation Ai for any of its child agi that their composition is close enough to A. In the rough mereological framework (see e.g. [8, 10]) any agent ag of the system S can perform tasks sti (ag), for i = 1; :::; n(ag) represented in the standard table of ag. It is assumed that for any non-leaf agent ag there is a set of composition rules fRj : stj (ag) (stj (ag1 ); :::; stj (agk ))g producing stj (ag) from standards stj (ag1 ),..., stj (agk ) of immediate children ag1 ; :::; agk of ag in the agent system. In addition, every composition rule Rj is given together with a tolerance composition condition " = 'j ("1 ; "2 ; :::; "k ), which means that if child-agents ag1; :::; agk realize their tasks satisfying speci cations stj (ag1 ),...., stj (agk ) with closeness greater than 1 ? "1; 1 ? "2; :::; 1 ? "k , respectively, then the parent-agent ag is able to perform the task formulated by stj (ag) with closeness greater than 1 ? ". Using such assumptions, an approximate reasoning scheme of synthesis can be developed (see e.g. [8, 10]). We analyze the complexity of some decomposition problems and we propose for them some heuristics solutions.
2 Basic Notions Information system [7] is a pair A = (U; A) where U is a non-empty, nite set called the universe and A is a non-empty, nite set of attributes, i.e. a : U ! Va for a 2 A, where Va is called the value set of attribute a. Elements of U are called objects. Every information system A = (U; A) and a non-empty set B A de ne a B-information function by InfBA (x) = f(a; a(x)) : a 2 B g for x 2 U . A The set InfB (x) : x 2 U is called the A-information set and it is denoted by INF A (B ). We also consider a special case of information systems called decision tables. A decision table is any information system of the form A = (U; A [ fdg), where d 2= A is a distinguished attribute called decision. We assume that the set Vd of values of the decision d is equal to f1; : : : ; r(d)g for some positive integer called the range of d. The decision d determines the partition C1 ; :::; Cr(d) of the universe U , where Ck = fu 2 U : d(u) = kg for 1 k r(d). The set Ck is called the k-th decision class of A. We will use some relations and operations over information systems de ned as follows:
1. Restriction: AjB = (U; B ) is called the B -restriction of A for B A. 2. Composition: For given information systems A1 = (U1 ; A1 ) and A2 = (U2 ; A2 ), we de ne a new information system A = A1 A2 = (U; A), called composition of A1 and A2 , by U = f(u1 ; u2) 2 U1 U2 : Inf A1 (u1 ) = Inf A2 (u2 )g
A1 \A2
A1 \A2
A1 A = A1 [ A2 ; a(u) = aa((uu1 )) ifif aa 22 A 2 2 for any u = (u1 ; u2 ) 2 U and a 2 A. By we also denote the de ned
analogously composition of information sets. 3. Set theoretical operations and relations: Given two information systems A1 = (U1 ; A) and A2 = (U2 ; A), one can de ne set theoretical operations and relations like union (A1 [A2 ), intersection (A1 \A2 ), subtraction (A1 ?A2 ), inclusion (A1 A2 ) and equality (A1 = A2 ) in terms of information sets INF A1 (A) and INF A2 (A). For example
A1 A2 , INF A1 (A) INF A2 (A) We denote by UNIVERSE(A) the maximal (with respect to inclusion) among information systems having A as the attribute set.
3 Decomposition of Complete Task Speci cation Let us consider an agent ag and two of his sub-agents ag1 and ag2 . We assume agents ag, ag1 and ag2 can synthesize products (objects) described by attribute sets A, A1 and A2 , respectively, where A = A1 [ A2 and A1 \ A2 = ;. Any information system A = (U; A) (resp. A1 = (U1 ; A1 ) and A2 = (U2 ; A2 )) is called the standard table of ag (for ag1 and ag2 , resp.).
We assume that the agent ag is obtaining a task speci cation in the form of an information system A = (U; A) (table of standards or standard table). Two standard tables A1 = (U1 ; A1 ) and A2 = (U2 ; A2 ) (of sub-agents ag1 and ag2 , resp.) are said to be consistent with A if A1 A2 A. The set of pairs of standard tables P = f(Ai1; Ai2 ) : i = 1; 2; :::g is called a consistent covering of A S if i (Ai1 Ai2 ) = A. A consistent covering is optimal if it contains a minimal number of standard pairs. We assume there is a prede ned partition of the attribute set A into disjoint non-empty subsets A1 and A2 , which can be explored by the agent-children ag1 or case for any consistent covering ag2 . Let AjA1 = (U; A1 ), AjA2 = (U; A2 ). In this P = f(Ai1; Ai2) : i = 1; 2; :::g of A we have S Ai1 = AjA1 and S Ai2 = AjA2 . Hence, the problem of searching for consistent covering of speci cation A can be called the "task decomposition problem". In this paper we consider some optimization problems related to the task decomposition problems which occur in multi agent systems. 1. Searching problem for a consistent (with A) pair of standard tables A1 = (U1 ; A1 ) and A2 = (U2 ; A2 ) with maximal card(A1 A2 ) (i.e. card(U1 U2 )). 2. Searching problem for consistent covering of A by the minimal number of standard table pairs. One can transform the covering problem by pairs of standard tables to the covering problem of a bipartite graph by complete subgraphs and the searching problem for a maximal consistent pair of standard tables to the searching problem for a maximal complete subgraph of a given bipartite graph. For given information systems A1 ; A2 we construct a bipartite graph G = (U1 [ U2 ; E ) , where U1 (U2 , resp.) is the set of objects of an information system A1 (A2 , resp.). A pair of vertices (v1 ; v2 ) belongs to E i InfAA1 (v1 ) [ InfAA2 (v2 ) 2 INF A (A): Hence every pair of consistent with A standard tables A1 = (U1 ; A1 ) and A2 = (U2 ; A2 ) (i.e. satisfying (A1 A2 ) A) corresponds exactly to one complete bipartite subgraph G0 = (U1 [ U2 ; E 0 ) and consistent (with A) covering P can be represented by a set of complete bipartite subgraphs, that covers a graph G. One can show more, namely that the considered decomposition problems are polynomially equivalent to the bipartite graph problems. Therefore computational complexity of the decomposition problems follows from complexity of corresponding graph problems (to be known as NP-hard problems). HEURISTIC: (corresponding to the minimal covering by standard pairs) Input: Bipartite graph G = (V1 [ V2; E ). Output: A set S of complete subgraphs covering the graph G. 1 S = ;.
2 Search for a semi-maximal complete subgraph G . 3 S =S[G ; G=G?G . 4 If G = ; stop, else go to Step 2. 0
0
0
Let N (v) denote the sets of objects adjacent to v. We have the following:
HEURISTIC: (corresponding to searching for maximal pair of standards) Input: Bipartite graph G = (V [0 V ; E ). Output: A complete subgraph G = (U [ U ; E 0 ) of G with semi-maximal cardinality card(U ) card(U ). 1 We construct a sequence of complete bipartite subgraphs Gi = (V i [ V i ; Ei ) of G as follows: i := 0; V := ;; V = V ; while ?N (V i) \ (V ? V i ) =6 ; Find a vertex v 2 N (V i ) \ (V ? V i ) with the maximal card(N (v ) \ V i ); V i := V i [ fvg; V i := V i \ N (v); i := i + 1; endwhile 2 Return G0 being the largest subgraph among complete 1
2
1
1
1
2
0 1
2
0 2
1
2
+1
subgraphs
1
Gi
2
1
2
1
2
2
2
+1
1
1
2
(i.e. with the maximal number of edges).
4 Decomposition of Incomplete Task Speci cation Usually in applications, we have to deal with partial speci cations of tasks. The situation when we have some partial information about speci cation will be considered in this section. Let A = (U; A [ fdg) be a given decision table describing a partial task speci cation for the agent ag, where d : U ! f+; ?g. Any u 2 U is called an example. We say that u is a positive example (satis es the speci cation) if d(u) = '+', and u is a negative example (does not satisfy the speci cation) if d(u) = '{'. Thus, the decision attribute d de nes a partition of A into two information systems A+ = (U + ; A) and A? = (U ? ; A), where U + = fu 2 U : d(u) = '+' g and U ? = fu 2 U : d(u) = '{'g The tables A = A+ and A = UNIVERSE(A) ? A? are called the lower approximation and the upper approximation, respectively, of the speci cation A. Two standard tables A1 = (U1 ; A1 ) and A2 = (U2 ; A2 ) are said to be satisfying the partial speci cation A if A1 A2 A+ and they are consistent with the partial speci cation A if A1 A2 \ A? = ;: A satis ability degree of any consistent pair of standard tables (A1 ; A2 ) with a given partial speci cation A is de ned by (A1 A2 \ A+ ) : Sat(A1 A2jA) = cardcard (A1 A2 ) According to this notation, the pair of standard tables (A1 ; A2 ) is satisfying A if and only if Sat(A1 A2 jA) = 1. The (consistent with A) pair of standard tables (A1 ; A2 ) is satisfying A to a degree 1 ? " of a given partial speci cation A (is "-consistent with A) if Sat(A1 A2jA) > 1 ? ": We have Theorem 1. If Sat(A1jA) > 1 ? "1 and Sat(A2jA) > 1 ? "2 then Sat(A1 A2jA) > 1 ? ("1 + "2):
Let A1 = (U1 ; A1 ) and A2 = (U2 ; A2 ) be an "-consistent (with A) pair of standard tables. One can construct two partial speci cations of tasks A01 = (U1 ; A1 [fd1 g) and A2 0 = (U2 ; A2 [fd2 g) for sub-agents ag1 and ag2 assuming U1+ = U1; U1 ? = fu 2 UNIVERSE(A1) : (fug; A1) A2 \ A? 6= ;g; U2+ = U2; U2 ? = fu 2 UNIVERSE(A2) : A1 (fug; A2) \ A? 6= ;g; The de ned above pair of partial speci cations A01 and A02 is also said to be "-consistent with A. Any set of "-consistent (with a given A) pairs of standard tables P = f(Ai1S; Ai2 ) : i = 1; 2; :::g is Scalled the consistent covering of speci cation A if A i (Ai1 Ai2) A i.e. i (Ai1 Ai2) \ A? = ; and A+ Si(Ai1 Ai2): The task decomposition problems for MAS and a given parameter " for agent ag can be now de ned as follows: 1. Searching problem for an "-consistent pair of standard tables A1 = (U1 ; A1 ) and A2 = (U2 ; A2 ) with maximal card(A1 A2 ). 2. Searching problem for a consistent covering of A by the minimal number of "-consistent pairs of standard tables.
4.1 Decomposition Method Based on Decision Table
In this subsection we discuss a method for "-consistent standard tables from a partial speci cation according to the de nition proposed in the previous section. One can see that the solutions of new decomposition problems can be found by solving some equivalent graph problems. Let the decision table A = (U; A [fdg) de ne a partial speci cation for the agent ag, and let A = A1 [ A2 be the prede ned partition of the attribute set A into disjoint subsets. The bipartite graph G = (V1 [ V1 ; E ) for a speci cation A is constructed analogously to a graph presented in Section 3 with the following modi cations: ? 1. The pair (v1 ; v2 ) belongs to E i Inf A1 (v1 ) Inf A2 (v2 ) 2 INF A (A): 2. The edges of a graph are labeled by 0 or 1 as follows: ? A1 (v1 ) [ Inf A2 (v2 ) = '+' label(v1; v2 ) = 10 ifif dInfInf A1 (v1 ) [ Inf A2 (v2 ) 2= INF A (A) The extracting problem of an "-consistent with A pair of standard tables (A1 ; A2 ) with the maximal value of card(A1 A2) and Sat(A1 A2jA) > 1 ? " can be transformed to the searching problem for a complete sub-graph of G0 = (U1 [ U1 ; E ) with a maximal card(U1 ) card(U2 ) and the number of edges labeled by 0 not exceeding " card(U1 ) card(U2 ). The considered graph problem is a modi ed version of the graph problem proposed in Section 4. Let N0 (v); N1 (v) be the sets of objects connected with v by edges labeled by 0 and 1, respectively, and let N (v) = N0 (v) [ N1 (v). Let Adj (v); Adj0 (v); Adj1 (v) denote the cardinality of N (v); N0 (v); N1 (v), respectively. Starting from the empty subgraph G0 , we append to G0 the vertices v with a maximal degree taking into consideration a 1 (v) proportion Adj Adj(v): The algorithm can be described as follows:
HEURISTIC: (corresponding to decomposition of partial speci cation) Input: Bipartite graph G = (V [ V ; E ) with edges labeled by 1 or 0, " > 0 Output: A semi-maximal complete bipartite subgraph G0 = (U [ U ; E 0) 1 U1 of G satisfying the condition Adj Adj U1 1 ? " 1 We construct a sequence of complete bipartite subgraphs Gi = (V i [ V i ; Ei ) of G as follows: i := 0; V := ;; V = V ; ? while N (V i) \ (V ? V i ) =6 ; Find a vertex v 2 N (V i ) \ (V ? V i ) with the maximal card(N (v ) \ V i ); Let k" := b" card(N (v) \ V i )c; Sort the set of vertices N (v) \ V i in the descending order with respect to Adj (:) and set Adj" (v) := the set of first k" vertices in N (v) \ V i ; V i := V i [fvg; V i := V i \ (Adj (v) [ Adj" (v)); i := i + 1; endwhile 2 Return the largest graph G among complete subgraphs Gi (i.e. with the maximal number card(V i ) card(V i ) of edges) 1
2
( (
1
2
0 1
2
0 2
1
1
) )
2
2
1
1
2
1
2
1
2
0
2
1
1
+1
1
2
+1
0
2
1
2
1
2
4.2 Example Now we present an illustrative example. A car (complex object) assembly room consists of ve factories (agents). They are denoted by ag (the main factory), ag1 (the factory of engines), ag2 (the factory of bodies), ag3 (body shop), ag4 (paint shop) (see Figure 1). Products of agents are described by attributes from
A = fEngine capacity, Body type, Body colorg: Let us assume that the agent ag has obtained from the customer the examples of his favorite cars (positive examples) and the cars that he don't wont to buy (negative examples). This partial speci cation of the assembly task is presented in the the form of the decision table presented in the Figure 2. The decomposition problem related to the agent ag can be treated as the problem of searching for the ENGINE speci cation A1 for the agent ag1 and the BODY speci cation A2 for the agent ag2 such that if ag1 and ag2 independently produce their parts satisfying the speci cations A1 and A2 , then the agent ag can use these parts to compose the car satisfying (consistent) with the customer's speci cation. The graph interpretation of the speci cation (Figure 2) is represented in Figure 3. By applying the algorithm described in the Section 4.1 for the root agent ag, we obtain the maximal pair of standard tables A1 and A2 presented in Figure 4. Consequently, the table A2 can be decomposed into a pair of standard tables A3 and A4 (see Figure 4).
Fig. 1. The system with ve agents. At- Fig. 2. The speci cation of task for the tributes are denoted by: a ="Engine root agent ag in form of the decision table capacity", b ="Body type", c ="Body A Engine Body Body Decision capacity type color color" u 1300 coupe white + 1
u2 u3 u4 u5 u6 u7 u8 u9 u10 u11 u12 u13 u14 u15 u16 u17 u18 u19 u20 u21 u22 u23 u24 u25 u26 u27 u28 u29 u30
ag a, b, c
ag1
ag2
a
b, c
ag3
ag4
b
c
1300 1300 1300 1300 1300 1500 1500 1500 1500 1500 1500 1600 1600 1600 1600 1600 1600 1600 1600 1600 1800 1800 1800 1800 1800 1800 1800 2000 2000
coupe coupe saloon saloon saloon coupe coupe coupe saloon saloon saloon coupe coupe coupe coupe saloon saloon saloon estate estate saloon saloon saloon estate estate limousine limousine limousine limousine
gray green white red gray white gray green white gray black white green gray red white gray black black white black gray white black white black white black white
+ + + ? + + + + + + + + + + ? + + + + ? + + ? + + + ? +
?
Fig. 3. The graph representation of the Fig. 4. The maximal pair of standard taspeci cation: solid lines { positive exam- bles (A1, A2), (A3, A4) found for the ples, dotted lines { negative examples root agent and for the agent ag2 , respectively coupe - white coupe - red
1300 coupe - gray coupe - green
1500 saloon - white saloon - gray
1600
A1 Engine capacity d1 x1 x2 x3 x4
y1 y2 + y3
+ y4 + y5 ? y6 y7 y8
1300 1500 1600 1800
saloon - black saloon - red
1800 estate - black estate - white
2000 limousine - black limousine - white
A2 Body Body type colour d2 coupe coupe coupe saloon saloon coupe saloon estate
? ?
A3 Body d3 type z1 z2 z3
A U A
+ + + + +
? ? ?
A4 Body d4 colour
t1 t2 ? t3
coupe + saloon + estate
white gray green white gray red red white
white gray red
+ +
?
5 Decomposition of Approximate Speci cation The notion of approximate speci cation has been considered in [8, 10] as an important aspect of reasoning for agents under uncertainty. Assuming that every agent ag is equipped with a function Simag that for any object x and any speci cation , the value Simag (x; ) 2 [0; 1] has an intended meaning the satis ability degree of by x. Then, the approximate speci cation of the agent ag is de ned by any pair (; "), and we denote by
ag (; ") = fx : Simag (x; ) > 1 ? "g the "-neighborhood of speci cation . The inference rules of agent ag whose children are ag1 , ..., agk are in the form
if (x 2 ag1 ( ; " )) ^ : : : ^ (xk 2 agk (k ; "k ))then (x 2 ag (; ")) 1
1
1
where x1 ; :::; xk are objects submitted by ag1; :::; agk , respectively, and x is the object composed by ag from x1 ; :::; xk . We analyze the relationship between " and "1 ; :::; "k for some well known functions SimAg in case of composition rule . We consider still a "binary" agent system, in which every agent has two children ag1 and ag2 . Let the task speci cation be de ned by an information system A = (U; A) stored at the root-agent. In our application every speci cation associated with the agent ag is de ned by an information system A equipped with this agent. Below we present some important functions de ning satis ability degrees of any object x with respect to the speci cation A. We start with some basic distance functions d : UNIVERSE(A) UNIVERSE(A) ! IR+ de ned by
d1 (x; y) = cardfa(x) 6= a(y) : a 2 Ag (the Hamming distance ) d2 (x; y) = max fja(x) ? a(y)jg (the 1-Norm) a2A d3 (x; y) =
X
a2A
(a(x) ? a(y))2
(the Euclidean distance)
We can see that distance functions are de ned for a space UNIVERSE(A), where every object is characterized by all attributes in A. For any subset B A the distance functions can be modi ed by restriction the attribute set to B . We denote the distance function d restricted to B by djB . Having the distance function d the distance of object x to the set S is de ned by d(x; S ) = miny2S d(x; y). Let A = (U; A) be a speci cation equipped with an agent ag. Hence the approximate speci cation for A can be de ned by (A; ") = fx : djA (x; U ) < "g. Let A1 = (U1 ; A1 ) and A2 = (U2 ; A2 ) be speci cations at ag1 and ag2, respectively. Let (A1 ; "1 ) and (A2 ; "2 ) be the approximate speci cation of A1 and A2 , respectively. The following observations show the relationship between (A1 ; "1 ), (A2 ; "2 ) and the composed approximate speci cation (A; "). For a given distance function d, we have the following
Theorem 2. If (A1 " ) and (A2 ; " ) are approximate speci cations of sub1
2
agents ag1 and ag2 , respectively then we have (A1 ; "1 ) (A2 ; "2 ) (A1 A2 ; ") where " = max("1 ; "2 ) if d is Hamming's distance or the 1-Norm and " = "1 +"2 if d is Euclidean distance.
6 Conclusions We have investigated some decomposition problems of complex tasks in a multiagent system assuming its speci cation is given. The two decomposition problems are discussed. The st problem concerns the decomposing such tasks under a complete speci cation. The second problem is related to tasks with a partial speci cation. Both problems can be solved by transforming them to corresponding graph problems. For some prede ned composition rules the proposed decomposition methods guarantee a low error rate of synthesis process. Acknowledgments: This work was partially supported by the grant of National Committee for Scienti c Research No 8T 11C 01011 and by the ESPRIT project 20288 CRIT-2.
References
1. S.Amarel, PANEL on AI and Design, in: J.Mylopoulos and R.Reiter, eds., Proceedings Twelfth International Conference on Arti cial Intelligence (Sydney, Australia, 1991), pp. 563{565. 2. K. Decker and V. Lesser, Quantitative modelling of complex computational task environments, in: Proceedings AAAI-93 (Washington, DC, 1993), pp. 217{224. 3. E.H. Durfee, Coordination of Distributed Problem Solvers (Kluwer, Boston, 1988). 4. Garey M.R., Johnson D.S.,Computers and Interactability. A Guide to the Theory of NP-Completeness (W.H. Freeman and Company New York, 1979). 5. M.N. Huhns, M.P. Singh, L. Gasser (eds.), Readings in agents, (Morgan Kaufmann, San Mateo, 1998). 6. H.S. Nguyen, S.H. Nguyen, The decomposition problem in multi-agent system. Proceedings of the W8 Workshop at ECAI'98 on Synthesis of Intelligent Agents from Experimental Data. Brighton August 24, 1998 (internal report). 7. Z. Pawlak, Rough sets: Theoretical Aspects of Reasoning about Data (Kluwer, Dordrecht, 1991). 8. L. Polkowski, A. Skowron: Rough mereology: A new paradigm for approximate reasoning. International Journal of Approximate Reasoning 15/4 (1996), pp. 333{ 365. 9. L. Polkowski and A. Skowron, Rough sets: A perspective, in: L. Polkowski and A. Skowron, eds., Rough Sets in Knowledge Discovery 1: Methodology and Applications (Physica-Verlag, Heidelberg, 1998), pp. 31{56. 10. A. Skowron and L. Polkowski. Rough mereological foundations for design, analysis, synthesis, and control in distributed systems, Information Sciences An International Journal 104(1-2) (1998), pp. 129-156. 11. A. Skowron, H.S. Nguyen. The Task Decomposition Problems in Multi-Agent Systems. In Proc. of CSP98, Humboldt University, Berlin, 1998 (internal report). 12. R.B. Rao and S.C.-Y. Lu, Building models to support synthesis in early stage product design, in: Proceedings of AAAI-93; Eleventh National Conference on Arti cial Intelligence (AAAI Press/MIT Press, Menlo Park, 1993), pp. 277{282.