## 3 DMAIR Description
### Learning and Teaching (LT)
#### 3.2.2 LT Component Structure
\begin{array}{c}BM=(B_{i,j})\rightarrow\left\{\begin{array}{c}B_{i,j} \leftrightarrow B_{i,j+1}\\ B_{i,j}\updownarrow B_{i+1,j}\end{array}\right.\\,i=1,\lfloor\frac{nB}{L(O)}\rfloor,j=\overline{1,L(O)}\end{array} \] (5)  
A matrix is obtained as a result of a genetic algorithm that will be described in the next sections. In this context, L(O) represents the number of levels within the generated ontology (O). Figure 2: The graphical representation of a learning block. * \(BLP\) is a learning path, a successive enumeration of blocks that start with an initial block BS and ends with a final block \(BE\). A path contains only blocks that are connected either linearly or leveled: \[BLP=\{(B_{i},B_{j})|\] (6) \[B_{1}=B_{S};B_{L(O)}=B_{E};\] \[B_{i}\leftrightarrow B_{j}\lor B_{i}\updownarrow B_{j};\] \[i,j=\overline{1,L(O)}\}\]  
The requirements given for the determination of the best learning path are classified in two phases:  
* The requirements for the determination of the best \(BM\) are as follows:
* R1: the \(BM\) matrix contains the \(BS\) and \(BE\) learning blocks;
* R2: the \(BM\) matrix has the highest number of connections between the forming blocks;
* R3: the \(BM\) matrix has a generality index (\(GP\)) as close as a value given by the user (\(uGP\)), where the generality index is the ratio between the column index of the \(BE\) block in the determined \(BM\) and \(L(O)\). * The requirements for the determination of the best \(BLP\) are as follows:
* R4: the \(BLP\) path is the optimal path between the \(BS\) and \(BE\) learning blocks, where optimal may consist of the minimum or the maximum steps in the \(BM\) matrix, according to the user requirement;
* R5: the \(BLP\) path has the \"lowest\" block (i.e., lowest refers to the maximum index of the \(BM\) matrix lines where a block from \(BLP\) is found) as close as \(uGP\). In order to determine the best \(BM\), a genetic algorithm will be applied. Thus, the main genetic structures are determined as follows:  
* \(g\) is the gene of a genetic algorithm and codifies a given block in the \(BM\) bidimensional array: \[g_{i}=B_{i},i=\overline{1,nB}\] (7)
* \(C\) is a chromosome and codifies a \(BM\) bidimensional array, which can be structured as an unfolded unidimensional array of \(BM\): \[C_{i}=B_{i,j},i=\overline{1,nB},j=\overline{1,L(O)}\] (8)
* \(P\) is the parameter set of the genetic algorithm, a quadruple of variables which defines the set of the genetic algorithm parameters, \(P=(NP,NG,rm,rc)\), where \(NP\) is the initial population size, \(NG\) the number of generations, \(rm\) the mutation rate and \(rc\) the crossover rate, \(NP\), \(NG\in\mathbb{N};rm,rc\in[0,1]\). * \(f\): \(C\longrightarrow\mathbb{N}\) is the fitness function, defined as the maximum number of valid connections between the blocks within the chromosome, as follows: \[f(C_{Z})=f(B_{i,j})=\prod_{s=1}^{4}f_{s}\] (9) where \(f_{1}\colon C\longrightarrow\{0,1\}\), \(f_{1}(C_{z})=\left\{ \begin{array}{ll}1,B_{s}\wedge B_{E}\in(B_{i,j})&\text{ defines the R1 requirement;}\\ 0,B_{s}\lor B_{E}\
ot\in(B_{i,j})&\text{ defines the R2 requirements based on $B_{i}\leftrightarrow B_{j}$}\\ \text{relationships;}&\text{ based on $B_{i}\updownarrow B_{j}$ relationships;}\\ \text{and $f_{2}\colon C\longrightarrow[0,1],f_{2}(C_{z})=\frac{\sum|O_{R} \cap I_{i}|}{2\times nB}$ defines the R2 requirements based on $B_{i}\leftrightarrow B_{j}$}\\ \text{relationships;}&\text{ and $f_{3}\colon C\rightarrow[0,1],f_{3}(C_{z})=(\sum(kws_{k},kwn_{ l}))/(2\times nB)$ defines the R2 requirements based on $B_{i}\updownarrow B_{j}$ relationships;}\\ \text{based on $B_{i}\updownarrow B_{j}$ relationships;}\\ \text{and $f_{4}\colon C\rightarrow[0,1],f_{4}(C_{z})=\frac{1-|GP-uGP|}{uGP},GP= \frac{i_{B_{E}}}{L(O)}$ defines the R3 requirement.}\end{array} \right.\)  
The measure of the total value of the fitness function over the interval \([0,1]\) is ensured.