# A Method of Ontology Integration for Designing Intelligent Problem Solvers
## 4 Integration Between the Kernel and Other Knowledge
### Integration with the Knowledge of Functions -Functs -set
#### 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 \(\mathbf{(O,F)\to G,}\) as in Section 3.2, in which the set of facts \(\mathbf{F}\) includes the additional facts as function-kinds. Fu.1, Fu.2, Fu.3, and the set \(\mathbf{G}\) is modeled as:  
\(\mathbf{G=(\text{``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.\)```
\(\mathbf{G}\): A knowledge domain combining functions \(\mathbb{X}\) = (\(\mathbf{C}\), \(\mathbf{L}\), \(\mathbf{K}\), \(\mathbf{K}\), \(\mathbf{K}\)) + \(\mathbf{F}\)\(\mathbf{F}\)\(\mathbf{G}\) on this knowledge domain, with \(\mathbf{G}\) = {\({}^{\circ}\)Compute\": \(g(x_{1},\,x_{2},\,\ldots,\,x_{n})\)}, where \(g\) is a function and \(x_{k}\) are objects (\(k\) = 1... \(n\)). Input: The problem P = (\(\mathbf{O}\), \(\mathbf{F}\)) \(\mathbf{G}\) = {\({}^{\circ}\)Compute\": \(g(x_{1},\,x_{2},\,\ldots,\,x_{n})\)} with: \(g\): \(\mathrm{I}_{\mathrm{C1}}\times\mathrm{I}_{\mathrm{C2}}\,\ldots\,\times\mathrm{I }_{\mathrm{cr}}\rightarrow\mathrm{I}_{\mathrm{c}}\) \(x_{k}\in\mathrm{I}_{\mathrm{cd}}\), \(\mathrm{c}_{k}\in\mathbf{C}\) (1 \(\leq k\leq n\)), \(\mathbf{c}\in\mathbf{C}\) Output: The value of \(g(x_{1},\,x_{2},\,\ldots,\,x_{n})\). The idea of the algorithm: The set \(\mathbf{F}\) is split into two sets: \(\mathrm{F}_{1}-\) the set of facts in the knowledge kernel, \(\mathrm{F}_{2}-\)the set of facts about functions. Firstly, using the knowledge kernel, the algorithm uses the objects and facts in the hypothesis (\(\mathbf{O}\), \(\mathrm{F}_{1}\)) 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 \(\mathrm{F}_{2}\), the algorithm uses the integrated knowledge of functions to compute the value of \(g\). Step 0: Initialize variables; KnownFacts: = \(\mathbf{F}_{i}\); ObjectGoal: = {\(x_{1}\), \(x_{2}\),..., \(x_{n}\)}; Sol: = { }; \(\mathbf{g}\) solution of problem. Step 1. Record elements in hypothesis and goal. Classify kinds of facts in \(\mathbf{F}=\mathrm{F}_{1}\cup\mathrm{F}_{2}\); F\({}_{1}\) = set of facts with kinds in the kernel knowledge model; F\({}_{2}\) = set of facts with kinds about functions (Fu.1, Fu.2, Fu.3, Fu.4); Determine the form of the function \(g\) in \(\mathbf{G}\). Step 2. Check \(\mathbf{G}\). If \(\mathbf{G}\) is obtained, then: Go to step 6. Step 3: Produce new facts based on the hypothesis; Apply objects and facts in the hypothesis (\(\mathbf{O}\), \(\mathrm{F}_{1}\)) to determine new facts by using the algorithm for solving problems on the kernel model, as in Section 3.2.2; UpdateKnownFacts and Sol. Step 4: If \(g\) has form 1, then: Apply facts in \(\mathrm{F}_{2}\) and \(\mathrm{KnownFacts}\) to compute the value of function; UpdateKnownFacts and Sol. ```

**Algorithm 3** Compute the value of a function. **Example 3**. : _In the knowledge domain about analytic geometry, \(\mathbf{F}\)\(\mathbf{F}\)\(\mathbf{F}\)\(\mathbf{F}\)\(\mathbf{G}\) is the set of the knowledge of functions, such as distance between two points and distance between a point and a line. We considered a problem, as follows:_

Problem P2: Given two points, B(\(-2\); \(\sqrt{3}\)), C(\(2\); \(\sqrt{3}\)), and ABC is an Equilateral Triangle as Figure 4, compute AB. Figure 4: Problem P2. + Model of the problem:

**O**:= {A, B, C: POINT, ABC: EquilateralTrirangle;

**F**:= {B = (-2, \(\sqrt{3}\)),C = (2, \(\sqrt{3}\))}

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