applied sciences

Article A Method of Ontology Integration for Designing Intelligent Problem Solvers

† † Nhon V. Do 1, , Hien D. Nguyen 2,*, and Thanh T. Mai 1 1 Faculty of Information Technology, Ho Chi Minh city Open University, Ho Chi Minh City 700000, Vietnam; [email protected] (N.V.D.); [email protected] (T.T.M.) 2 Faculty of Computer Science, University of Information Technology, VNU-HCM, Ho Chi Minh City 700000, Vietnam * Correspondence: [email protected] † Equal contribution.

 Received: 31 July 2019; Accepted: 3 September 2019; Published: 10 September 2019 

Featured Application: In this paper, we present a method to integrate the knowledge-based systems based on ontology approach. Specially, this method can be used to design an integrated knowledge-based system for solving problems that involve the knowledge from multiple domains, such as Linear Algebra and Graph Theory. Given a specific problem that requires the knowledge from both domains, the system can reason upon the appropriate knowledge in the scope of the problem and generate a step-by-step solution which is very similar to that of humans. Therefore, this knowledge-based system can assist students in learning how to solve problems in many courses, thus meeting the requirements of an Intelligent Problem Solver in education.

Abstract: Nowadays, designing knowledge-based systems which involve knowledge from different domains requires deep research of methods and techniques for knowledge integration, and ontology integration has become the foundation for many recent knowledge integration methods. To meet the requirements of real-world applications, methods of ontology integration need to be studied and developed. In this paper, an ontology model used as the knowledge kernel is presented, consisting of concepts, relationships between concepts, and inference rules. Additionally, this kernel is also added to other knowledge, such as knowledge of operators and functions, to form an integrated knowledge-based system. The mechanism of this integration method works upon the integration of the knowledge components in the ontology structure. Besides this, problems and the reasoning method to solve them on the integrated knowledge domain are also studied. Many related problems in the integrated knowledge domain and the reasoning method for solving them are also studied. Such an integrated model can represent the real-world knowledge domain about operators and functions with high accuracy and effectiveness. The ontology model can also be applied to build knowledge bases for intelligent problem solvers (IPS) in many mathematical courses in college, such as linear algebra and graph theory. These IPSs have great potential in helping students perform beer in those college courses.

Keywords: knowledge integration; ontology integration; knowledge-based system; ; intelligent problems solver; intelligent software

1. Introduction Nowadays, the knowledge from several sources needs to be integrated in order for machines to accomplish different tasks in a more intelligent way than conventional systems [1]. Knowledge integration is important in intelligent software development [2]. In order to achieve this, knowledge

Appl. Sci. 2019, 9, 3793; doi:10.3390/app9183793 www.mdpi.com/journal/applsci Appl. Sci. 2019, 9, 3793 2 of 27 has to be processed and synthesized into knowledge bases. Many intelligent systems have introduced knowledge integration to increase their power. Wolfram|Alpha is an engine for computing answers and providing knowledge [3]. The knowledge of this system is integrated from multiple knowledge domains, such as mathematics, science and technology, and society. The IMS Learning Information Services is a tool to share data about learning [4]. This service supports the exchange of information about courses and learning outcomes between users. It is a combined knowledge-integrated system of learning management platforms, student record systems, and personnel systems. Thus, knowledge integration is an imperative need for designing knowledge-based systems. Knowledge integration is the combination of multiple models for representing knowledge domains into a common model [1,5]. This integration has to meet some requirements, as follows:

• Practicality: The method for knowledge integration must be able to represent the real-world knowledge domain in a , produce an that reasons upon the knowledge base, and solve practical problems via a similar reasoning process to that of humans; • Accuracy: The components of the knowledge domain must be represented precisely and fully using the knowledge integration method, in a way that simulates human acquisition.

Ontology design and ontology integration are a potential approach to solve the problems of the integration of heterogeneous knowledge [6]. They provide sophisticated knowledge about the environment for task execution [7]. They allow the users to organize information on the taxonomies of concepts, with their own aributes, to describe relationships between the concepts. When data are represented by means of ontologies, software agents can beer understand the content of the data and messages [8]. Domain-based knowledge can be modeled in ontology using ontology markup languages and various ontology tools, like Protege, OILed [9], PDDL (Planning Domain Definition Language)[10], and NDDL (New Domain Definition Language) [11]. The structure of an ontology consists of these basic components: concepts, relationships, and rules [12]. Concepts are the foundation for building the knowledge base, they make the representation clearer and more exact. Relationships on ontology perform connections between concepts. Inference rules are mechanisms for the reasoning to solve problems of the knowledge domain. The model for the integration of knowledge bases needs a knowledge kernel as ontology. Besides, solving a problem with the integrated model may require the knowledge of another pre-solved problem in the knowledge kernel. For example, in the knowledge domain of linear algebra, the knowledge of matrixes is the knowledge kernel. When solving a linear equations system, problems on the matrix, such as row transformation and column tranformation, have to be solved first [13]. Similarly, before solving a problem about vector spaces, it has to be converted to a matrix problem. Hence, the ontology-based model for integrating knowledge-based systems is a combination of the kernel ontology and other knowledge. In this paper, an ontology model used as the knowledge kernel is presented. It includes concepts, relationships between concepts, and inference rules. Some problems for this kernel have been proposed and solved. This kernel is integrated with other knowledge, such as the knowledge of operators and functions, to form an integrated knowledge-based system. The integrating method works by integrating the knowledge components in the ontology structure. The problems in the integrated knowledge domain and the reasoning method to solve them are also studied. With such an integrated model, a real-world knowledge domain about operators and functions can be represented more accurately and effectively. These models are also applied to build the knowledge bases of intelligent problem solvers (IPS) in linear algebra and graph theory courses in university. Appl. Sci. 2019, 9, 3793 3 of 27

2. Related Works There are various ontology-based methods for knowledge integration, most of which focus on basic kinds of ontology and are mainly used for information searching. They have not yet met the requirements of knowledge integration. The Semanticscience Integrated Ontology (SIO) is an ontology for facilitating biomedical knowledge discovery [14]. SIO provides an ontological foundation for the Bio2RDF linked data for the life sciences project and is used for semantic integration and discovery for SADI-based services (Semantic Automated Discovery and Integration - SADI). However, the concepts of SIO are only basic information for searching. Ontology-based knowledge integration is also used for semantic web services. Ontology WSMO is built based on the Web Service Modeling Framework (WSMO) [15]. WSMO defines four top level elements as the main concepts which have to be described in order to describe the semantic web services: ontologies, services, mediators, and goals. These methods only solve the integration of ontology as information but cannot support solving decision problems. Fuzzy ontology integration is used for the representation of uncertain knowledge on the semantic web [16,17]. The author in [16] used description logic and fuzzy set theory to represent fuzzy logic and reason on it. The study in [17] presented a method to integrate fuzzy ontology based on consensus theory. Nonetheless, those methods are just theoretical and cannot be applied in the complex knowledge domains in practice. Ontology COKB (Computational Objects Knowledge Base) is a useful ontology to represent complex knowledge domains [12]. This ontology can be used to describe many kinds of knowledge, such as knowledge about relationships, operators, and functions. It can be applied to build intelligent educational systems [18]. However, ontology COKB is too general to represent a specific knowledge domain, so it is very difficult to apply. Furthermore, the combination problems on the knowledge components in COKB have not yet been mentioned. Ontology is also a technique model for information retrieval via the processing and translation of ontological knowledge into database search requests [19]. It is also used to compare the existing ontology-to-database transformation and mapping approaches in terms of loss of data, domain knowledge applicability, and structural mapping. Nonetheless, the mentioned knowledge in this study is simple, and the ontology integration has not yet been studied.

3. The Knowledge Kernel

3.1. Model of Knowledge Kernel

3.1.1. Structure of the Kernel The model of the knowledge kernel in this paper was an ontology which was built based on the object-oriented approach. The model of the knowledge kernel was a tube:

(C, R, Rules ), in which C is a set of concepts, each concept is a class of objects, R is a set of binary relationships between concepts in C , and Rules is a set of inference rules. Figure 1 shows the structure of the knowledge kernel. It is a tube (C ,R ,Rules ) as part (A). The structure of each component is as Table 1. Each concept in C is a class of objects. An object has aributes and internal relationships between them, it also has behaviors to solve the problems on it as part (B). This kernel had two kinds of problems: problems on an object and general problems (Section 3.2). The model of general problems is as part (C). Appl. Sci. 2019, 9, 3793 4 of 27 Appl. Sci. 2019, 9, x FOR PEER REVIEW 4 of 26

Page 4:

