Составление экспертной системы по анализу родственных связей выбранной группы людей (анализ генеалогического древа рода А.С.Пушкина), страница 2

X= abram_petrovic

X= lev_aleksandrovic

X= osip_abramovic

X= osip_abramovic

X= sergey_lvovic

X= sergey_lvovic

X= lev_sergeevic

X= lev_sergeevic

X= aleksandr_sergeevic

X= aleksandr_sergeevic

X= aleksandr_aleksandrovic

X= aleksandr_aleksandrovic

X= grigory_aleksandrovic

X= grigory_aleksandrovic

14 Solutions

women (X)

X= regina_fon_sheberg

X= natalja_nikolaevna

X= olga_vasiljevna

X= olga_sergeevna

X= maria_alekseevna

X= nadezhda_osipovna

X= nadezhda_osipovna

X= maria_aleksandrovna

X= maria_aleksandrovna

X= natalja_aleksandrovna

X= natalja_aleksandrovna

11 Solutions

suprug (X,aleksandr_sergeevic)

X= natalja_nikolaevna

X= natalja_nikolaevna

X= natalja_nikolaevna

X= natalja_nikolaevna

4 Solutions

dedushka (X,aleksandr_sergeevic)

X= lev_aleksandrovic

X= osip_abramovic

X= osip_abramovic

3 Solutions

babushka (X,aleksandr_sergeevic)

X= olga_vasiljevna

X= maria_alekseevna

2 Solutions

pradedushka (X,aleksandr_sergeevic)

X= abram_petrovic

X= abram_petrovic

2 Solutions

prababushka (X,aleksandr_sergeevic)

X= regina_fon_sheberg

X= regina_fon_sheberg

2 Solutions

brat (X,aleksandr_sergeevic)

X= lev_sergeevic

X= lev_sergeevic

2 Solutions

dyadya (X,Y)

X= lev_sergeevic, Y= aleksandr_aleksandrovic

X= lev_sergeevic, Y= grigory_aleksandrovic

X= lev_sergeevic, Y= maria_aleksandrovna

X= lev_sergeevic, Y= natalja_aleksandrovna

X= lev_sergeevic, Y= aleksandr_aleksandrovic

X= lev_sergeevic, Y= grigory_aleksandrovic

X= lev_sergeevic, Y= maria_aleksandrovna

X= lev_sergeevic, Y= natalja_aleksandrovna

8 Solutions

rebenok (X,aleksandr_sergeevic)

X= aleksandr_aleksandrovic

X= grigory_aleksandrovic

X= maria_aleksandrovna

X= natalja_aleksandrovna

4 Solutions

vnuk (X,Y)

X= lev_sergeevic, Y= lev_aleksandrovic

X= lev_sergeevic, Y= olga_vasiljevna

X= lev_sergeevic, Y= osip_abramovic

X= lev_sergeevic, Y= osip_abramovic

X= lev_sergeevic, Y= maria_alekseevna

X= aleksandr_sergeevic, Y= lev_aleksandrovic

X= aleksandr_sergeevic, Y= olga_vasiljevna

X= aleksandr_sergeevic, Y= osip_abramovic

X= aleksandr_sergeevic, Y= osip_abramovic

X= aleksandr_sergeevic, Y= maria_alekseevna

X= aleksandr_aleksandrovic, Y= sergey_lvovic

X= aleksandr_aleksandrovic, Y= sergey_lvovic

X= aleksandr_aleksandrovic, Y= nadezhda_osipovna

X= aleksandr_aleksandrovic, Y= nadezhda_osipovna

X= grigory_aleksandrovic, Y= sergey_lvovic

X= grigory_aleksandrovic, Y= sergey_lvovic

X= grigory_aleksandrovic, Y= nadezhda_osipovna

X= grigory_aleksandrovic, Y= nadezhda_osipovna

18 Solutions

vnuchka (X,Y)

X= nadezhda_osipovna, Y= abram_petrovic

X= nadezhda_osipovna, Y= regina_fon_sheberg

X= maria_aleksandrovna, Y= sergey_lvovic

X= maria_aleksandrovna, Y= sergey_lvovic

