Tren cac ma hlnh bi6u di€n tri thUc nay, mQt s6 thu~t giai duQcxay dt!ng d6 co th6 cai o~t cac thu t\1cgiai bai loan dt!a tren cackie'n thlic trong co so tri thlic.. Cac ma hlnh tren se
Trang 1BAI HQC QUOC GIA THANH PHO HO CHI MINH.
TRUdNG BAI HQC KHOA HQC TV NHIEN
-BO VAN NHcJN
XA Y D{jNG HI:: TINH TOAN THONG MINH
XAY DVNG & PHAT TRlftN cAe M6 HINH BlftU
DlitN TRI TIHJ'CClIO CAC Ht GIAI TOAN TV DONG
Chuyen nganh: Dam baa toao hQc cho may Hnh
Va cac h~ tho'ng Hnh toaDMii so': 1.01.10
TOM TAT LUh-N AN TIEN SI TO AN HQC
Thanh pho' H6 Chi Minh - 2001
Trang 2PHAN Md DAD
Tri tu~ Nhan t<;lOla mQt lInh vlfe eua khoa hge may tinhnh~m nghien CUllphat tri6n cae h~ th6ng ngay cang thong mint
hon h6 trel tcJt hon cho h()~\t dOng xlt ly thong tin va XL(ly tri
thue, tint loan va diSH khi6n, v.v Trong qua trlnh philo tich vathiSt kS cae M th6ng Tri tu~ Nhan t<;lO,d~e bi~t la cae Mehuyen gia va cae h~ giai loan thong minh, nguoi ta ph~Uquan
tam uSn 2 va'n dS co ban nha't la:
(I) Bi6u diGn tri thae, va
(2) Phlwng phap va ky thuOt t1mk16m hay SHYdiOn,
Ngl1i<3nel(U vi\ pl1~llridll de l1\t\1111111bidu di~n lrilhac vi\ suydi€:n tlf dQng tren tri thue gilt mOt dia vi ra't quan tr9ng trangkhoa 11(.)Cmay linh cOng nlu( lrong 'I'd lll\; Nhan l<.lo
M~le lieu ct'1adS tai Iii xfiy d\1'ng,phat tri6n mOt sO'mo hintbi6u di~n tri thue va cae thu~ t giai d6 giai tlf dOng cae d<;lngbEdloan khae nhau dlfa tren tri thue
Cach ti6p c~n duQc slt d\1ng Iii kC't hQp cae phuong phapbi6u di~n tri thUe da e6 vdi nhung phat lri6n nha't dint d6 t<;lOramQt sO'mo hint bi6u di€:n tri thue mdi th6 hi~n duQe nhiSu d<;lngkiC'n thue da d<;lngbon Tli d6 cae ma hint nay e6 th6 duQe sltd\1ng nhu la co s0 va Iii eong e\1eho vi~e thiSt kS co sa tri thUe,
bQ pMn SHYlu~n giai loan cling nhu thiSt kS ph§n giao di~n euachuang trlnh
Lu~n an da xfiy d~tng cae mo hinh bi6u diGn tri thae sau:
1 M6 hint m<;lngSHYdi0n va tinh loan
2 Mo hint mOt d6i tuQng tinh loan (C-Objeet)
3 Mo hint tri thue vS cae C-Objeet, vii ma hint ma
C-Objeet rf:JH ~ H Tt/ N~iE iJ
/'c
THU V;rN
.,
Trang 3Tren cac ma hlnh bi6u di€n tri thUc nay, mQt s6 thu~t giai duQcxay dt!ng d6 co th6 cai o~t cac thu t\1cgiai bai loan dt!a tren cackie'n thlic trong co so tri thlic Cac ma hlnh tren se ouQCsa d\1ngtrong thie't ke' va cai o~t mQt s6 chuang trlnh giai tt! dQng mQt s6lOp bai loan vS cac tam giac, cac tli giac, cac bai loan hlnh hQcph~ng, cac bai loan hlnh hQCgiai tich va mQt s6 bai loan trencac phan ling hoa hQc.
Lu~n an g6m 5"chuang Chuang lla phfin t6ng quail v~ bi6udi€n tri thlic va h~ giai loan dt!a tren tri thlic Chuang 2 d~ xua'tmQt ma hlnh bi6u di€n tri thlic, duQc gQi la m;;tng suy di€n-tinhloan Chuang 3 lieu leD mOt ma hlnh cho mOt lOp tri thUc, duQcgQi la ma hlnh tri thlic cac d6i tuQng t1nh' loan (C~Objcct).Chuang 4 trlnh bay mOt ma hlnh co th6 dung bi6u di€n cho d;;tngbai loan t6ng quat tren ma hlnh tri thlic vS cac C-Object: mahlnh m;;tng cac C-Object Chuang 5 trlnh bay cac ling d\1l1gva
L "
$C\IJ'heb la phan ket lu~n.
Chu'o'ng 1.
BIJ'fUDIEN TRI TRUC vA
Rt GIAI TOAN D{jA TREN TRI TRUC
Chuang n~y trlnh bay t6ng quan v~ cac phuong phap bi6udi€n tri thUc va cac cang trlnh lieu bi6u vS cac chuang trlnh giaicac bai loan dt!a tren tri thUc Cac ke't qua nghien cliu oa co n~ycling ouQc nh?n d~nh va oanh gia
1.1 Cae va'n d~ cd ban trong thie't ke' m{)t h~ giai b~li toan dQ.'atren tri thue
1.1.1 Ca'u true eua m{)t h~ giai b~li to:1n dQ.'atren tri thue
Ca'u truc co ban cua M th6ng bao g6m cac thanh ph~n ouQcchi ra tren blah 1.1 bell dUai
2
Trang 4Giao
N gu'~l 511'dllng
moh 1.1 Cffu true eua mQt h~ giiii loan thong minh
C6 th~ n6i rAng trai tim eua h~ th6ng la phh co sd tri thue,trong d6 ehua cae kie'n thue dn thie't eho vi~e giiii cae bai loan
BQ soy di1;n (con gQi 1£1mo-tel soy di1;n) se ap d\;lng kie'n thUctrong co sd tri thue Mtlm Wi giiii eho bai loan.
1.1.2 Va-o d~ Bi~u di~o Tri thuG
Bi~u di1;n tri thue d6ng vai tro rfft quail tn;mg trong thie't ke'
va xfiy dlfng mQt M giai bai loan thong minh George F Luger([26]) va Gerhard Lakemeyer ([41]) oa t6ng ke't cae phuongphap bi6u diGn tri thue khae nhau va philn lam 4 lo~i: bi6u diGndlfa tren logic hlnh thue, bi~u di1;n tri thue thu tl,1e,bi~u di~nd[~ng \11l,1ng,va hiGHdiGn CrIlltruc MOi phuong phap chI biGudi1;n ou<;leffiQt khia e~nh eua kie'n thue trong khi tri thue dndu<;lebi~u di€n trong cae Mung dl,1ngrfft da d~ng
1.1.3 Va-n d~ Soy di~n Tt! dQng
Soy di1;n tlf dQng d~ giiii quye't cae bai loan dlfa tren tri thueeilng 1a mQt vffn d~ quail trQng Cae phuong phap soy di1;n tlfdQng v~n dl,1ngkie'n thUe oa bie't d~ soy lu~n giiii quye't vffn d~trong d6 quail tn;mg nhfft la cae ehie'n lU<;ledi~u khi~n giup phatsinh nhil'ng slf ki9n mdi tU cae slf ki~n da e6 Cae ky thu~t soydi€n tlf dQng da du<;lecae nha nghien CUllkhiio sat kha d~y du dmue dQ tuong d6i khai quat bao g6m:
3
Trang 5Phuong phap h<;Jpgi<'titrong bi&u di~n tri tMc dudi d<;lnglogic vi
tu Phuong phap suy di~n tie'n (forward chaining) Phuong phapsuy di~n llii (Backward chaining) Ke't h<;Jpsuy di~n tie'n va suydi~n llii
1.2 Phfin tich, danh gill mQt s6 cong trlnh da co
Trong ph§n nay se ban lu~n v6 mQt s6 cong trlnh 19 thuye'tcling nhu ling d\lng da co lien quail de'n m\lc lieu cua d~ tai tu
do neu len cac m\lc lieu c\l th& du<;JCt~p trung nghien CUll,gii'dquye't
1.2.1 Cae phu'dng phIlp bi~u di~n tri thuc
Cac phuong phap bi&u di~n tri tMc chung da bie't du<;Jctrlnhbay trong cac tai lic$ud~u co nhung u'u di6m nha't djnh;trong vi~cbi&u dih tUng d:;lng tri thU'c Tuy nhien cac phuong phap nayd~u co mQt nhu<;Jcdi&m chung la chi bi&u di~n du<;JcmQt khiaqnh cua tri thuc rift da d1;lngva chua hudng Wi mQt mo hlnh trithuc baa ham nhi6u d<;lngthong tin va nhi6u d~ng 51/ki<$nkhacnhau
1.2.2 MQt s6ly thuye't v~ chung minh va suy di~n ttf dQngTrong cach tie'p c~n theo phuong phap hlnh thuc cac ke't qua1:9 thuye't kha truu tu<;Jnglien rift kho ap d\lng trong cac h~chuyen gia va cac M giai loan d1/a tren tri thuc trong th1/Cte' VIcac hc$n§y doi hOi phai co mQt co sa tri thuc d1/a tren d.c mohlnh bi&u di~n tri thuc co Hnh tfl/Cquail , tinh mo dun hoa cao vacMa d1!ng nhi~u thanh ph§n tri tMc da d<;lng
1.2.3 MQt s6 phu'dng phIlp chung minh dinh ly hlnh hQcNhi~u phuong pha p chung minh djnh 19 hlnh hQc da dlt<;JCd~xufft nhu phuong phap di~n tich va phuong phap "full angle".Cac phuong phap nay chua cho ta mQt mo hlnh bi6u di~n tri thuc
4
Trang 6t6t d~ co th~ xiiy dl!ng m(>tco s0 tri thuG va m(>tligon ngG' khaibao bai loan mOt cach tl! nhien.
1.2.4 Phu'dng phIlp Wu
Phuong phap Wu la mN phuong phap chung minh dinh 1:9hlnh hQc theo cach liSp c~n d~i so' Phuong phap nffy cho ta mOtbi~u dii;n kha dyp v~ m~t 1:9thuySt loan hQC.Tuy nhien no cling
co nhi~u h~n chS nhu cac phuong pha p "di~n tich" va ':f'ull
angle" trong nhu du xiiy dl!ng mOt M giiii bai loan dl!a tren tri
thuG
1.2.5 Cac phtidng philp chung minh hinh hQc biing may HnhT(ing kG! cae nghicn Call VO cl~((ng l1linht\( dOngcae bidloan hlnh hQC, S.C Chou va cac d6ng lac giii oil li<$tke caephuong phap khac nhau co th6 sa dl,mg 06 chung minh cac bililoan hlnh hQc b~ng may tinh H~n chS ldn nha't cua cac phuopgphap nffy la chUng khong cho ta nhG'ng mo hlnh bi~u dii;n trithUGt6t giup xiiy dl!ng mOt co s0 tri thuG, b(> suy dii;n va cacthanh pMn khac cila M th6ng
1.2.6 MQt s(f nghien CUllxfiy d1;ingh~ ghii toan hinh hQc
M(>t so' nghien CUllxiiy dl!ng h~ giiii loan hlnh hQc GOngdu<;icd~ c~p dSn va GOngco nhG'ng h~n chS tuong tl! nhu cacphuong pha p da c1u<;iclieU d tren
1.2.7 MQt s(f san phii'm phftn m~m giai toan
Trong m1,1cnffy u~ c~p uSn mOt so' phffm m~m Cl,lth~ co lienquail uSn tri thuG va giai loan g5m: Cac chuong trlnh tinh loanhlnh hQC trong bO phfin m~m Engineering 2000, Chuong trlnhStudyWorks Chuong trlnh StudyWorks Chuong trlnhStudyWorks Chuong trlnh StudyWorks, Chuong trlnh MathExpress!, Phffn m~m loan hQc MAPLE, MATHEMATICA,MATHCAD, REDUCE, v.v
5
Trang 7Chuang 2.
M~NG SUY DIEN - TINH TOA.N
2.1 D§n nh1j.p: GiOi thi~u v~ ma hlnh va each tie'p c~n Kay
d\!ng ma hlnh
2.2 M~ng suy di~n va cae va-n M cd ban
2.2.1 Quan h~ va lu1j.tsuy di~n
Cho M = {XI,X2, ,Xm}la mQt t~p hcjp cae bie'n c6 th~ la'y giatri trong cae mi6n xae dint tuong ung D],D2, ,Dm MQt quaD h~R(x],x2,"',Xm) xac dinh mOt (hay mOt s6) anh X~lfR.u,v:Du -*Dvhay v~n t~t la f: u -*v, trong d6 u ~ x, v~ x; Du va Dv la tkheua cae mi6n xae dint tuong ung eua cae bie'n trong u va trong
v Quan h~ nhu the' ducjc gQi la quan h~ suy ddn MQt quaD M ducjc n6i Hi deli xllng e6 h<;tng(rank) k khi quaD M d6 giup ta e6 th€ tint aucje k bie'n ba't ky tU m-k bie'n kia D6i vdi cae quaD h~
khOng d6i Kung ta c6 th~ giii sti' quaD M xae djnh mQt lu~t d~n fvdi t~p bie'n vao la u(f) va t~p bie'n ra la v(f)
r6ng cua M sao eho u(f) n v(f) =0.
D6i vdi m6i f E F, ta kg hi~u M(f) la t~p cae bie'n e6 lien Mtrong quaD h~ f, nghla la M(f) =u(f) u v(f).
2.2.3 Cae va-n d~ eo' ban tren m~ng suy di~n
6
Trang 8Tren m(;lngsuy di6n (M,F) gici sa c6 mQt t~p bie'n A ~ M dadu<;Jcxac dinh vft B 1ftmQt t~p bie'n ba't ky trong M.
. Va'n d~ 1: C6 th€ xac dinh du<;Jc(hay suy fa) t~p B tU t~p Anho cac quail M trong F hay khong?
. Va'n d~ 2: Ne'u c6 tItS suy ra du<;JcB tU A thl qua trlnh suydi6n nhu the' nfta? Cach suy di6n khac nhau thl cach suydi0n nao la t6t nhflt'l
. Va'n d~ 3: Trang truong h<;Jpkhong tItS xac dinh du<;JcB, 'thl
dn cho them di~u ki~n gl M c6 th~ xac dinh du'<;JcB
Biii loan xac djnh B tU A tren m(;l~gsuy di6n (M,F) du<;Jcvie'tdlfdi d~ng A -t B
Dinh nghia 2.2: Cho D = {1'" 1'2, , 1'd c F va A eM Ky hi<$uD(A) 1fts1,1'ma rQng clia A nho ap dl,lllgday quail h~ D
Dinh nghia 2.3: D ={fl, f2, , fd c F 1ft mQt liJi giai cua bfti
loan A -t B khi D(A) ::) B Bfti loan A -t B du<;JcgQi 1ftgidi
du(/c khi n6 c6 mQtWigicii.Loi gicii {f1 0f2o , fd 1ftliJi gidi t6't
ne'u khong tItS bo bot mQt s6 quail h~ trong Wi gicii
2.3 TIm lui giai
Xet bfti loan A -t B tren m(;lng suy di6n (M,F) Trang m1,1cn~y ta khao sat tinh ghli dtiQc cua b~1iloan suy di~n, tlm mQt loigicii t6t cho bfti loan suy di6n vft phan tkh qua trlnh suy di6n.2.3.1 nnh giai duQc
Dinh nghia 2.4: Cho m(;lng suy di6n (M,F), vft A 1ftmQt t~p concua M Bao dong cua A 1ftt~p B lOn nha't ~ M sao cho bfti loanA-tB la gicii du<;Jc.Ky hi~u baa d6ng cua A la A
M~nh d~ 2.1 lieU len mQt s6 Hnh cha't cua baa d6ng
M~nh d~ 2.2 lieU len mQt s6 Hnh cha't cua Wi giai
Dinh Iv 2.1: Trcn mQt m(;lngsuy di6n (M,F), b~d loan A -t B lagicii du<;Jckhi va chi khi B ~ A
Trang 9M~nh d~ 2.3: neu 1en di~u ki~n dn va du d~ mQt day quail M
ap dl)ng du'Qctren mQt t~p hQp A ~ M
Dinh Iv 2.2 Tren mQt m~ng suy di~n (M,F), gici Stl A, B 1a hait~p con cua M Ta co cac di~u sau day 1a tu'dng du'dng:(1) B ~ A.
(2) Co mQt day D={fl, f2, , fk} ~ F thoa cac di~u ki~n
D ap dl)ng du'Qctren A va D(A);2 B
Thu~H toaD 2.1: TIm bao d6ng cua t~p A ~ M
2.3.2 LOi giai cua b8i toaD
M~nh d~ 2.4: Day quail M D 1iimQt Wi gicii cUa bai loan A~ Bkhi va chi khi D ap d\mg OltQCtren A va D(A) ;;2B
Thu~it toaD 2.2 TIm mQt Wi gicii cho b~liloan A ~ B .
Dinh I:V2.3 chung minh cd sa loan hQCch6 thu~t loan 2.3.Thu~it toaD 2.3 TIm mQt Wi gicii t6t tu mQt loi gicii da bi~t.2.3.3 Dinh Iy v~ st!-phan tich qua trinh gi:H
Dinh Iv 2.4 Cho {fl, f2, , fm}1a mQt Wi gicii t6t cho biii loan A
~ B tren mQt m~ng suy di~n (M, F) f)~t:
Ao = A, Ai = {fl, f2, , fi}(A), voi mQi i=I, ,m.
Khi d6 c6 mQt day {Bo,B\, , Bm-I,Bm}, thOa cac di~u ki~n: (1)
Bm =B, (2) ! Bi ~ Ai , voi mQi i=O,I, ,m, vii (3) Voi mQii=I, ,m, {fi} 1a Wi gicii cua bai loan Bi-I ~ Bi nhu'ng khOngphcii 1a Wi gicii cua bai loan G ~ Bi , trong d6 G 1ii mQt t~p contMt s1/ tilyycua Bi-I
2.4 M~ng soy di~n co trQng s6 va lOigiai t6i u'u
2.4.1 Dinh nghia va ky hi~u
Dinh nghia 2.5: MQt mg.ngsuy ddn co trQng sr/, vie't t~t bdi
MSDT, 1iimQtmo hlnh (A, D, w) bao g6m:
(1) mQtt~p hQpcac thuQctinh A,
(2) mQtt~p hQpcac 1u~tsuy di~n D, vii
Trang 102.4.2 L<1igiai va dQ phuc t~p cua qua trinh Hm loi giai
Thu~t toaD 2.4: TIm mQt Wi giiii cho bai loan H ~ G tren mQt MSDT (A, D, w).
Meoh d~ 2.5 Thu~t loan 2.4 cho Wi giiii la dung va co dQ phuct~p la O(IAI.IDl.min(IAI,IDI).
2.4.3 Tim liYigiiii t6i lill
vein d~ tlm Wi giiU lo'i u'u cho btd loan H~G lren MSDT (A,
D, w) du'Qcgiiii quye't d1!a tren thu~t giiii A b~ng cach xay d1!ng
d6 thj co trQng so' Grapgh(H~G)
Meoh d~ 2.6:
(1) MQt day S g6m cac lu~t la mQt loi giiii cua H~G khi va chi
khi S la mQt 1(>trlnh tren Graph(H~G) n6i tU H de'n S(H) va
S(H) =:>G.
(2) D(>diU cua m(>l 1(>lrlnh S lrcn <16lhj Graph(H~G) Hi w(S),
trQng s6 cua danh sach lu~t S tren MSDT (A, D, w).
Thu~t toaD 2.5: TIm Wi giiii t6i u'u cho bfli tmin H~G.
Meoh d~ 2.7 Thu~t loan 2.5 cho Wi giiii la dung va co dQ phuct~p 1ft O(IAI2.IDI2).
2.5 TS)phqp sinh va vit:CKi~m djnh, bOsung gia thie't2.5.1 Khai ni~m t~p hqp sinh
Bioh oghia 2.7: Cho (A, D) la mQtm~ngsuy di~n M9t t~p thu9C tinh SeA du'QcgQila m(>ttgp h(!psinh cua m~ng suy di~n khi ta
co S =A
2.5.2 Tim t~p hqp sinh
9
Trang 11Thu~H tmin 2.6: TIm m(}t t~p h<;Jpsinh Strong MSD (A,D) b~ng
phu'dng phap thlt dfin
Dinh nghla 2.8: xily dvng d6 thi Graph(A,D) tu'dng ung cua m<,tngsoy di~n (A,D), va d6 thi tho g9n GraphD(A).
Dinh nghia 2.9: neu leu kh::lini~m biiu dc'Jphfln cap va muc cua
dlnh
M~nh d~ 2.8: Cho m<,tng(A, D) Giii slt d6 thi Graph(A, D) co d6
thi tho g9n Graphf)(A) Khi fly, ne'u Graphf)(A) la m(>td6 thi philo
dtp thl t~p h<;JpS=Levelo g6m tilt ca cae dlnh mue 0 se eho tam(}t t~p h<;Jpsinh eua m<,tngsoy di~n Hdn nITatrong tru'ong h<;Jpnfiy ta eon eo:
(1) S la t~p h<;Jpsinh nha nhflt ireD m~lllgsoy di6n
(2) D la t~p h<;Jplu~t t6i thiSu M Levelo sinh ra A.
Dinh tv2.5: Cho m<,tngsoy di~n (A, D) ta eo:
(1) SeA la m(}t t~p h<;Jpsinh ireD m<,tngsoy diSn khi va chi khi
co D' cD sao cho Graph(A, D') la m(}t d6 thi philo cflp va S chua t~p h<;Jpeac dlnh muc 0 ctia d6 thi nfiy.
(2) T6n t<,tim(>tt~p lu~t D' cD sao cho Graph(A, D') la m(}t d6
thi philo cflp.
Thu(lt toaD 2.7: TIm m(}t t~p h<;Jpsinh Strong m<,tngsoy di~n (A, D) b~ng each xily dl/ng m(}t m<,tngcon (A', D') vdi A' = A va co Graph(A', D') la m(>tbiSu d6 philo dtp.
2.5.3 nO' sung gia thic't cho bai toaD suy di~n
xet vit$c b6 sung gi:i thie't cho bai loan H ~ G tn~n m(}t
m<,tngsoy diSn (A, D) trong tru'ong h<;Jpbai loan khong gi:ii du'<;Jc.
Ytu'ong chinh a dily la tie'n hanh m(}tqua trlnh xily dl/ng m(}tbiSu d6 philo dtp vdi t~p h<;Jpdinh ehua G va u'u lien cho vi~c
d~t cae ph5n tlt cua H a muc O.
10
Trang 12Thui,H toaD 2.8: Cho m<;lngsuy di~n (A, D) va bai loan H + G
khong gilli dU<;1C(khong co Wi gilli) TIm H' sao cho H n H' =0
va bai loan (H u H') +G la gilli dU<;1c.
Menh d~ 2.9: Thui,lt loan 2.8 d~ tlm s1,1'b5 sung gill thi~t cho bai
suy di~n la dung va co dQ phuc t~p la O(IAI.IDI).
2.6 M~ng Suy di~n - Tinh toaD
2.6.1 Mo hlnh
Dinh nghia 2.10: MQt m~ng suy di~n-tinh loan g6m:
(1) T~p h<;1pA g6m cac thuQc tinh.
(2) T~p h<;1pD g6m cac lu~t suy dit;n (hay cac quan h9 suydi~n) In~n cite Ihll0c Ifnh
(3) T~p h<;1pF gOm cac Gong thuG Hnh loan hay cac lhii ll,lc ~inh
loan tu'dng ung vdi cae lu~t suy di~n S1,1'tu'dng ung nfly lhS
hi<$nboi mQt anh x<;lf: D + F.
(4) T~p h<;1pR g6m mQt s6 qui t~c hay di@ukic$nrang buQc tren
cac thuQc tinh
M~ng suy di~n Hnh loan du<;1cky hic$uboi bQ b6n (A, D, F, R) Theo dinh nghla, ta co (A, D) la mQt m<;lngsuy di€n va Wi gilli cho bai loan H + G tren m~ng suy di€n n§y se xac dinh cac Gong thuG hay cac thii t,=,cHnh loan cac ph§n ta thuQC G ti't cac
phh ta thuQc H.
2.6.2 Giai bili toaD tren m~ng guy di~n-tinh toaD
Ta co th€ gilli quy~t cac bai loan suy dit;n Hnh loan va tlm
Wi gilli t6i u'u d1,1'atren cac thu~t gilli dii trlnh bay a tren Ngoai
fa, con tlm ra du<;1ccae Gong thuG Luong minh qua cac buGCgillibai loan va rUt gQn cae Gong thuG du'oi d~ng ky hil$u Nhu lhe'tren m~ng suy di€n-Hnh loan ta eo th~ chi ra mQt cach t1,1'dQngcac Gong thUGLuong minh d~ Hnh mQt s6 y~u t6 n§y ti't mQt s6
y€u t6 khac (n€u b~1iloan co Wi giail ~~t R<W.4i~Nti~1 vic$e
Trang 13do tIm nhung s\1'lien Msuy di~n giua cac ySu t5 nao d6 ma taquan Him se cho ta mQt phuong phap d€ t\1'dQng tIm ra themnhung lu~t suy di~n va nhung cong thuc tinh loan lien quan dSncac ySu t5 E>i~un~y c6 ynghia nhu mOt ky thu~t kMm pM trithuc.
Chu'dng 3.
MO HINH TRI THUC cAc DOl Tu'<;1NGTINH ToAN
3.1 Khai ni~m v~ d6i tu'Q'ngHnh toaD va mo hlnh
Dinh ni!hia 3.1: MQt d5i tu9ng tinh loan (C-object) li\ mQt c15i
(1) MOt danh sach cac thuQc tinh Attr(O) = {XI,X2, ,xn}vagiua cac thuQc tinh c6 lien h~ qua cac s\1'ki~n, cac lu~tsuy di~n hay cac cong thuc tinh loan
(2) Cac h~lnh vi lien quan de'n s\1'suy di~n va tinh loan trencac thuQc tinh cua d5i tuc;fngnhu:
. Xac djnh bao d6ng cua mQt t~p thuOc tinh A
. X6t tinh ghH oU<;1ccua bai loan suy di~n tinh loan c6d~ng A ~ B vdi A c Attr(O) va B c Attr(O)
. Th\1'chi~n cac tinh loan
. Th\1'C hi~n g<;1iyb5 sung giii thiSt cho bi\i loan
. Xem xet tinh xac dinh cua d5i tU<;1ng
MOt C-Object c6 th~ dU9Cma hlnh h6a bdi mQt b9:
(Attrs, F, Facts, Rules)trong d6: Attrs la t~p thu9c tinh cua d5i tu9ng, F la t~p cac quan
M suy di~n tinh loan, Facts la t~p h9P cac tinh cha't v5n c6 cuad5i tU<;1ng,va Rules la t~p h9P cae lu~t suy di~n tren cac s\1'ki~n
12
Trang 143.2 M6 hlnh tri thuc cae d6i tu'qng tinh toan
Ma hlnh tri thue cae C-objeet co th~ dung bi~u dien eho mQtd~ng co sO tri thue bao g6m cae khai ni~m v~ cae d6i tu'<;1ngcodiu true cling voi cae lo~i quan h~ va cae eang thue Hnh loanlien quan
3.2.1 M6 hlnh tri thuc
Ta gQi mQt ma hlnh tri thue cae C-Objeet , vie't t1{tla mQt
ma hlnh COKB (Computational Objects Knowledge Base), lami)t h9 th6ng (C, H, R, Ops, Rules) g6m:
1 Mot tap hop C cae khai niem v~ cae C-Obieet
M5i khai ni9m la mQt lOp C-Objee't co du true bell trong nhu'san:
Ki~u d6i tu'<;1ng
Danh saeh cae thuQe Hnh
Quan h9 tren du true thie't l~p
T~p h<;1pcae di~u ki9n rang buQe tren eae thuQe Hnh.T~p h<;1peae tinh eha't nQi t~i tren cae thuQe Hnh
T~p h<;1peae quan h~ soy dien -Hnh loan.
T~p h<;1peae lu~t soy dien eo d~ng:
{cae SIfki~n giil thie't}:::>{caes11ki9n ke't lu~n}Cung voi du true tren, d6i tu'<;1ngeon du'<;1etrang bi eae Mnh vitrong vige giili quye't eae bai loan soy di~n va Hnh loan
2 Mot tap H eae quan he phan dp giua cae loai d6i tu'ong.Tren t~p C ta eo mQt quan h~ phan dp theo do eo th~ eomQt so' khai ni9m la st;l d~e bi9t hoa eua eae khai ni9mkhae C6 th~ n6i rhng H 11\mOt bi~u d6 Hasse khi xem quan
M phan dp tren la mQt quan M thU t11tren C
3 Mot tap R eae loai quan he tren cae C-Obieet
M6i quan h~ du'<;1exae dinh boi <ten quan M> va cae lo~id6i tu'<;1ngclia quan h~, va quan M co th~ eo mQt so' Hnheha't nhfft djnh
13
Trang 154 Mot tap hop Ops d.c loan tu.
Cac loan tu cho ta mQt s6 phep loan tren cac bie'n th1.fcclingnhu tren cac d6i tuQng
5 Mot tap hop Rules g6m cac luat duoc phan lOp
M6i lu~t cho ta mQt qui t~c suy lu~n M di de'n cac s1.fkil$nmoi tu cac s1.fkil$n naG do, va v~ m~t ca'u truc m6i lu~t r coth6 duQc mo hInh duoi d~ng:
r: {skI, skz, , skn} => { skI, skz, , skm }
Dinh nghia 3.2: (Cac lo~i s1.fkil$n)
(1) S1.fki~n thong tin v~ lo~i cua mQt d6i tU<;ing
(2) S1.fki~n v~ tinh xac dinh cua mQt d6i tuQng (cac thuQc tinhcoi nhu da bie't) hay cila mQt thuQc Hnh
(3) S1.fki~n v~ s1.fxac dinh cua mQt thuQc Hnh haymQt d6ituQng thong qua mQt bi6u thuc hiing
(4) S1.fki~n v~ s1.fbiing nhau giua mQt d6i tuQng hay mQt thuQctinh voi mQt d6i tU<;inghay mQt thuQc Hnh khac
(5) S1.fki~n v~ s1.fphI,! thuQc cua mQt d6i tuQng hay cua mQtthuQc Hnh theo nhUng d6i tuQng hay cac thuQc tinh khacthong qua mQt cong thUc Hnh loan
(6) S1.fki~n v~ mQt quail h~ tren cac d6i tuQng hay trcn cacthuQc Hnh cua cac d6i tuQng :
3.2.2 Vi dQ.v~ m{)t mo hinh tri thuc cae C-object
Tri thlic v~ cac tam giac va tu giac trong hInh hQc ph~ng coth<5dU<;icbi<5udiGn theo mo hInh COKB MQt phan 10n kie'n thlicv~ hInh hQc giii tich 3 chi~u hay kie'n thlic v~ cac phin ling hoahQc cling co th<5dU<;iCbi6u diGn theo ma hInh nay
3.3 T6' chuc cd sd tri thuc COKB
Co so tri thUc COKB co th6 duQc t6 chlic boi mQt M th6ngt~p tin van ban co ca'u truc nhu sail:
14
Trang 16[1] T~p tin "Objeets.txt" lu'u tru cae dinh danh eho cae lo<;tid6i tU<;1ngC-Objeet.
[2] T~p tin "RELATIONS.txt" lu'u tru thong tin v€ cae lo<;tiquan h~ khae nhau tren cae lo<;tiC-Objeet
[3] T~p tin "Hierarehy.txt" lu'u l<;ticae bi~u d6 Hasse th~hi~n quan h~ phan ea'p tren cae khai ni~m
[4] Cae t~p tin voi ten t~p tin d~ lu'u tru ea'u true eua lo<;tid6i tu<;1ng
[5] T~p tin "Operators.txt" lu'u tru cae thOng tin v~ cae roant\i' tren cae d6i tu<;1ng
[6] T~p tin "FACTS.txt" lu'u tru thOng tin v~ cae lo<;tisl!ki~n khae nhau
[7] T~p tin "RULES.txt" lu'u h~ lu~t cua cd sa tri thUG.M6i lien h~ v€ ca'u truc thong tin trong cd sa tri thUGc6 th~ ou<;1cminh hQa trcn so d0 sau day:
cofu truc 661 tu'<!ng
Cifu tnJc 661 tu'<!ng
mnh 3.3 Bi~u 06 lien M giua cac thanh phgn trong COKB
Cach tes chuG cci so tri thUG cho ta mQt cau truc tri thuG
ro rang va tach bc;tChvoi day du cac thong tin clIng voi caclien h$ khac nhau rat da dc;lng.Mo hlnh COKB dLiQCxaydljng co cac Liudi§m sau day:
. Thfch hQp cho vi~c thie't ke' ml;Jt cd sa trl thuc vdl cae
khai ni$m co th§ dLiQCbi§u dien bai cac C-Object
15