<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>MATHEMATICAL FOUNDATIONS FOR DESIGNING AND DEVELOPMENT OF INTELLIGENT SYSTEMS OF INFORMATION ANALYSIS</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>D.O. Terletskyi</string-name>
          <email>dmytro.terletskyi@gmail.com1</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>O.I. Provotar</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Taras Shevchenko National University of Kyiv, Cybernetics Faculty 03680</institution>
          ,
          <addr-line>Kyiv, Academician Glushkov Avenu 4d</addr-line>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2014</year>
      </pub-date>
      <fpage>233</fpage>
      <lpage>241</lpage>
      <abstract>
        <p>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. Дана стаття є спробою поєднати різні підходи до роботи з множинами об'єктів та їхніми класами задля проектування і розробки систем штучного інтелекту (СШІ) для аналізу інформації, використовуючи об'єктно-орієнтоване програмування (ООП). Робота містить аналіз базових концепцій ООП і їхній зв'язок з теорією множин та штучним інтелектом (ШІ). Розглядається процес створення множин та мультимножин з різних сторін, зокрема з огляду на математичну теорію множин, ООП та ШІ. Запропоновані визначення об'єкту та його властивостей, однорідного та неоднорідного класу об'єктів, множини об'єктів, мультимножини об'єктів і конструктивні методи їх створення та класифікації. Окрім того, показана необхідність в деякому розширенні засобів ООП з метою практичної реалізації СШІ для аналізу інформації, використовуючи запропонований підхід.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        Modern programming includes many different paradigms, approaches, techniques and programming
languages. Object-Oriented Programming (OOP) is one of the famous and useful programming paradigm nowadays.
Indeed, according to [
        <xref ref-type="bibr" rid="ref1 ref2 ref3">1–3</xref>
        ] the most popular programming languages are such languages, which support OOP.
      </p>
      <p>
        As we know, object and class are the main concepts of OOP. According to [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], 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
procedures, functions (methods) which we can apply to this object and change its state, form and so on. According to [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ],
real world is created by objects, and OOP is the approach for description and simulation of this world or some his
particular parts.
      </p>
      <p>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
sometimes 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.</p>
      <p>Modern AI includes many directions as knowledge representation, automated planning and scheduling,
