# Multiple-Valued Logic Modelling for Agents Controlled via Optical Networks
## 2 Methods
### The Structure of MVL Function  
Traditional design of models for robotic agents implies the formation of mathematical expressions intrinsically based on Boolean logic operations \(AND\), \(OR\), \(NOT\), but MVL logic calculus of Allen-Givone algebra (AGA) is based on more general operators \(Maximum\), \(Minimum\), and \(Literal\)[29]. The comparison of MVL operators with Boolean ones and other possible logic systems was carried out in [23; 30; 31]. AGA [29] is one of several known versions of MVL models that operates with discrete MVL functions \(y\ =\ f(x_{1},\ldots,x_{n})\), given for \(n\) input variables \(x_{1},\ldots,x_{n}\) and one output variable \(y\). Specifics of AGA are that instead of two truth levels {0,1} in Boolean logic, all its input variables \(x_{1},x_{2},\ \ldots,x_{n}\) and the output variable \(y\) can have \(k\) discrete truth levels: \(x_{1},\ x_{2},\ \ldots,x_{n}\,y\ \in\ L\ =\ \{0,1,\ldots,\ k-1\}\), i.e., they are natural numbers. In earlier designed MVL coding schemes [23; 30; 31] for 8-bit controllers, \(k\) was supposed to be 256, which was enough even for the description of secret coding procedures and communication messages. However, the further proposed MVL model of distributed ledger is to be based on definitions and algorithms of AGA [29] defined for functions with the larger number of truth levels \(k\). The complete set of non-Boolean operators [29]  
\[<0,\ 1,\ldots,\ k-1,\ X(a,b),\ *\,+\ > \tag{1}\]  
ensures the possibility to represent arbitrary function \(y\ =\ f(x_{1},\ldots,x_{n})\) as some combination of logic operators taken from the list given further:  
* \(0,\ 1,\ldots,\ k-1\) are constants;
* operator \(Minimum\ \big{(}x_{i},x_{j}\ \big{)}\) or \(MIN\) is marked by (\(*\)) and means the choice of the minimal one in the pair \(x_{i},x_{j}\ ;\)
* operator \(Maximum\ \big{(}x_{i},x_{j}\ \big{)}\) or \(MAX\) is marked by (\(+\)), it means the choice of the maximal value in the pair \(x_{i},x_{j}\ ;\)operator \(X(a,b)\) is called _Literal_ and is given by Equation (5): \[X(a,b)\ =\ \left\{ \begin{array}{cl}0,&\text{if }b<x<a\\ k-1,&\text{if }a\leq x\leq b\,\end{array} \right.\] (2) where for any \(X(a,b)\), always \(b\geq a\), and \(a,b\ \in\ L\ =\ \{0,1,\ldots,k-1\}\). Equation (2) demonstrates that operator Literal, in fact, resembles the discrete band filter with variable lower and upper limits. This expression is either equal to the maximal truth level \(k-1\) or \(0\), which simplifies the analysis of data. It was commented in [30] that the general structure of \(MIN\) and \(MAX\) operators dates back to basic definitions of the set \"lattice\" and its operators \"Infimum\" and \"Supremum\", which namely for the \"lattice\" were proved to be MAX and MIN. In fact, these binary operators \(MAX(\,x_{1},x_{2})\) and \(MIN(x_{1},x_{2})\) are the comparison of two logic values \(x_{1},x_{2}\), which can reproduce Boolean operators \(AND\), \(OR\) if written as appropriate rows into the MVL truth table. However, MVL operators do not possess some specific theorems of Boolean logic, providing its more universal properties. Thus, AGA is a more general but very poor set of tools for data procession, which mainly provides calculation of arbitrarily given MVL functions and their minimization (i.e., simplification), described in detail in [30]. For example, traditional arithmetic operations are not defined in AGA, and they can be reproduced in AGA only by the specially given MVL functions with appropriate truth tables. At the same time, AGA calculus [29] provides primitive logic calculations, whose result is predictable only for a specific numerical data set and does not give appropriate tools for design of trapdoors and schemes to break cryptographic one-way functions and hash ones. Equivalent representations of MVL functions include truth table, logic expression, and matrix form [29].