Mat_Logika_Algebra_i_ischislenie_vyskazyvany
.pdf71
Вариант N-20
> f20:=(x,y,z)->ifthen(ifthen(equiva(x,y),z),ifthen(not
x, z) or not y); |
|
fDNF:=(x,y,z)-> x or not y or |
z; |
fKNF:=(x,y,z)-> x or not y or |
z; |
GetLog(f20); |
|
f20 := ( x, y, z ) → ifthen( ifthen( equiva( x, y ), z ), ifthen( not fDNF := ( x, y, z ) → x or not fKNF := ( x, y, z ) → x or not
x, z ) or not y ) y or z
y or z
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 |
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 |
72
Вариант N-21
> f21:=(a,b,c)->ifthen(a and equiva(b,not c), ifthen(b
and a, c));
fDNF:=(x,y,z)-> not y or |
z; |
|
|||
fKNF:=(x,y,z)-> not y or |
z; |
|
|||
GetLog(f21); |
|
|
|
|
|
f21 := ( a, b, c ) → ifthen( a and equiva( b, not c ), ifthen( b and a, c ) ) |
|
||||
|
|
fDNF := ( x, y, z ) → not y or z |
|
||
|
|
fKNF := ( x, y, z ) → not y or z |
|
||
x |
y |
z |
f |
ДНФ |
КНФ |
===== |
===== |
===== |
===== |
======= |
======= |
false |
false |
false |
true |
ДНФ -> true |
КНФ -> true |
false |
false |
true |
true |
ДНФ -> true |
КНФ -> true |
false |
true |
false |
true |
ДНФ -> false |
КНФ -> false |
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 |
true |
ДНФ -> true |
КНФ -> true |
"ДНФ неверная" "КНФ неверная"
73
Вариант N-22
> f22:=(x,y,z)->ifthen( ifthen(x , y and not z),equiva(x
, z));
fKNF:=(x,y,z)-> (not x or not y or z) and (x or not z);
GetLog(f22);
f22 := ( x, y, z ) → ifthen( ifthen( x, y and |
not z ), equiva( x, z ) ) |
|
||||
fKNF := ( x, y, z ) → ( not ( x and y ) or |
z ) and ( x or not z ) |
|
||||
x |
y |
z |
f |
ДНФ |
КНФ |
|
===== |
===== |
===== |
===== |
======= |
======= |
|
false |
false |
false |
true |
ДНФ -> DNF? |
КНФ -> true |
|
false |
false |
true |
false |
ДНФ -> DNF? |
КНФ -> false |
|
false |
true |
false |
true |
ДНФ -> DNF? |
КНФ -> true |
|
false |
true |
true |
false |
ДНФ -> DNF? |
КНФ -> false |
|
true |
false |
false |
true |
ДНФ -> DNF? |
КНФ -> true |
|
true |
false |
true |
true |
ДНФ -> DNF? |
КНФ -> true |
|
true |
true |
false |
false |
ДНФ -> DNF? |
КНФ -> false |
|
true |
true |
true |
true |
ДНФ -> DNF? |
КНФ -> true |
"ДНФ неверная"
74
Вариант N-23
> f23:=(x,y,z)->ifthen( x and ifthen(y,not z), ifthen(y,
x) and z);
fDNF:=(x,y,z)-> not x or |
z; |
|
|||
fKNF:=(x,y,z)-> not x or |
z; |
|
|||
GetLog(f23); |
|
|
|
|
|
f23 := ( x, y, z ) → ifthen( x and ifthen( y, not z ), ifthen( y, x ) and z ) |
|
||||
|
|
fDNF := ( x, y, z ) → not x or z |
|
||
|
|
fKNF := ( x, y, z ) → not x or 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 |
true |
ДНФ -> true |
КНФ -> true |
true |
false |
false |
false |
ДНФ -> false |
КНФ -> false |
true |
false |
true |
true |
ДНФ -> true |
КНФ -> true |
true |
true |
false |
false |
ДНФ -> false |
КНФ -> false |
true |
true |
true |
true |
ДНФ -> true |
КНФ -> true |
75
Вариант N-24
> f24:=(x,y,z)->ifthen( ifthen(x and y, y),ifthen(not y,
z) or not x);
fDNF:=(x,y,z)->not x or y or |
z; |
|
|
|||
fKNF:=(x,y,z)->not x or y or |
z; |
|
|
|||
GetLog(f24); |
|
|
|
|
|
|
f24 := ( x, y, z ) → ifthen( ifthen( x and y, y ), ifthen( not y, z ) or not |
x ) |
|||||
|
|
fDNF := ( x, y, z ) → not |
x or y or z |
|
||
|
|
fKNF := ( x, y, z ) → not |
x or y or 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 |
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 |
76
Вариант N-25
> f25:=(a,b,c)->ifthen(
ifthen(a , not ifthen(b, c)),ifthen(ifthen(not a,b),ifthen(a, c)));
fDNF:=(x,y,z)-> not x or not y or z; fKNF:=(x,y,z)-> not x or z; GetLog(f25);
f25 := ( a, b, c ) →
ifthen( ifthen( a, not ifthen( b, c ) ), ifthen( ifthen( not a, b), ifthen( a, c ) ) )
|
|
fDNF := ( x, y, z ) → not ( x and y ) or z |
|
||
|
|
fKNF := ( x, y, z ) → not x or 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 |
true |
ДНФ -> true |
КНФ -> true |
true |
false |
false |
true |
ДНФ -> true |
КНФ -> false |
true |
false |
true |
true |
ДНФ -> true |
КНФ -> true |
true |
true |
false |
false |
ДНФ -> false |
КНФ -> false |
true |
true |
true |
true |
ДНФ -> true |
КНФ -> true |
"КНФ неверная"
77
Вариант N-26
> f26:=(a,b,c)->ifthen( a and ifthen(c,b),ifthen(not b
or c, a and c));
fDNF:=(x,y,z)-> not x or (not y and z) or (y and not z)
or (x and z) ;
fKNF:=(x,y,z)-> not x or y or z;
GetLog(f26);
f26 := ( a, b, c ) → ifthen( a and ifthen( c, b), ifthen( not b or c, a and |
c ) ) |
||||
fDNF := ( x, y, z ) → not x or not y and z or y and not z or x and z |
|
||||
|
|
fKNF := ( x, y, z ) → not x or y or 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 |
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 |
78
Вариант N-27
> f27:=(a,b,c)->(ifthen(a or not b,(not a and not b) or
ifthen(a, c))) and not c;
fDNF:=(x,y,z)-> not x and not z;
fKNF:=(x,y,z)-> not x and not z;
GetLog(f27);
f27 := ( a, b, c ) → ifthen( a or not b, not ( a or b) or ifthen( a, c ) ) and |
not c |
||||
|
|
fDNF := ( x, y, z ) → not ( x or z ) |
|
||
|
|
fKNF := ( x, y, z ) → not ( x or 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 |
false |
ДНФ -> false |
КНФ -> false |
true |
false |
false |
false |
ДНФ -> false |
КНФ -> false |
true |
false |
true |
false |
ДНФ -> false |
КНФ -> false |
true |
true |
false |
false |
ДНФ -> false |
КНФ -> false |
true |
true |
true |
false |
ДНФ -> false |
КНФ -> false |
79
Вариант N-28
> f28:=(a,b,c)->ifthen(ifthen( a or b, not c),ifthen(a or c, b or not c));
fDNF:=(x,y,z)-> x or y or not z; fKNF:=(x,y,z)-> x or y or not z; GetLog(f28);
f28 := ( a, b, c ) → ifthen( ifthen( a or b, not |
c ), ifthen( a or |
c, b or not c ) ) |
||||
|
|
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 |
80
Вариант N-29
> f29:=(x,y,z)->(ifthen(x or y,ifthen(x, y) or (x and
z))) and z;
fDNF:=(x,y,z)-> z;
fKNF:=(x,y,z)-> z;
GetLog(f29);
f29 := ( x, y, z ) → ifthen( x or y, ifthen( x, y ) or x and z ) and z |
|
||||
|
|
|
fDNF := ( x, y, z ) → z |
|
|
|
|
|
fKNF := ( x, y, z ) → z |
|
|
x |
y |
z |
f |
ДНФ |
КНФ |
===== |
===== |
===== |
===== |
======= |
======= |
false |
false |
false |
false |
ДНФ -> false |
КНФ -> false |
false |
false |
true |
true |
ДНФ -> true |
КНФ -> true |
false |
true |
false |
false |
ДНФ -> false |
КНФ -> false |
false |
true |
true |
true |
ДНФ -> true |
КНФ -> true |
true |
false |
false |
false |
ДНФ -> false |
КНФ -> false |
true |
false |
true |
true |
ДНФ -> true |
КНФ -> true |
true |
true |
false |
false |
ДНФ -> false |
КНФ -> false |
true |
true |
true |
true |
ДНФ -> true |
КНФ -> true |