Mat_Logika_Algebra_i_ischislenie_vyskazyvany
.pdf81
Вариант N-30
> f30:=(a,b,c)->ifthen(ifthen( b and
c,a),ifthen(ifthen(not a, c), b));
fDNF:=(x,y,z)-> not x and not z or y;
GetLog(f30);
f30 := ( a, b, c ) → ifthen( ifthen( b and c, a ), ifthen( ifthen( not a, c ), b) )
|
|
fDNF := ( x, y, z ) → not ( x or z ) or y |
|
||
x |
y |
z |
f |
ДНФ |
КНФ |
===== |
===== |
===== |
===== |
======= |
======= |
false |
false |
false |
true |
ДНФ -> true |
КНФ -> KNF? |
false |
false |
true |
false |
ДНФ -> false |
КНФ -> KNF? |
false |
true |
false |
true |
ДНФ -> true |
КНФ -> KNF? |
false |
true |
true |
true |
ДНФ -> true |
КНФ -> KNF? |
true |
false |
false |
false |
ДНФ -> false |
КНФ -> KNF? |
true |
false |
true |
false |
ДНФ -> false |
КНФ -> KNF? |
true |
true |
false |
true |
ДНФ -> true |
КНФ -> KNF? |
true |
true |
true |
true |
ДНФ -> true |
КНФ -> KNF? |
"КНФ неверная"
82
Вариант N-31
> f31:=(x,y,z)->ifthen( ifthen(x, x and not y), ift-
hen(ifthen(x, z) and not y,y));
fDNF:=(x,y,z)-> x and not z or y;
GetLog(f31);
f31 := ( x, y, z ) → ifthen( ifthen( x, x and not y ), ifthen( ifthen( x, z ) and |
not y, y ) ) |
||||
|
|
fDNF := ( x, y, z ) → x and not z or y |
|
||
x |
y |
z |
f |
ДНФ |
КНФ |
===== |
===== |
===== |
===== |
======= |
======= |
false |
false |
false |
false |
ДНФ -> false |
КНФ -> KNF? |
false |
false |
true |
false |
ДНФ -> false |
КНФ -> KNF? |
false |
true |
false |
true |
ДНФ -> true |
КНФ -> KNF? |
false |
true |
true |
true |
ДНФ -> true |
КНФ -> KNF? |
true |
false |
false |
true |
ДНФ -> true |
КНФ -> KNF? |
true |
false |
true |
false |
ДНФ -> false |
КНФ -> KNF? |
true |
true |
false |
true |
ДНФ -> true |
КНФ -> KNF? |
true |
true |
true |
true |
ДНФ -> true |
КНФ -> KNF? |
"КНФ неверная"
83
Вариант N-32
> f32:=(x,y,z)->ifthen( equiva(ifthen(x, y), not y),
ifthen(x, z) or y);
fDNF:=(x,y,z)-> x and y or not x or z or y ;
GetLog(f32);
f32 := ( x, y, z ) → ifthen( equiva( ifthen( x, y ), not y ), ifthen( x, z ) or y ) fDNF := ( x, y, z ) → x and y or not x or z or y
x |
y |
z |
f |
===== |
===== |
===== |
===== |
false |
false |
false |
true |
false |
false |
true |
true |
false |
true |
false |
true |
false |
true |
true |
true |
true |
false |
false |
true |
true |
false |
true |
true |
true |
true |
false |
true |
true |
true |
true |
true |
ДНФ
=======
ДНФ -> true ДНФ -> true ДНФ -> true ДНФ -> true ДНФ -> false ДНФ -> true ДНФ -> true ДНФ -> true
КНФ
=======
КНФ -> KNF? КНФ -> KNF? КНФ -> KNF? КНФ -> KNF? КНФ -> KNF? КНФ -> KNF? КНФ -> KNF? КНФ -> KNF?
"ДНФ неверная"
"КНФ неверная"
84
Вариант N-33
> f33:=(x,y,z)->ifthen( equiva(x, y ),ifthen( y, not x
and z));
fDNF:=(x,y,z)-> not x and y or not y or not x and z ;
fKNF:=(x,y,z)-> not x or not y ;
GetLog(f33);
f33 := ( x, y, z ) → ifthen( equiva( x, y ), ifthen( y, |
not x and z ) ) |
|
|||
fDNF := ( x, y, z ) → not x and y or not y or |
not x and z |
|
|||
|
|
fKNF := ( x, y, z ) → not ( x and y ) |
|
||
x |
y |
z |
f |
ДНФ |
КНФ |
===== |
===== |
===== |
===== |
======= |
======= |
false |
false |
false |
true |
ДНФ -> true |
КНФ -> true |
false |
false |
true |
true |
ДНФ -> true |
КНФ -> true |
false |
true |
false |
true |
ДНФ -> true |
КНФ -> true |
false |
true |
true |
true |
ДНФ -> true |
КНФ -> true |
true |
false |
false |
true |
ДНФ -> true |
КНФ -> true |
true |
false |
true |
true |
ДНФ -> true |
КНФ -> true |
true |
true |
false |
false |
ДНФ -> false |
КНФ -> false |
true |
true |
true |
false |
ДНФ -> false |
КНФ -> false |
85
Вариант N-34
> f34:=(x,y,z)->ifthen( equiva(not x, ifthen(not y,not
z)),ifthen(x or y, x and z)); |
|
|
|||||
fDNF:=(x,y,z)-> |
x or |
z and not y or not y and not x or |
|||||
x and z ; |
|
|
|
|
|
|
|
fKNF:=(x,y,z)-> |
x or not y ; |
|
|
||||
GetLog(f34); |
|
|
|
|
|
|
|
f34 := ( x, y, z ) → ifthen( equiva( not x, ifthen( not y, not z ) ), ifthen( x or y, x and z ) ) |
|||||||
fDNF := ( x, y, z ) → x or |
z and not y or not |
( y or x ) or |
x and z |
|
|||
|
|
|
fKNF := ( x, y, z ) → x or |
not y |
|
||
x |
y |
|
z |
f |
ДНФ |
КНФ |
|
===== |
===== |
===== |
===== |
======= |
======= |
||
false |
false |
false |
true |
ДНФ -> true |
КНФ -> true |
||
false |
false |
true |
true |
ДНФ -> true |
КНФ -> true |
||
false |
true |
false |
false |
ДНФ -> false |
КНФ -> false |
||
false |
true |
true |
false |
ДНФ -> false |
КНФ -> false |
||
true |
false |
false |
true |
ДНФ -> true |
КНФ -> true |
||
true |
false |
true |
true |
ДНФ -> true |
КНФ -> true |
||
true |
true |
false |
true |
ДНФ -> true |
КНФ -> true |
||
true |
true |
true |
true |
ДНФ -> true |
КНФ -> true |
86
Вариант N-35
> f35:=(x,y,z)->ifthen(ifthen( x, y),equiva(( x and y),
ifthen(not x,y)) and z);
fDNF:=(x,y,z)-> x and not y or x and y and z or not x
and not y and z; GetLog(f35);
f35 := ( x, y, z ) → ifthen( ifthen( x, y ), equiva( x and y, ifthen( not x, y ) ) and z ) fDNF := ( x, y, z ) → x and not y or x and y and z or not ( x or y ) and z
x |
y |
z |
f |
ДНФ |
КНФ |
===== |
===== |
===== |
===== |
======= |
======= |
false |
false |
false |
false |
ДНФ -> false |
КНФ -> KNF? |
false |
false |
true |
true |
ДНФ -> true |
КНФ -> KNF? |
false |
true |
false |
false |
ДНФ -> false |
КНФ -> KNF? |
false |
true |
true |
false |
ДНФ -> false |
КНФ -> KNF? |
true |
false |
false |
true |
ДНФ -> true |
КНФ -> KNF? |
true |
false |
true |
true |
ДНФ -> true |
КНФ -> KNF? |
true |
true |
false |
false |
ДНФ -> false |
КНФ -> KNF? |
true |
true |
true |
true |
ДНФ -> true |
КНФ -> KNF? |
"КНФ неверная"
|
|
|
|
|
87 |
|
|
|
|
|
|
|
Вариант N-36 |
|
|
|
|
> f36:=(x,y,z)->ifthen(ifthen(equiva(not x, not y), |
||||||||
z),ifthen(x or z, y or z)); |
|
|
|
|
||||
fDNF:=(x,y,z)-> |
y or z or not x; |
|
|
|
||||
fKNF:=(x,y,z)-> |
y or z or not x; |
|
|
|
||||
GetLog(f36); |
|
|
|
|
|
|
|
|
f36 := ( x, y, z ) → ifthen( ifthen( equiva( not x, |
not y ), z ), ifthen( x or z, y or z ) ) |
|||||||
|
|
|
fDNF := ( x, y, z ) → y or z or |
not |
x |
|
||
|
|
|
fKNF := ( x, y, z ) → y or z or |
not |
x |
|
||
x |
y |
|
z |
f |
ДНФ |
|
|
КНФ |
===== |
===== |
===== |
===== |
======= |
|
======= |
||
false |
false |
false |
true |
ДНФ -> true |
КНФ -> true |
|||
false |
false |
true |
true |
ДНФ -> true |
КНФ -> true |
|||
false |
true |
false |
true |
ДНФ -> true |
КНФ -> true |
|||
false |
true |
true |
true |
ДНФ -> true |
КНФ -> true |
|||
true |
false |
false |
false |
ДНФ -> false |
КНФ -> false |
|||
true |
false |
true |
true |
ДНФ -> true |
КНФ -> true |
|||
true |
true |
false |
true |
ДНФ -> true |
КНФ -> true |
|||
true |
true |
true |
true |
ДНФ -> true |
КНФ -> true |
88
Вариант N-37
> f37:=(x,y,z)->ifthen(equiva(x, y or not z),ifthen(not y, x) or x and z);
fDNF:=(x,y,z)-> x or y or not z; fKNF:=(x,y,z)-> x or y or not z; GetLog(f37);
f37 := ( x, y, z ) → ifthen( equiva( x, y or not |
z ), ifthen( not |
y, x ) or x and z ) |
||||
|
|
fDNF := ( x, y, z ) → x or y or |
not z |
|
||
|
|
fKNF := ( x, y, z ) → x or y or |
not z |
|
||
x |
y |
z |
f |
ДНФ |
|
КНФ |
===== |
===== |
===== |
===== |
======= |
======= |
|
false |
false |
false |
true |
ДНФ -> true |
КНФ -> true |
|
false |
false |
true |
false |
ДНФ -> false |
КНФ -> false |
|
false |
true |
false |
true |
ДНФ -> true |
КНФ -> true |
|
false |
true |
true |
true |
ДНФ -> true |
КНФ -> true |
|
true |
false |
false |
true |
ДНФ -> true |
КНФ -> true |
|
true |
false |
true |
true |
ДНФ -> true |
КНФ -> true |
|
true |
true |
false |
true |
ДНФ -> true |
КНФ -> true |
|
true |
true |
true |
true |
ДНФ -> true |
КНФ -> true |
89
Вариант N-38
> f38:=(x,y,z)->ifthen(equiva(not x, y),ifthen(ifthen(x, y and z), not z));
fDNF:=(x,y,z)-> x or not y or not z; fKNF:=(x,y,z)-> x or not y or not z; GetLog(f38);
f38 := ( x, y, z ) → ifthen( equiva( not x, y ), ifthen( ifthen( x, y and z ), not z ) ) fDNF := ( x, y, z ) → x or not y or not z
fKNF := ( x, y, z ) → x or not y or not z
x |
y |
z |
f |
ДНФ |
КНФ |
===== |
===== |
===== |
===== |
======= |
======= |
false |
false |
false |
true |
ДНФ -> true |
КНФ -> true |
false |
false |
true |
true |
ДНФ -> true |
КНФ -> true |
false |
true |
false |
true |
ДНФ -> true |
КНФ -> true |
false |
true |
true |
false |
ДНФ -> false |
КНФ -> false |
true |
false |
false |
true |
ДНФ -> true |
КНФ -> true |
true |
false |
true |
true |
ДНФ -> true |
КНФ -> true |
true |
true |
false |
true |
ДНФ -> true |
КНФ -> true |
true |
true |
true |
true |
ДНФ -> true |
КНФ -> true |
90
Вариант N-39
> f39:=(x,y,z)->ifthen(equiva(not x, not y or not
z),ifthen(y, z));
GetLog(f39);
f39 := ( x, y, z ) → ifthen( equiva( not x, not ( y and z ) ), ifthen( y, z ) )
x |
y |
z |
f |
===== |
===== |
===== |
===== |
false |
false |
false |
true |
false |
false |
true |
true |
false |
true |
false |
false |
false |
true |
true |
true |
true |
false |
false |
true |
true |
false |
true |
true |
true |
true |
false |
true |
true |
true |
true |
true |
ДНФ
=======
ДНФ -> DNF? ДНФ -> DNF? ДНФ -> DNF? ДНФ -> DNF? ДНФ -> DNF? ДНФ -> DNF? ДНФ -> DNF? ДНФ -> DNF?
КНФ
=======
КНФ -> KNF? КНФ -> KNF? КНФ -> KNF? КНФ -> KNF? КНФ -> KNF? КНФ -> KNF? КНФ -> KNF? КНФ -> KNF?
"ДНФ неверная"
"КНФ неверная"