machine 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
particular 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
process, 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.</p>
      <p>
        Nowadays very often development of AIS is reduced to heuristic programming [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. 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 [
        <xref ref-type="bibr" rid="ref10 ref11 ref12 ref13 ref7 ref8 ref9">7–13</xref>
        ] and Logical Models [
        <xref ref-type="bibr" rid="ref10 ref11 ref12 ref13 ref14 ref9">9–14</xref>
        ] also Scripts [
        <xref ref-type="bibr" rid="ref10 ref8 ref9">8–10</xref>
        ], Conceptual Dependency [
        <xref ref-type="bibr" rid="ref10 ref8">8, 10</xref>
        ], Search Spaces,
Search Trees [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], Petri Nets [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], K-Lines, Memory Organization Packets [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], Semantic WEB, Computational
Knowledge Discovery [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] are known. Furthermore, there are a few hybrid models of KR, in particular Brooks’
Subsumption Architecture and Copycat [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ].
      </p>
      <p>Each of these models has own specifics and is useful in the particular domain. However, during 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,
implementation 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.</p>
      <p>
        One of the main postulates of OOP is that objects create world. Development of OO-programs is formal
description 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
opportunity 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 [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ]. We can
conclude that the “new” set can be obtained by set-theoretic operations over “existing” sets, analyzing the different
systems of set theory [
        <xref ref-type="bibr" rid="ref16 ref17">16, 17</xref>
        ], 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.
      </p>
    </sec>
    <sec id="sec-2">
      <title>Objects and Classes</title>
      <p>
        Objects. We know that each set consists of elements, which form it. Everything, phenomena of our
imagination 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 [
        <xref ref-type="bibr" rid="ref4 ref5">4, 5</xref>
        ], 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
cannot 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.
      </p>
      <p>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.</p>
      <p>Definition 1. Quantitative property of object A is a tuple pi ( A)  (v( pi ( A)), u( pi ( A))) , where i  1, n ,
v( pi ( A)) is an quantitative value of pi ( A) , and u( pi ( A)) are units of measure of quantitative value of pi ( A) .</p>
      <p>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 pweigth ( Apple)  (v( pweigth ( Apple)),u( pweigth ( Apple))) ,
and if our apple has the weight of 0.2 kg, then property pweight ( Apple) will be the following pweight ( Apple)  (0.2, kg) .
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 poddnum (PhoneNumber)  (v( poddnum (PhoneNumber)), u( poddnum (PhoneNumber))) ,
and if your phone number includes following odd numbers 3,7,5, then property poddnum (PhoneNumber) will be the
following poddnum (PhoneNumber)  ((3,7,5), numbers) .</p>
      <p>Definition 2. Two quantitative properties pi ( A) and p j (B) , where i  1, n , j  1, m , are equivalent, i.e.
Eq( pi ( A), p j (B))  1 , if and only if u( pi ( A))  u( p j (B)) .</p>
      <p>
        Definition 3. Qualitative property of object A is a verification function pi ( A)  vfi ( A) , which defines as a
mapping vfi ( A) : pi ( A)  [
        <xref ref-type="bibr" rid="ref1">0,1</xref>
        ] , i  1, n .
      </p>
      <p>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 p positivity (n)  vf positivity (n) , where
vf (n) is verification function of property p positivity (n) . In this case, function vf positivity (n) : p positivity (n)  {0,1} , and it
is a particular case of verification function – predicate or Boolean-valued function.</p>
      <p>
        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 vfhighspeed (car) , because “high speed” is
fuzzy concept [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ]. There are many ways to define value of vfhighspeed (car) , and everything depends on definition of
high speed. For example if high speed is 150 km/hour, then we can conclude that vfhighspeed (150km / hour)  1 , and
vfhighspeed (0km / hour )  0 . Based on this and using proportion we can conclude that vfhighspeed (75km / hour )  0.5 .
      </p>
      <p>We can conclude that, such approach gives an opportunity to combine description of property and its
verification 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.</p>
      <p>Definition 4. Two qualitative properties pi ( A) and p j (B) , where i  1, n , j  1, m , are equivalent, i.e.
Eq(vfi ( A),vf j (B))  1 , if and only if (vfi ( A)  vf j ( A))  (vfi (B)  vf j (B)) .</p>
      <p>Definition 5. Specification of object A is a vector P( A)  ( p1( A),..., pn ( A)) , where pi ( A) , i  1, n is
quantitative or qualitative property of object A .</p>
      <sec id="sec-2-1">
        <title>Definition 6. Dimension of object A is number of properties of object A , i.e. D( A)  P( A) .</title>
      </sec>
      <sec id="sec-2-2">
        <title>Now, we can formulate the definition of “object”.</title>
        <p>Definition 7. Object is a pair A / P( A) , where A is object’s identifier and P( A) – specification of object.</p>
      </sec>
      <sec id="sec-2-3">
        <title>Essentially, object is a carrier of some properties, which define it as some essence.</title>
        <p>Definition 8. Two objects A1 and A2 are equivalent, i.e. Eq( A1, A2 )  1 , if and only if P( A1)  P( A2 ) .</p>
        <p>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).</p>
        <p>Definition 9. Operation (method) of object A is a function f ( A) , which we can apply to object A considering
the features of its specification.</p>
        <p>For example, for such objects as natural numbers n , m we can define operations “+” and “*”.</p>
        <p>
          In OOP [
          <xref ref-type="bibr" rid="ref19 ref20 ref4 ref5">4, 5, 19, 20</xref>
          ], 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 [
          <xref ref-type="bibr" rid="ref21 ref22">21, 22</xref>
          ], 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.
        </p>
        <p>Definition 10. Signature of object A is a vector F ( A)  ( f1( A),..., fm ( A)) , where fi ( A) , i  1, m is an
