## 2 Materials and Methods
### Application of Grammatical Evolution  
We redefine the experiment and assume the domain expert has provided only numerical values of the variable \(d\) as a column of experimental results. However, leveraging domain-specific knowledge, the expert can offer insights into how \(d\) might depend on other variables. In this phase of the experiment, the gramEvol package, a native R implementation of grammatical evolution, is utilized (it is also used in the subsequent experiments outlined in this paper). We maintain the use of 100 observations, as in the previous stages, but apply GE methods.  
External knowledge can be represented as a context-free grammar and utilized as input for the GE process. The following is an example of such a grammar:  
<expr> ::= <var> | <op>(<n>, <var>) | <op>(<var>, <n>)  
| <op>(<expr>, <expr>)  
<op> ::= \"_\" | \"*\" | \"^\" <var> ::= a | b | c  
<n> ::= 1 | 2 | 3 | 4  
Since GE is capable of performing symbolic regression tasks, it can identify functional dependencies within the data. The following expression for the \(d\) variable was derived utilizing the GE approach after fewer than 30,000 iterations:  
Best Expression: b^2 - c * 4 * a  
Using the derived formula for \(d\), an additional component is incorporated into the model. The three-class classification problem is simplified into three distinct binary classification cases. Subsequently, a set of rules is established to determine the number of roots for a quadratic equation tailored specifically to each case:  
ifelse(d > 0, \"two\", \"other no. of roots\")  
ifelse(d == 0, \"one\", \"other no. of roots\")  
ifelse(d < 0, \"zero\", \"other no. of roots\")  
The result of combined rules is a simple and human-interpretable classification rule:  
ifelse(d > 0, \"two\", ifelse ( d == 0, \"one\", \"zero\"))  
It should be noted that although d > 0, d == 0, or d < 0 is always included in the resulting formula of the GE process, occasionally, more complex rules, e.g., ifelse((b > min(b)) & (d == 0), \"one\", \"other no. of solutions\") are proposed as the final solution.  
As might be expected, the classification model developed using the GE approach achieves 100% accuracy.  
The classification explanation is given by the functional structural diagram shown in Figure 5. This diagram includes two functional components; the first calculates the value of \(d\), and the second determines the actual class based on the value of \(d\).  
Figure 5: The functional model.  
Note that in general, the diagram can take a more complex form of a directed acyclic graph. A more precise statement of the underlying theory is presented in a subsection below.  
Incorporating external knowledge components (auxiliary domain knowledge and expert knowledge) can often enhance the levels of explainability and trustworthiness of AI models. A well-fitting KC can improve interpretability, address ethical issues, provide context, and boost model performance. Aligning the decision-making process with established principles or rules makes it easier to comprehend and explain the model's predictions. By incorporating domain knowledge, logical constraints, or expert guidelines, models can propose explanations that align with human reasoning. Additionally, domain expertise allows the model to capture underlying patterns and relationships that may not be apparent in the training data alone. This may result in better coverage and generalization of new, previously unseen data.  
While incorporating external knowledge into the explanation process can be advantageous, it is crucial to verify the reliability and quality of the external source. Additionally, potential biases or limitations in the external information should be carefully considered [34].