Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Mat_Logika_Algebra_i_ischislenie_vyskazyvany

.pdf
Скачиваний:
216
Добавлен:
15.02.2015
Размер:
1.27 Mб
Скачать

61

Вариант N-10

> f10:=(a,b,c)->ifthen( a or not( b and c),ifthen(not a,

c) and b);

fDNF:=(x,y,z)-> x and y or y and z;

GetLog(f10);

f10 := ( a, b, c ) ifthen( a or not ( b and c ), ifthen( not a, c ) and b)

 

 

 

fDNF := ( x, y, z ) x and y or y and z

 

x

y

z

f

ДНФ

КНФ

=====

=====

=====

=====

=======

=======

false

false

false

false

ДНФ -> false

КНФ -> KNF?

false

false

true

false

ДНФ -> false

КНФ -> KNF?

false

true

false

false

ДНФ -> false

КНФ -> 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?

"КНФ неверная"

62

Вариант N-11

> f11:=(x,y,z)->ifthen( ifthen(x, x and y), ifthen(x, not z) and y);

fDNF:=(x,y,z)-> (not x and y) or (x and not y) or (y and not z) ;

fKNF:=(x,y,z)-> (not x or not y or not z) and (x or y); GetLog(f11);

f11 := ( x, y, z ) ifthen( ifthen( x, x and y ), ifthen( x, not z ) and y ) fDNF := ( x, y, z ) not x and y or x and not y or y and not z fKNF := ( x, y, z ) not ( x and y and z ) and ( x or y )

x

y

z

f

ДНФ

КНФ

=====

=====

=====

=====

=======

=======

false

false

false

false

ДНФ -> false

КНФ -> false

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

false

ДНФ -> false

КНФ -> false

63

Вариант N-12

> f12:=(x,y,z)->ifthen( ifthen(x, y) and not y, (z or

not x) and y);

fDNF:=(x,y,z)-> x or y ;

fKNF:=(x,y,z)-> (not x or z) and (x or y);

GetLog(f12);

f12 := ( x, y, z ) ifthen( ifthen( x, y ) and not y, ( z or not x ) and y )

 

 

 

fDNF := ( x, y, z ) x or y

 

 

 

fKNF := ( x, y, z ) ( not x or z ) and ( x or

y )

x

y

z

f

ДНФ

КНФ

=====

=====

=====

=====

=======

=======

false

false

false

false

ДНФ -> false

КНФ -> false

false

false

true

false

ДНФ -> false

КНФ -> false

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

true

ДНФ -> true

КНФ -> false

true

true

true

true

ДНФ -> true

КНФ -> true

"КНФ неверная"

64

Вариант N-13

> f13:=(x,y,z)->ifthen( ifthen(not x, y or not z),ifthen(ifthen( x,not y), ifthen( x,not z))); fDNF:=(x,y,z)-> not x or y or not z ; fKNF:=(x,y,z)-> not x or y or not z ; GetLog(f13);

f13 := ( x, y, z )

 

 

 

 

 

 

ifthen( ifthen( not x, y or not z ), ifthen( ifthen( x, not y ), ifthen( x,

not z ) ) )

 

 

fDNF := ( x, y, z ) not x or y or

not

z

 

 

 

fKNF := ( x, y, z ) not x or 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

true

ДНФ -> true

 

КНФ -> true

true

false

false

true

ДНФ -> true

 

КНФ -> true

true

false

true

false

ДНФ -> false

КНФ -> false

true

true

false

true

ДНФ -> true

 

КНФ -> true

true

true

true

true

ДНФ -> true

 

КНФ -> true

65

Вариант N-14

> f14:=(x,y,z)->ifthen( not x and ifthen(not y,not z),x

or y or x and z);

 

 

 

fDNF:=(x,y,z)->

x or

z or y ;

 

fKNF:=(x,y,z)->

x or

z or y ;

 

GetLog(f14);

 

 

 

 

 

f14 := ( x, y, z ) ifthen( not x and

ifthen( not y, not z ), x or y or x and z )

 

 

 

fDNF := ( x, y, z ) x or z or y

 

 

 

 

fKNF := ( x, y, z ) x or z or y

 

x

y

 

z

f

ДНФ

