A Knowledgeable Model: Network of C-Objects
Trang 1A Knowledgeable Model: Network of C-Objects
Hoang Kiem - Do Van Nhon - Le Hoai Bac
Information Technology Department University of Hochiminh City
227 - Nguyen Van Cu St., Dist 5,
HoChiMinh City, VIETNAM
Trang 2In this paper we propose a model that can be used for representing knowledge: network of C-objects We also discuss some problems on a network of C-objects, and prove the correctness of the algorithms used to solve these problems Algorithms have been implemented and tested carefully in various applications In this paper we bring out an application example: solving a geometry problem
1 Network of C-Objects
1.1 C-Objects
In many problems we usually meet many different kinds of objects Each object has attributes and internal relations between them Besides, objects can execute some actions and answer to requests from the outside As an example, a triangle with some knowledge (formulas, theorems, etc ) is an object The attributes of a “triangle” object are 3 edges, 3 angles, A “triangle” object can also answer some questions such as “Is there a solution for the problem to compute the surface from one edge and two angles?”
Here we consider a kind of object called C-object A C-object has the following characteristics:
1 A C-object has valued attributes The set consists of all attributes of a C-object O will be denoted by
M(O) The figure 1 is the symbol of an object O ({x1, , xk} Í M(O))
2 There are internal relations between attributes of a C-object O These are manifested in the following features of the object:
- Given a subset A of M(O) The object O can show us the attributes that can be determined from A
- The object O will give us the value of an attribute if we request it
- It can also show us the internal process of determining the attributes
figure 1: an C-object
1.2 Network of C-objects
Suppose O1 and O2 are C-objects Between attributes of these C-ojects can have a relation f We will call
f a relation between two objects O1 and O2 For example, the value of the attribute a of O1 is equal to the value of the attribute b of O2 will give a relation between O1 and O2 This relation can be written by the expression O1.a = O2.b In general, we call a relation f between attributes of certain objects a relation between the objects A relation will help us deduce some attributes from the others
Our network of C-objects will consists of a set of C-objects O = {O 1 ,O 2 , , O n} and a set of relations F
= {f 1 ,f 2 , , f m} This network of C-objects is denoted by (O,F)
2 Problems On C-Object Network
Let (O,F) be a C-object network We put
Trang 3M(f i ) = the set of attributes of C-objects in the relation fi.
M(F) = M(fi
i 1
m
)
M(O) = M(Oi
i 1
n
)
M = the set of attributes of C-objects are considered in certain problem.
M i = M Ç M(Oi), for i=1,2, , m
By the above notations, Mi is the set of attributes considered as of the object Oi on the network of C-objects (O,F)
We will suggest some algorithms that are completely proved These algorithms give us the method to solve the following problems:
Problem 1 Given sets of attributes A and B The question is “Can we determine the attributes in B
from the attributes in A?”.
Problem 2 Suppose that we can determine the attributes in B from the attributes in A The question is
“How is the process of determining attributes in B from attributes in A?”.
Let A Í M be the set of attributes that are given, and B be the set of attributes that are needed to determine We denote the two problems by the notation:
A ® B
3 Algorithms
3.1 Definitions and notations
Let (O,F) be a network of C-objects, and M be a set of attributes Suppose A is a subset of M For each f
Î F, we denote f(A) be the union of the set A and the set consists of all attributes in M deduced from A by f, and we write:
A f
® f(A)
Similarly, for each C-object Oi Î O, Oi(A) is the union of the set A and the set consists of all attributes (in M) that the object Oi can determine from attributes in A
By the above notations, if t Î F È O then we have t(A) Ê A
Suppose D = {t1, t2, , tm} is a sequence of elements in F È O Put
A0 = A, A1 = t1(A0), ,
Am = tm(Am-1), and D(A) = Am,
we have A0 Í A1 Í Í Am = D(A) Í M
A problem A ® B on a network (O,F) is called solvable if and only if there is a sequence D Í F È O such that D(A) Ê B In this case, we say that D is a solution of the problem.
3.2 Algorithms
To find out a solution for the problem A ® B we can select relations and objects, and then we use them
to extend the set of attributes determined Those actions can be repeated until all of attributes in B are determined or until we cannot determine any more attribute We have proved and tested the following algorithms for solving the problem
Algorithm 1 finding a solution.
Input : (O,F) is a network of C-objects,
Trang 4M is a set of attributes,
A Í M, and B Í M
Output : a solution of the problem A ® B
Algorithm :
1 Solution ¬ empty;
2 if B Í A then
begin
Solution_found ¬ true;
{ Solution_found = true if solvable}
goto 5;
end else
Solution_found ¬ false;
Aold ¬ A;
Select f that is not considered yet;
while not Solution_found and
(the selection is successful) do begin
if ( f symmetric and
0 < Card (M(f) \ A) £ r(f) )
or
( f not symmetric and
Æ ¹ M(f) \ A Í v(f) ) then
begin
A ¬ f(A);
Solution ¬ Solution È {f};
end;
if B Í A then
Solution_found ¬ true; Select f that is not considered yet;
end; { while }
Until Solution_found or (A = Aold);
4 if not Solution_found then
begin
Select Oi Î O such that Oi(A) ¹ A;
if (the selection is successful) then
begin
A ¬ Oi(A);
Solution ¬ Solution È { Oi };
if (B Í A) then
begin
Solution_found ¬ true;
goto 5;
end;
else
goto 3;
end;
end;
5 if not Solution_found then
the problem has no solution;
else
Solution is a solution of the problem;
Algorithm 2 Find a good solution from an already solution known.
Input : (O,F) is a network of C-objects,
Trang 5a solution {t1, t2, , tm} of the problem A® B
Output : A good solution of
the problem A ® B
Algorithm :
1 D ¬ {t1, t2, , tm};
2 for i=m downto 1 do
if D \ {ti} is a solution then
D ¬ D \ {ti};
3 D is a good solution
3.3 Solving process
Consider a problem A® B on a network of C-objects (O,F) In this section we state a method to construct the solving process from a solution With a solution, it is possible that we determine some redundant elements Therefore we need to consider the process of applying relations in the solution, and determine only necessary elements to solve the problem The following theorem give us an analysis (depending on the solution) the sets of elements, and we can construct a process for determining necessary attributes
Theorem Let {t1, t2, , tm} be a good solution of the problem A ® B on a network of C-objects (O,F) Put
A0 = A, Ai = {t1, t2, , ti}(A), for i=1, ,m
Then there exists a sequence {B0, B1, ., Bm-1, Bm} consists of subsets in M satisfying the following conditions:
(1) Bm = B
(2) Bi Í Ai , for i=0,1, ,m
(3) for i=1, ,m, {ti} is a solution of the problem Bi-1 ® Bi but it is not a solution of the problem G ®
Bi , where G is an arbitrary subset in Bi-1 and G ¹ Bi-1
4 Application Example
Now we state an application example: solve a geometry problem This example is solved by a program written in the programming language C++ The program gave us a good solution
Figure 2
In the above figure 2, suppose that AB = AC, the values of the angle A and the edge BC are given ABDE and ACFG are squares Compute EG
The problem can be considered on the network of C-objects as follows:
1 Four objects :
O1 : triangle ABC , with AB = AC,
O2 : triangle AEG,
O3 : square ABDE,
Trang 6O4 : square ACFG.
2 The relations between objects :
f1 : O1.c = O3.a {the edge c of triangle ABC = the edge of the square ABDE}
f2 : O1.b = O4.a {the edge b of triangle ABC = the edge of the square ACFG}
f3 : O2.b = O4.a {the edge b of triangle AEG = the edge of the square ACFG}
f4 : O2.c = O3.a {the edge c of triangle AEG = the edge of the square ABDE}
f5 : O1.A + O2.A = 180 Here we have:
M(f1) = { O1.c , O3.a }, M(f2) = { O1.b , O4.a }, M(f3) = { O2.b , O4.a }, M(f4) = { O2.c , O3.a }, M(f5) = { O1.a , O2.a },
M = { O1.a, O1.b, O1.c, O1.A, O2.b,
O2.c, O2.A , O2.a, O3.a, O4.a }
3 the attribute must be computed :
O2.a {the edge EG of the triangle AEG}
We have to find out a solution for the problem
A ® B, where A = { O1.a , O1.a }, and B = {O2.a } By applying the above algorithms, we have a solution
D = { f5, O1, f1, f2, f3, f4, O2}, and the process of extending the set of attributes as follows:
A0 f5
® A1 O1
® A2 f1
®
A3 f2
® A4 f3
® A5 f4
®
A6 ®O2 A7
where
A0 = A = {O1.a , O1.A},
A1 = {O1.a , O1.A, O2.A},
A2 = { O1.a , O1.A, O2.A, O1.b, O1.c },
A3 = {O1.a , O1.A, O2.A, O1.b, O1.c, O3.a},
A4 = {O1.a , O1.A, O2.A, O1.b, O1.c, O3.a,
O4.a},
A5 = {O1.a , O1.A, O2.A, O1.b, O1.c, O3.a,
O4.a, O2.b},
A6 = {O1.a , O1.A, O2.A, O1.b, O1.c, O3.a,
O4.a, O2.b, O2.c},
A7 = {O1.a , O1.A, O2.A, O1.b, O1.c, O3.a,
O4.a, O2.b, O2.c, O2.a}
5 Comments
Network of C-objects is a useful model It can be used to represent knowledge in intelligent systems This model can be researched and developed more completely so to become a helpful tool
References
Trang 7[1] Hoang Kiem & Do Van Nhon, Computational nets and its applications, in: Proceedings of the Conference on Information Technology, Hanoi (1996) 236-241
[2] Elaine Rich & Kevin Knight, Artificial Intelligence,McGraw-Hill, Inc, 1991
[3] Jean-Louis Laurieøre Problem-Solving and Artificial Intelligence, Prentice Hall, 1990
[4] Bach Hung Khang & Hoang Kiem, Artificial Intelligence, methods and applications, Hanoi Science and Technique Inc, 1989
[5] Hojjat Adeli, Knowlegde Engineering, Vol I & II, McGraw-Hill, Inc, 1990
[6] J.D Ullman, Principles of Database and Knowledge-base Systems, Vol I & II, Computer Science Press, 1988-1989
[7] J.Bergin, DATA ABSTRACTION The Object-Oriented Approach using C++, McGrawHill, 1994 [8] P.H.Winston, Artificial Intelligence, Addison-Weysley, 1993
Trang 8Do Van Nhon
thnhi@hcmu.edu.vn +84.8.8579546 (Tel) Page 1/4