operation (method) of object A .</p>
        <p>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.</p>
        <p>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.</p>
        <p>Definition 11. Objects A and B are similar objects, if and only if, when they have the same dimension and
equivalent specifications.</p>
        <p>If certain two objects are similar, we can conclude that these objects have the same type or class. Now we can
introduce concept of object's class.</p>
        <p>Definition 12. Object’s class T is a tuple T  (P(T ), F (T )) , where P(T ) is abstract specification of some
quantity of objects, and F (T ) is their signature.</p>
        <p>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
objects.</p>
        <p>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
where property p1(Int) means “integer number”, property p2 (Int) means “number not bigger then 2147336147 and
not smaller then −2147336148”. It is obvious, that all numbers which have properties p1(Int) and p2 (Int) are objects
of class Int . Let define the methods of class Int in the following way:</p>
        <p>P(Int)  ( p1(Int), p2 (Int)) ,</p>
        <p>F (Int)  ( f1(Int), f2 (Int)) ,
where f1(Int) "" and f2 (Int) "*" .</p>
        <p>Let us define concept of homogeneous class of objects.</p>
        <p>Definition 13. Homogeneous class of objects T is a class of objects, which contains only similar objects.</p>
        <p>Considering concept of OO class, we can conclude that class is a prototype for particular objects, and all
objects of class are described by class description. It means that every particular object of the class has the same
specification 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
different 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.</p>
        <p>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.
Furthermore, some objects are members of few classes simultaneously. For example, such objects as natural numbers n1,..., nn
are members of such classes as natural numbers, integer numbers, rational numbers and real numbers, i.e.
n1,..., nn  N  Z  Q  R . 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.</p>
        <p>Let consider the class of real numbers R , and describe it by the following specification
P(R)  ( p1(R),..., p5 (R),...) , where p1(R) is “integer number”, p2 (R) is “natural number”, p3 (R) is “fractional
number”, p4 (R) is “negative integer”, p5 (R) 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 P(R) . Clearly that they do so, but in different ways
(see Table).
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.</p>
        <p>As we can see, there are two different types of object classes, that is why, let us define concept of
inhomogeneous class of objects.</p>
        <p>Definition 14. Inhomogeneous class of objects T is a tuple T  (Core(T ), pr1( A1),..., prn ( An )) , where
Core(T )  (P(T ), F (T )) is the core of class T , which includes properties and methods similar to specifications
P( A1),..., P( An ) and signatures F ( A1),..., F ( An ) respectively, and where pri ( Ai )  (P( Ai ), F ( Ai )) , i  1, n are
projections of objects A1,..., An , which consist of properties and methods typical only for these objects.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Universal Operation on Objects and Runtime Class Generation</title>
      <p>
        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
classes, 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 [
        <xref ref-type="bibr" rid="ref24">24</xref>
        ] and C# [
        <xref ref-type="bibr" rid="ref25">25</xref>
        ]. These tools based on manipulating with bytecode and
implemented for such platforms of programming as Java and .NET. However, now we will not discuss practical
implementations of RCG for concrete platforms of programming, but will focus on specifics of this process.
      </p>
      <p>It is known, that logic of program provides access and work with some classes of objects, during program
execution, 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.</p>
      <p>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.</p>
      <p>Definition 15. Union  of n  2 arbitrary objects is a new set of objects S , which obtain in the following way
S  A1 / T ( A1)  ...  An / T ( An )  {A1,..., An} / T (S ) , where A1,..., An are objects, such that Ai , Aj , where i, j  1, n and
i  j , Eq( Ai , Aj )  0 , T ( Ai ) , i  1, n is a class of object Ai and T (S ) is a class of new set of objects S and n is its
cardinality.</p>
      <p>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 P( A)  ( p1( A),..., p4 ( A)) , P(B)  ( p1(B),..., p3 (B)) , P(C)  ( p1(C),..., p4 (C)) ,