Figure 1. Structure of the knowledge kernel. Figure 1. Structure of the knowledge kernel. Table 1. Structure of components in the knowledge kernel. Table 1. Structure of components in the knowledge kernel. C R Facts ∈ C ⊂ Φ Φ ⊆ × R Facts - Each concept c C is a class of R { | Ici Icj, Classify kinds of facts: ∈ C ∪ C objects,- Each itconcept has an instancec ∈ C is a set class Ic of ci,R ⊂ { cjΦ|Φ ⊆o Ici × I,cj, 1/InformationClassify kinds about of kind facts: of object including objects. ci ∈ C ∨ cj ∈ C } Specification: x:c objects, it has an instance set Ic ∪ • Fundamental concepts are In the case of ci, ci =cj cj,  the Co properties C, Condition:1/Information x ∈ aboutΣ*, c kind∈ C of object including objects. Φ the default concepts of the of arelationship ci  Care ∨ cj considered:  C} 2/Determination Specification: an object x:c knowledge• Fundamental domain. A concepts set of are thereflexive, symmetric, asymmetric, Specification: o In the case of ci = cj, the Condition: x ∈ Σ*, c ∈ C fundamentaldefault concepts concepts of isthe denoted: knowledgeand transitive. Condition: o ∈ Ic, c ∈ C C ∈ R domain.o A set of fundamental * Relationshipsproperties of “is-a”a relation < ship: Φ are3/ Determination2/Determination of a an list object of objects C ∈ C ... - Setconceptsis a setis denoted: of concepts, Co the Let c1, c2 : Specification: [o1, o2, , on] considered:⇔ reflexive, symmetric, Specification:∈ ∈ o structure- Set C is of a an set object of concepts, in a concept the c2 < c1 c2 is a sub-concept of c1 Condition: n , oi Ic,  ⊂ ∈ C ≤ ≤ is a tube: asymmetric c1.Attrs, and transitive.c2.Attrs c Condition:(1 oi ∈ nIc), c ∈ C structure of an object in a concept is ⇔  ⊑ (Ars, Facts, RulObj),  c1.Facts c2.Facts 4/Determination of an object by a a tube: * Relations hips “is⊑-a”  ∈ R: 3/Determination of a list of objects in which: c1.RulObj c2.RulObj value or a constant expression ♢ Ars(Attrsis a, set Facts of, aributes: RulObj), Let c1, c2 ∈ C: Specification: Specification:o = [o 1, o2, …, on] ∪ ∈ ∈ C in which:Ars = ArsVar ArsList Condition: o Ic, c c2  c1 ⇔ c2 is a sub-concept of c1 Condition: n ∈ , oi ∈ Ic, An ◊ aribute Attrs is a in set Ars of attributes:Var is a : constant C variable which has the kind in o: ⊂ 5/Equality on objects c ∈ C (1 ≤ i ≤ n) Attrs =⊆ AttrsVar ∪∈ AttrsC List c12.. Attrs c Attrs ArsVar {x|x:c, c o}.  Specification: x = y An attribute in AttrsVar is a variable ⇔ c.. Facts c Facts 4/Determination∈ of an ∈object by a An aribute in ArsList is a list of  12 Condition: x,y Ic, c C which has the kind in Co:  ... variables which have the same c12.. RulObj c RulObj orvalue x or = [xa 1constant, , xn expression] and C ... kind inAttrso: Var ⊆ {x|x:c, c ∈ Co}. y = [y1, , yn] with ⊆ ... ∈ Specification:∈ ∈ C o≤ = ≤ ArsAn attributeList in{[x Attrs1, List, x isn]|n a list of xi, yi Ic, c (1 i n) and x : c, c ∈ C }. 6/Relationship Condition: between o ∈ Ic,objects c ∈ C variablesi whicho have the same kind ♢ Facts is a set of facts on Specification: x Φ y : constant aributesin Co: in Ars. Condition: Φ ∈ R , FactsAttrs⊂ {Listf | f⊆is {[x a1 fact,, …, xvarn]|(nf ) ∈⊆  and x5/Equality∈ Icx, on y ∈ objectsIcy, Ars} cx ∈ C , cy ∈ C xi: c, c ∈ Co}. Specification: x = y ♢ RulObj is a set of deductive * Kind(f): kind of fact f. ◊ Facts is a set of facts on attributes rules of the concept: Condition: x,y ∈ Ic, c ∈ C in AttrsRulObj. ⊂ {u → v|u ⊆ Ars, v ⊆ ⊓ or x = [x1, …, xn] and Ars,Factsu v ⊂= Ø}{f|f is a fact, var(f) ⊆ y = [y1, …, yn] with Attrs} xi, yi ∈ Ic, c ∈ C (1 ≤ i ≤ n) ◊ RulObj is a set of deductive rules of the concept: 6/Relationship between objects Page 5: Specification: x Φ y

Appl. Sci. 2019, 9, 3793 5 of 27

Definition 1. Reference [20]: The closure of a set of facts

Let Obj = (Ars, Facts, RulObj) be an object of concept in C , F be a set of facts. The closure of a set of facts F by Obj, Obj.Closure(F), is a maximum extension of F by combining facts in F and Obj.Facts and reasoning on rules in Obj.RulObj.

3.1.2. Unification of Facts

 Definition 2. Given two facts f1 and f2. They are unified, , when they satisfy following conditions:

1. f 1 and f 2 have them same kind of k; 2. And if k = 1, 2, it means f 1 and f 2 are facts of information about object kind or determination of an object;

Then f 1 = f 2; Or else if k = 3, it means f 1 and f 2 are facts of determination of a list of objects; Then NumberOfElements(f 1) = NumberOfElements(f 2);  ∀ ≤ ≤ and f 1.oi f 2.oi i, 1 i NumberOfElements(f 1); Or else if k = 4, it means f1 and f2 are facts of determination of an object by a value or a constant expression;  Then left(f 1) left(f 2) and compute(right(f 1)) = compute(right(f 2)); Or else if k = 5: it means f 1 and f 2 are facts of equality on objects;   Then (left(f 1) left(f 2) and right(f 1) right(f 2));   Or (left(f 1) right(f 2) and right(f 1) left(f 2)); Or else if k = 6, it means f 1 and f 2 are facts of relationships between objects; ≡ Then NameOfRelationship(f 1) NameOfRelationship(f 2) and ≡   Property(f 1) “symmetric” and (left(f 1) left(f 2) and right(f 1) right(f 2));   or (left(f 1) right(f2) and right(f 1) left(f 2)); ≡ Or NameOfRelationship(f 1) NameOfRelationship(f 2);   and (left(f 1) left(f 2) and right(f 1) right(f 2)); For which: • compute(expr): compute the value of the expression expr. • NameOfRelation(f ): return the name of relation in fact f that is kind 6. • left(f ), right(f ): return the left side, right side of expression f.

Definition 3. Reference [20]: Let x be a fact, A and B be sets of facts, the relationships between them have been defined as followed: x ⊙ A ⇔ ∃ g ∈ A, x  g A ⊓ B = {x|x ⊙ A ∧ x ⊙ B}

A ⊑ B ⇔ ∀ x ∈ A, x ⊙ B A ⊔ B = {x|x ⊙ A ∨ x ⊙ B}

A = B ⇔ A ⊑ B ∧ B ⊑ A A\B = {x|x ⊙ A ∧ not(x ⊙ B)}

3.1.3. Rules —Set of Rules A rule r ∈ Rules is one of three kinds, as follows:

• r is a deductive rule, it has the form u(r)→ v(r), where u(r), v(r) are sets of facts; • r is a deductive rule for generating a new object, it has the form u(r)→ v(r), where u(r) and v(r) are sets of facts, they satisfy the conditions: ∃ object o, o ⊙ v(r) and not(o ⊙ u(r)); • r is an equivalent rule: h(r), u(r) ↔ v(r), where h(r), u(r) and v(r) are sets of facts, they satisfy the conditions: h(r), u(r)→ v(r), and h(r), v(r)→ u(r) are true. Appl. Sci. 2019, 9, 3793 6 of 27

3.2. Problems and Reasoning Methods on the Kernel Model The kernel of knowledge model has two kinds problems: problems on an object and general problems with the kernel. Problems with an object relate to only the behaviors of an object. Each object of a concept in C uses its structure to solve the problems on itself. General problems with the kernel combine the knowledge of all objects and the kernel. When solving a general problem, the kernel has to apply the ability to solve problems with objects and the reasoning method on the knowledge of R and Rules .

3.2.1. Problem on an Object An object of the Kernel Model has basic behaviors for solving problems on it. It is equipped abilities to solve problems such as: (i) Determine the closure of a set of aributes; (ii) Determine the closure of a set of facts; and (iii) Execute deduction and give solutions for problems. In this section, the algorithm for solving the problem (ii) is presented. The other problems can be solved by using this algorithm.

Algorithm 1. Determine the closure of a set of facts. Input: Object Obj = (Ars, Facts, RulObj), F is a set of facts related to Obj; Output: Obj.Closure(F). Step 0: Initialize variables Step 5. Search the rule r in Obj.RulObj which can be flag: = true; applied on KnownFacts; KnownFacts: = F ⊔ Obj.Facts; while (flag! = false) do; Step 1. Classify the kinds of facts in KnownFacts; 5.1. if (rule r can be found), then Step 2. Determine new facts from facts in for e in v(r) do; KnownFacts by using the reasoning rule; KnownFacts: = KnownFacts ⊔ {e}; Step 3. Search the closure of facts of kind 2 in if (new facts can be determined), then KnownFacts; determine new facts from facts in KnownFacts for fact2 in KnownFacts do; by using deduce rules; if Kind(fact2) = 2 and fact2 ∈ C then # fact2 is a end if; determined object; if Kind(e) = 2 and e ∈ C, then KnownFacts: = KnownFacts ⊔ fact2. Ars; KnownFacts: = KnownFacts ⊔ end if; e.Closure(v(r)); end do; if (new facts can be determined), then Step 4. Search the closure of facts of kind 3 in determine new facts from facts in KnownFacts; KnownFacts by using deduction rules; for fact3 in KnownFacts do; end if; if Kind(fact3) = 3; end do; # for then for i from 1 to NumberfElements(fact3) do end if; # 5.1 KnownFacts: = KnownFacts ⊔ fact3[i]; 5.2. if (rule r cannot be found) then flag: = false; end if; end if; end do; end do; # while Step 6. Obj.Closure(F): = KnownFacts.

Example 1. In the knowledge domain about geometry, the triangle T is requested to give a solution for a problem {b, A, C}→ hb (hb is the length of altitude from the point B). The triangle T determines its closure of the set F = {b, A, C}. By Algorithm 1, the set T.Closure(F) is:

T.Closure(F) = {b, A, C, B, a, S, hb} by the following rules: r1: {A, C} → B by A + B + C = 180; r2: {A, B, b} → a, by Determine a/sin(A) = b/sin(B); r3: {a, b, C} → S, by S = a.b.sin(C)/2; r4: {S, b} → hb, by S = b.hb/2; Appl. Sci. 2019, 9, 3793 7 of 27

3.2.2. General Problem with the Model of the Kernel The model of problems has the form: (O, F) → G, where O is the set of objects and F is the set of facts. G = {“KEYWORD”: f } with “KEYWORD” may be the following:

- Determine”: to determine the fact f ; - Prove”: to prove the fact f.

The general algorithm for solving these problems was presented in [20]. It uses forward chaining reasoning for solving problems and applies heuristics rules as sample problems [21], arranging the priority to use inference rules. Each object aends the reasoning process by solving problems on itself as Algorithm 1.

4. Integration Between the Kernel and Other Knowledge

4.1. The Method to Integrate the Kernel and Other Knowledge

4.1.1. Knowledge Components of Operators and Functions The knowledge of operators and functions is necessary to represent actual knowledge, especially the knowledge domains about computation. The knowledge of operators, called Ops -set, represents the computing operations over the objects in the knowledge domain. The knowledge of functions, called Funcs -set, represents how objects depend on each other, described as a set of conditions or a procedure over objects, in the knowledge domain. The integration of these components makes the knowledge base more powerful for representation and reasoning.

4.1.2. Principle to Integrate the Kernel and Components of Operators and Functions The knowledge kernel can combine with other components, such as operators and functions, to represent real-world knowledge domains more accurately. When integrating new knowledge with the kernel (C, R, Rules) , some aspects have to be considered:

• Building the structure of the additional component: This structure has to be built upon the kernel such that the integration of new concepts is seamless and consistent. Any additional component should have specification language similar to that of the kernel; • Adding more kinds of facts: Facts in any additional component need to represent the real knowledge and connect with former kinds of facts in the kernel. This is a study about the unification of facts; • Adding more kinds of rules from the additional component: More kinds of rules have been studied based on the integrated knowledge and need to be merged into the kernel; • Proposing the problems with the reasoning by integrating the kernel knowledge and additional knowledge.

In this paper, we present a method to integrate the additional knowledge of operators and functions as Figure 2. Appl. Sci. 2019, 9, 3793 8 of 27 Appl. Sci. 2019, 9, x FOR PEER REVIEW 8 of 26