X= maria_aleksandrovna, Y= nadezhda_osipovna

X= maria_aleksandrovna, Y= nadezhda_osipovna

X= natalja_aleksandrovna, Y= sergey_lvovic

X= natalja_aleksandrovna, Y= sergey_lvovic

X= natalja_aleksandrovna, Y= nadezhda_osipovna

X= natalja_aleksandrovna, Y= nadezhda_osipovna

10 Solutions

Листинг разработанной базы знаний на языке ПРОЛОГ

syn(osip_abramovic,abram_petrovic).

syn(osip_abramovic,regina_fon_sheberg).

doch(nadezhda_osipovna,osip_abramovic).

doch(nadezhda_osipovna,maria_alekseevna).

syn(sergey_lvovic,lev_aleksandrovic).

syn(sergey_lvovic,olga_vasiljevna).

syn(lev_sergeevic,sergey_lvovic).

syn(lev_sergeevic,nadezhda_osipovna).

syn(aleksandr_sergeevic,sergey_lvovic).

syn(aleksandr_sergeevic,nadezhda_osipovna).

doch(maria_aleksandrovna, aleksandr_sergeevic).

doch(maria_aleksandrovna, natalja_nikolaevna).

doch(natalja_aleksandrovna, aleksandr_sergeevic).

doch(natalja_aleksandrovna, natalja_nikolaevna).

syn(aleksandr_aleksandrovic,aleksandr_sergeevic).

syn(aleksandr_aleksandrovic, natalja_nikolaevna).

syn(grigory_aleksandrovic,aleksandr_sergeevic).

syn(grigory_aleksandrovic, natalja_nikolaevna).

zhena(regina_fon_sheberg,abram_petrovic).

zhena(olga vasiljevna,lev_aleksandrovic).

zhena(nadezhda osipovna,sergey_lvovic).

zhena (maria_alekseevna,osip_abramovic).

zhena(olga_sergeevna,lev_sergeevic).

zhena(natalja_nikolaevna,aleksandr_sergeevic).

muzh(abram_petrovic,regina_fon_sheberg,).

muzh(lev_aleksandrovic,olga vasiljevna).

muzh(sergey_lvovic,nadezhda osipovna).

muzh (osip_abramovic,maria_alekseevna).

muzh(lev_sergeevic,olga_sergeevna).

muzh(aleksandr_sergeevic,natalja_nikolaevna,).

men (abram_petrovic).

men (lev_aleksandrovic).

women(regina_fon_sheberg).

women (natalja_nikolaevna).

women (olga_vasiljevna).

women (olga_sergeevna).

women (maria_alekseevna).

men(X):-syn(X,Y).

women(X):-doch(X,Y).

rebenok(X,Y):-syn(X,Y);doch(X,Y).

suprug(X,Y):-rebenok(Z,X),rebenok(Z,Y),X\=Y.

otec(X,Y):-(syn(Y,X);doch(Y,X)),men(X).

mama(X,Y):-(syn(Y,X);doch(Y,X)),women(X).

sestra(X,Y):-doch(X,Z),(syn(Y,Z);doch(Y,Z)),X\=Y.

brat(X,Y):-syn(X,Z),(syn(Y,Z);doch(Y,Z)),X\=Y.

dedushka(X,Y):-otec(X,Z),(syn(Y,Z);doch(Y,Z)).

babushka(X,Y):-mama(X,Z),(syn(Y,Z);doch(Y,Z)).

dyadya(X,Y):-brat(X,Z),(syn(Y,Z);doch(Y,Z)).

prababushka(X,Y):-mama(X,Z),(babushka(Z,Y);dedushka(Z,Y)).

pradedushka(X,Y):-otec(X,Z),(otec(Z,H);mama(Z,H)),(syn(Y,H);doch(Y,H)).

vnuk(X,Y):-syn(X,Z),(otec(Y,Z);mama(Y,Z)).

vnuchka(X,Y):-doch(X,Z),(otec(Y,Z);mama(Y,Z)).

Список литературы.

Методические указания к выполнению  лабораторной работы по дисциплине

“Интеллектуальные информационные системы”.