F ( A)  ( f1( A), f2 ( A)) , F (B)  ( f1(B), f2 (B)) and F (C)  ( f1(C), f2 (C)) . Properties p1( A) , p1(B) , p1(C) are
quantities of sides of figures, properties p2 ( A) , p2 (B) , p2 (C) , are sizes of sides of figures, properties p3 ( A) ,
p3 (B) , are sizes of angles of figures, property p4 ( A) is triangle inequality and property p4 (C) is parallelism of two
sides of figure. Methods f1( A) , f1(B) , f1(C) are functions of perimeter calculation of figures, and methods f2 ( A) ,
f2 (B) , f2 (C) 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.</p>
      <p>Let us apply the union operation to these objects and create new set of objects.</p>
      <p>S  A  B  C  {A, B, C} / T (S ) .</p>
      <p>We have obtained new set of objects S and new class of objects T (S )  (Core(S ), pr1( A), pr2 (B), pr3 (C)) , where
Core(S )  ( p1(S ), p2 (S ), p3 (S ), f1(S )) , property p1(S ) is quantity of sides of figures, property p2 (S ) means sizes of
sides of figures, p3(S ) are sizes of angles of figures, method f1(S) is a function of perimeter calculation of figures,
pr1( A)  ( p4 ( A), f2 ( A)) , pr2 (B)  ( f2 (B)) , pr3 (C)  ( p4 (C), f2 (C)) . Essentially, set of objects S is the set of
triangles of class T ( A) , squares of class T (B) and trapezes of class T (C) . Concerning class of objects T (S ) , it describes
three types of geometrical figures T ( A) , T (B) and T (C) .</p>
      <p>Definition 16. Intersection  of two arbitrary objects A1 and A2 is a class of objects T ( A)  (P( A), F ( A)) ,
where P( A)   pi1 ( A1) | Eq( pi1 ( A1), pi2 ( A2 ))  1 and F ( A)   fi1 ( A1) | Eq( fi1 ( A1), fi2 ( A2 ))  1 . Intersection of two
arbitrary objects A1 and A2 does not exist, if and only if Eq( pi1 ( A1), pi2 ( A2 ))  0 for all i1 and i2 .</p>
      <sec id="sec-3-1">
        <title>Let us calculate intersection of triangle A and square B , which were described above.</title>
        <p>A  B  T ( A  B) .</p>
        <p>As the result we have obtained new class of objects T ( A  B) , which does not contain any projections of objects, i.e.
T ( A  B)  Core( A  B) , where Core( A  B)  ( p1( A  B), p2 ( A  B), p3 ( A  B), f1( A  B)) , property p1( A  B)
is quantity of sides of figure, property p2 ( A  B) means sizes of sides of figure, p3 ( A  B) are sizes of angles of
figure, f1( A  B) is a function of perimeter calculation of figure. As we can see, class T ( A  B) 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.</p>
        <p>Definition 17. The difference \ of two arbitrary objects A1 and A2 is a class of objects T ( A)  (P( A), F ( A)) ,
where P( A)   pi1 ( A1) | Eq( pi1 ( A1), pi2 ( A2 ))  0 and F ( A)   fi1 ( A1) | Eq( fi1 ( A1), fi2 ( A2 ))  0 . Difference of two
arbitrary objects A1 and A2 does not exist, if and only if Eq ( pi1 ( A1), pi2 ( A2 ))  1 for all i1 and i2 .</p>
      </sec>
      <sec id="sec-3-2">
        <title>Let us calculate difference of triangle A and trapeze C , which were described above.</title>
        <p>A \ C  T ( A \ C) .</p>
        <p>As the result, we have obtained new class of objects T ( A \ C) , which does not contain core, i.e. T ( A \ C)  pr1( A \ C) ,
