  
  [1X4 [33X[0;0YNetworks of Threshold Elements[133X[101X
  
  [33X[0;0YNot  all  Boolean  functions  can be realized by a single threshold element.
  However, all of them can be realized by a multi-layered network of threshold
  elements,  with  a  number  of  threshold  elements  on  a  first  layer and
  conjunction  or  a  disjunction on the second layer. In this chapter we will
  decribe some functions regarding such networks.[133X
  
  
  [1X4.1 [33X[0;0YBasic Operations[133X[101X
  
  [33X[0;0YIn  this  section we describe some operations, similar to the ones described
  in Section [14X3.1[114X.[133X
  
  [1X4.1-1 NeuralNetwork[101X
  
  [33X[1;0Y[29X[2XNeuralNetwork[102X( [3XInnerLayer[103X, [3XOuterLayer[103X ) [32X function[133X
  
  [33X[0;0YFor  the  list  of  threshold  elements  [10XInnerLayer[110X and the Boolean variable
  [10XOuterLayer[110X,   which  can  be  either  [10Xtrue[110X  (for  disjunction),  [10Xfalse[110X  (for
  conjunction),   or   [10Xfail[110X   (if  there  is  only  one  layer)  the  function
  [10XNeuralNetwork[110X returns a neural network built from this inputs.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X
[128X[104X
    [4X[25Xgap>[125X [27Xte1:=ThresholdElement([1,1],1);
[127X[104X
    [4X[28X< threshold element with weight vector [ 1, 1 ] and threshold 1 >
[128X[104X
    [4X[25Xgap>[125X [27Xte2:=ThresholdElement([-1,-2],-2);
[127X[104X
    [4X[28X< threshold element with weight vector [ -1, -2 ] and threshold -2 >
[128X[104X
    [4X[25Xgap>[125X [27Xinner:=[te1,te2];
[127X[104X
    [4X[28X[ < threshold element with weight vector [ 1, 1 ] and threshold 1 >,
[128X[104X
    [4X[28X  < threshold element with weight vector [ -1, -2 ] and threshold -2 > ]
[128X[104X
    [4X[25Xgap>[125X [27Xnn:=NeuralNetwork(inner,false);
[127X[104X
    [4X[28X< neural network with
[128X[104X
    [4X[28X2 threshold elements on inner layer and conjunction on outer level >
[128X[104X
    [4X[25Xgap>[125X [27XDisplay(last);
[127X[104X
    [4X[28XInner Layer:
[128X[104X
    [4X[28X[ [[ 1, 1 ], 1], [[ -1, -2 ], -2] ]
[128X[104X
    [4X[28XOuter Layer: conjunction
[128X[104X
    [4X[28XNeural Network realizes the function f :
[128X[104X
    [4X[28XBoolean function of 2 variables.
[128X[104X
    [4X[28X[ 0, 0 ] || 0
[128X[104X
    [4X[28X[ 0, 1 ] || 1
[128X[104X
    [4X[28X[ 1, 0 ] || 1
[128X[104X
    [4X[28X[ 1, 1 ] || 0
[128X[104X
    [4X[28XSum of Products:[ 1, 2 ]
[128X[104X
    [4X[28X
[128X[104X
  [4X[32X[104X
  
  [1X4.1-2 IsNeuralNetwork[101X
  
  [33X[1;0Y[29X[2XIsNeuralNetwork[102X( [3XObj[103X ) [32X function[133X
  
  [33X[0;0YFor  the  object  [10XObj[110X  the function [10XIsNeuralNetwork[110X returns [10Xtrue[110X if [10XObj[110X is a
  neural network (see [2XNeuralNetwork[102X ([14X4.1-1[114X)), and [10Xfalse[110X otherwise.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X
[128X[104X
    [4X[25Xgap>[125X [27X## Consider the neural network <C>nn</C> from the previous example.
[127X[104X
    [4X[25Xgap>[125X [27XIsNeuralNetwork(nn);
[127X[104X
    [4X[28Xtrue
[128X[104X
    [4X[28X
[128X[104X
  [4X[32X[104X
  
  [1X4.1-3 OutputOfNeuralNetwork[101X
  
  [33X[1;0Y[29X[2XOutputOfNeuralNetwork[102X( [3XNNetwork[103X ) [32X function[133X
  
  [33X[0;0YFor  the  neural network [10XNNetwork[110X the function [10XOutputOfNeuralNetwork[110X returns
  the Boolean function, realized by [10XNNetwork[110X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X
[128X[104X
    [4X[25Xgap>[125X [27Xf:=OutputOfNeuralNetwork(nn);
[127X[104X
    [4X[28X< Boolean function of 2 variables >
[128X[104X
    [4X[25Xgap>[125X [27XDisplay(last);
[127X[104X
    [4X[28XBoolean function of 2 variables.
[128X[104X
    [4X[28X[ 0, 0 ] || 0
[128X[104X
    [4X[28X[ 0, 1 ] || 1
[128X[104X
    [4X[28X[ 1, 0 ] || 1
[128X[104X
    [4X[28X[ 1, 1 ] || 0
[128X[104X
    [4X[28X
[128X[104X
  [4X[32X[104X
  
  
  [1X4.2 [33X[0;0YNetworks of Threshold Elements[133X[101X
  
  [33X[0;0YIn this section we consider the networks of threshold elements.[133X
  
  [1X4.2-1 BooleanFunctionByNeuralNetwork[101X
  
  [33X[1;0Y[29X[2XBooleanFunctionByNeuralNetwork[102X( [3XFunc[103X ) [32X function[133X
  
  [33X[0;0YFor  the  Boolean  function [10XFunc[110X the function [10XBooleanFunctionByNeuralNetwork[110X
  returns a two-layered neural network, which realizes [10XFunc[110X (see [2XNeuralNetwork[102X
  ([14X4.1-1[114X)).  The  realization  of  this  function  is  based  on the algorithm
  proposed in [GPR83].[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X
[128X[104X
    [4X[25Xgap>[125X [27Xx:=Indeterminate(GF(2),"x");;
[127X[104X
    [4X[25Xgap>[125X [27Xy:=Indeterminate(GF(2),"y");;
[127X[104X
    [4X[25Xgap>[125X [27Xz:=Indeterminate(GF(2),"z");;
[127X[104X
    [4X[25Xgap>[125X [27Xf:=PolynomialToBooleanFunction(x*y+z,3);
[127X[104X
    [4X[28X< Boolean function of 3 variables >
[128X[104X
    [4X[25Xgap>[125X [27Xnn:=BooleanFunctionByNeuralNetwork(f);
[127X[104X
    [4X[28X< neural network with
[128X[104X
    [4X[28X2 threshold elements on inner layer and disjunction on outer level >
[128X[104X
    [4X[25Xgap>[125X [27XDisplay(last);
[127X[104X
    [4X[28XInner Layer:
[128X[104X
    [4X[28X[ [[ -1, -2, 4 ], 2], [[ 1, 2, -3 ], 3] ]
[128X[104X
    [4X[28XOuter Layer: disjunction
[128X[104X
    [4X[28XNeural Network realizes the function f :
[128X[104X
    [4X[28XBoolean function of 3 variables.
[128X[104X
    [4X[28X[ 0, 0, 0 ] || 0
[128X[104X
    [4X[28X[ 0, 0, 1 ] || 1
[128X[104X
    [4X[28X[ 0, 1, 0 ] || 0
[128X[104X
    [4X[28X[ 0, 1, 1 ] || 1
[128X[104X
    [4X[28X[ 1, 0, 0 ] || 0
[128X[104X
    [4X[28X[ 1, 0, 1 ] || 1
[128X[104X
    [4X[28X[ 1, 1, 0 ] || 1
[128X[104X
    [4X[28X[ 1, 1, 1 ] || 0
[128X[104X
    [4X[28XSum of Products:[ 1, 3, 5, 6 ]
[128X[104X
    [4X[28X
[128X[104X
  [4X[32X[104X
  
  [1X4.2-2 BooleanFunctionByNeuralNetworkDASG[101X
  
  [33X[1;0Y[29X[2XBooleanFunctionByNeuralNetworkDASG[102X( [3XFunc[103X ) [32X function[133X
  
  [33X[0;0YFor       the       Boolean       function       [10XFunc[110X      the      function
  [10XBooleanFunctionByNeuralNetworkDASG[110X  returns  a  two-layered  neural  network
  which  realizes  [10XFunc[110X  (see  [2XNeuralNetwork[102X ([14X4.1-1[114X)). The realization of this
  function  is  based on decomposition of [10XFunc[110X by the non-unate variables with
  the  biggest  influence.  The DASG algorithm (DASG - Decomposition Algorithm
  for  Synthesis and Generalization) was proposed in [SJF08], however we use a
  slightly modified version of this algorithm.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X
[128X[104X
    [4X[25Xgap>[125X [27Xf:=LogicFunction(3,2,[0,0,0,0,0,1,1,0]);
[127X[104X
    [4X[28X< Boolean function of 3 variables >
[128X[104X
    [4X[25Xgap>[125X [27Xnn:=BooleanFunctionByNeuralNetworkDASG(f);
[127X[104X
    [4X[28X< neural network with 2 threshold elements on inner layer and conjunction on outer level >
[128X[104X
    [4X[25Xgap>[125X [27XDisplay(last);
[127X[104X
    [4X[28XInner Layer:
[128X[104X
    [4X[28X[ [[ 1, 4, 2 ], 3], [[ 1, -4, -2 ], -3] ]
[128X[104X
    [4X[28XOuter Layer: conjunction
[128X[104X
    [4X[28XNeural Network realizes the function f :
[128X[104X
    [4X[28XBoolean function of 3 variables.
[128X[104X
    [4X[28X[ 0, 0, 0 ] || 0
[128X[104X
    [4X[28X[ 0, 0, 1 ] || 0
[128X[104X
    [4X[28X[ 0, 1, 0 ] || 0
[128X[104X
    [4X[28X[ 0, 1, 1 ] || 0
[128X[104X
    [4X[28X[ 1, 0, 0 ] || 0
[128X[104X
    [4X[28X[ 1, 0, 1 ] || 1
[128X[104X
    [4X[28X[ 1, 1, 0 ] || 1
[128X[104X
    [4X[28X[ 1, 1, 1 ] || 0
[128X[104X
    [4X[28XSum of Products:[ 5, 6 ]
[128X[104X
    [4X[28X
[128X[104X
  [4X[32X[104X
  