FigureFigure 2. 2. IntegratingIntegrating the the kernel kernel and and the the knowledge knowledge of of operators operators and and functions functions.. 4.2. Integration with the Knowledge of Operators—Ops -set 4.2. Integration with the Knowledge of Operators—Ops-set 4.2.1. Structure of the Ops -Set 4.2.1. Structure of the Ops-Set Ops is a set of operators between concepts in Co and C . Its structure is presented as Table 2: Ops is a set of operators between concepts in Co and C. Its structure is presented as Table 2: Ops Table 2. Structure of the Ops--set.set. Structure of the Ops -Set Additional Facts Additional Kind of Rules Additional Kind of StructureOps = O of the∪ O Ops-Set Op.1. DependenceAdditional of an objectFacts by an r is an equation rule, it has (1) (2) Rules In which: expression. the form: Ops = O(1) ∪ O(2) Op.1. Dependence of an object by an r is an equation rule, it + Set of unary operators O(1): Specification: x = g = h ⊂ ⊕ → ∈ C ∈ ∈ OIn(1) which:{ :I ci Ick|ci, ck } expression. Condition: x Ic, c C where g, h arehas expressions the form: of + Set of binary operators O(2): : Specification: expression x = objects. g = h + Set⊂ of⊗ unary× operators→ O(1): O(2) { :Ici Icj Ick| Op.2. Equality of expressions Denote: Condition: x ∈ Ic, c ∈ C where g, h are expressions O ci,(1) ⊂ {⊕: Ici → I cj,ck| ckci,∈ ckC ∈} C} Specification: left(r) = g Each operator is checked for its : = expression right(of objects.r) = h + Set of binary operators O(2): properties: commutation, Condition: : expression Op.2. Equality of expressions Denote: Oassociation,(2) ⊂ {⊗: Ici × identity. Icj → Ick| : expression Specification: ci, cj, ck ∈ C} left(r) = g = EachAn operatoroperator is in checked the Ops for-set its is specified as below: right(r) = h Condition: : expression properties: commutation, Operator-def: = OPERATOR association, identity. : expression ARGUMENT: argument-def+ RETURN: return-def+; An operator in the Ops-set is specified as below: PROPERTY: prob-type+ Operator [constraint]-def: = OPERATOR [variables] ARGUMENT: argument-def+ [statements] END OPERATOR. RETURN: return-def+; argument-def: = : type return-def: = name: type PROPERTY: prob-type+ prob-type: = commutative|associative|identity [constraint] statement: = name: = . [variables] 4.2.2. Problems and Reasoning Methods on the Knowledge of Operators [statements] The model of problems has the form (O, F, E) → G [22], where O is the set of objects, F is the set ... of facts, E = {e 1 , eEND2, OPERATOR., ek} is the set of equations, and G is: G = {“KEYWORD”: f } with “KEYWORD” is a keyword of the goal and f is a fact. Besides keywordsargument as-def: Section = :3.2.2, type “KEYWORD” may be as follows:

- returnCompute”:-def: = name: to determine type the value of f when f is an expression; - probTransform”:-type: = commutative|associative|identity transform an object into an expression between certain objects. statement: = name: = . Appl. Sci. 2019, 9, 3793 9 of 27

Algorithm 2. Given a knowledge domain combining with operators K = (C, R, Rules) + Ops , and a problem P = (O, F, E) → G on this knowledge domain. This algorithm will solve the problem P though the following steps: Input: The problem P = (O, F, E) → G Output: The solution of the problem P. The idea of the algorithm: Using objects in O, it determines the closure of each object by Algorithm 1. After that, it solves the problem (O, F) → G on the knowledge kernel. Secondly, it uses the knowledge of operators, which was integrated, to process the equations in E for geing new facts. Some new objects may be generated in this reasoning. If the goal G is achieved at any time, this algorithm will stop. Step 0: Initialize variables; if (r generates a new object o) and not (o ⊙ flag: = true; KnownFacts), then: KnownFacts: = F ⊔ E; KnownFacts: = KnownFacts ⊔ A; Sol: = [ ]; # solution of problem; Go to Step 3 with new object o; Step 1. Record elements in hypothesis and goal; Or else: Classify kinds of facts in F and E. KnownFacts: = KnownFacts ⊔ A; Step 2. Check G; continue; If G is obtained, then go to step 6. end if; Step 3: Use objects in set O and the set of facts in F end if; #5.1 and E to determine the closure of each object by 5.2. Case: r has another kind; Algorithm 1; Transform equations in E to relationships between Step 4: Use the equations in E to generate the new objects if possible; facts as relationship form; Update KnownFacts and Sol; Use the relationships in F to generate the Solve the problem (O, KnownFacts) → G based on equations; the knowledge of the kernel (C, R, Rules) by Update KnownFacts and Sol. algorithms in Section 3.2; Step 5: Select a rule in the set Rules for producing end if; #5.2 new facts or new objects; Step 6: Conclusion of the problem; While (flag! = false) and not (G is determined) do If G is determined, then: Search r in the Rules set, which can be applied to Problem (O, F, E) → G is solvable; KnownFacts. Sol is a solution of the problem; 5.1. Case: r is an equation rule; Reduce the solution found by excluding if (r has form: g = h), then: redundant rules and information in the solution; r can generate a set of new facts. Or else A: = r(KnownFacts) = {f |Kind(f ) = 2 ∨ Problem (O, F, E) → G is unsolvable; Kind(f ) = 3 ∨ Kind(f ) = Op.1 ∨ end if; Kind(f ) = Op.2} s: = [r, KnownFacts, A]; Sol: = [op(Sol), s];