where pr1( A \ C)  ( p4 ( A), f2 ( A)) . As in the case of intersection, we have obtained new class of objects, which
describes 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.</p>
        <sec id="sec-3-2-1">
          <title>Definition 18. The symmetrical difference  of two arbitrary objects A1 and</title>
        </sec>
        <sec id="sec-3-2-2">
          <title>A2 is a class of objects</title>
          <p>T ( A)  (P( A), F ( A)) , where</p>
          <p>P( A)   ( pi1 ( A1), pi2 ( A2 )) | Eq( pi1 ( A1), pi2 ( A2 ))  0 ,</p>
          <p>F ( A)   ( fi1 ( A1), fi2 ( A2 )) | Eq( fi1 ( A1), fi2 ( A2 ))  0 .</p>
          <p>Symmetrical difference of two arbitrary objects A1 and A2 does not exist, if and only if Eq ( pi1 ( A1), pi2 ( A2 ) )  1 for
all i1 and i2 .</p>
        </sec>
      </sec>
      <sec id="sec-3-3">
        <title>Let us calculate symmetrical difference using the same figures, i.e. triangle A and trapeze C .</title>
        <p>A  C  T ( A  C) .</p>
        <p>As the result, we have obtained new class of objects T ( A  C) , which like the previous case, does not contain core, i.e.
T ( A  C)  ( pr1 ( A  C), pr2 ( A  C)) , where pr1( A  C)  ( p4 ( A), f2 ( A)) and pr2 ( A  C)  ( p4 (C), f 2 (C)) . 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.</p>
        <p>Definition 19. Clone of the arbitrary object A is an object Ai  Ai / P( A) , where P( A) is specification of
object A and i is a number of its clone.</p>
        <p>
          This operation is similar to concept of copy constructor in C++ [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ], and is an example of constructor of objects.
        </p>
        <p>
          As we can see, the majority of operations on objects that defined above are similar to set-theoretic operations in
classical set theory [
          <xref ref-type="bibr" rid="ref23">23</xref>
          ]. However, in contrast to them, operations on objects give us opportunities to create sets and
classes of objects.
        </p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Sets of Objects and Inhomogeneous Classes</title>
      <p>Sets of Objects. There are a few ways to create set of objects. Firstly, we can obtain a set of objects using
union 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
objects, using these ideas, concepts of object and class of objects.</p>
      <sec id="sec-4-1">
        <title>Definition 20. The set of objects S is a union, which satisfies one of the following schemes:</title>
        <p>S1)O1  ...  On  S / T (S );</p>
        <p>S 2)S1  ...  Sm  S / T (S );</p>
        <p>S3)O1  ...  On  S1  ...  Sm  S / T (S );
culate their union.
where O1,..., On are arbitrary objects, S1,..., Sm are arbitrary sets of objects, and T (S ) is a class of new set of objects S .</p>
        <p>
          We have defined union operation for scheme S1 , now let us do this for schemes S 2 and S 3 . As we know,
scheme S 2 is defined in classical set theory, and this operation is known as a union of sets [
          <xref ref-type="bibr" rid="ref23">23</xref>
          ]. However, that
definition does not consider concept of class of objects, that is why we need to redefine this operation.
        </p>
        <p>Definition 21. Union  of m (m  2) arbitrary sets of objects is a new set of objects S , which obtains in the
following way S  S1 / T (S1)  ...  Sm /T (Sm )  {A1,..., An}/T (S ) , where A1,..., An , are such objects that Ai , Aj ,
where i, j  1, n and i  j , Eq ( Ai , Aj )  0 , T (Si ) , i  1, m is a class of set of object Si and T (S ) is a class of new set
of objects S and n is its cardinality.</p>
        <p>Let us consider two sets of objects S1  {A, B} , S2  {A, C} which consist of triangle A , square B and trapeze
C , which were described above, and calculate their union.</p>
        <p>S  S1 /T (S1)  S2 /T (S2 )  {A, B}/T (S1)  {A,C}/T (S2 )  {A, B,C}/ T (S ).</p>
        <p>As we can see, we have obtained the same result, as in the case of union of objects A , B and C , which we