КНФ

=====

=====

=====

=====

=======

=======

false

false

false

false

ДНФ -> false

КНФ -> false

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

true

ДНФ -> true

КНФ -> true

true

true

true

true

ДНФ -> true

КНФ -> true

66

Вариант N-15

> f15:=(x,y,z)->ifthen(ifthen(not x, y),((not x and y) or ifthen(x,y)) and z);

fDNF:=(x,y,z)-> not x and not y or not x and z or y and z;

fKNF:=(x,y,z)-> (not x or z) and (y or not x) and (z or not y);

GetLog(f15);

f15 := ( x, y, z ) ifthen( ifthen( not

x, y ), ( not x and y or

ifthen( x, y ) ) and z )

fDNF := ( x, y, z ) not ( x or y ) or

not x and z or y and

z

 

fKNF := ( x, y, z ) ( not x or z ) and ( y or

not x ) and ( z 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

true

ДНФ ->

true

КНФ -> true

true

false

false

false

ДНФ ->

false

КНФ -> false

true

false

true

false

ДНФ ->

false

КНФ -> false

true

true

false

false

ДНФ ->

false

КНФ -> false

true

true

true

true

ДНФ ->

true

КНФ -> true

67

Вариант N-16

> f16:=(x,y,z)->ifthen((not x and not y) or z,equiva(x, y or z));

fDNF:=(x,y,z)-> not z and x or not z and y or z and x or y and x or not z and not y and not x;

fKNF:=(x,y,z)-> not z or

x;

 

 

GetLog(f16);

 

 

 

 

 

f16 := ( x, y, z ) ifthen( not ( x or

y ) or

z, equiva( x, y or z ) )

 

fDNF :=

 

 

 

 

 

 

( x, y, z ) not z and x or not z and y or z and x or y and x or

not ( z or y or x )

 

 

fKNF := ( x, y, z ) not z or x

 

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

true

ДНФ -> true

КНФ -> true

true

false

true

true

ДНФ -> true

КНФ -> true

true

true

false

true

ДНФ -> true

КНФ -> true

true

true

true

true

ДНФ -> true

КНФ -> true

68

Вариант N-17

> f17:=(x,y,z)->equiva(ifthen(x, y) and z,ifthen(y, z));

fDNF:=(x,y,z)-> (not x and z and not y) or y ;

GetLog(f17);

f17 := ( x, y, z ) equiva( ifthen( x, y ) and z, ifthen( y, z ) )

 

 

fDNF := ( x, y, z ) not x and z and not y or y

x

y

z

f

ДНФ

КНФ

=====

=====

=====

=====

=======

=======

false

false

false

false

ДНФ -> false

КНФ -> KNF?

false

false

true

true

ДНФ -> true

КНФ -> 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?

"КНФ неверная"

69

Вариант N-18

> f18:=(x,y,z)->equiva(ifthen(x and y, z) ,ifthen(not z,

y));

fDNF:=(x,y,z)-> z or not x and y;

GetLog(f18);

f18 := ( x, y, z ) equiva( ifthen( x and y, z ), ifthen( not z, y ) )

 

 

fDNF := ( x, y, z ) z or not x and y

 

x

y

z

f

ДНФ

КНФ

=====

=====

=====

=====

=======

=======

false

false

false

false

ДНФ -> false

КНФ -> KNF?

false

false

true

true

ДНФ -> true

КНФ -> KNF?

false

true

false

true

ДНФ -> true

КНФ -> KNF?

false

true

true

true

ДНФ -> true

КНФ -> KNF?

true

false

false

false

ДНФ -> false

КНФ -> KNF?

true

false

true

true

ДНФ -> true

КНФ -> KNF?

true

true

false

false

ДНФ -> false

КНФ -> KNF?

true

true

true

true

ДНФ -> true

КНФ -> KNF?

"КНФ неверная"

70

Вариант N-19

> f19:=(x,y,z)->equiva(ifthen(x, ifthen(y, z)) ,(x and

y) or z);

fDNF:=(x,y,z)-> z;

fKNF:=(x,y,z)-> z;

GetLog(f19);

f19 := ( x, y, z ) equiva( ifthen( x, ifthen( y, z ) ), x and y or 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

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]