Академический Документы
Профессиональный Документы
Культура Документы
Function
x1
n 1
f
1
x n 1
X0 X1 Xk Xn-1
F(X)
Adding Amplifier.
r r0 r1 rk rn-1
2
k
U in U ou t
Let
Example:
The logic function satisfying this condition is represented by f = x0 x1 x2 . Let n = 2. In this case, when 0 = 1 = 1 and = 0.5 When 0 = 1 = 1, When
f = x0 x1 ;
= 0.5, then f = x0 x1 .
3
0 = 1 = 1,
Example: There are 16 functions of two variables, Among them, only two functions are not threshold functions: x1 x 2 and x1 x2 All other functions are threshold functions. Example: All the monotone increasing function with up to three variables are threshold functions. However, the four-variable function x 1 x 2 x 3 x 4 is not a threshold function.
Set of all functions Monotonic Isotonic Threshold Self-dual Majority
f7 f6
f1
f2
f3 f8 f9
f4
f5
xi
, and if i 0
Proof (isotonic) : Assume that i 0 and the function is not isotonic in xi . Then there is at least one combination of x0 ,...xi 1 , xi +1 ,...xn 1 where 1 = f ( x0 ,...0, xn 1 ) > f ( x0 ,...1, xn 1 ) = 0 Therefore 0 x0 + ... + 0 + ... + n 1 xn 1 and 0 x0 + ... + i + ... + n 1 xn 1 < since i 0 we get a contradiction.
6
Properties of threshold functions (cont) Theorem: A threshold function is monotonic in respect of all its variables.
All threshold functions are monotonic, but opposite is not true - not any monotonic function is a threshold function.
Example: function
| i |=| i | and = f ( , ) .
min( j + );
j =0
n 1
j =0
n 1
x j 0 x j < 0
X T ; X F ;
j =0
n 1
This task is called the standard task of linear programming. If a solution of this task exists, then for xj ={0,1} it exists in integer numbers. If a solution doesnt exist, this Boolean function is not a threshold function.
9
10
f ( x) = 1. and
if Mi = M j
xi = 1
if
Mi > M j
then i = j .
Mi B A
Proof: Assume that i j and M i > M j Let A = ( x1 , x2 ,..xi 1 , 0, xi +1.., x j 1 ,1, x j +1 ,...xn 1 ) and B= ( x1 , x2 ,..xi 1 ,1, xi +1.., x j 1 , 0, x j +1 ,...xn 1 )
11
Synthesis of isotonic threshold functions-cont Example: M0=7 M1=8 M2=6 M3=6 M1>M0>M2=M3
x3x2 x1x0 00 01 11 10 1 1 1 1 1 1 1 1 1 1 1 00 01 11 10 x3x2 x1x0 00 00
1
01
2
11
1
10
0 2 5 3
1 3 6 4
2 4 7 5
1 3 6 4
2 5 3
01 11 10
base point
f ( x0 , x1 , x2 , x3 ) = 2 x0 + 3 x1 + 1x2 + 1x3 3
12
x2
x3
x x5 4
13
2
000 00 001
1
010
2
110
4
111 4
3
101
1
100
x1
x x2 3
4 7 3
01 11 10
x x5 4
M 1 = 12, M 2 = 11, M 3 = 11, M 4 = 16, M 5 = 13 4 > 5 > 1 > 2 = 3 4 > 3 > 2 >1 =1 5 > 3 > 2 >1 =1 = 5 4 = 5, 5 = 3, 1 = 2, 2 = 1, 3 = 1 = 5 (3 + 1)
x = 1 x
14
x1 + x2 1 = 0; D (Y , L) =
0 y0 + 1 y1 02 + 12
=
y0 + y1 1 ; 2
D (0, L) =
02 + 12
1 ; 2
15
y0
X0
For 3-dimentions:
X2 1
0 x0 + 1 x1 + 2 x2 = 0
- equation of a plane.
Y D(Y,P)
1 X0 X1 1
x0 + x1 + x2 1 = 0; D (Y , P ) =
0 y0 + 1 y1 + 2 y2
2 02 + 12 + 2
y0 + y1 + y2 1 ; 3
16
n 1
- equation of a hyper-
D(Y , P n ) =
j =0
j y j
n 1
;
2
j =0
n 1
As
2 j j =0
> 0, then
Sign{D(Y, P )} = Sign( j y j )
n j =0
n 1
and the value of the threshold function in the point Y (cube vertex) is determined by the sign of the distance from this point to the hyper-plane determined by the weights of the variables and by the threshold.
17
At all the cube vertices located above or within the hyper-plane, the value of threshold function is equal to 1. At all the cube vertices located below the hyper-plane, the value of threshold function is equal to 0.
20
21
22
Since a threshold function is monotonous, it is represented by a star of basic elements. Basic sets T0 and F0 of threshold function are the sets of vertexes, which are maximal diagonal vertices in the basic elements that form stars for the function itself and for its negation. 6 4 Example: 5 7 Star top is 15 vertex. 12 0 2 T = {3,6,7,10,11,13,14,15} T0={3,6,10,13} Star top of negation function is 0 1 15 13 3 vertex. 8 F = {0,1,4,2,5,8,9,12} F0={2,5,9,12} 9 11
14
10
( x0 , x1, x2 , x3 ) = x0 x1 + x1 x2 + x1 x3 + x0 x2 x3 = = Sign ( x0 + 2 x1 + x2 + x3 3)
When synthesizing a threshold element, it is sufficient to solve the linear programming task only for the basic sets because, if the inequalities are true for the supporting sets, they are certainly true for all the remaining vertexes.
23
f ( x1,, x5 ) = x1 x3 + x1 x5 + x1 x2 x4 + x2 x3 x5
by a single threshold element
1. Define weight relations between variables x1 and x2:
f ( x1 = 1, x2 = 0, x3, x4 , x5 ) = x3 + x5 f ( x1 = 0, x2 = 1, x3, x4 , x5 ) = x3 x5
Since x3+ x5 x3x5, than x1>x2 2. Define weight relations between variables x2 and x3:
f ( x1, x2 , x3 = 1, x4 = 0, x5 ) = x1 + x2 x5
Since x1+x2x5 x1x5+x2x5 than x3>x4
f ( x1, x2 , x3 = 0, x4 = 1, x5 ) = x1x5 + x2 x5
25
f ( x1 = 0, x2 , x3 = 1, x4 , x5 ) = x2 x5
Since x5+x2x4 x2x5 than x1>x3
f ( x1 = 1, x2 , x3 = 0, x4 , x5 ) = x5 + x2 x4
f ( x1, x2 , x3 = 1, x4 , x5 = 0 ) = x1
f ( x1, x2 , x3 = 0, x4 , x5 = 1) = x1
Consequently: x3 ~ x5
26
f ( x1, x2 = 0, x3, x4 = 1, x5 ) = x1 x3 + x1 x5
Consequently: x2>x4 And: x1 > x3 ~ x5 > x2 > x4
f ( x1, x2 = 1, x3, x4 = 0, x5 ) = x1 x3 + x1 x5 + x3 x5
f ( x1 = 1, x2 , x3, x4 = 0, x5 = 0 ) = x3
f ( x1 = 0, x2 , x3, x4 = 1, x5 = 1) = x2 x3
Threshold is equal to 8
f ( x1,...., x5 ) = Sign(5 x1 + 2 x2 + 3 x3 + x4 + 4 x5 8)
27
X0 X1 Xk Xn-1
F(X)
Adding Amplifier.
r r0 r1 rk rn-1
28
k
U in U ou t
1. Logical synthesis of discrete devices (hardware) 2. Pattern recognition. Diagnostics (hardware and software). Example: Relying on a set of symptoms (results of analyses, temperature, cardiogram, etc. etc.) for each of the possible diseases a weighted sum is calculated and compared with threshold. 3. Neural networks. (hardware and software). Input weights and threshold are formed during learning. 4. Coding (hardware and software)
29
ones.
n=4 {1100, 1010, 1001, 0110, 0101, 0011} Hence, whether a combination belongs to the working set is determined by the n 1 n 1 condition:
n + 1 xj 1)) 2 j =0
Example 2: Bergers code (Code with code indicator): Bergers code consist of two parts which are the n-bits information part and (1+]log2n[)-bits code indicator, the value of which is equal of the number of zeros in the information part. n=3, k=2 {000.11, 100.01, 110.10, 111.00, ....} Whether a combination belongs to the working set is determined by the condition:
Sign(
n 1
k 1
n 1
k 1