considered before.</p>
        <p>Now, let us define union operations for scheme S 3 .</p>
        <p>Definition 22. Union  of n (n  1) arbitrary objects and m (m  1) arbitrary sets of objects is a new set of
objects S , which obtains in the following way</p>
        <p>S  A1 /T ( A1)  ...  An /Tn  S1 /T (S1)  ...  Sm / T (Sm )  {A1,..., Ak }/T (S ) ,
where A1,..., Ak , are such objects that  Ai , Aj , where i, j  1, k and i  j , Eq ( Ai , Aj )  0 , T ( Ai ) , i  1, n is a class
of object Ai , T (Si ) , i  1, m is a class of set of object Si and T (S ) is a class of new set of objects S and k is its
Let us consider objects A , B , C , and sets of objects S1 , S2 , which we used in the previous example, and
calS  A /T ( A)  B / T (B)  C / T (C)  S1 /T (S1)  S2 /T (S2 ) 
 A /T ( A)  B /T (B)  C / T (C)  {A, B}/T (S1)  {A,C}/ T (S2 )  {A, B,C}/ T (S ) .</p>
        <p>
          Multisets of Objects. As we know, a multiset is a generalization of the notion of set in which members are
allowed to appear more than once [
          <xref ref-type="bibr" rid="ref29 ref30 ref31">29–31</xref>
          ]. Formally multiset can be defined as a 2-tuple ( A, m) , 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. m : A  N . 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.
        </p>
        <p>Definition 23. The multiset of objects is a set of bjects S  {A1,..., An} , that  Ai , Aj , where i, j  1, n and i  j ,
Eq( Ai , Aj )  1 .</p>
        <p>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.</p>
        <p>Union of objects.</p>
        <p>S  A / T ( A)  A / T ( A)  B / T (B)  C / T (C)  C / T (C)  C / T (C)  {A, A, B,C,C,C}/ T (S) .</p>
      </sec>
      <sec id="sec-4-2">
        <title>Union of sets of objects.</title>
      </sec>
      <sec id="sec-4-3">
        <title>Union of objects and sets of objects.</title>
        <p>S  S1 / T (S1)  S2 / T (S2 )  {A, B}/ T (S1) {A,C}/ T (S2 )  {A, A, B,C}/ T (S ) .</p>
        <p>S  A / T ( A)  C / T (C)  S1 / T (S1)  A / T ( A)  C / T (C) {A, B}/ T (S1)  {A, A, B,C}/ T (S ) .</p>
        <p>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
thinking 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 certain
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
examples from our daily activity. Very often in such situations and similar to them we operate with sets of objects
subconsciously, and as the result, we pay little attention to this, but it is happening permanently. That is why we can
conclude that creation of sets and classes of objects is normal activity of our mind, and if we want to simulate and
reproduce 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.</p>
        <p>
          Nowadays, there are a few different implementations of tools for working with sets within some OOP-languages,
in particular set in STL for C++ [
          <xref ref-type="bibr" rid="ref26">26</xref>
          ], HashSet in Java [
          <xref ref-type="bibr" rid="ref20">20</xref>
          ], HashSet, SortedSet and ISet in C# [
          <xref ref-type="bibr" rid="ref27">27</xref>
          ], set and frozenset in
Python [
          <xref ref-type="bibr" rid="ref28">28</xref>
          ]. These tools allow sets creation, executing set-theoretic operations, membership checking, adding and
removing 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.
        </p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Conclusions</title>
      <p>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
objects 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.</p>
      <p>Process of sets and multisets creation was considered in details from different sides, in particular