Example 2. In the knowledge domain about direct current electrical circuits,Ops is the set of the knowledge of operators being series connection (+) and parallel connection (//) between two circuits. We considered the problem as follows:

Problem P1: Three resistors are connected like the Figure 3. Resistor T1 has value 45 Ω, Resistor T3 has value 90 Ω. The total current is 0.5 A, current though T3 is 0.3 A. Appl. Sci. 2019, 9, x FOR PEER REVIEW 10 of 26

Example 2: In the knowledge domain about direct current electrical circuits, Ops is the set of the knowledge of operators being series connection (+) and parallel connection (//) between two circuits. We considered the problem as follows:

Problem P1: Three resistors are connected like the Figure 3. Resistor T1 has value 45 Ω, Resistor T3Appl. has Sci. value2019, 9 90, 3793 Ω. The total current is 0.5 A, current though T3 is 0.3 A. 10 of 27 What is the current thought T1?

FigureFigure 3.3. ProblemProblem P1 P1.. What is the current thought T1? + Model of problem: + Model of problem:

O: =O: {T1, = {T1, T2, T3:T2, RESISTOR;T3: RESISTOR; AB: CIRCUIT} AB: CIRCUIT} F: = {AB = T1 + T2//T3, T1.R = 45, T3.R = 90, T3.I = 0.3, AB.I = 0.5} G: =F: {T1.I}. = {AB = T1 + T2//T3, T1.R = 45, T3.R = 90, T3.I = 0.3, AB.I = 0.5} + Searching rules of Algorithm 2: G: = {T1.I}. S1: {T1 + T2//T3 = (T1 + T2)//T3} by rule: ”equation rule”; + Searching S2: {Let rules [CD, of Algorithm CIRCUIT], 2 CD: = T1 + T2}, by rule: ”rule for generating a new object”; S3: {AB = T1 + T2//T3, T1 + T2//T3 = (T1 + T2)//T3, CD = T1 + T2} → {AB = CD//T3}, S1: {T1 + T2//T3 = (T1 + T2)//T3} by rule: ”equation rule”; by rule: ”deductive rule”; S2: {Let [CD, CIRCUIT], CD = T1 + T2}, by rule: ”rule for generating a new object”; S4: {AB = CD//T3} → {CD.I = CD.I + T3.I}, by rule: “deductive rule of parallel circuits”; S3: {AB = T1 + T2//T3, T1 + T2//T3 = (T1 + T2)//T3, CD = T1 + T2} → {AB = CD//T3}, S5: {CD = T1 + T2} → {CD.I = T1.I}, by rule: “deductive rule of series circuits”; by rule: ”deductive rule”; S6: {T3.I = 0.3, AB.I = 0.5, AB.I = CD.I + T3.I} → {CD.I = 0.2}, by rule: “ equation rule for solving”; S4: {AB = CD//T3} → {CD.I = CD.I + T3.I}, by rule: “deductive rule of parallel circuits”; S7: {CD.I = 0.1, CD.I = T1.I} → {T1.I = 0.2}, by rule: “equation rule for solving an equation”. S5: {CD = T1 + T2} → {CD.I = T1.I}, by rule: “deductive rule of series circuits”; 4.3. IntegrationS6: {T3.I = with0.3, AB.I the Knowledge = 0.5, AB.I of = Functions—CD.I + T3.I}Funcs → {CD.I-set = 0.2}, by rule: “ equation rule for solving”; S7: {CD.I = 0.1, CD.I = T1.I} → {T1.I = 0.2}, by rule: “equation rule for solving an equation”. 4.3.1. Structure of the Funcs -Set 4.3. Integration with the Knowledge of Functions—Funcs-set Funcs is a set of functions in the knowledge domain. The structure of the Funcs-set, some 4.3.1.additional Structure facts, of and theadditional Funcs-Set kinds of rules about functions are shown in Table 3. A function in the Funcs -set is specified as followed: Funcs is a set of functions in the knowledge domain. The structure of the Funcs-set, some function-def: = FUNCTION name; additional facts, and additional kinds of rules about functions are shown in Table 3. ARGUMENT: argument-def+ RETURN: return-def; Table 3. Structure of the Funcs-set [constraint]; [facts]; Additional Kinds of [variables];Structure of the Funcs-Set Additional Facts Rules [statements]; Let ENDFUNCTION; F = {f|f is a function}: Fu.1. Determination of a function. r is an equation rule, it has

statements: α: F → =N statement-def+;: assigning the Specification: f(x1, x2, …, xn); the form: statement-def: = assign-stmt|if-stmt|for-stmt; number of arguments to a Condition: f ∈ Funcs, n = α(f), f = g, asign-stmt: = name: = expr; function.if-stmt: = IF logic-expr THEN statements+ ENDIF;f: Ic1 × Ic2 ×…× Icn → Ic, where f, g are functions or

Funcs |IF ⊆ {f ∈ F|n = α logic-exprK(f), THEN statements+ xk ∈ Ick, ELSEck ∈ C statements+ (1 ≤ k ≤ n). ENDIF; expressions. for-stmt: = FOR name IN [range] DO statements+ ENDFOR; f: Ic1 × Ic1 … × Icn → Ic, Fu.2. Dependence of an object on a function. Denote: Appl. Sci. 2019, 9, 3793 11 of 27

Table 3. Structure of the Funcs -set

Structure of the Funcs -Set Additional Facts Additional Kinds of Rules Let F = {f |f is a function}: Fu.1. Determination of a function. r is an equation rule, it has → ... α:F N: assigning the number Specification: f (x1, x2, , xn); the form: of arguments to a function. Condition: f ∈ Funcs , n = α(f ), f = g, ⊆ ∈ × × ... × → Funcs {f F|n = αK(f ), f: Ic1 Ic2 Icn Ic, where f, g are functions or × ... × → ∈ ∈ C ≤ ≤ f :Ic1 Ic1 Icn Ic, xk Ick, ck (1 k n). expressions. ... ∈ c1, c2, , cn, c C }. Fu.2. Dependence of an object on a Denote: Each function is checked for its function. left(r) = f ... properties: commutation. Specification: o = f (x1, x2, , xn); right(r) = g Condition: f ∈ Funcs, n = α(f ), × × ... × → f: Ic1 Ic2 Icn Ic, ∈ ∈ C ≤ ≤ xk Ick, ck (1 k n), o ∈ Ic, c ∈ C. Fu.3. Dependence of a function on an expression. Specification: ... f (x1, x2, , xn) = . Condition: f ∈ Funcs , n = α(f ), × × ... × → f: Ic1 Ic2 Icn Ic, ∈ ∈ C ≤ ≤ ∈ C xk Ick, ck (1 k n), c , : expression. Fu.4. Relationship between functions. Specification: ... Φ ... f (x1, x2, , xn) g(y1, y2, , ym). Condition: Φ ∈ R, f ∈ Funcs , g ∈ Funcs, n = α(f ), tag">m = α(g); c, c’ ∈ C ; × ... × → f: Ic1 Ic2 Icn Ic, ∈ ∈ C ≤ ≤ xk Ick, ck (1 k n), × ... × → g:Ib1 Ib2 Ibm Ic’, ∈ ∈ C ≤ ≤ yk Ibk, bk (1 k m).

4.3.2. Problems and Reasoning Methods on the Knowledge of Functions When integrating the knowledge of functions, the general problem of the integration has the form (O, F) → G, as in Section 3.2, in which the set of facts F includes the additional facts as function-kinds Fu.1, Fu.2, Fu.3, and the set G is modeled as: G = {“KEYWORD”: f } with “KEYWORD” is a keyword of the goal and f is a fact, “KEYWORD” may be the followings:

- Compute”: to determine the value of f when f is a function; - Prove”: prove the fact f. Appl. Sci. 2019, 9, 3793 12 of 27

Algorithm 3. Compute the value of a function. Give a knowledge domain combining functions K = (C, R, Rules ) + Funcs , and a problem P = (O, F) → G ... on this knowledge domain, with G = {“Compute”: g(x1, x2, , xn)}, where g is a function and xk are objects (k = 1 ... n). Input: The problem P = (O, F) → G ... × ... × → G = {“Compute”: g(x1, x2, , xn)} with: g:Ic1 Ic2 Icn Ic ∈ ∈ C ≤ ≤ ∈ C xk Ick, ck (1 k n), c ... Output: The value of g(x1, x2, , xn). The idea of the algorithm: The set F is split into two sets: F1—the set of facts in the knowledge kernel, F2—the set of facts about functions. Firstly, using the knowledge kernel, the algorithm uses the objects and facts in the hypothesis (O,F1) to determine new facts by applying the sub-algorithm for solving problems on the kernel model, as in Section 3.2.2. Secondly, combining with the facts in the set F2, the algorithm uses the integrated knowledge of functions to compute the value of g. Step 0: Initialize variables; Apply objects in ObjectGoal and facts in ... KnownFacts: = F; KnownFacts to compute the value of g(x1, x2, , xn) ... ObjectGoal: = {x1, x2, , xn}; based on the specification of g; Sol: = [ ]; # solution of problem. Update KnownFacts and Sol; Step 1. Record elements in hypothesis and goal. End if; ∪ Classify kinds of facts in F = F1 F2; Go to Step 6. F1: = set of facts with kinds in the kernel Step 5: knowledge model; If g has form 2, then: F2: = set of facts with kinds about functions (Fu.1, Apply objects in ObjectGoal and statements of Fu.2, Fu.3, Fu.4); functions in F2 to produce new facts; Determine the form of the function g in G. Update KnownFacts; Step 2. Check G. Apply facts in KnownFacts and statements of the ... If G is obtained, then: function g to compute the value of g(x1, , xn); Go to step 6. Update KnownFacts and Sol. Step 3: Produce new facts based on the hypothesis; end if; Apply objects and facts in the hypothesis (O, F1) Go to Step 6; to determine new facts by using the algorithm for Step 6: Conclusion of problem; solving problems on the kernel model, as in If G is determined, then: Section 3.2.2; Problem (O, F) → G is solvable; Update KnownFacts and Sol. Sol is a solution of problem; Step 4: Reduce the solution found by excluding If g has form 1, then: redundant rules and information in the solution. → Apply facts in F2 and KnownFacts to compute the Or else, problem (O, F) G is unsolvable; Appl.value Sci. of2019 function;, 9, x FOR PEER REVIEW end if; 13 of 26 Update KnownFacts and Sol. Example 3: In the knowledge domain about analytic geometry, Funcs is the set of the knowledge of functions,Example 3.suchIn the as knowledge distance domain between about two analytic points geometry, and distanceFuncs betweenis the set ofa thepoint knowledge and a of line. functions, We csuchonsider as distanceed a problem between, as two follows points: and distance between a point and a line. We considered a problem, as follows: √ √ ProblemProblem P2: P2: G Giveniven two two point points,s, B(−2;2; 33),), C(2; C(2; 33),), and and ABC ABC is is an an Equilateral Equilateral Triangle Triangle as as FigureFigure 44, ,c computeompute A AB.B. √ √

Figure 4. Problem P2. Figure 4. Problem P2. + Model of the problem:

O := {A, B, C: POINT, ABC: EquilateralTriangle};

F := {B = (−2, 3), C = (2, 3)};

G := {Compute:√ Distance(A,B)√ }.

+ Solution for the program: Set F is split into two sets:

F1 = {B = (−2, 3), C = (2, 3)};

F2 = {Distance(A,√ B), Distance(B,√ C), Distance(A, C)}.

By using (O, F1), the system gets some new facts as follows: S1: {ABC: EquilateraTtriangle} → {Distance(A,B) = Distance(A,C), Distance(A,C) = Distance(B,C), Distance(A,B) = Distance(B,C)} by “Properties of the Equilateral Triangle”. By using (O, F2), the system gets some new facts, as follows:

S2: Distance(B,C) = ( . B. x) + ( . B. y) , 2 2 by “Function of distance”: � 𝐶𝐶 𝑥𝑥 − 𝐶𝐶 𝑦𝑦 − S3: {B = (-2, 3), C = (2, 3), Distance(B,C) = ( . B. x) + ( . B. y) } 2 2 √ √ → {Distance(B,C)� 𝐶𝐶 =𝑥𝑥 4}−, 𝐶𝐶 𝑦𝑦 − by the rule “equation rule for solving an equation”. Combining those new facts in S1, S2, and S3, the system gets: S4: {Distance(A,B) = Distance(B,C), Distance(B,C) = 4} → {Distance(A,B) = 4}. Algorithm 4. Prove the equality between two functions. Given a knowledge domain combining functions K = (C, R, Rules)  Funcs, and a problem P = (O, F) → G on this knowledge domain, with G = {“Prove”: g(x1, x2, …, xn) = h(y1, y2, …, ym)}, where g, h are functions and xi, yj are objects (i = 1…n, j = 1… m). Appl. Sci. 2019, 9, 3793 13 of 27

+ Model of the problem:

O:= {A,{ B, C: POINT,√ ) ABC: EquilateralTriangle};√ ) F := B = (−2, 3 , C = (2, 3 } G:= {Compute: Distance(A,B)}. + Solution for the program: Set F is split into two sets: { √ ) √ ) − } F1 = B = ( 2, 3 , C = (2, 3

F2 = {Distance(A, B), Distance(B, C), Distance(A, C)}.

By using (O,F1), the system gets some new facts as follows:

S1: {ABC: EquilateraTtriangle} → {Distance(A,B) = Distance(A,C),

Distance(A,C) = Distance(B,C),

Distance(A,B) = Distance(B,C)}

by “Properties of the Equilateral Triangle”. By using (O,F2), the system gets some new facts, as follows: √ ◦ S2 : Distance(B, C) = (C.x − B.x)2 + (C.y − B.y)2 by “Function of distance”: { } ( √ ) ( √ ) √ ◦ S3 : B = −2, 3 , C = 2, 3 , Distance(B, C) = (C.x − B.x)2 + (C.y − B.y)2

→ {Distance(B,C) = 4},

by the rule “equation rule for solving an equation”. Combining those new facts in S1, S2, and S3, the system gets:

S4: {Distance(A,B) = Distance(B,C), Distance(B,C) = 4} → {Distance(A,B) = 4} Appl. Sci. 2019, 9, 3793 14 of 27

Algorithm 4. Prove the equality between two functions. Given a knowledge domain combining functions K = (C, R, Rules) + Funcs , and a problem P = (O, F) → ...... G on this knowledge domain, with G = {“Prove”: g(x1, x2, , xn) = h(y1, y2, , ym)}, where g, h are ...... functions and xi, yj are objects (i = 1 n, j = 1 m). Input: The problem P = (O, F) → G...... G = {“Prove”: g(x1, x2, , xn) = h(y1, y2, , ym)}, ∈ C × ... × → × ... × → with: c g: Ic1 Ic2 Icn Ic h:Ib1 Ib2 Ibm Ic ∈ ∈ C ≤ ≤ ∈ ∈ C ≤ ≤ xi Ici, ci (1 i n) yk Ibk, bk (1 k m) ...... Output: Solution of the proof: g(x1, x2, , xn) = h(y1, y2, , ym)...... The idea of the algorithm: It uses Algorithm 3 to compute the values of g(x1, x2, , xn) and h(y1, y2, , ym) ... and compare them. In a case where they cannot be computed, from two sets of objects O1 = {x1, , xn} and ... O2 = {y1, , ym}, the algorithm uses the hypothesis (O1, F) and (O2, F) to determine new facts by applying the algorithm for solving problems on the kernel model, as in Section 3.2.2. Based on those results, it concludes the solution to the current problem. Step 0: Initialize variables; Step 4: flag: = true; F1: = set of new facts produced from hypothesis KnownFacts: = F; (O1, KnownFacts) by using the algorithm for solving ... O1: = {x1, x2, , xn}; problems on the kernel model as Section 3.2 ... O2: = {y1, y2, , ym}; F2: = set of new facts produced from hypothesis Sol: = [ ]; # solution of the problem. (O2, KnownFacts) by using the algorithm for solving Step 1. Record the elements in the hypothesis and problems on the kernel model as Section 3.2 goal. Update Sol; Step 2: If (O2 m F1) or (O1 m F2), then: ... G1: = {“Compute”: g(x1, x2, , xn)}; If statements of g are similar to statements of h, ... G2: = {“Compute”: h(y1, y2, , ym)}; then: If problems (O, F) → G1 and (O, F) → G2 are G is determined and update Sol; solvable by using Algorithm 4, then: Goto step 5; ... if the value of g(x1, x2, , xn) = the value of h(y1, end if; ... y2, , ym), then: end if; G is determined, and go to step 5; Step 5: Conclusion of problem; end if; If G is determined, then: end if; Problem (O, F) → G is solvable; Step 3: Produce new facts based on the hypothesis; Sol is a solution of the problem; Apply objects and facts in the hypothesis (O, F) to Reduce the solution found by excluding determine new facts by using the algorithm for redundant rules and information in the solution; solving problems on the kernel model, as in Or else: Problem (O, F) → G is unsolvable; Section 3.2; end if; Update KnownFacts and Sol;

4.4. Heuristic Rules For making the inference process faster and more effective, in Algorithms 2–4, some heuristic rules can be used to search the inference rules, as follows:

Hypothesis 1. Restrict the set of rules that can be applied to the problem.

Based on the facts in the hypothesis of the problem, the reasoning part of the algorithms can reduce the set of rules being searched for the current problem, thus making it faster to search for rules. This heuristic rule is used after the step of recording the hypothesis of the problem in algorithms.

Hypothesis 2. Arrange the rules in order of priority. Appl. Sci. 2019, 9, 3793 15 of 27

For each kind of practical problem, inference rules are applied in order. Hence, these rules can be arranged according to their priority to speed up the inference process. This heuristic rule is applied when solving sub-problems in algorithms.

5. Application for Intelligent Systems in Education Intelligent systems in education need useful knowledge bases to organize the complete knowledge in academic courses fully and accurately. The kernel ontology is used to represent the knowledge of matrixes and vectors, such as the structure of matrixes, the relationships between them, and the rules on matrixes. In this section, the method for integrating this knowledge kernel and the knowledge of operators and functions is applied to construct the knowledge bases of linear algebra and graph theory. These knowledge bases are the foundations for designing the intelligent problem solver (IPS) for the corresponding courses, which satisfy the criteria of IPS in mathematics education [23].

5.1. Representation of the Knowledge of Matrixes Using the Kernel Model The basic knowledge of Matrixes in [13,24] can be represented by the kernel model. It includes the field of real numbers Ñ, the concepts of kinds of matrixes and vectors, and the relationships between these concepts and rules about transforming a matrix:

C ,R , Rules ( kernel kernel kernel),

C kernel—set of concepts about matrixes and vectors:

C kernel = {Matrix, SquareMatrix, DiagnonalMatrix, Vector,}.

The structure of the SquareMatrix concept:

SquareMatrix: Matrix (A square matrix is a matrix); Ars: = Matrix.Ars ∪ {inv, diag, det, sym}; diag: Boolean//the diagonalizable property; inv: Boolean //the invertible property; sym: Boolean//the symmetric property; permutation: Boolean//the property about permutation; Facts: = {m = n}, ∪ → RulObj: = Matrix.RulObj {r1: det # 0 inv = 1, ∀ ≤ ≤ ≤ ≤ → r2: i, j, 1 i n, 1 j n: a[i][j] = a[j][i] sym = 1}. R C kernel—set of relationships between concepts in kernel:

R kernel = {equal (=), similar (~), row equivalence, column equivalence}. (1)

Relationship “is-a“ between the kinds of matrixes, such as SquareMatrix is-a Matrix. Rules kernel—set of inference rules on matrixes.

Example 4. Rule 1: {A: Matrix, B: Matrix, A.m = B.m, A.n = B.n}:

{∀ i, j, 1 ≤ i ≤ m, 1 ≤ j ≤ n, A.a[i][j] = B.a[i][j]} ↔ {A = B};

∃α ∈ ∃ ∃ , α Rule 2: {A: SquareMatrix, Ñ, m1, m2, m1 m2, rowA(m1) = * rowA(m2)}

→ {det(A) = 0}; Appl. Sci. 2019, 9, 3793 16 of 27

Rule 3: {A: SquareMatrix, A.permutation = 1}

→ ∃ ...... { {f 1, , f k} is a sequence of row permutation: f 1(f 2( f k(this) )) = IA.n},

∈ (Ik: the k-order identity matrix, k ).

5.2. Design Knowledge Base of Linear Algebra Using the Integrating Model (C, R, Rules ) + Ops.

5.2.1. Knowledge Base of Linear Algebra The knowledge about linear algebra was collected from [13,24]. A part of this knowledge domain, about chapters Matrixes–Vectors, Linear Equations System, and Vector Space, can be represented by the model for integrating the kernel and knowledge of operators:

(C, R, Rules ) + Ops.

C —set of concepts. Besides concepts in the kernel, C also includes concepts about the Linear Equations System, and Vector Space:

C C ∪ = kernel {Equation, EquationsSystem, CramerSystem, VectorSpace}.

R —set of relations. Besides the relations in the kernel, R also includes the relationships in the Linear Equations System and Vector Space:

R ∪ ... = Rkernel {eigenvalue, eigenvector, sub-space, based-set, spanning-set, linearly independent, }.

Ops is the set of operators between matrixes and vectors, operators in vector space. Rules is the set of rules on the knowledge domain about linear algebra. It includes rules for generating a new object, equation rules, and equivalent rules in linear algebra. The knowledge base of this knowledge domain is represented in Appendix A.

5.2.2. Types of Exercises in Linear Algebra Based on the knowledge base in Section 5.2.1 and the algorithms in Sections 3.2 and 4.2.2, an intelligent system for solving problems in linear algebra was designed. Some types of exercises in the curriculum were tested:

• Problems with the Matrix–Vector: Find the rank of a matrix, find the inverse matrix, find the value of an expression between matrixes. • Problems with the Linear Equations System: Solve a linear equations system by the Gaussian method and Cramer method. • Problems with the Vector Space: Determine the independence of vectors, determine the basis of a vector space.

∈ 4 Example 5. Given a set of vectors A = {u = (x1, x2, x3, x4) Ñ |x1 = 2x2 = x3}, and a subspace W = , Determine the based-set of W.

+ The model of this problem:

I O: = {W: VectorSpace, x1, x2, x3, x4: Ñ, A: 2 vector }; F: = {A = {(x1, x2, x3, x4)|x1 = 2x2 , x1 = x3}, A is a spanning-set of W}; G: = {Determine: Based-set of W}. Appl. Sci. 2019, 9, 3793 17 of 27

Step 1: From A = {(x1, x2, x3, x4)|x1 = 2x2, x1 = x3}, Step 5: Let B = {a1 = (1, ½, 1, 0), a2 = (0, 0, 0, 1)}, let u: Vector: then B is linearly independent. ∈ u = (x1, x2, x3, x4), u A. Step 6: ∈ Step 2: From u = (x1, x2, x3, x4), u A, From u = (1, ½, 1, 0) *x1 + (0, 0, 0, 1) *x4, ∈ ∈ ∈ A = {(x1, x2, x3, x4)|x1 = 2x2, x1 = x3}, u A, x1 Ñ, x4 Ñ, then u = (x1, ½.x1, x1, x4). a1 = (1, ½, 1, 0), a2 = (0, 0, 0, 1), Step 3: From u = (x1, ½.x1, x1, x4), B = {a1, a2}, then u = (x1, ½.x1, x1, 0) + (0, 0, 0, x4), A is a spanning-set of W, u = (1, ½, 1, 0) *x1 + (0, 0, 0, 1) *x4. then B is a spanning-set of W. Step 4: From u = (1, ½, 1, 0) *x1 + (0, 0, 0, 1) *x4, Step 7: From B is a spanning-set of W, let a1: Vector, a2: Vector, B is linearly independent. a1 = (1, ½, 1, 0) a2 = (0, 0, 0, 1). Then, B is a based-set of W

5.3. Design Knowledge Base of Graph Theory Using the Integrating Model (C, R, Rules ) + Funcs

5.3.1. Knowledge Base of Graph Theory The knowledge about graph theory was collected from [25–27]. In this section, we only cover the knowledge about undirected graphs. The knowledge base of this knowledge domain can be represented by the method for integrating the kernel and knowledge of functions:

(C, R, Rules ) + Funcs .

C —set of concepts. It includes concepts in the kernel and concepts about the knowledge of the graph: C C ∪ ... = kernel {Graph, Connected Graph, Simple Graph, }. R —set of relationships. Besides relationships in the kernel, R also includes relationships between graphs: R R ∪ ... = kernel {sub-graph, isomorphism, }. Funcs —set of functions of the knowledge domain about graph theory:

Funcs = {Degree, Path, Girth, EulerPath, HamiltonCycle ... }.

Rules —set of rules on the knowledge domain about graph theory. It includes deductive rules and equivalent rules. The knowledge base of this knowledge domain is represented in Appendix B.

5.3.2. Kinds of Exercises in Graph Theory Based on the knowledge base and the inference engine in the above section, an intelligent system for solving problems in graph theory was designed. This system can solve many types of problems that are in the curriculum of this course. They are classified in the three following types [18]:

• Type 1: find the shortest paths between nodes in a graph, find a minimum spanning tree for a weighted undirected graph. These problems also have additional conditions; • Type 2: Determine a graph from an expression of graphs; • Type 3: Prove a property of a graph or a relationship between two graphs.

Example 6. Given two simple graphs G1,G2, as in Figure 5, prove G1 and G2 are isomorphic. Appl. Sci. 2019, 9, x FOR PEER REVIEW 17 of 26

A = {(x1, x2, x3, x4)|x1 = 2x2, x1 = x3}, u ∈ A, x1 ∈ , x4 ∈ ,

then u = (x1, ½.x1, x1, x4). a1 = (1, ½, 1, 0), a2 = (0, 0, 0, 1), Step 3: From u = (x1, ½.x1, x1, x4), B = {a1, a2}, then u = (x1, ½.x1, x1, 0) + (0, 0, 0, x4), A is a spanning-set of W, u = (1, ½, 1, 0) *x1 + (0, 0, 0, 1) *x4. then B is a spanning-set of W. Step 4: From u = (1, ½, 1, 0) *x1 + (0, 0, 0, 1) *x4, Step 7: From B is a spanning-set of W, let a1: Vector, a2: Vector, B is linearly independent. a1 = (1, ½, 1, 0) a2 = (0, 0, 0, 1). Then, B is a based-set of W

5.3. Design Knowledge Base of Graph Theory Using the Integrating Model (C, R, Rules)  Funcs

5.3.1. Knowledge Base of Graph Theory The knowledge about graph theory was collected from [25–27]. In this section, we only cover the knowledge about undirected graphs. The knowledge base of this knowledge domain can be represented by the method for integrating the kernel and knowledge of functions: (C, R, Rules)  Funcs. C—set of concepts. It includes concepts in the kernel and concepts about the knowledge of the graph:

C = Ckernel ∪ {Graph, Connected Graph, Simple Graph, …}. R—set of relationships. Besides relationships in the kernel, R also includes relationships between graphs:

R = Rkernel ∪ {sub-graph, isomorphism,…}. Funcs—set of functions of the knowledge domain about graph theory: Funcs = {Degree, Path, Girth, EulerPath, HamiltonCycle …}. Rules—set of rules on the knowledge domain about graph theory. It includes deductive rules and equivalent rules. The knowledge base of this knowledge domain is represented in Appendix B.

5.3.2. Kinds of Exercises in Graph Theory Based on the knowledge base and the inference engine in the above section, an intelligent system for solving problems in graph theory was designed. This system can solve many types of problems that are in the curriculum of this course. They are classified in the three following types [18]:

• Type 1: find the shortest paths between nodes in a graph, find a minimum spanning tree for a weighted undirected graph. These problems also have additional conditions; • Type 2: Determine a graph from an expression of graphs; • Type 3: Prove a property of a graph or a relationship between two graphs. Appl. Sci. 2019, 9, 3793 18 of 27 Example 6: Given two simple graphs G1, G2, as in Figure 5, prove G1 and G2 are isomorphic.

Figure 5. Graphs in example 6. Figure 5. Graphs in example 6.

+ The model of this problem:

O: = {G1,G2: Graph}, F: = {G1.Adj = {(0, 1, 0, 0, 0), (1, 0, 1, 0, 1), (0, 1, 0, 1, 1), (0, 0, 1, 0, 1), (0, 1, 1, 1, 0)}, G2.Adj = {(0, 1, 1, 1, 0), (1, 0, 1, 0, 0), (1, 1, 0, 1, 0), (1, 0, 1, 0, 1), (0, 0, 0, 1, 0)}, G: = {“Prove”: G1 and G2 are isomorphic}

+ The solution of this system:    0 1 1 1 0       1 0 1 0 0    Step 1: From G1: Graph, G1. Adj =  1 1 0 1 0 ,      1 0 1 0 1  0 0 0 1 0 Select P5: SquareMatrix,   0 0 0 0 1       0 0 0 1 0    P5 =  1 0 0 0 0 ,P5.n = G1.n,P5.permutation = 1.      0 1 0 0 0  0 0 1 0 0 Step 2:    0 0 0 0 1       0 0 0 1 0    From P5 =  1 0 0 0 0 ,      0 1 0 0 0  0 0 1 0 0    0 0 1 0 0       0 0 0 1 0    Then T: SquareMatrix, T = Transpose(P5), T =  0 0 0 0 1 .      0 1 0 0 0  1 0 0 0 0 Step 3:      0 0 0 0 1   0 0 1 0 0           0 0 0 1 0   0 0 0 1 0      From P5 =  1 0 0 0 0 , T =  0 0 0 0 1 ,          0 1 0 0 0   0 1 0 0 0   0 0 1 0 0 1 0 0 0 0   0 1 0 0 0   0 1 1 1 0           1 0 1 0 1   1 0 1 0 0      G1.Adj =  0 1 0 1 1 ,G2.Adj =  1 1 0 1 0 ,          0 0 1 0 1   1 0 1 0 1  0 1 1 1 0 0 0 0 1 0 Then G1. Adj = P5 *G2. Adj * T Appl. Sci. 2019, 9, 3793 19 of 27

Step 4: From G1: Graph, G2: Graph, P5: SquareMatrix, T: SquareMartrix,

G1.n = G1.n, P5.n = G1.n, T = Transpose(P5),

G1. Adj = P5 *G2. Adj * T

Then, G1 and G2 are isomorphic.

6. Experimental Results

6.1. Intelligent Problem Solver in Linear Algebra The integrating model between the kernel ontology and the knowledge of operators was used to design the knowledge base of IPS in linear algebra, as in Section 5.2. The knowledge base of this

Appl.system Sci. 2019 satisfied, 9, x FOR the PEER criteria REVIEW of the knowledge representation for an IPS in education [27]. It can19 of be26 used to support the study of Linear Algebra at university. SymbolabSymbolab is a website which can automatically solve mathematical problems [[2828]. It It can can solve solve severalseveral problemsproblems about about matrixes matrixes and and equation equation systems, systems and produce, and produce step-by-step step solutions.-by-step solutions. Mathway Mathwayis another is website another to we solvebsite linear to solve algebra linear problems algebra automaticallyproblems automatically [29]. It plays [29 as]. It a chatbotplays as toa chatbot interact towith interact the user. with the The user. test resultsThe test of results Symbolab, of Symbolab, Mathway, Mathway, and our and system our system are shown are shown in Table in T4ableand 4Figure and Figure6. 6.

TableTable 4. TheThe results of testing of exercises in [ 13]]..

NumberNumber of of Number of of Problems Problems that that Can Can Be SolvedBe Solved ChapterChapter TestingTesting Problems Problems SymbolabSymbolab MathwayMathway OurOur System System Matrix–VectorMatrix–Vector 65 65 30 30 4343 5858 Linear EquationsEquations system system 39 39 25 25 1919 3838 VectorVector space space 67 67 0 0 2211 5353 TotalTotal 171 171 55 55 8383 149149

FigureFigure 6. 6Results. Results of of testing testing of of Symbolab, Symbolab Mathway,, Mathway and, and our our system. system.

TheThe knowledge bases of Symbolab and Mathway are organized as frames. They They only only can can solve solve somesome type typess of exercises exercises,, which have already been set up. The The interface interface of of Mathway Mathway is is a a chatbot chatbot for for showingshowing the step step-by-step-by-step solutions. Besides Besides this this,, the the user user can can input input some some simple simple problems problems by by images images toto that that program. program. In In contrast, contrast, t thehe knowledge knowledge base base of of our our program program wa wass organized organized as as a a complete complete system system,, representingrepresenting thethe knowledgeknowledge similarly similarly to to the the knowledge acquisition of human. of human Its. solutions Its solutions were we clear,re clearstep-by-step,, step-by- andstep similar, and similar to those to those of students. of students. The IPS in linear algebra was also examined by the students in two universities. In the curriculum for information technology from these two universities, linear algebra takes place in the second semester of the first academic year. This survey focused on four requirements of an IPS in education [27,30]: sufficient knowledge base, the ability to solve common exercises, pedagogy, usefulness. Each criterion can be evaluated from 1–5, from very bad to very good. The meaning of each level was described in [30]. There were 87 students in this survey, who were either: • First-year students (63 students ~72%): students who took this course the first time; • The other students (24 students ~28%): students who took this course again because they had failed before. Each student was prompted to choose three problems from a list of 149 exercises that could be solved by the program. After seeing the program-generated solutions for those problems, they were requested to input three more problems using specification language and then check the solutions produced by the program. Based on these results, the students evaluated this program by four criteria, on a scale of 1 to 5. Appl. Sci. 2019, 9, 3793 20 of 27

The IPS in linear algebra was also examined by the students in two universities. In the curriculum for information technology from these two universities, linear algebra takes place in the second semester of the first academic year. This survey focused on four requirements of an IPS in education [27,30]: sufficient knowledge base, the ability to solve common exercises, pedagogy, usefulness. Each criterion can be evaluated from 1–5, from very bad to very good. The meaning of each level was described in [30]. There were 87 students in this survey, who were either:

• First-year students (63 students ~72%): students who took this course the first time; • The other students (24 students ~28%): students who took this course again because they had failed before.

Each student was prompted to choose three problems from a list of 149 exercises that could be solved by the program. After seeing the program-generated solutions for those problems, they were requested to input three more problems using specification language and then check the solutions produced by the program. Based on these results, the students evaluated this program by four criteria, on a scale of 1 to 5. The results of this survey are shown in Table 5.

Table 5. Results of the survey.

Level Criterion 1 2 3 4 5 Sufficient knowledge 25% 75% Ability to solve common 24% 76% exercises Pedagogy 32% 68% Usefulness 31% 69%

6.2. Intelligent Problem Solver in Graph Theory The integrating model between kernel ontology and the knowledge of functions was used to design the knowledge base of IPS in graph theory, as in Section 5.3. The knowledge base of this system meets requirements of an IPS in education [23]. The students used this system to support their learning of graph theory at university. VisuAlgo is a learning website [31] that can visualize algorithms in graph theory, such as graph traversal, finding the minimum spanning tree, shortest paths, graph matching, traveling salesman. Maple software is an essential mathematical tool for education [32]. It includes many packages for studying mathematics. Maple has a network package to represent the knowledge of graph theory. Although it can solve some problems about graphs, Maple only shows their results, and not step-by-step solutions. Table 6 and Figure 7 compare the ability for solving exercises in graph theory [27] between VisuAlgo, Maple, and our system.

Table 6. The ability for solving exercises in graph theory [27].

Number of Number of Problems that Can Be Solved Kind of Exercises Testing Exercises VisuAlgo Maple Our System Type 1 28 12 10 26 Type 2 11 0 0 8 Type 3 25 5 6 17 Total 64 17 16 51 Appl. Sci. 2019, 9, x FOR PEER REVIEW 20 of 26

The results of this survey are shown in Table 5.

Table 5. Results of the survey.

Level Criterion 1 2 3 4 5 Sufficient knowledge 25% 75% Ability to solve common exercises 24% 76% Pedagogy 32% 68% Usefulness 31% 69%

6.2. Intelligent Problem Solver in Graph Theory The integrating model between kernel ontology and the knowledge of functions was used to design the knowledge base of IPS in graph theory, as in Section 5.3. The knowledge base of this system meets requirements of an IPS in education [23]. The students used this system to support their learning of graph theory at university. VisuAlgo is a learning website [31] that can visualize algorithms in graph theory, such as graph traversal, finding the minimum spanning tree, shortest paths, graph matching, traveling salesman. Maple software is an essential mathematical tool for education [32]. It includes many packages for studying mathematics. Maple has a network package to represent the knowledge of graph theory. Although it can solve some problems about graphs, Maple only shows their results, and not step-by- step solutions. Table 6 and Figure 7 compare the ability for solving exercises in graph theory [27] between VisuAlgo, Maple, and our system.

Table 6. The ability for solving exercises in graph theory [27].

Number of Problems that Can Be Solved Kind of Exercises Number of Testing Exercises VisuAlgo Maple Our System Type 1 28 12 10 26 Type 2 11 0 0 8 Type 3 25 5 6 17 Appl. Sci. 2019, 9, 3793 21 of 27 Total 64 17 16 51

Figure 7.7. Results of testing of VisuAlgo VisuAlgo,, Maple,Maple, and our system.

With exercisesexercises of type 1, our system can solve problems with additional conditions, while VisuAlgo and MapleMaple cancan only solvesolve algorithmsalgorithms whichwhich dodo notnot containcontain conditions.conditions. Exercises of type 2 and type 3 are difficultdifficult for students.students. VisuAlgo only solve solvess some exercises in type 3 about determining the ismorphism between two graphs, but our system could solve exercises of all types. Maple only shows the results of exercises and not the detailed solutions. It is a useful tool to support learning, but it does not meet the requirements of an IPS in graph theory. Similar to the IPS in linear algebra, the IPS in graph theory was also examined by the students in two universities, based on four criteria: sufficient knowledge base, the ability to solve common exercises, pedagogy, and usefulness. In the curriculum for information technology from these two universities, graph theory took place in the first semester of the first academic year. A total of 95 students joined this survey, and were again classified into two types: students who were studying this course for the first time (73 students ~77%), and students who were studying the course for the second time (22 students ~23%). Each student was again prompted to pick three exercises in the list of 51 exercises that could be solved by the program. After seeing the program-generated solutions for those problems, they were asked to input three more problems using the specification language and then check the solutions produced by the program. Based on these results, the students evaluated this program by four criteria on a scale of 1 to 5. Results of this survey are shown in Table 7:

Table 7. Results of the survey.

Level Criterion 1 2 3 4 5 Sufficient Knowledge 25% 75% Ability to solve common 24% 76% exercises Pedagogy 15% 85% Usefulness 26% 74%

7. Conclusions and Future Works Knowledge integration is an important method for developing intelligent software. It makes the system more intelligent than conventional systems. Systems with knowledge integration can simulate the knowledge organization and solve problems on the knowledge domains in a similar way to the human method. In this paper, a method for knowledge integration based on ontology was presented. This method is effective at representing the real knowledge domain. It meets the requirements of knowledge integration. The integrating models have a kernel consisting of concepts, Appl. Sci. 2019, 9, 3793 22 of 27 relationships, and inference rules, which can be extended with other knowledge by integrating more components, kinds of facts, and kinds of rules into the kernel. Hence, a method for integration between the knowledge kernel and the knowledge of operators and functions was proposed. These models can represent real knowledge domains more clearly, naturally, and accurately, and therefore are applicable in practice. These integrating models were applied to build IPSs in mathematical courses at universities, such as linear algebra and graph theory. The kernel of these models represented the concepts of matrixes and vectors, relationships, and inference rules on them. Based on this kernel, the integrating model with knowledge of operators was used to represent the knowledge base of linear algebra, consisting of additional knowledge about matrix operators, linear equations systems, and vector spaces. Besides this, this kernel was also integrated with the knowledge of functions and operators to represent and organize the knowledge base of graph theory. These knowledge bases were applied to build the IPSs for these courses. These systems supported students well in their study of these courses. They could solve common exercises in each course, and their reasoning and solutions were readable, step-by-step, and similar to human methods. Our method for integrating the knowledge based on ontology can be applied to other knowledge domains, especially knowledge in natural sciences, such as mathematics, physics, and chemistry. Depending on the knowledge domains, knowledge bases may vary in their structure, as long as the structure is bounded to these following five elements: concepts, relationships, inference rules, operators, and functions. This setup makes the integration of multiple knowledge bases seamless and consistent. In the future, we will research and develop more methods and techniques of knowledge integration that are applicable in more complex real-world knowledge domains. Problems using heuristics and sample problems [21] for reasoning on the integrated structure will also be studied. Additionally, with the IPS in education, after finding the solution of a problem, the system will omit the redundant steps, which are unnatural for humans, and wrap the solution steps into tutoring steps. This stage of the system uses the meta-knowledge of humans, especially the knowledge of the learner. In the next study, some meta-knowledge will be researched to process the final solutions of the system. This will make the solutions more natural and tend to the instructions for solving a problem. Nowadays, there are many knowledge domains collected from many sources. Hence, a model to represent the combination of multiple knowledge domains is very necessary for knowledge integration, and a method to combine multiple knowledge models will have many applications in practice.

Author Contributions: Conceptualization, N.V.D. and H.D.N.; methodology, N.V.D. and H.D.N.; software, T.T.M.; resources, H.D.N. and T.T.M.; writing—original draft preparation, H.D.N. and T.T.M.; writing—review and editing, N.V.D.; visualization, T.T.M. Funding: This research is funded by Vietnam National University HoChiMinh City (VNU-HCM) under grant number B2017-26-03. Conflicts of Interest: The authors declare no conflict of interest.

Appendix A The knowledge about linear algebra, including the chapters Matrixes–Vectors, Linear Equations System, and Vector Space was collected from [13,24]. It was represented by the model for integrating the kernel and knowledge of operators:

(C, R, Rules ) + Ops Appl. Sci. 2019, 9, 3793 23 of 27

C —set of concepts. Besides concepts in the kernel, C also includes concepts about Linear Equations System, and Vector Space:

C C ∪ = kernel {Equation, EquationsSystem, CramerSystem, VectorSpace}.

The structure of the EquationsSystem concept:

Ars: = {m, n, eq[m], Root, aug_matrix},

m, n: //m is the number of equations, n is number of variables. eq[m]: Equation//List of linear equations. ∑ ... ∈ n ∀ ≤ ≤ Root: = {(b1, , bn) Ñ | i, 1 i m, eq[i].a[j] *b[j] = eq[i].a[n + 1]}

aug_matrix: Matrix [m, n + 1]//Augmented matrix

Facts: = {∀ i, 1 ≤ i ≤ m, eq[i].NumOfVariables = n,

∀ i, j, 1 ≤ i ≤ m, 1 ≤ j ≤ n+1: aug_matrix[i, j] = eq[i].a[j] ... ..} → ... RulObj: = {r1: aug_matrix.rank = n card(Root) = 1 } R —set of relationships. Besides relationships in the kernel, R also includes relationships in the Linear Equations System, and Vector Space:

R ∪ ... = Rkernel {eigenvalue, eigenvector, sub-space, based-set, spanning-set, linearly independent, }.

⊆ × Example A1. + based-set I2IVector IVectorSpace: relation between a set of vectors and a based-set of a vector space. ∈ k + linearly independent IVector: a relation about linearly independent between k vectors. Ops —set of operators between matrixes and vectors, operators in vector space.

Example A2. + The operators between matrixes and vectors. − + The operators: determinant (det), inverse ( 1) on a matrix. + The operators about row and and column tranformation on a matrix. + V: VectorSpace.

• IVector × IVector → CoorMatrixV: 2 2 ISquareMatrix

(B1, B2)# M

CoorMatrixV is an operator to determine the matrix for converting the coordinate in a vector space V from based-set B1 to based-set B2:

• × IVector → CoorV:IVector 2 IVector; (v, B)# v’

CoorV is an operator to determine the coordinate of a vector v with based-set B in a vector space V. Rules —set of rules on the knowledge domain about linear algebra. • Rules for generating a new object: Rule LA1: {A: SquareMatrix, A.diag = 1} Appl. Sci. 2019, 9, 3793 24 of 27

→ ∃D: DiagonalMatrix, S: SquareMatrix, S.inv = 1, D.n = S.n = A.n:

− A = S 1. D.S

• Equation rules:

I Rule LA2: {V: VectorSpace, v: Vector, B1, B2: 2 VECTOR , B1 is a based-set of V, B2 is a based-set of V}

CoorV(v, B2) = CoorMatrixV(B2, B1). CoorV(v, B1)

• Equivalent rules: Rule LA3: {A: Matrix, B: Matrix} ↔ ∃ ... ⊂ A is row equivalent to B [f 1, , fn] Ops : list of operators about primary row ...... transformation,USVfn( Symbol(f 1(A) Macro(s)) = B Description Rule LA4: {A, B: EquationsSystem} 21CC ⇌ \textrightleftharpoons RIGHTWARDS HARPOON OVER LEFTWARDS HARPOON ↔ A is equivalent to B (A.aug_matrix is21CD row equivalence⇍ \textnLeftarrow to B.aug_matrix) LEFTWARDS DOUBLE ARROW WITH STROKE IVector ... Rule LA5: {S: 2 , S = {e1, e2, , ek}, S is21CE linear independent}⇎ \textnLeftrightarrow LEFT RIGHT DOUBLE ARROW WITH STROKE 21CF ⇏ \textnRightarrow RIGHTWARDS DOUBLE ARROW WITH STROKE ... ↔ ... ({a1*e1 + + ak*ek =21D0 0} {a1⇐= a2 = \textLeftarrow= am = 0}) LEFTWARDS DOUBLE ARROW 21D1 ⇑ \textUparrow UPWARDS DOUBLE ARROW IVector ... Rule LA6: {V: VectorSpace, B: 2 , B = {21D2e1, e2, ⇒, eV.dim\textRightarrow}} RIGHTWARDS DOUBLE ARROW B is a based-set of V ↔ (B is linearly21D3 independent)⇓ ∧\textDownarrow(B is a spanning-set of V) DOWNWARDS DOUBLE ARROW 21D4 ⇔ \textLeftrightarrow LEFT RIGHT DOUBLE ARROW Appendix B 21D5 ⇕ \textUpdownarrow UP DOWN DOUBLE ARROW 21D6 ⇖ \textNwarrow NORTH WEST DOUBLE ARROW

The knowledge about undirected graphs21D7 in⇗ graph\textNearrow theory was collected from [25–27]. NORTH EAST DOUBLE ARROW This knowledge base is represented by the method21D8 for⇘ integrating\textSearrow the kernel and knowledge of SOUTH EAST DOUBLE ARROW functions: 21D9 ⇙ \textSwarrow SOUTH WEST DOUBLE ARROW (C, R, Rules21DA ) + ⇚Funcs\textLleftarrow LEFTWARDS TRIPLE ARROW 21DB ⇛ \textRrightarrow RIGHTWARDS TRIPLE ARROW C —set of concepts: 21DC ⇜ \textleftsquigarrow LEFTWARDS SQUIGGLE ARROW

21DD ⇝ \textrightsquigarrow RIGHTWARDS SQUIGGLE ARROW C C ∪ ... = kernel {Graph, Connected21E0 Graph,⇠ Simple\textdashleftarrow Graph, }. LEFTWARDS DASHED ARROW 21E1 ⇡ \textdasheduparrow UPWARDS DASHED ARROW 21E2 ⇢ \textdashrightarrow RIGHTWARDS DASHED ARROW

Example A3. The structure of Graph concept: 21E3 ⇣ \textdasheddownarrow DOWNWARDS DASHED ARROW

21E8 ⇨ \textpointer RIGHTWARDS WHITE ARROW Ars: = {n, m, V,21F5 E, M, Adj,⇵ connected\textdownuparrows} DOWNWARDS ARROW LEFTWARDS OF UPWARDS ARROW 21FD ⇽ \textleftarrowtriangle LEFTWARDS OPEN-HEADED ARROW n, m: Ñ //n is the number of vertices,21FE m is number⇾ of edges\textrightarrowtriangle RIGHTWARDS OPEN-HEADED ARROW 21FF ⇿ \textleftrightarrowtriangle LEFT RIGHT OPEN-HEADED ARROW

... FOR ALL V = {x1, , xn}:2200set of symbols∀ for\textforall vertices 2201 ∁ \textcomplement COMPLEMENT E ⊆ V 2202× V: set of∂ edges \textpartial PARTIAL DIFFERENTIAL 2203 ∃ \textexists THERE EXISTS Adj: SquareMatrix[n]//the adjacency2204 matrix of the∄ graph\textnexists THERE DOES NOT EXIST connected: Boolean//Boolean value for2205 the connecting∅ of\textemptyset the graph. EMPTY SET 2206 ∆ \texttriangle INCREMENT

∀ ≤ ≤ ∈ → NABLA Facts: = { i, j, 1 i, j 2207n:(xi, xj)∇ E \textnablaAdj.a[i][j] = 1, 2208 ∈ \textin ELEMENT OF ∀ ≤ ≤ 2209 ∉ → \textnotin NOT AN ELEMENT OF i, j, 1 i, j n:(xi, xj) E Adj.a[i][j] = 0} 220A ∊ \textsmallin SMALL ELEMENT OF → ∀ ≤ ≤ ∃ ⊆ RulObj: = {{connected = 1} 220Bi, j, 1 ∋i, j n\textni: Path(xi, xj) E} CONTAINS AS MEMBER 220C ∌ \textnotowner DOES NOT CONTAIN AS MEMBER

220D ∍ \textsmallowns SMALL CONTAINS AS MEMBER 220F ∏ \textprod N-ARY PRODUCT

2210 ∐ \textamalg N-ARY COPRODUCT 2211 ∑ \textsum N-ARY SUMMATION

2212 − \textminus MINUS SIGN 2213 ∓ \textmp MINUS-OR-PLUS SIGN

2214 ∔ \textdotplus DOT PLUS 2215 ∕ \textDivides DIVISION SLASH

2216 ∖ \textsetminus SET MINUS 2217 ∗ \textast ASTERISK OPERATOR

2218 ∘ \textcirc RING OPERATOR 2219 ∙ \textbulletoperator BULLET OPERATOR

221A √ \textsurd SQUARE ROOT 221D ∝ \textpropto PROPORTIONAL TO

221E ∞ \textinfty INFINITY

38 Appl. Sci. 2019, 9, 3793 25 of 27

R —set of relations:

R R ∪ ... = kernel {sub-graph, isomorphism, }

⊆ × Example A4. + sub-graph IGraph IGraph: a graph is a sub-graph of another graph. ⊆ × + isomorphism IGraph IGraph: the isomorphism between two graphs. Funcs —set of functions of the knowledge domain about graph theory.

Funcs = {Degree, Path, Girth, EulerPath, HamiltonCycle ... }

Example A5. + Degree(x: symbol): return the degree of node x in the graph G (x ∈ G.E). Degree(G: Graph): return the degree of the graph G.

Degree(G): = max{Degree(x)|x ∈ G.E}

+ Path(x: symbol, y: symbol): return a list of nodes being a path between x-node and y-node in a graph G (x, y ∈ G.E). If G does not contain a path between x and y, its value is an empty list. + Girth(G: Graph): return the length of the smallest cycle in the graph G. If G does not contain any cycles, its value is 0. Rules —set of rules on the knowledge domain about graph theory

• Equivalent rules: Rule GT1: {G: Graph, H: Graph} G sub-graph H ↔ G.V ⊆ H.V, G.E ⊆ H.E Rule GT2: {G: Graph, H: Graph, G.n = H.n} G, H are isomorphism ↔ ∃ P: SquareMatrix, P.n = G.n, P.permutation = 1:

G.Adj = P*H.Adj*Transpose(P)

• Deductive rule: Rule GT3: {G: Graph, p: Ñ, p = Girth(G), p ≥ 3} → G.m ≤ p/(p − 2)*(G.n − 2)

References

1. Noy, N.; McGuinness, D. Final Report on the 2013 NSF Workshop on Research Challenges and Opportunities in Knowledge Representation; National Science Foundation Workshop Report: Alexandria, VA, USA, 2013. 2. Mehta, N.; Bharadwaj, A. Knowledge Integration in Outsourced Software Development. J. Manag. Inf. Syst. 2015, 32, 82–115. [CrossRef] 3. Wolfram|Alpha. Available online: https://www.wolframalpha.com/ (accessed on 7 September 2019). 4. IMS Learning Information Services Tools. Available online: https://www.k-int.com/products/ims-learning- information-services-tools/ (accessed on 7 September 2019). 5. Bassea, M.; Faa, F.; Manti, A. San Pietro di Deca in Torrenova: Integrated Survey Techniques for the Morphological Transformation Analysis. In Handbook of Research on Emerging Technologies for Architectural and Archaeological Heritage; IGI Global: Hershey, PA, USA, 2017. 6. Sowa, J.F. Knowledge Representation: Logical, Philosophical, and Computational Foundations; Brooks Cole: Pacific Grove, CA, USA, 2000. 7. Gayathri, R.; Uma, V. Ontology based knowledge representation technique, domain modeling languages and planners for robotic path planning: A survey. ICT Express 2018, 4, 69–74. 8. Truong, H.B.; Duong, T.H.; Thanh, N.N. A hybrid method for fuzzy ontology integration. Cyber. Syst. Int. J. 2013, 44, 133–154. [CrossRef] Appl. Sci. 2019, 9, 3793 26 of 27

9. Provine, R.; Schlenoff, C.; Balakirsky, S.; Smith, S.; Uschold, M. Ontology-based methods for enhancing autonomous vehicle path planning. Robot Auton. Syst. 2004, 49, 123–133. [CrossRef] 10. Fratini, S.; Nogueira, T.; Policella, N. Integrating modeling and knowledge representation for combined task, resource and path planning in robotics. In Proceedings of the Workshop on Knowledge Engineering for Planning and Scheduling—27th International Conference on Automated Planning and Scheduling (ICAPS 2017), Pisburgh, PA, USA, 18–23 June 2017. 11. Ong, J.; Remolina, E.; Prompt, A.; Robinson, P.; Sweet, A.; Nishikawa, D. Software testbed for developing and evaluating integrated autonomous systems. In Proceedings of the 2015 IEEE Aerospace Conference, Big Sky, MT, USA, 7–14 March 2015; pp. 1–12. 12. Do, N.V. Ontology COKB for Knowledge Representation and Reasoning in Designing Knowledge-Based Systems. In Communications in Computer and Information Science (CCIS); Springer: Berlin/Heidelberg, Germany, 2015; Volume 513, pp. 101–118. 13. Anton, H.; Rorres, C. Elementary Linear Algebra, 10th ed.; John Wiley & Sons: Hoboken, NJ, USA, 2010. 14. Dumontier, M.; Baker, C.J.; Baran, J.; Callahan, A.; Chepelev, L.; Cruz-Toledo, J.; Del Rio, N.R.; Duck, G.; Furlong, L.I.; Keath, N.; et al. The Semanticscience Integrated Ontology (SIO) for biomedical research and knowledge discovery. J. Biomed. Semant. 2014, 5, 14. [CrossRef][PubMed] 15. Chabeb, Y.; Tata, S.; Belaïd, D. Toward an integrated ontology for Web services. In Proceedings of the 2009 Fourth International Conference on Internet and Web Applications and Services, Venice/Mestre, Italy, 24–28 May 2009; pp. 463–467. 16. Bobillo, F.; Straccia, U. fuzzyDL—An Expressive Fuzzy Description Logic Reasoner. In Proceedings of the 2008 IEEE International Conference on Fuzzy Systems, Hong Kong, China, 1–6 June 2008; pp. 923–930. 17. Bang, T.H.; Quach, X.H. An Overview of Fuzzy Ontology Integration Methods Based on Consensus Theory. In Advanced Computational Methods for Knowledge Engineering; Van Do, T., Le Thi, H.A., Nguyen, N.T., Eds.; Springer: Berlin/Heidelberg, Germany, 2014; Volume 282, pp. 217–227. 18. Do, N.V.; Nguyen, H.D.; Mai, T.T. Intelligent Educational Software in Discrete Mathematics and Graph Theory. In Proceedings of the 17th International Conference on Intelligent Software Methodologies, Tools, and Techniques (SOMET 2018), Granada, Spain, 26–28 September 2018; Volume 303, pp. 925–938. 19. Munir, K.; Anjum, M.S. The use of ontologies for effective knowledge modelling and information retrieval. Appl. Comput. Inform. 2018, 14, 116–126. [CrossRef] 20. Do, N.V.; Nguyen, H.D.; Selamat, A. Knowledge-Based model of Expert Systems using Rela-model. Int. J. Softw. Eng. Knowl. Eng. (IJSEKE) 2018, 28, 1047–1090. [CrossRef] 21. Do, N.V.; Nguyen, H.D.; Mai, T.T. Designing an Intelligent Problems Solving System based on Knowledge about Sample Problems. In Proceedings of the 5th Asian conference on Intelligent Information and Database Systems (ACIIDS 2013), Kuala Lumpur, Malaysia, 18–20 March 2013; Volume 7802, pp. 465–475. 22. Nguyen, H.D.; Do, V.; Pham, V.T.; Inoue, K. Solving problems on a knowledge model of operators and application. Int. J. Digit. Enterp. Technol. (IJDET) 2018, 1, 37–59. [CrossRef] 23. Nguyen, H.D.; Do, N.V.; Tran, N.P.; Pham, X.H. Criteria of a Knowledge model for an Intelligent Problems Solver in Education. In Proceedings of the 10th IEEE International Conference on Knowledge and Systems Engineering (KSE 2018), Ho Chi Minh City, Vietnam, 1–3 November 2018; pp. 288–293. 24. Lang, S. Linear Algebra, 3rd ed.; Undergraduate Texts in Mathematics; Springer: Berlin/Heidelberg, Germany, 2004. 25. Fournier, J. Graph Theory and Applications—With Exercises and Problems; Wiley Online Library: Hoboken, NJ, USA, 2010. 26. Chartrand, G.; Zhang, P. A first Course in Graph Theory; Dover Pub.: Mineola, New York, NY, USA, 2006. 27. Mier, A.; Maureso, M. Graph Theory: Exercises and Problems; Barcelona School of Informatics: Barcelona, Spain, 2015. 28. Symbolab. Available online: www.symbolab.com (accessed on 7 September 2019). 29. Mathway. Available online: https://www.mathway.com/LinearAlgebra (accessed on 7 September 2019). Appl. Sci. 2019, 9, 3793 27 of 27

30. Nguyen, H.D.; Do, N.V. Intelligent Problems Solver in Education for Discrete Mathematics. In Proceedings of the 16th International Conference on Intelligent Software Methodologies, Tools, and Techniques (SOMET_17), Kitakyushu, Japan, 26–28 September 2017; Volume 297, pp. 21–34. 31. VisuAlgo. Available online: https://visualgo.net/en (accessed on 7 September 2019). 32. Maple Software. Available online: https://www.maplesoft.com/ (accessed on 7 September 2019).

© 2019 by the authors. Licensee MDPI, Basel, Swierland. This article is an open access article distributed under the terms and conditions of the Creative Commons Aribution (CC BY) license (hp://creativecommons.org/licenses/by/4.0/).