Mathematical foundations for designing and development of intelligent systems of information analysis
This article is an attempt to combine different ways of working with sets of objects and their classes for designing and development of artificial intelligent systems (AIS) of analysis information, using object-oriented programming (OOP). This paper contains analysis of basic concepts of OOP and the...
Saved in:
Date: | 2025 |
---|---|
Main Authors: | , |
Format: | Article |
Language: | English |
Published: |
Інститут програмних систем НАН України
2025
|
Subjects: | |
Online Access: | https://pp.isofts.kiev.ua/index.php/ojs1/article/view/716 |
Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
Journal Title: | Problems in programming |
Institution
Problems in programmingid |
pp_isofts_kiev_ua-article-716 |
---|---|
record_format |
ojs |
resource_txt_mv |
ppisoftskievua/63/3e3578da59dab90235fd698162f84b63.pdf |
spelling |
pp_isofts_kiev_ua-article-7162025-04-09T22:22:32Z Mathematical foundations for designing and development of intelligent systems of information analysis Математичні основи проектування та розробки інтелектуальних систем аналізу інформації Terletskyi, D.O. Provotar, O.I. UDC 510.2:004.8 УДК 510.2:004.8 This article is an attempt to combine different ways of working with sets of objects and their classes for designing and development of artificial intelligent systems (AIS) of analysis information, using object-oriented programming (OOP). This paper contains analysis of basic concepts of OOP and their relation with set theory and artificial intelligence (AI). Process of sets and multisets creation from different sides, in particular mathematical set theory, OOP and AI is considered. Definition of object and its properties, homogeneous and inhomogeneous classes of objects, set of objects, multiset of objects and constructive methods of their creation and classification are proposed. In addition, necessity of some extension of existing OOP tools for the purpose of practical implementation AIS of analysis information, using proposed approach, is shown.Prombles in programming 2014; 2-3: 233-241 Дана стаття є спробою поєднати різні підходи до роботи з множинами об’єктів та їхніми класами задля проектування і розробки систем штучного інтелекту (СШІ) для аналізу інформації, використовуючи об’єктно-орієнтоване програмування (ООП). Робота містить аналіз базових концепцій ООП і їхній зв'язок з теорією множин та штучним інтелектом (ШІ). Розглядається процес створення множин та мультимножин з різних сторін, зокрема з огляду на математичну теорію множин, ООП та ШІ. Запропоновані визначення об’єкту та його властивостей, однорідного та неоднорідного класу об’єктів, множини об’єктів, мультимножини об’єктів і конструктивні методи їх створення та класифікації. Окрім того, показана необхідність в деякому розширенні засобів ООП з метою практичної реалізації СШІ для аналізу інформації, використовуючи запропонований підхід.Prombles in programming 2014; 2-3: 233-241 Інститут програмних систем НАН України 2025-04-09 Article Article application/pdf https://pp.isofts.kiev.ua/index.php/ojs1/article/view/716 PROBLEMS IN PROGRAMMING; No 2-3 (2014); 233-241 ПРОБЛЕМЫ ПРОГРАММИРОВАНИЯ; No 2-3 (2014); 233-241 ПРОБЛЕМИ ПРОГРАМУВАННЯ; No 2-3 (2014); 233-241 1727-4907 en https://pp.isofts.kiev.ua/index.php/ojs1/article/view/716/768 Copyright (c) 2025 PROBLEMS IN PROGRAMMING |
institution |
Problems in programming |
baseUrl_str |
https://pp.isofts.kiev.ua/index.php/ojs1/oai |
datestamp_date |
2025-04-09T22:22:32Z |
collection |
OJS |
language |
English |
topic |
UDC 510.2:004.8 |
spellingShingle |
UDC 510.2:004.8 Terletskyi, D.O. Provotar, O.I. Mathematical foundations for designing and development of intelligent systems of information analysis |
topic_facet |
UDC 510.2:004.8 УДК 510.2:004.8 |
format |
Article |
author |
Terletskyi, D.O. Provotar, O.I. |
author_facet |
Terletskyi, D.O. Provotar, O.I. |
author_sort |
Terletskyi, D.O. |
title |
Mathematical foundations for designing and development of intelligent systems of information analysis |
title_short |
Mathematical foundations for designing and development of intelligent systems of information analysis |
title_full |
Mathematical foundations for designing and development of intelligent systems of information analysis |
title_fullStr |
Mathematical foundations for designing and development of intelligent systems of information analysis |
title_full_unstemmed |
Mathematical foundations for designing and development of intelligent systems of information analysis |
title_sort |
mathematical foundations for designing and development of intelligent systems of information analysis |
title_alt |
Математичні основи проектування та розробки інтелектуальних систем аналізу інформації |
description |
This article is an attempt to combine different ways of working with sets of objects and their classes for designing and development of artificial intelligent systems (AIS) of analysis information, using object-oriented programming (OOP). This paper contains analysis of basic concepts of OOP and their relation with set theory and artificial intelligence (AI). Process of sets and multisets creation from different sides, in particular mathematical set theory, OOP and AI is considered. Definition of object and its properties, homogeneous and inhomogeneous classes of objects, set of objects, multiset of objects and constructive methods of their creation and classification are proposed. In addition, necessity of some extension of existing OOP tools for the purpose of practical implementation AIS of analysis information, using proposed approach, is shown.Prombles in programming 2014; 2-3: 233-241 |
publisher |
Інститут програмних систем НАН України |
publishDate |
2025 |
url |
https://pp.isofts.kiev.ua/index.php/ojs1/article/view/716 |
work_keys_str_mv |
AT terletskyido mathematicalfoundationsfordesigninganddevelopmentofintelligentsystemsofinformationanalysis AT provotaroi mathematicalfoundationsfordesigninganddevelopmentofintelligentsystemsofinformationanalysis AT terletskyido matematičníosnoviproektuvannâtarozrobkiíntelektualʹnihsistemanalízuínformacíí AT provotaroi matematičníosnoviproektuvannâtarozrobkiíntelektualʹnihsistemanalízuínformacíí |
first_indexed |
2025-07-17T09:37:22Z |
last_indexed |
2025-07-17T09:37:22Z |
_version_ |
1837886386794921984 |
fulltext |
Інтелектуальні інформаційні технології
© D.O. Terletskyi, O.I. Provotar, 2014
ISSN 1727-4907. Проблеми програмування. 2014. № 2–3. Спеціальний випуск 233
UDC 510.2:004.8
MATHEMATICAL FOUNDATIONS FOR DESIGNING AND
DEVELOPMENT OF INTELLIGENT SYSTEMS
OF INFORMATION ANALYSIS
D.O. Terletskyi
1
, O.I. Provotar
2
Taras Shevchenko National University of Kyiv, Cybernetics Faculty
03680, Kyiv, Academician Glushkov Avenu 4d,
dmytro.terletskyi@gmail.com
1
, aprowata@unicyb.kiev.ua
2
This article is an attempt to combine different ways of working with sets of objects and their classes for designing and development of artifi-
cial intelligent systems (AIS) of analysis information, using object-oriented programming (OOP). This paper contains analysis of basic con-
cepts of OOP and their relation with set theory and artificial intelligence (AI). Process of sets and multisets creation from different sides, in
particular mathematical set theory, OOP and AI is considered. Definition of object and its properties, homogeneous and inhomogeneous clas-
ses of objects, set of objects, multiset of objects and constructive methods of their creation and classification are proposed. In addition, ne-
cessity of some extension of existing OOP tools for the purpose of practical implementation AIS of analysis information, using proposed ap-
proach, is shown.
Дана стаття є спробою поєднати різні підходи до роботи з множинами об’єктів та їхніми класами задля проектування і розробки
систем штучного інтелекту (СШІ) для аналізу інформації, використовуючи об’єктно-орієнтоване програмування (ООП). Робота
містить аналіз базових концепцій ООП і їхній зв'язок з теорією множин та штучним інтелектом (ШІ). Розглядається процес
створення множин та мультимножин з різних сторін, зокрема з огляду на математичну теорію множин, ООП та ШІ.
Запропоновані визначення об’єкту та його властивостей, однорідного та неоднорідного класу об’єктів, множини об’єктів,
мультимножини об’єктів і конструктивні методи їх створення та класифікації. Окрім того, показана необхідність в деякому
розширенні засобів ООП з метою практичної реалізації СШІ для аналізу інформації, використовуючи запропонований підхід.
Introduction
Modern programming includes many different paradigms, approaches, techniques and programming lan-
guages. Object-Oriented Programming (OOP) is one of the famous and useful programming paradigm nowadays.
Indeed, according to [1–3] the most popular programming languages are such languages, which support OOP.
As we know, object and class are the main concepts of OOP. According to [4], objects are the building blocks
of an object-oriented program. We associate these blocks with the objects of real world, during developing programs.
Concerning classes, they are blueprints, which we use as the basis for objects building. Every object is defined by
two terms: attributes and behaviors. Attributes are properties of object, which describe it, and behaviors are proce-
dures, functions (methods) which we can apply to this object and change its state, form and so on. According to [5],
real world is created by objects, and OOP is the approach for description and simulation of this world or some his
particular parts.
It is obvious, if person can develop the programs, which operate with models of objects of real world, their
classes and so on, then this person precisely knows how to operate with them using his mind (intellect). Of course,
sometimes people do this consciously, sometimes not, but it is important that they do this, and simple proof of this
fact is that people have invented OOP. However, real world is very complicated, and consists of huge number of
objects of different classes, that is why formalization of objects of real world into OOP objects and classes some-
times is nontrivial. Despite this, programming, in particular OOP, is developing day by day. People are finding more
and more new practical applications for programming, and such area as Artificial Intelligence (AI) is not exception.
Modern AI includes many directions as knowledge representation, automated planning and scheduling, ma-
chine learning, robotics, computer vision, artificial creativity, natural language processing, and so on. Nevertheless,
all these directions have something common among themselves. One of the main targets for all these directions is
development of intelligent information systems (IIS) or artificial intelligent systems (AIS) for solving particular
practical problems in these areas. Also very important aspect of AIS is intellectual analysis of information, in partic-
ular in real world or in some its parts. Ideologically this is very close to process of development of object-oriented
programs. However, software development which is just tool for solving particular tasks, management by some pro-
cess, etc. is easier then development of software which has some level of individuality and intellectuality and can do
something bigger than just some computations. That is why questions about usability of development AIS using
OOP approach appear.
Nowadays very often development of AIS is reduced to heuristic programming [6]. The advantage is that such
approach gives an opportunity to solve corresponding practical problems, but the disadvantage is that partial solution
does not guarantees general solution of corresponding problems. However, every AIS is based on some model of
knowledge representation (KR). Nowadays, there is a variety of them. The most famous and common are Semantic
Nets, Frames [7–13] and Logical Models [9–14] also Scripts [8–10], Conceptual Dependency [8, 10], Search Spaces,
Search Trees [7], Petri Nets [8], K-Lines, Memory Organization Packets [9], Semantic WEB, Computational
mailto:dmytro.terletskyi@gmail.com
mailto:aprowata@unicyb.kiev.ua
Інтелектуальні інформаційні технології
234
Knowledge Discovery [11] are known. Furthermore, there are a few hybrid models of KR, in particular Brooks’
Subsumption Architecture and Copycat [10].
Each of these models has own specifics and is useful in the particular domain. However, dur ing developing
certain AIS we need to implement a model of KR. Therefore, in this case, we have at least two levels of our AIS,
first of them is a level of KR model and second one is a level of its practical implementation. In some cases, imple-
mentation of particular KR model can cause additional problems and difficulties. That is why, sometimes it leads to
development of new programming paradigms and languages, which are invented for effective implementations of
particular KR model. One of such examples is programming language PROLOG, which is logical programming
language and it gives us opportunities for implementations of different Logical models of KR.
One of the main postulates of OOP is that objects create world. Development of OO-programs is formal de-
scription of objects from some world and relations between them, etc. That is why we can conclude that OOP can be
one of the KR models, which represents (describes) knowledge about objects. Such model is very close to human
perception of real world, because a person perceives real world by objects of this world. This fact gives us an oppor-
tunity to combine level of KR model and level of its practical implementation, during AIS development. In addition,
a person also uses concept of class and set of objects in the process of thinking. Really, we use classes and sets in our
mental activity during perception, analysis, comparison, retrieval, classification every day. We create classes and sets
consciously or subconsciously, operate with them and apply a variety of operations to them. Moreover, set is the
central concept in set theory and one of the most important for mathematics in general. However, questions about the
origin of specific sets are emerging while analyzing the definition of this term, which is given in [15]. We can con-
clude that the “new” set can be obtained by set-theoretic operations over “existing” sets, analyzing the different sys-
tems of set theory [16, 17], and it is really so. However, the questions about origin of these so-called “existing” sets,
their number, their types and so on do not disappear. Our target is development of AIS for intellectual analysis of
information, based on operating with sets of objects and their classes, using OOP. However, primarily we need to
understand specifics of classes’ and sets creation from different sides, i.e. sets in the set theory, sets and classes in
OOP and in the process of human thinking.
Objects and Classes
Objects. We know that each set consists of elements, which form it. Everything, phenomena of our imagina-
tion or of our world can be the elements of the set. It is convenient for us to call them objects. Let consider such
object as “natural number”. It is clear that every natural number must be integer and positive. These are characteristic
properties of natural numbers. It is obvious, that 11 is really a natural number, but −16 and 9.52, for example, are not
natural numbers. We can conclude that each object has certain properties, which define it as some essence while
analyzing this fact. Usually in OOP [4, 5], we can consider properties of objects separately from objects. Such form
of consideration is very close to concept of object-oriented class (OO class). Actually, objects and their properties
cannot exist separately, because if we assume the opposite, we will have contradiction. On the one hand, object can-
not exists separately from its properties, because without properties we cannot imagine and cannot describe it. On the
other hand, object's properties cannot exist separately from object, because without object we cannot see and cannot
perceive them. That is why, we cannot consider them separately, and there are few variants of the definitions order.
It means that we cannot introduce definition of object without definition of its properties and vice versa. Therefore,
we decided to introduce concept of object's properties firstly.
Globally we can divide properties of objects into two types – quantitative and qualitative. We will define
these two types of object's properties formally, but their semantics has intuitive nature.
Definition 1. Quantitative property of object A is a tuple )))(()),((()( ApuApvAp iii , where ni ,1 ,
))(( Apv i is an quantitative value of )(Api , and ))(( Apu i are units of measure of quantitative value of )(Api .
Let us consider some examples of quantitative properties of objects. Suppose we have an apple, and one of its
properties is weight. We can present this property as follows )))(()),((()( ApplepuApplepvApplep weigthweigthweigth ,
and if our apple has the weight of 0.2 kg, then property )(Applepweight will be the following ),2.0()( kgApplepweight .
Suppose we have a phone number, and one of its properties is sequence of odd numbers, which it comprises. We can
present this property as follows )))(()),((()( rPhoneNumbepurPhoneNumbepvrPhoneNumbep oddnumoddnumoddnum ,
and if your phone number includes following odd numbers 3,7,5, then property )( rPhoneNumbepoddnum will be the
following )),5,7,3(()( numbersrPhoneNumbepoddnum .
Definition 2. Two quantitative properties )(Api and )(Bp j , where ni ,1 , mj ,1 , are equivalent, i.e.
1))(),(( BpApEq ji , if and only if ))(())(( BpuApu ji .
Definition 3. Qualitative property of object A is a verification function )()( AvfAp ii , which defines as a
mapping ]1,0[)(:)( ApAvf ii , ni ,1 .
Інтелектуальні інформаційні технології
235
Let us consider some examples of qualitative properties of objects. Suppose we have an integer number n ,
and one of its properties is positivity. We can present this property as follows )()( nvfnp positivitypositivity , where
)(nvf is verification function of property )(nppositivity . In this case, function }1,0{)(:)( npnvf positivitypositivity , and it
is a particular case of verification function – predicate or Boolean-valued function.
Let us consider such object as car, and one of its properties is “high speed”. Suppose that maximum speed of
this car is 200 km /hour. In this case we cannot precisely conclude about )(carvfhighspeed , because “high speed” is
fuzzy concept [18]. There are many ways to define value of )(carvfhighspeed , and everything depends on definition of
high speed. For example if high speed is 150 km/hour, then we can conclude that 1)/150( hourkmvfhighspeed , and
0)/0( hourkmvfhighspeed . Based on this and using proportion we can conclude that 5.0)/75( hourkmvfhighspeed .
We can conclude that, such approach gives an opportunity to combine description of property and its verific a-
tion in the one function, i.e. verification function is a verification function and a description of property at the same
time. Therefore, different algorithms can be verifiers and descriptors of property simultaneously.
Definition 4. Two qualitative properties )(Api and )(Bp j , where ni ,1 , mj ,1 , are equivalent, i.e.
1))(),(( BvfAvfEq ji , if and only if ))()(())()(( BvfBvfAvfAvf jiji .
Definition 5. Specification of object A is a vector ))(),...,(()( 1 ApApAP n , where )(Api , ni ,1 is quantita-
tive or qualitative property of object A .
Definition 6. Dimension of object A is number of properties of object A , i.e. )()( APAD .
Now, we can formulate the definition of “object”.
Definition 7. Object is a pair )(/ APA , where A is object’s identifier and )(AP – specification of object.
Essentially, object is a carrier of some properties, which define it as some essence.
Definition 8. Two objects 1A and 2A are equivalent, i.e. 1),( 21 AAEq , if and only if )()( 21 APAP .
Classes of Objects. In general, we can divide objects on concrete and abstract, and does not matter when or
how someone created each particular object. It is material implementation of its abstract image – a prototype. This
prototype is essentially an abstract specification for creation the future real objects. Besides properties of objects, we
should allocate operations (methods) which we can apply to objects, considering the features of their specifications.
Really, we can apply some operations (methods) to objects for their changing and for operating with them. That is
why, it will be useful to define concept of object's operation (method).
Definition 9. Operation (method) of object A is a function )(Af , which we can apply to object A considering
the features of its specification.
For example, for such objects as natural numbers n , m we can define operations “+” and “*”.
In OOP [4, 5, 19, 20], programmers operate with specifications and methods of objects without objects, and
they call it a type or a class of object. It consists of fields and methods. Fields of class, essentially, are specification
of class. Methods are functions, which we can apply to objects of this class for their changing and for operating with
them. Concept of OO class is similar to universal algebra [21, 22], where carrier of algebra consists of objects and
signature consists of methods of objects. That is why, henceforth sometimes we will use title signature of class for
methods of class. Let us define concept of object's signature.
Definition 10. Signature of object A is a vector ))(),...,(()( 1 AfAfAF m , where )(Afi , mi ,1 is an opera-
tion (method) of object A .
Generally, signature of particular object can consist of different quantity of operations, but in practice, especially
in programming, usually we are considering finite signatures of objects.
According to definition of object, every object has some specification, which defines it as some essence. There
are some objects, which have similar specifications. It means that we can apply the same methods to them. Let us define
similar objects.
Definition 11. Objects A and B are similar objects, if and only if, when they have the same dimension and
equivalent specifications.
Інтелектуальні інформаційні технології
236
If certain two objects are similar, we can conclude that these objects have the same type or class. Now we can in-
troduce concept of object's class.
Definition 12. Object’s class T is a tuple ))(),(( TFTPT , where )(TP is abstract specification of some
quantity of objects, and )(TF is their signature.
When we talk about class of objects, we mean properties of these objects and methods, which we can apply to
them. Class of objects is a generalized form of consideration of objects and operations on them, without these o b-
jects.
As an example, let us describe type Int in programming language C++, using concept of similar objects and
object’s class. Let us set the next specification for class Int
))(),(()( 21 IntpIntpIntP ,
where property )(1 Intp means “integer number”, property )(2 Intp means “number not bigger then 2147336147 and
not smaller then −2147336148”. It is obvious, that all numbers which have properties )(1 Intp and )(2 Intp are objects
of class Int . Let define the methods of class Int in the following way:
))(),(()( 21 IntfIntfIntF ,
where "")(1 Intf and "*")(2 Intf .
Let us define concept of homogeneous class of objects.
Definition 13. Homogeneous class of objects T is a class of objects, which contains only similar objects.
Considering concept of OO class, we can conclude that class is a prototype for particular objects, and all ob-
jects of class are described by class description. It means that every particular object of the class has the same speci-
fication and signature. That in turn, imposes some constraints on description of objects from real world. There are
many different objects of real world, which belong to different classes, and if we need to work with them, we can
describe them, using new class for each new type of objects. Especially, if we work with not very big quantity of
different types of objects, we can do it without any fears. However, if we need to work with huge quantity of differ-
ent types, for example, with a few thousands of different types, just a process of description of such types is very
complex and time-consuming not to mention size of code and performance of such programs.
According to definitions of object and object’s class, we can conclude two points. Firstly, every object is
a member of at least one class of objects, and secondly, objects and their classes cannot exist separately. Further-
more, some objects are members of few classes simultaneously. For example, such objects as natural numbers nnn ,...,1
are members of such classes as natural numbers, integer numbers, rational numbers and real numbers, i.e.
RQZNnn n ,...,1 . As we can see, class R has the biggest cardinality in this case; furthermore, it consists
of groups of objects of different types. It contradicts concept of OO class, because different objects from one OO
class cannot have different specifications and signatures. That is why we cannot describe such class of objects using
OO class.
Let consider the class of real numbers R , and describe it by the following specification
),...)(),...,(()( 51 RpRpRP , where )(1 Rp is “integer number”, )(2 Rp is “natural number”, )(3 Rp is “fractional num-
ber”, )(4 Rp is “negative integer”, )(5 Rp is “even number”. Let consider following numbers 3, 2.75, −16, 4, −7.48.
It is obvious that they are objects of different types, but all of them are objects of class R . However, if these
objects belong to class R , they must conform to the specification )(RP . Clearly that they do so, but in different ways
(see Table).
Table. Conformity of objects 3, 2.75, −16, 4, −7.48 to the class R
iij AAp /)( 3 2.75 −16 4 −7.48
Integer number 1 0 1 1 0
Natural number 1 0 0 1 0
Fractional number 0 1 0 0 1
Negative integer 0 0 1 0 1
Even number 0 0 1 1 1
Інтелектуальні інформаційні технології
237
It is obvious, that mathematically all these numbers 3, 2.75, −16, 4, −7.48 are objects of the class R , but, as we can see,
we really cannot describe them using one OO class. Of course, real numbers implemented for many program languages
as one of the primitive types of data, which we can use without any descriptions, because it is built-in. However, it is
one of the examples of inhomogeneous class of objects.
As we can see, there are two different types of object classes, that is why, let us define concept of inhomogene-
ous class of objects.
Definition 14. Inhomogeneous class of objects T is a tuple ))(),...,(),(( 11 nn AprAprTCoreT , where
))(),(()( TFTPTCore is the core of class T , which includes properties and methods similar to specifications
)(),...,( 1 nAPAP and signatures )(),...,( 1 nAFAF respectively, and where ))(),(()( iiii AFAPApr , ni ,1 are projec-
tions of objects nAA ,...,1 , which consist of properties and methods typical only for these objects.
Universal Operation on Objects and Runtime Class Generation
One of the most important aspects of OOP is an opportunity to work only with classes, which are described
before program execution. Of course, some programs provide us with a possibility to work with new classes, which
we can obtained using basic classes. However, we cannot obtain new classes, which are not inheritors of basic clas-
ses, during program execution. In modern programming, this process is known as runtime class generation (RCG) or
runtime class creation (RCC). Nowadays, there are some approaches for implementation of this task for some OOP-
languages, in particular for Java [24] and C# [25]. These tools based on manipulating with bytecode and implement-
ed for such platforms of programming as Java and .NET. However, now we will not discuss practical implementa-
tions of RCG for concrete platforms of programming, but will focus on specifics of this process.
It is known, that logic of program provides access and work with some classes of objects, during program ex-
ecution, depending on particular program scenario. Moreover, it can provide RCG, based on some constructors
of classes. According to this, we will propose some constructors of classes, defining some universal operations
on objects.
As it was mentioned before, in OOP, objects have methods. Usually they are functions, which we can execute
for these objects. We can divide methods of objects on two types, depending on character of their action. They are
modifiers and exploiters. Modifiers are functions, which can change objects, in particular some fields of objects.
Exploiters are functions, which use objects as arguments and cannot change them. However, majority of methods of
objects are local with respect to objects, and cannot be applied to objects of different types. Of course, there are some
methods, which we can apply to objects of different types, but usually we need to use overloading operator for this.
Nevertheless, we will define some universal operations for objects, which can be applied to any objects. Let us do it
using the concept of object and object’s class.
Definition 15. Union of 2n arbitrary objects is a new set of objects S , which obtain in the following way
)(/},...,{)(/...)(/ 111 STAAATAATAS nnn , where nAA ,...,1 are objects, such that ji AA , , where nji ,1, and
ji , 0),( ji AAEq , )( iAT , ni ,1 is a class of object iA and )(ST is a class of new set of objects S and n is its
cardinality.
Let us consider such geometrical objects as triangle, square and trapeze. It is obvious that these objects belong to
different classes of geometrical figures. Let us denote triangle as A , square as B , trapeze as C , and describe their
classes as follows ))(),...,(()( 41 ApApAP , ))(),...,(()( 31 BpBpBP , ))(),...,(()( 41 CpCpCP ,
))(),(()( 21 AfAfAF , ))(),(()( 21 BfBfBF and ))(),(()( 21 CfCfCF . Properties )(1 Ap , )(1 Bp , )(1 Cp are quan-
tities of sides of figures, properties )(2 Ap , )(2 Bp , )(2 Cp , are sizes of sides of figures, properties )(3 Ap , )(3 Bp , are
sizes of angles of figures, property )(4 Ap is triangle inequality and property )(4 Cp is parallelism of two sides of fig-
ure. Methods )(1 Af , )(1 Bf , )(1 Cf are functions of perimeter calculation of figures, and methods )(2 Af , )(2 Bf ,
)(2 Cf are functions of area calculation of figures. Of course, specifications and signatures of these objects can include
more properties and methods, than we presented in this example, everything depends on level of detail.
Let us apply the union operation to these objects and create new set of objects.
)(/},,{ STCBACBAS .
We have obtained new set of objects S and new class of objects ))(),(),(),(()( 321 CprBprAprSCoreST , where
))(),(),(),(()( 1321 SfSpSpSpSCore , property )(1 Sp is quantity of sides of figures, property )(2 Sp means sizes of
sides of figures, )(3 Sp are sizes of angles of figures, method )(1 Sf is a function of perimeter calculation of figures,
))(),(()( 241 AfApApr , ))(()( 22 BfBpr , ))(),(()( 243 CfCpCpr . Essentially, set of objects S is the set of trian-
Інтелектуальні інформаційні технології
238
gles of class )(AT , squares of class )(BT and trapezes of class )(CT . Concerning class of objects )(ST , it describes
three types of geometrical figures )(AT , )(BT and )(CT .
Definition 16. Intersection of two arbitrary objects 1A and 2A is a class of objects ))(),(()( AFAPAT ,
where 1))(),((|)()( 211 211
ApApEqApAP iii and 1))(),((|)()( 211 211
AfAfEqAfAF iii . Intersection of two
arbitrary objects 1A and 2A does not exist, if and only if 0))(),(( 21 21
ApApEq ii for all 1i and 2i .
Let us calculate intersection of triangle A and square B , which were described above.
)( BATBA .
As the result we have obtained new class of objects )( BAT , which does not contain any projections of objects, i.e.
)()( BACoreBAT , where ))(),(),(),(()( 1321 BAfBApBApBApBACore , property )(1 BAp
is quantity of sides of figure, property )(2 BAp means sizes of sides of figure, )(3 BAp are sizes of angles of
figure, )(1 BAf is a function of perimeter calculation of figure. As we can see, class )( BAT is a class of objects,
which describes some type of geometrical figures. However, we do not know exactly which type, even considering
its specification and signature, because many of geometric figures have sides and angles. Nevertheless, it is a new
type of objects, which we have obtained from intersection of two objects, which describe two determined types of
geometric figures.
Definition 17. The difference \ of two arbitrary objects 1A and 2A is a class of objects ))(),(()( AFAPAT ,
where 0))(),((|)()( 211 211
ApApEqApAP iii and 0))(),((|)()( 211 211
AfAfEqAfAF iii . Difference of two
arbitrary objects 1A and 2A does not exist, if and only if 1))(),(( 21 21
ApApEq ii for all 1i and 2i .
Let us calculate difference of triangle A and trapeze C , which were described above.
)\(\ CATCA .
As the result, we have obtained new class of objects )\( CAT , which does not contain core, i.e. )\()\( 1 CAprCAT ,
where ))(),(()\( 241 AfApCApr . As in the case of intersection, we have obtained new class of objects, which de-
scribes some type of geometric figures, however, unlike the previous case we can say that this new type of geometric
figures is a triangle, although it is described using smaller specification.
Definition 18. The symmetrical difference of two arbitrary objects 1A and 2A is a class of objects
))(),(()( AFAPAT , where
0))(),((|))(),(()( 2121 2121
ApApEqApApAP iiii ,
0))(),((|))(),(()( 2121 2121
AfAfEqAfAfAF iiii .
Symmetrical difference of two arbitrary objects 1A and 2A does not exist, if and only if 1))(),(( 21 21
ApApEq ii for
all 1i and 2i .
Let us calculate symmetrical difference using the same figures, i.e. triangle A and trapeze C .
)( CATCA .
As the result, we have obtained new class of objects )( CAT , which like the previous case, does not contain core, i.e.
))(),(()( 21 CAprCAprCAT , where ))(),(()( 241 AfApCApr and ))(),(()( 242 CfCpCApr . As in the
case of difference, we have obtained new class of objects, which describes a type of geometric figures, however, as in
the case of intersection, we do not know exactly which type of geometrical figures this class describes. Nevertheless, we
can say that this class describes two types of geometrical figures, and one of them is triangle.
Інтелектуальні інформаційні технології
239
Definition 19. Clone of the arbitrary object A is an object )(/ APAA ii , where )(AP is specification of ob-
ject A and i is a number of its clone.
This operation is similar to concept of copy constructor in C++ [8], and is an example of constructor of objects.
As we can see, the majority of operations on objects that defined above are similar to set-theoretic operations in
classical set theory [23]. However, in contrast to them, operations on objects give us opportunities to create sets and
classes of objects.
Sets of Objects and Inhomogeneous Classes
Sets of Objects. There are a few ways to create set of objects. Firstly, we can obtain a set of objects using un-
ion operation to not less than two arbitrary objects. Secondly, we can do it using set-theoretic operations over sets of
objects. Eventually, we can obtain a set of objects combining these two approaches, namely to use union operation to
not less than two arbitrary objects and not less than one arbitrary set of objects. Let us define concept of set of ob-
jects, using these ideas, concepts of object and class of objects.
Definition 20. The set of objects S is a union, which satisfies one of the following schemes:
);(/...)1 1 STSOOS n
);(/...)2 1 STSSSS m
);(/......)3 11 STSSSOOS mn
where nOO ,...,1 are arbitrary objects, mSS ,...,1 are arbitrary sets of objects, and )(ST is a class of new set of objects S .
We have defined union operation for scheme 1S , now let us do this for schemes 2S and 3S . As we know,
scheme 2S is defined in classical set theory, and this operation is known as a union of sets [23]. However, that defi-
nition does not consider concept of class of objects, that is why we need to redefine this operation.
Definition 21. Union of m )2( m arbitrary sets of objects is a new set of objects S , which obtains in the
following way )(/},...,{)(/...)(/ 111 STAASTSSTSS nmm , where nAA ,...,1 , are such objects that ji AA , ,
where nji ,1, and ji , 0),( ji AAEq , )( iST , mi ,1 is a class of set of object iS and )(ST is a class of new set
of objects S and n is its cardinality.
Let us consider two sets of objects },{1 BAS , },{2 CAS which consist of triangle A , square B and trapeze
C , which were described above, and calculate their union.
).(/},,{)(/},{)(/},{)(/)(/ 212211 STCBASTCASTBASTSSTSS
As we can see, we have obtained the same result, as in the case of union of objects A , B and C , which we consid-
ered before.
Now, let us define union operations for scheme 3S .
Definition 22. Union of n )1( n arbitrary objects and m )1( m arbitrary sets of objects is a new set of
objects S , which obtains in the following way
)(/},...,{)(/...)(//...)(/ 11111 STAASTSSTSTAATAS kmmnn ,
where kAA ...,,1 , are such objects that ji AA , , where kji ,1, and ji , 0),( ji AAEq , )( iAT , ni ,1 is a class
of object iA , )( iST , mi ,1 is a class of set of object iS and )(ST is a class of new set of objects S and k is its
cardinality.
Let us consider objects A , B , C , and sets of objects 1S , 2S , which we used in the previous example, and cal-
culate their union.
)(/)(/)(/)(/)(/ 2211 STSSTSCTCBTBATAS
Інтелектуальні інформаційні технології
240
)(/},,{)(/},{)(/},{)(/)(/)(/ 21 STCBASTCASTBACTCBTBATA .
Multisets of Objects. As we know, a multiset is a generalization of the notion of set in which members are al-
lowed to appear more than once [29–31]. Formally multiset can be defined as a 2-tuple ),( mA , where A is the set,
and m is the function that puts a natural number in accordance to each element of the set A , which is called the
multiplicity of the element, i.e. NAm : . However, this definition does not explain how to create the multiset of
objects, that is why we are going to define multiset of objects using concept of set of objects.
Definition 23. The multiset of objects is a set of bjects },...,{ 1 nAAS , that ji AA , , where nji ,1, and ji ,
1),( ji AAEq .
We can obtain multiset of objects in the same way as set of objects. The example will be shown , using objects
and sets of objects, which were mentioned previously.
Union of objects.
)(/},,,,,{)(/)(/)(/)(/)(/)(/ STCCCBAACTCCTCCTCBTBATAATAS .
Union of sets of objects.
)(/},,,{)(/},{)(/},{)(/)(/ 212211 STCBAASTCASTBASTSSTSS .
Union of objects and sets of objects.
)(/},,,{)(/},{)(/)(/)(/)(/)(/ 111 STCBAASTBACTCATASTSCTCATAS .
As we can see, creation of sets and multisets of objects entails creation of new classes of objects, in particular
inhomogeneous, that causes some problems related to description of such classes in OOP. At first glance it may
seems, that there is no necessity to work with such classes, and we can use just concept of homogeneous class, that
implemented within OOP. However, if we analyze some aspects of human mind, especially mechanisms of its think-
ing and analysis, we can conclude that concept of set of objects is one of the basic and very important concepts for
them. Really, let us consider situation, when you need to find some book among big amount of different books,
which lying on the shelves of bookcase. If you know how exactly this book looks, you can imagine this book and
you can distinguish it from other books in this bookcase. Finally, during searching for this book, you perform c ertain
exhaustive search, and at the same time, you create set of books, which you have checked. Let us imagine another
situation, when you need to count money, which you have in your wallet. During counting, you create at least two
sets, set of banknotes and set of coins. In addition, we can consider situation when you want to play chess, and after
opening the box with chess, you need to make initial arrangement of figures on the chessboard. During figures
placement, you create set of white and set of black figures from set of all figures. These are just a few simple exa m-
ples from our daily activity. Very often in such situations and similar to them we operate with sets of objects subco n-
sciously, and as the result, we pay little attention to this, but it is happening permanently. That is why we can co n-
clude that creation of sets and classes of objects is normal activity of our mind, and if we want to simulate and repro-
duce this process, using computer system, we need to have certain opportunities to work with sets of objects and
inhomogeneous classes of objects. It means we need appropriate tools within certain OOP-language for working with
such abstractions.
Nowadays, there are a few different implementations of tools for working with sets within some OOP-languages,
in particular set in STL for C++ [26], HashSet in Java [20], HashSet, SortedSet and ISet in C# [27], set and frozenset in
Python [28]. These tools allow sets creation, executing set-theoretic operations, membership checking, adding and re-
moving of elements and checking of equivalence between sets, etc. However, we have not opportunities for working
with classes of sets and multisets, and this is one of disadvantages of modern OOP.
Conclusions
In this paper we analyzed such basic concepts of OOP as object and class and their relation with set theory
and AI. According to this, definitions of object and its properties, homogeneous and inhomogeneous classes of ob-
jects were proposed. We defined such operations on objects as union, intersection, difference, symmetric difference
and cloning. Besides, we considered process of runtime class generation and showed that intersection, difference,
symmetric difference of objects are examples of classes’ generators.
Process of sets and multisets creation was considered in details from different sides, in particular mathemati-
cal set theory, OOP and AI. After that, constructive definition of set of objects, multiset of objects and methods of
their creation were proposed. Relation between sets of objects and classes of objects was also shown. The proposed
approach allows not only to create (generate) sets and multisets of objects, but also to classify them. It also allows
considering the problem of object classification and identification in another way.
Інтелектуальні інформаційні технології
241
Besides, we showed that, we could not operate with inhomogeneous classes of objects, classes of sets and
multisets of objects using existing OOP tools. In addition, we cannot create new classes of object using operations on
objects, in particular in runtime. After all, we can conclude that we need some OOP extension for the purpose of
design and developing AIS using proposed approach.
1. http://langpop.com/ Programming Language Popularity.
2. http://www.tiobe.com/ TIOBE Programming Community Index.
3. http://lang-index.sourceforge.net/ The Transparent Language Popularity Index.
4. Weisfeld M. The Object-Oriented Thought Process. Third Edition. Addison-Wesley Professional, 2008.
5. Pecinovský R. OOP – Learn Object Oriented Thinking and Programming. Tomáš Bruckner, Řepín-Živonín, 2013.
6. Slagle J.R. Artificial intelligence: The Heuristic Programming Approach. McGRAW-HILL Book Company, 1971.
7. Coppin B. Artificial intelligence illuminated. Jones and Bartlett Publishers, Inc. 2004.
8. Konar A. Artificial Intelligence and Soft Computing. Behavioral and Cognitive Modeling of the Human Brain. CRC Press LLC, 2000.
9. Rabunal J.R., Dorado J., Pazos A. Encyclopedia of Artificial Intelligence. Information Science Reference, 2008.
10. Luger G.F. Artificial Intelligence. Structures and Strategies for Complex Problem Solving: 6-th edition. Addison-Wesley, 2008.
11. Jones M.T. Artificial Intelligence: A Systems Approach. Infinity Science Press LLC, 2008.
12. Handbook of Artificial Intelligence Book 2: Models and Methods, edited by D. A. Pospelov. – Moscow, “Radio i Sviaz” 1990.
13. Ruchkin V.N., Fulin V.A. Universal Artificial Intelligence and Expert Systems. St. Petersburg: "BHV-Petersburg", 2009.
14. Ginsberg M. Essentials of artificial intelligence. Morgan Kaufmann Publishers, Inc., 1993.
15. Cantor G. Contributions to the Founding of the Theory of Transfinite Numbers. – New York: Dover Publications, Inc., 1915.
16. Wang H. and Naughton R.M. Les Systemes Axiomatiques de la Theorie des Ensembles. – Paris: Gauthier-Villars, 1953.
17. Vopenka P. Mathematics in the alternative set theory. Leipzig: BSB B.G. Teubner, 1979.
18. Zadeh L.A. Fuzzy sets. Information and control. – 1965, N 8, P. 338–353.
19. Stroustrup B. The C++ Programming Language: Special Edition. Addison-Wesley Professional, 2000.
20. Eckel B. Thinking in Java: 4-th Edition. Prentice Hall. – 2006.
21. Kurosh A.G. Lectures on general algebra: Second Edition. – Moscow: Nauka, 1973.
22. Serhienko I.V., Kryvyi S.L., and Provotar O.I. Algebraic Aspects of Information Technology. – Kyiv: Naukova Dumka, 2011.
23. Stoll R.R. Sets, Logic and Axiomatic Theories: 2-nd edition. W.H. Freeman & Co Ltd. 1975.
24. http://cglib.sourceforge.net/ Code Generation Library CGLib.
25. http://msdn.microsoft.com/en-us/library/650ax5cx.aspx Code Document Object Model.
26. Musser D.R., Derge G.J., Saini A. STL Tutorial and Reference Guide: 2-nd edition. C++ Programming with the Standard Template Library,
Addison-Wesley Professional, 2001.
27. Mukherjee S. NET 4.0 Generics: Beginner’s Guide. Packt Publishing Ltd. 2012.
28. Summerfield M. Programming in Python 3. A Complete Introduction to the Python Language: 2-nd edition. Pearson Education, Inc. 2010.
29. Bruijn N.D. Denumerations of rooted trees and multisets // Discrete Applied Mathematics. – 1983. – Vol. 6, N 1. – P. 25–33.
30. Syropoulos A. Mathematics of multisets, in Proceedings of the Workshop on Multiset Processing: Multiset Processing, Mathematical, Computer
Science, and Molecular Computing Points of View”, Springer-Verlag Berlin Heidelberg, 2001. – P. 347–358.
31. Petrovskyi A. Spaces of sets and multisets. M.: Editorial URSS, 2003.
http://langpop.com/
http://www.tiobe.com/
http://lang-index.sourceforge.net/
http://cglib.sourceforge.net/
http://msdn.microsoft.com/en-us/library/650ax5cx.aspx
|