mathematical 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.</p>
      <p>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.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>1. http://langpop.com/ Programming Language Popularity.</mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>2. http://www.tiobe.com/ TIOBE Programming Community Index.</mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3. http://lang-index.
          <source>sourceforge.net/ The Transparent Language Popularity Index.</source>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Weisfeld M. The Object-Oriented Thought Process. Third Edition. Addison-Wesley Professional</surname>
          </string-name>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Pecinovský R. OOP - Learn Object Oriented</surname>
          </string-name>
          <article-title>Thinking and Programming</article-title>
          .
          <source>Tomáš Bruckner</source>
          ,
          <string-name>
            <surname>Řepín-Živonín</surname>
          </string-name>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Slagle</surname>
            <given-names>J.R.</given-names>
          </string-name>
          <article-title>Artificial intelligence: The Heuristic Programming Approach</article-title>
          .
          <string-name>
            <surname>McGRAW-HILL Book</surname>
          </string-name>
          Company,
          <year>1971</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Coppin</surname>
            <given-names>B</given-names>
          </string-name>
          .
          <article-title>Artificial intelligence illuminated</article-title>
          . Jones and Bartlett Publishers, Inc.
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Konar</surname>
            <given-names>A. Artificial</given-names>
          </string-name>
          <string-name>
            <surname>Intelligence</surname>
            and
            <given-names>Soft</given-names>
          </string-name>
          <string-name>
            <surname>Computing</surname>
          </string-name>
          .
          <article-title>Behavioral and Cognitive Modeling of the Human Brain</article-title>
          . CRC Press LLC,
          <year>2000</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Rabunal</surname>
            <given-names>J.R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dorado</surname>
            <given-names>J.</given-names>
          </string-name>
          ,
          <source>Pazos A. Encyclopedia of Artificial Intelligence. Information Science Reference</source>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Luger G.F. Artificial</surname>
          </string-name>
          <article-title>Intelligence. Structures and Strategies for Complex Problem Solving: 6-th edition</article-title>
          .
          <source>Addison-Wesley</source>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Jones M.T. Artificial</surname>
          </string-name>
          <article-title>Intelligence: A Systems Approach</article-title>
          . Infinity Science Press LLC,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <source>Handbook of Artificial Intelligence Book 2: Models and Methods</source>
          , edited by D. A.
          <string-name>
            <surname>Pospelov</surname>
          </string-name>
          . - Moscow, “Radio i Sviaz”
          <year>1990</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Ruchkin</surname>
            <given-names>V.N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fulin</surname>
            <given-names>V</given-names>
          </string-name>
          .
          <source>A. Universal Artificial Intelligence and Expert Systems. St. Petersburg: "BHV-Petersburg"</source>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Ginsberg</surname>
            <given-names>M.</given-names>
          </string-name>
          <article-title>Essentials of artificial intelligence</article-title>
          . Morgan Kaufmann Publishers, Inc.,
          <year>1993</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Cantor</surname>
            <given-names>G</given-names>
          </string-name>
          .
          <article-title>Contributions to the Founding of the Theory of Transfinite Numbers</article-title>
          . - New York: Dover Publications, Inc.,
          <year>1915</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Wang</surname>
            <given-names>H.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Naughton R.M. Les Systemes Axiomatiques de la Theorie des Ensembles</surname>
          </string-name>
          . - Paris: Gauthier-Villars,
          <year>1953</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17. Vopenka P.
          <article-title>Mathematics in the alternative set theory</article-title>
          . Leipzig: BSB B.G. Teubner,
          <year>1979</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>Zadeh</surname>
            <given-names>L.A.</given-names>
          </string-name>
          <article-title>Fuzzy sets</article-title>
          .
          <source>Information and control</source>
          . - 1965, N 8,
          <string-name>
            <surname>P.</surname>
          </string-name>
          338-
          <fpage>353</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19.
          <string-name>
            <surname>Stroustrup B. The</surname>
            <given-names>C</given-names>
          </string-name>
          +
          <article-title>+ Programming Language: Special Edition</article-title>
          .
          <string-name>
            <surname>Addison-Wesley Professional</surname>
          </string-name>
          ,
          <year>2000</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20.
          <string-name>
            <surname>Eckel</surname>
            <given-names>B.</given-names>
          </string-name>
          <article-title>Thinking in Java: 4-th</article-title>
          <string-name>
            <given-names>Edition. Prentice</given-names>
            <surname>Hall</surname>
          </string-name>
          .
          <article-title>- 2006.</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          21.
          <string-name>
            <surname>Kurosh</surname>
            <given-names>A.G.</given-names>
          </string-name>
          <article-title>Lectures on general algebra: Second Edition</article-title>
          . - Moscow: Nauka,
          <year>1973</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          22.
          <string-name>
            <surname>Serhienko</surname>
            <given-names>I.V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kryvyi</surname>
            <given-names>S.L.</given-names>
          </string-name>
          ,
          <source>and Provotar O.I. Algebraic Aspects of Information Technology. - Kyiv: Naukova Dumka</source>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          23.
          <string-name>
            <surname>Stoll R.R. Sets</surname>
          </string-name>
          , Logic and Axiomatic Theories:
          <fpage>2</fpage>
          -
          <string-name>
            <surname>nd</surname>
            <given-names>edition. W.H.</given-names>
          </string-name>
          <string-name>
            <surname>Freeman</surname>
          </string-name>
          &amp; Co
          <string-name>
            <surname>Ltd</surname>
          </string-name>
          .
          <year>1975</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>24. http://cglib.sourceforge.net/ Code Generation Library CGLib.</mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>25. http://msdn.microsoft.com/en-us/library/650ax5cx.aspx Code Document Object Model.</mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          26.
          <string-name>
            <surname>Musser</surname>
            <given-names>D.R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Derge</surname>
            <given-names>G.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Saini</surname>
            <given-names>A. STL</given-names>
          </string-name>
          <article-title>Tutorial and Reference Guide: 2-nd edition</article-title>
          . C+
          <article-title>+ Programming with the Standard Template Library</article-title>
          ,
          <string-name>
            <surname>Addison-Wesley Professional</surname>
          </string-name>
          ,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref27">
        <mixed-citation>
          27.
          <string-name>
            <surname>Mukherjee</surname>
            <given-names>S.</given-names>
          </string-name>
          <article-title>NET 4.0 Generics: Beginner's Guide</article-title>
          .
          <source>Packt Publishing Ltd</source>
          .
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref28">
        <mixed-citation>
          28.
          <string-name>
            <surname>Summerfield</surname>
            <given-names>M.</given-names>
          </string-name>
          <article-title>Programming in Python 3. A Complete Introduction to the Python Language: 2-nd edition</article-title>
          .
          <source>Pearson Education</source>
          , Inc.
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref29">
        <mixed-citation>
          29.
          <string-name>
            <surname>Bruijn</surname>
            <given-names>N.D.</given-names>
          </string-name>
          <article-title>Denumerations of rooted trees</article-title>
          and multisets // Discrete Applied Mathematics. -
          <year>1983</year>
          . - Vol. 6,
          <string-name>
            <given-names>N</given-names>
            <surname>1</surname>
          </string-name>
          . - P.
          <fpage>25</fpage>
          -
          <lpage>33</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref30">
        <mixed-citation>
          30.
          <string-name>
            <surname>Syropoulos</surname>
            <given-names>A</given-names>
          </string-name>
          . Mathematics of multisets,
          <source>in Proceedings of the Workshop on Multiset Processing: Multiset Processing</source>
          , Mathematical, Computer Science, and Molecular Computing Points of View”, Springer-Verlag Berlin Heidelberg,
          <year>2001</year>
          . - P.
          <fpage>347</fpage>
          -
          <lpage>358</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref31">
        <mixed-citation>
          31.
          <string-name>
            <surname>Petrovskyi</surname>
          </string-name>
          <article-title>A. Spaces of sets and multisets</article-title>
          . M.:
          <string-name>
            <surname>Editorial</surname>
            <given-names>URSS</given-names>
          </string-name>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>