Một cách tiếp cận để xấp xỉ dữ liệu trong cơ sở dữ liệu mờ
Tóm tắt Một cách tiếp cận để xấp xỉ dữ liệu trong cơ sở dữ liệu mờ: ..., u ≈k v ⇔ ∃∆ k ∈ P k : I(u) ⊆ ∆k va` I(v) ⊆ ∆k. Vı´ du. 3.1. Cho da.i soˆ´ gia tu .’ X = (X,G,H,6), trong do´ H = H+ ∪ H−, H+ = {ho.n, raˆ´t}, ho.n kha’ na˘ng, G = { tre’, gia`} . Ta co´ P 1 = {I(tre’), I(gia`)} la` moˆ.t phaˆn hoa.ch cu’a [0, 1]. Tu .o.ng tu.. , P 2 = {I(ho.n tre’), I(raˆ´....h ′ 1x) ∈ P k va` ∃∆k−1 = I(hk−2...h1x) ∈ P k−1 hoa˘. c ∃∆ k−1 = I(h′k−2...h ′ 1x) ∈ P k − 1... va` ∃∆2 = I(h1x) ∈ P 2 hoa˘. c ∃∆ 2 = I(h′1x) ∈ P 2 va` ∃∆1 = I(x) ∈ P1 sao cho: ∆ k ⊆ ∆k−1 ⊆ ... ⊆ ∆2 ⊆ ∆1 (2’). Tu`. (1’) va` (2’) ta co´ I(u) ⊆ ∆k ⊆ ∆k−1 ⊆ ... ⊆ ∆2 ⊆ ∆1 va` I(v) ⊆ ∆k ⊆... . lieˆ.u sau na`y. Go.i Dom(Ai) = Num(Ai)∪LV (Ai) la` mie`ˆn tri. cu’a thuoˆ.c t´ınh mo` . Ai trong moˆ. t quan heˆ. cu’a lu.o.. c doˆ` co . so.’ du˜. lieˆ.u. Khi do´, thuaˆ.t toa´n du .o.. c xaˆy du . . ng nhu . sau. Thuaˆ.t toa´n 3.1 Va`o: Cho r la` moˆ.t quan heˆ. xa´c di.nh treˆn taˆ....
haˆn hoa.ch cu’a I(x ′). Do do´ ∃∆(n+1) = I(h1x′) ∈ P (n+1) : I(h1x′) = I(x) ⊆ ∆(n+1). Vaˆ.y ≈k du´ng vo´ .i k = n+ 1, hay x ≈n+1 x. T´ınh doˆ´i xu´.ng: ∀x, y ∈ Dom(Ai), neˆ´u x ≈k y th`ı theo di.nh ngh˜ıa ∃∆ k ∈ P k : I(x) ⊆ ∆k va` I(y) ⊆ ∆k hay ∃∆k ∈ P k : I(y) ⊆ ∆k va` I(x) ⊆ ∆k. Vaˆ.y y ≈k x th`ı y ≈k x. T´ınh ba˘´t ca`ˆu: Ta chu´.ng minh ba`˘ng phu.o.ng pha´p qui na.p. Tru.`o.ng ho.. p k = 1: Ta co´ P 1 = {I(c+), I(c−)}, neˆ´u x ≈1 y va` y ≈1 z th`ı ∃∆ 1 = I(c+) ∈ P 1 : I(x) ⊆ ∆1 va` I(y) ⊆ ∆1 va` I(z) ⊆ ∆1 hoa˘. c ∃∆ 1 = I(c−) ∈ P 1 : I(x) ⊆ ∆1 va` I(y) ⊆ ∆1 va` I(z) ⊆ ∆1, co´ ngh˜ıa la` ∃∆1 ∈ P 1 : I(x) ⊆ ∆1 va` I(z) ⊆ ∆1 hay x ≈1 z. Vaˆ.y ≈k du´ng vo´ .i k = 1. Gia’ su.’ quan heˆ. ≈k du´ng vo´ .i tru.`o.ng ho.. p k = n co´ ngh˜ıa la` ta co´ ∀x, y, z ∈ Dom(Ai) neˆ´u x ≈n y va` y ≈n z th`ı x ≈n z. Ta ca`ˆn chu´.ng minh quan heˆ. ≈k du´ng vo´ .i tru.`o.ng ho..p k = n+1. Tu´ .c la` ∀x, y, z ∈ Dom(Ai) neˆ´u x ≈n+1 y va` y ≈n+1 z th`ı x ≈n+1 z. Theo gia’ thieˆ´t neˆ´u x ≈n+1 y va` y ≈n+1 z th`ı ∃∆ (n+1) ∈ P (n+1) : I(x) ⊆ ∆(n+1) va` I(y) ⊆ ∆(n+1) va` I(z) ⊆ ∆(n+1), co´ ngh˜ıa la` ∃∆(n+1) ∈ P (n+1) : I(x) ⊆ ∆(n+1) va` I(z) ⊆ ∆(n+1). Vaˆ.y x ≈n+1 z. Boˆ’ de`ˆ 3.2. Cho u = hn..h1x va` v = h ′ m...h ′ 1x la` bieˆ’u dieˆ˜n ch´ınh ta˘´c cu’a u va` v doˆ´i vo´ .i x. (1) Neˆ´u u = v th`ı u ≈k v vo´.i mo. i k. (2) Neˆ´u h1 6= h ′ 1 th`ı u ≈|x| v. Chu´.ng minh: (1) Theo Boˆ’ de`ˆ 3.1, v`ı u = v neˆn ta co´ u ≈k u hay v ≈k v , vo´.i mo.i k. (2) Neˆ´u u| = |v| = 2, tu´.c la` u = h1x va` v = h ′ 1x, do h1 6= h ′ 1 neˆn u 6= v. Ta co´ I(h1x) ⊆ I(x), I(h′1x) ⊆ I(x) va` I(h1x) 6⊂ I(h ′ 1x) neˆn ∃∆ 1 = I(x) ∈ P 1 : I(h1x) ⊆ ∆1 va` I(h′1x) ⊆ ∆ 1 hay h1x ≈1 h′1x. Vaˆ.y u ≈|x| v. Neˆ´u |u| 6= |v|, do h1 6= h′1 neˆn I(h1x) 6⊂ I(h ′ 1x) (1’). Gia’ su .’ ∃k > 1 sao cho u ≈k v th`ı MOˆ. T CA´CH TIE´ˆP CAˆ. N DEˆ ’ XA´ˆP XI’ DU˜ . LIEˆ. U 115 ∃∆k ∈ P k = {I(hk−1...h1x), I(h ′ k−1...h ′ 1x)}, vo´ .i P k la` moˆ.t phaˆn hoa.ch cu’a I(x) : I(u) ⊆ ∆ k va` I(v) ⊆ ∆k. Neˆ´u cho.n ∆ k = I(hk−1...h1x) th`ı I(u) ⊆ I(hk−1...h1x) va` I(v) ⊆ I(hk−1...h1x) hay I(hn...h1x) ⊆ I(hk−1...h1x) va` I(h′m...h ′ 1x) ⊆ I(hk−1...h1x) die`ˆu na`y maˆu thuaˆ’n v`ı I(h ′ m...h ′ 1x) 6⊂ I(hk−1...h1x) do (1’). Neˆ´u cho.n∆ k = I(h′k−1...h ′ 1x) th`ı I(hn...h1x) ⊆ I(h ′ k−1...h ′ 1x) va` I(h ′ m...h ′ 1x) ⊆ I(h ′ k−1...h ′ 1x), die`ˆu na`y maˆu thuaˆ’n v`ı I(hn...h1x) 6⊂ I(h′k−1...h ′ 1x) do (1’). Vaˆ.y khoˆng toˆ`n ta. i k > 1 sao cho u ≈k v hay k = 1. Vaˆ.y u ≈|x| v. Di.nh ly´ 3.1. Xe´t P k = {I(x) : x ∈ Xk} vo´.i Xk = {x ∈ X : |x| = k} la` moˆ. t phaˆn hoa. ch, u = hn...h1x va` v = h ′ m...h ′ 1x la` bieˆ’u dieˆ˜n ch´ınh ta˘´c cu’a u va` v doˆ´i vo´ .i x. (1) Neˆ´u u ≈k v th`ı u ≈k′ v, ∀0 < k ′ < k. (2) Neˆ´u toˆ`n ta. i moˆ. t chı’ soˆ´ j 6 min(m, n) lo´ .n nhaˆ´t sao cho vo´.i mo. i s = 1...j, ta co´ hs = h ′ s th`ı u ≈j+|x| v. Chu´.ng minh: (1) Ta co´ P k = {I(hk−1...h1x), I(h′k−1...h1x)}. Vı` u ≈k v neˆn theo di.nh ngh˜ıa ∃∆k ∈ P k : I(u) ⊆ ∆k va` I(v) ⊆ ∆k (1’). Ta la. i co´ P 1 = {I(x)}, P 2 = {I(h1x), I(h′1x)}, ..., P k = {I(hk−1...h1x), I(h′k−1...h1x)}. Ma˘. t kha´c ta co´ I(hk−1...h1x) ⊆ I(hk−2...h1x) ⊆ ... ⊆ I(h1x) ⊆ I(x) va` I(h ′ k−1...h ′ 1x) ⊆ I(h′k−2...h ′ 1x) ⊆ ... ⊆ I(h ′1x) ⊆ I(x) neˆn ∃∆k = I(hk−1...h1x) ∈ P k hoa˘.c ∃∆ k = I(h′k−1...h ′ 1x) ∈ P k va` ∃∆k−1 = I(hk−2...h1x) ∈ P k−1 hoa˘. c ∃∆ k−1 = I(h′k−2...h ′ 1x) ∈ P k − 1... va` ∃∆2 = I(h1x) ∈ P 2 hoa˘. c ∃∆ 2 = I(h′1x) ∈ P 2 va` ∃∆1 = I(x) ∈ P1 sao cho: ∆ k ⊆ ∆k−1 ⊆ ... ⊆ ∆2 ⊆ ∆1 (2’). Tu`. (1’) va` (2’) ta co´ I(u) ⊆ ∆k ⊆ ∆k−1 ⊆ ... ⊆ ∆2 ⊆ ∆1 va` I(v) ⊆ ∆k ⊆ ∆k−1 ⊆ ... ⊆ ∆2 ⊆ ∆1, co´ ngh˜ıa la` ∀0 < k′ < k luoˆn ∃∆k ′ ∈ P k ′ : I(u) ⊆ ∆k ′ va` I(v) ⊆ ∆k ′ . Vaˆ.y ∀0 < k′ < k neˆ´u u ≈k v th`ı u ≈k′ v. (2): Neˆ´u j = 1 ta co´ h1 = h ′ 1, khi do´ u = hn...h2h1x va` v = h ′ m...h ′ 2h ′ 1x hay u = hn...h2h1x va` v = h′m...h ′ 2h1x. Da˘.t x ′ = h1x ta co´ u = hn...h2x ′ va` v = h′m...h ′ 2x ′. Vı` h2 6= h ′2 neˆn theo Boˆ’ de`ˆ 2.3 ta co´ u ≈|x′| v (do |x ′| = 2, |x| = 1) hay u ≈2 v. Vaˆ.y u ≈j+|x| v. Neˆ´u j 6= 1, da˘.t k = j, ta ca`ˆn chu´ .ng minh u ≈k+|x| v. Vı` u ≈k v neˆn theo gia’ thieˆ´t ta co´ ∀s = 1...k ta co´ hs = h ′ s. Khi do´ u = hn...h2h1x va` v = h ′ m...h ′ 2h ′ 1x hay u = hn.hkhk−1...h1x va` v = h′m...hkhk−1...h1x. Da˘.t x ′ = hkhk−1...h1x ta co´ u = hn...hk+1x ′ va` v = h′m...h ′ k+1x ′. Vı` hk+1 6= h ′ k+1 neˆn theo Boˆ’ de`ˆ 2.2 ta co´ u ≈|x′| v hay u ≈k+|x| v (do |x ′| = k, |x| = 1). Heˆ. qua’ 3.1. Neˆ´u u ∈ H(v) th`ı u ≈|v| v. Di.nh ly´ 3.2. Xe´t P k = {I(x) : x ∈ Xk} vo´.i X k = {x ∈ X : |x| = k}, u = hn...h1x va` v = h′m...h ′ 1x la` bieˆ’u dieˆ˜n ch´ınh ta˘´c cu’a u va` v doˆ´i vo´ .i x. Neˆ´u toˆ`n ta. i chı’ soˆ´ k 6 min(m, n) lo´.n nhaˆ´t sao cho u ≈k v th`ı u 6=k+1 v. Heˆ. qua’ 3.2. (1) Neˆ´u u ∈ H(v) th`ı u 6=|v|+1 v (2) Neˆ´u u 6=k v th`ı u 6=k′ v ∀0 < k < k ′ Di.nh ly´ 3.3. Xe´t P k = {I(x) : x ∈ Xk} vo´.i X k = {x ∈ X : |x| = k}, u = hn...h1x va` v = h′m...h ′ 1x la` bieˆ’u dieˆ˜n ch´ınh ta˘´c cu’a u va` v doˆ´i vo´ .i x. Neˆ´u u k v th`ı vo´ .i 116 NGUYE˜ˆN CA´T HOˆ`, NGUYE˜ˆN COˆNG HA`O mo. i a ∈ H(u), vo´ .i mo. i b ∈ H(v) ta co´ a k b. 3.2. Mie`ˆn tri. cu’a thuoˆ.c t´ınh trong quan heˆ. co´ chu´ .a gia´ tri. soˆ´ Tru.`o.ng ho.. p mie`ˆn tri. cu’a thuoˆ.c t´ınh co´ chu´ .a gia´ tri. soˆ´, chu´ng ta se˜ bieˆ´n doˆ’i ca´c gia´ tri. soˆ´ tha`nh ca´c gia´ tri. ngoˆn ngu˜ . tu.o.ng u´.ng theo moˆ. t ngu˜ . ngh˜ıa xa´c di.nh. Tru .´o.c tieˆn, ta di xaˆy du.. ng moˆ. t ha`m IC chuyeˆ’n moˆ. t soˆ´ ve`ˆ moˆ. t gia´ tri. thuoˆ.c [0, 1] va` ha`m Φk deˆ’ chuyeˆ’n moˆ. t gia´ tri. trong [0, 1] tha`nh moˆ.t gia´ tri. ngoˆn ngu˜ . x tu.o.ng u´.ng trong da. i soˆ´ gia tu .’ X. Di.nh ngh˜ıa 3.5. Cho Dom(Ai) = Num(Ai)∪LV (Ai), v la` ha`m di.nh lu .o.. ng ngu˜ . ngh˜ıa cu’a Ai. Ha`m IC : Dom(Ai)→ [0, 1] du.o.. c xa´c di.nh nhu . sau: Neˆ´u LV (Ai) = ∅ va` Num(Ai) 6= ∅ th`ı ∀ω ∈ Dom(Ai) ta co´ IC(ω) = ω − ψmin ψmax − ψmin vo´.i Dom(Ai) = [ψmin, ψmax] la` mie`ˆn tri. kinh dieˆ’n cu’a Ai. Neˆ´uNum(Ai) 6= ∅, LV (Ai) 6= ∅ th`ı ∀ω ∈ Dom(Ai) ta co´ IC(ω) = {ω ∗v(ψmaxLV )}/ψmax, vo´.i LV (Ai) = [ψminLV , ψmaxLV ] la` mie`ˆn tri. ngoˆn ngu˜ . cu’a Ai. Vı´ du. 3.5. Cho Dom(Tuoi) = {0...100, ... raˆ´t raˆ´t tre’ ,......., raˆ´t raˆ´t gia`}. Num(Tuoi) = {20, 25, 27, 30, 45, 60, 75, 66, 80}. LV (Tuoi) = {tre’ , raˆ´t tre’ , gia`, kha´ tre’ , kha´ gia`, ı´t gia`, raˆ´t gia`, raˆ´t raˆ´t tre’}, Dom(Tuoi) = Num(Tuoi) ∪ LV (Tuoi). Neˆ´u LV (Tuoi) = ∅ khi do´ Dom(Tuoi) = Num(Tuoi) = {20, 25, 27, 30, 45, 60, 75, 66, 80}. Do do´ ∀ω ∈ Dom(Tuoi), ta co´ Dom(Tuoi) = {0,2, 0,25, 0,27, 0,3, 0,45, 0,6, 0,75, 0,66, 0,8}. Neˆ´u Num(Ai) 6= ∅ va` LV (Ai) 6= ∅ ta co´ Dom(Tuoi) = Num(Tuoi) ∪ LV (Tuoi) = {tre’ , raˆ´t tre’ , gia`, kha´ tre’ , kha´ gia`, ı´t gia´, raˆ´t gia`, raˆ´t raˆ´t tre’ , 20, 25, 27, 30, 45, 60, 75, 66, 80}. Gia’ su.’ t´ınh du.o.. c v(ψmaxLV ) = v(raˆ´t raˆ´t gia`) = 0,98. Khi do´ ∀ω ∈ Num(Ai) ta co´ IC(ω) = {ω.v(ψmaxLV )}/ψmax = (ω × 0, 98)/100, hay ∀ω ∈ Num(Ai) su.’ du. ng IC(ω), ta co´ Num(Ai) = {0,196, 0,245, 0,264, 0,294, 0,441, 0,588, 0,735, 0,646, 0,784}. Neˆ´u ta cho.n ca´c tham soˆ´ W va` doˆ. do t´ınh mo` . cho ca´c gia tu.’ sao cho v(ψmaxLV ) ≈ 1, 0 th`ı ({ω × v(ψmaxLV )}/ψmax) ≈ 1− ψmax − ω ψmax − ψmin . Di.nh ngh˜ıa 3.6. Cho da. i soˆ´ gia tu .’ X = (X,G,H,6), v la` ha`m di.nh lu .o.. ng ngu˜ . ngh˜ıa cu’a X . φk : [0, 1]→X go. i la` ha`m ngu .o.. c cu’a ha`m v theo mu´ .c k du.o.. c xa´c di.nh: ∀a ∈ [0, 1], Φk(a) = x k khi va` chı’ khi a ∈ I(xk), vo´.i xk ∈X k. Vı´ du. 3.6. Cho da. i soˆ´ gia tu .’ X = (X,G,H,6), trong do´ H+ = {ho.n, raˆ´t} vo´.i ho.n < raˆ´t va` H− = {´ıt, kha’ na˘ng} vo´.i ı´t > kha’ na˘ng, G = {nho’, lo´.n}. Gia’ su.’ cho W = 0, 6, fm(ho.n) = 0, 2, fm(raˆ´t) = 0, 3, fm(´ıt) = 0, 3, fm(kha’ na˘ng) = 0, 2. Ta co´ P 2 = {I(ho.n lo´.n), I(raˆ´t lo´.n), I (´ıt lo´.n), I(kha’ na˘ng lo´.n), I(ho.n nho’), I(raˆ´t nho’), I (´ıt nho’), I(kha’ na˘ng nho’)} la` phaˆn hoa.ch cu’a [0, 1]. fm(nho’) = 0, 6, fm(lo´ .n) =0, 4, fm(raˆ´t lo´.n) = 0, 12, fm(kha’ na˘ng lo´.n) = 0, 08. Ta co´ |I(raˆ´t lo´.n)| = fm(raˆ´t lo´.n) = 0, 12, hay I(raˆ´t lo´.n) = [0, 88, 1]. Do do´ theo di.nh ngh˜ıa Φ2(0, 9) = raˆ´t lo´ .n v`ı 0, 9 ∈ I(raˆ´t lo´.n). Tu.o.ng tu.. ta co´ |I(kha’ na˘ng lo´ .n)| = fm(kha’ na˘ng lo´.n) = 0, 08, hay I(kha’ na˘ng lo´.n) = [0, 72, 0, 8]. Do do´ theo di.nh ngh˜ıa Φ2(0, 75) = kha’ na˘ng lo´ .n v`ı 0, 75 ∈ I(kha’ na˘ng lo´.n). MOˆ. T CA´CH TIE´ˆP CAˆ. N DEˆ ’ XA´ˆP XI’ DU˜ . LIEˆ. U 117 Trong pha`ˆn na`y, gia’ su.’ chu´ng toˆi chı’ xe´t ca´c pha`ˆn tu.’ du.o.. c sinh tu` . pha`ˆn tu.’ lo´.n. H`ınh 3.1. T´ınh mo`. cu’a pha`ˆn tu.’ sinh lo´.n Di.nh ly´ 3.4. Cho da. i soˆ´ gia tu .’ X = (X,G,H,6), v la` ha`m di.nh lu .o.. ng ngu˜ . ngh˜ıa cu’a X, Φk la` ha`m ngu .o.. c cu’a v, ta co´ (1) ∀xk ∈Xk, Φk(v(xk)) = xk (2) ∀a ∈ I(xk), ∀b ∈ I(yk), xk 6=k y k, neˆ´u a < b th`ı Φk(a) <k Φk(b). Chu´.ng minh. (1) Da˘. t a = v(x k) ∈ [0, 1]. Vı` v(xk) ∈ I(xk) neˆn a ∈ I(xk). Theo di.nh ngh˜ıa ta co´ Φk(v(x k)) = xk. (2) Vı` xk 6=k yk neˆn theo di.nh ngh˜ıa ta co´ x k <k y k hoa˘. c y k <k x k, suy ra v(xk) < v(yk) hoa˘. c v(y k) < v(xk). Ma˘.t kha´c ta co´ v(x k) ∈ I(xk) va` v(yk) ∈ I(yk), theo gia’ thieˆ´t a < b do do´ xk <k y k. Hay Φk(a) <k Φk(b). 3.3. Thuaˆ.t toa´n xa´c di.nh gia´ tri. chaˆn ly´ cu’a die`ˆu kieˆ.n mo` . Nhu. trong Mu˜c 3 da˜ tr`ınh ba`y, mie`ˆn tri. cu’a thuoˆ.c t´ınh mo` . trong quan heˆ. cu’a lu .o.. c doˆ` co . so.’ du˜. lieˆ.u phu´ .c ta.p va` co´ theˆ’ nhaˆ.n gia´ tri. nhu . soˆ´, gia´ tri. ngoˆn ngu˜ . hoa˘. c vu` .a gia´ tri. soˆ´ vu` .a gia´ tri. ngoˆn ngu˜ .. Vı` vaˆ.y, ta di xaˆy du . . ng thuaˆ.t toa´n da´nh gia´ die`ˆu kieˆ.n mo` . deˆ’ la`m co. so.’ cho vieˆ.c thao ta´c va` t`ım kieˆ´m du˜ . lieˆ.u sau na`y. Go.i Dom(Ai) = Num(Ai)∪LV (Ai) la` mie`ˆn tri. cu’a thuoˆ.c t´ınh mo` . Ai trong moˆ. t quan heˆ. cu’a lu.o.. c doˆ` co . so.’ du˜. lieˆ.u. Khi do´, thuaˆ.t toa´n du .o.. c xaˆy du . . ng nhu . sau. Thuaˆ.t toa´n 3.1 Va`o: Cho r la` moˆ.t quan heˆ. xa´c di.nh treˆn taˆ.p vu˜ tru. ca´c thuoˆ.c t´ınh U. Die`ˆu kieˆ.n t[Ai] ≈k u, vo´ .i u la` moˆ.t gia´ tri. soˆ´ hoa˘. c gia´ tri. ngoˆn ngu˜ .. Ra: Vo´.i mo. i t ∈ r sao cho (t[Ai] ≈k u) = true. Phu.o.ng pha´p // Di xaˆy du.. ng ca´c P k = {I(t[Ai]) : |t[Ai]| = k, ∀t ∈ r}, theo [2], moˆ. t gio´ .i ha.n ho . . p ly´ deˆ’ phu` ho.. p trong thu . . c teˆ´ ta cho k 6 4. Tru .´o.c tieˆn, ta chuyeˆ’n ca´c gia´ tri. soˆ´ tha`nh gia´ tri. ngoˆn ngu˜ .. (1) for moˆ˜i t ∈ r do (2) if t[Ai] ∈ Num(Ai) then t[Ai] = Φk(IC(t[Ai])) //Xaˆy du.. ng ca´c P k du.. a va`o doˆ. da`i ca´c tu` .. (3) k = 1 (4) While k 6 4 do (5) P k = ∅ 118 NGUYE˜ˆN CA´T HOˆ`, NGUYE˜ˆN COˆNG HA`O (6) for moˆ˜i t ∈ r do (7) if |t[Ai]| = k then P k = P k ∪ {I(t[Ai])} (8) k = k + 1 // Xa´c di.nh gia´ tri. chaˆn ly´ cu’a (t[Ai] ≈k u). (9) if u ∈ Num(Ai) then u ′ = Φk(IC(u)) (10) k = 4 // Phaˆn hoa.ch tu .o.ng u´.ng vo´.i mu´.c lo´.n nhaˆ´t. (11) While k > 0 do (12) for moˆ˜i ∆k ∈ P k do (13) if (I(t[Ai]) ⊆ ∆k and I(u) ⊆ ∆k) or (I(t[Ai]) ⊆ ∆k and I(u′) ⊆ ∆k) then {(t[Ai] ≈k u) = true} or {(t[Ai] ≈k u′) = true} (14) exit (15) k = k − 1 Thuaˆ.t toa´n 3.2 Va`o: Cho r la` moˆ.t quan heˆ. xa´c di.nh treˆn taˆ.p vu˜ tru. ca´c thuoˆ.c t´ınh U. Die`ˆu kieˆ.n t[Ai]θu, vo´ .i u la` moˆ. t gia´ tri. soˆ´ hoa˘.c gia´ tri. ngoˆn ngu˜ ., θ ∈ {6=k, k}. Ra: Vo´.i mo. i t ∈ r sao cho (t[Ai]θu) = true Phu.o.ng pha´p (1) Su.’ du.ng ca´c bu .´o.c tu`. (1)-(8) trong Thuaˆ.t toa´n 3.1 (2) if u ∈ Num(Ai) then u ′ = Φk(IC(u)) (3) k = 1 (4) While k 6 4 do (5) for vo´.i mo. i ∆ k ∈ P k do (6) if {I(t[Ai]) 6⊂ ∆ k or I(u) 6⊂ ∆k} then (t[Ai] 6=k u) = true (7) if {v(t[Ai]) > v(u)} then (t[Ai] >k u) = true (8) else if (t[Ai] <k u) = true (7) if {I(t[Ai]) 6⊂ ∆k or I(u′) 6⊂ ∆k} then (t[Ai] 6=k u′) = true (9) if {v(t[Ai]) > v(u′)} then or (t[Ai] >k u′) = true (10) else if (t[Ai] <k u ′) = true (11) k = k + 1 3.4. Vı´ du. . Cho lu .o.. c doˆ` quan heˆ. U = {SOCM,HOTEN, SUCKHOE,TUOI,LUONG} va` quan heˆ. Luong Tuoi du .o.. c xa´c di.nh nhu . sau: Ba’ng 3.1. Quan heˆ. Lu .o.ng tuoˆ’i MOˆ. T CA´CH TIE´ˆP CAˆ. N DEˆ ’ XA´ˆP XI’ DU˜ . LIEˆ. U 119 Socm Hoten Suckhoe Tuoi Luong 11111 Pha.m Tro.ng Ca`ˆu raˆ´t raˆ´t toˆ´t 31 2.800.000 22222 Nguye˜ˆn Va˘n Ty´ raˆ´t toˆ´t 85 cao 33333 Tra`ˆn Tieˆ´n xaˆ´u 32 2.000.000 44444 Vu˜ Hoa`ng ho.n xaˆ´u 45 500.000 55555 An Thuyeˆn raˆ´t xaˆ´u 41 raˆ´t cao 66666 Thuaˆ.n Yeˆ´n kha’ na˘ng xaˆ´u 61 thaˆ´p 77777 Va˘n Cao ho.n toˆ´t 59 ı´t cao 88888 Thanh Tu`ng kha’ na˘ng toˆ´t 75 1.500.000 99999 Nguye˜ˆn Cu.`o.ng ı´t toˆ´t 25 kha´ thaˆ´p (a) T`ım nhu˜.ng ca´n boˆ. co´ TUOI ≈2 ho .n gia` va` SUCKHOE ≈2 kha’ na˘ng toˆ´t. (b) T`ım nhu˜.ng ca´n boˆ. co´ TUOI ≈1 tre’ hoa˘.c co´ LUONG 6=1 cao. Tru.´o.c heˆ´t chu´ng ta se˜ xem mie`ˆn tri. cu’a SUCKHOE, TUOI va` LUONG la` ba da. i soˆ´ gia tu.’ va` du.o.. c xa´c di.nh nhu . sau: XSuckhoe = X suckhoe, Gsuckhoe, Hsuckhoe,6), vo´ .i Gsuckhoe = {toˆ´t, xaˆ´u}, H + suckhoe = {raˆ´t, ho.n}, H−suckhoe = {kha’ na˘ng, ı´t}, raˆ´t > ho .n va` ı´t > kha’ na˘ng. Wsuckhoe = 0, 6, fm(xaˆ´u) = 0, 6, fm(toˆ´t) = 0, 4, fm(raˆ´t) = 0, 3, fm(kha´) = 0, 2, fm(kha’ na˘ng) = 0, 2, fm(´ıt) = 0, 3. XTuoi = (X tuoi, Gtuoi, Htuoi,6), vo´ .i Gtuoi = {tre’, gia`}, H + t uoi = {raˆ´t, ho .n}, H−tuoi = {kha’ na˘ng, ı´t}, raˆ´t > ho.n va` ı´t > kha’ na˘ng. Wtuoi = 0, 4, fm(tre’) = 0, .4, fm(gia`) = 0, 6, fm(raˆ´t) = 0, 3, fm(kha´) =0, 15, fm(kha’ na˘ng) = 0, 25, fm(´ıt) = 0, 3. XLuong = (X luong , Gluong, Hluong,6), vo´ .i Gluong = {cao, thaˆ´p}, H + luong = {raˆ´t, ho .n}, H−luong = {kha’ na˘ng, ı´t}, raˆ´t > ho .n va` ı´t > kha’ na˘ng. Wluong = 0, 6, fm(thaˆ´p) = 0, 6, fm (cao) = 0, 4, fm(raˆ´t) = 0, 25, fm(kha´) = 0, 25, fm(kha’ na˘ng) = 0, 25, fm(´ıt) = 0, 25. Doˆ´i vo´.i thuoˆ.c t´ınh TUOI: Ta co´ fm(raˆ´t tre’) = 0, 12, fm(ho .n tre’) = 0, 06, fm(´ıt tre’) = 0, 12, fm(kha’ na˘ng tre’) = 0, 1. Vı` raˆ´t tre’ < ho.n tre’ < tre’ < kha’ na˘ng tre’ < ı´t tre’ neˆn I(raˆ´t tre’) = [0, 0, 12], I(ho.n tre’) = [0, 12, 0, 18], I(kha’ na˘ng tre’) = [0, 18, 0, 3], I (´ıt tre’) = [0, 3, 0, 4]. Ta co´ fm(raˆ´t gia`) = 0, 18, fm(ho.n gia`) = 0, 09, fm(´ıt gia`) = 0, 18, fm(kha’ na˘ng gia`) = 0, 15. Vı` ı´t gia` < kha’ na˘ng gia` < gia` < ho.n gia` < raˆ´t gia` neˆn I (´ıt gia`) = [0, 4, 0, 58], I(kha’ na˘ng gia`) = [0, 58, 0, 73], I(ho.n gia`) = [0, 73, 0, 82], I(raˆ´t gia`) = [0, 82, 1]. Neˆ´u cho.n ψ1 = 100 ∈X tuoi khi do´ ∀ω ∈ Num(TUOI), su .’ du. ng IC(ω) ta co´Num(TUOI) = {0, 31, 0, 85, 0, 32, 0, 45, 0, 41, 0, 61, 0, 59, 0, 75, 0, 25}. Do do´ Φ2(0, 31) = ı´t tre’ v`ı 0, 31 ∈ I (´ıt tre’), tu.o.ng tu.. Φ2(0, 85) = raˆ´t gia`, Φ2(0, 32) = ı´t tre’, Φ2(0, 45) = ı´t gia`, Φ2(0, 41) = ı´t gia`, Φ2(0, 61) = kha’ na˘ng gia`, Φ2(0, 59) = kha’ na˘ng gia`, Φ2(0, 75) = ho .n gia`, Φ2(0, 25) = kha’ na˘ng tre’. Doˆ´i vo´.i thuoˆ.c t´ınh LUONG: Ta co´fm(raˆ´t thaˆ´p) = 0, 15, fm(kha´ thaˆ´p) = 0, 15, fm(´ıt thaˆ´p) = 0, 15, fm(kha’ na˘ng thaˆ´p) = 0, 15. Vı` raˆ´t thaˆ´p < ho.n thaˆ´p< thaˆ´p< kha’ na˘ng thaˆ´p < ı´t thaˆ´p neˆn I(raˆ´t thaˆ´p) = [0, 0, 15], I(ho.n thaˆ´p) = [0, 15, 0, 3], I(kha’ na˘ng thaˆ´p) = [0, 3, 0, 45], I (´ıt thaˆ´p) = [0, 45, 0, 6]. 120 NGUYE˜ˆN CA´T HOˆ`, NGUYE˜ˆN COˆNG HA`O Ta co´ fm(raˆ´t cao) = 0, 1, fm(ho.n cao) = 0, 1, fm(´ıt cao) = 0, 1, fm(kha’ na˘ng cao) = 0, 1. Vı` ı´t cao < kha’ na˘ng cao < cao < ho.n cao < raˆ´t cao neˆn I (´ıt cao) = [0, 6, 0, 7], I(kha’ na˘ng cao) = [0, 7, 0, 8], I(ho.n cao) = [0, 8, 0, 9], I(raˆ´t cao) = [0, 9, 1]. Neˆ´u cho.n ψ2 =raˆ´t raˆ´t cao ∈ X luong va` ψ1 = 3.000.000, ta co´ v(raˆ´t raˆ´t cao) = 0, 985 khi do´ ∀ω ∈ Num(LUONG) = {2.800.000, 2.000.000, 500.000, 1.500.000}, su.’ du. ng IC(ω) = {ω × v(ψ2)}/ψ1, ta co´ Num(LUONG) = {0, 92, 0, 65, 0, 16, 0, 49}. Do do´ Φ2(0, 92)= raˆ´t cao, Φ2(0, 65) = ı´t cao, Φ2(0, 16) = ho.n thaˆ´p, Φ2(0, 49) = ı´t cao. Vaˆ.y, nhu˜ .ng ca´n boˆ. co´ TUOI ≈2 ho .n gia` va` SUCKHOE ≈2 kha’ na˘ng toˆ´t la`: Ba’ng 3.2. Keˆ´t qua’ t`ım kieˆ´m cu’a v´ı du. (a) Socm Hoten Suckhoe Tuoi Luong 88888 Thanh Tu`ng kha’ na˘ng toˆ´t 75 1.500.000 va` nhu˜.ng ca´n boˆ. co´ TUOI ≈1 tre’ hoa˘. c co´ LUONG 6=1cao. Ba’ng 3.2. Keˆ´t qua’ t`ım kieˆ´m cu’a v´ı du. (b) Socm Hoten Suckhoe Tuoi Luong 11111 Pha.m Tro.ng Ca`ˆu raˆ´t raˆ´t toˆ´t 31 2.800.000 33333 Tra`ˆn Tieˆ´n xaˆ´u 32 2.000.000 44444 Vu˜ Hoa`ng kha´ xaˆ´u 45 500.000 66666 Thuaˆ.n Yeˆ´n kha’ na˘ng xaˆ´u 61 thaˆ´p 99999 Nguye˜ˆn Cu.`o.ng ı´t toˆ´t 25 kha´ thaˆ´p 4. KEˆ´T LUAˆ. N Ba`i ba´o xem xe´t moˆ. t ca´ch tro.n ve.n vieˆ.c da´nh gia´ deˆ’ doˆ´i sa´nh ca´c gia´ tri. khi mie`ˆn tri. thuoˆ.c t´ınh cu’a moˆ. t quan heˆ. trong co . so.’ du˜. lieˆ.u mo` . nhaˆ.n gia´ tri. da da.ng.Vieˆ.c da´nh gia´ na`y la` phu` ho.. p vo´ .i thu.. c teˆ´, bo .’ i v`ı gia´ tri. cu’a ngoˆn ngu˜ . la` tu.o.ng doˆ´i phu´.c ta.p. Treˆn co . so.’ na`y, ba`i ba´o da˜ phaˆn t´ıch ca´c quan heˆ. doˆ´i sa´nh giu˜ .a hai gia´ tri. theo ngu˜ . ngh˜ıa mo´.i. Tu`. do´ du.a ra moˆ. t soˆ´ v´ı du. ve`ˆ ca´c thao ta´c du˜ . lieˆ.u theo ca´ch tieˆ´p caˆ.n mo´ .i. Vaˆ´n de`ˆ xaˆy du.. ng ca´c phu. thuoˆ.c du˜ . lieˆ.u treˆn moˆ h`ınh co . so.’ du˜. lieˆ.u mo` . theo ca´ch tieˆ´p caˆ.n da. i soˆ´ gia tu .’ se˜ du.o.. c gio´ .i thieˆ.u trong nhu˜.ng ba`i ba´o tieˆ´p theo. TA`I LIEˆ. U THAM KHA ’O [1] B.P. Buckles, F.E. Petry, A fuzzy representation of data for relational databases, Fuzzy Sets and Systems 7 (3) (1982) 213–226. [2] Hoˆ` Thua`ˆn, Hoˆ` Caˆ’m Ha`, An approach to extending the relational database model for handing incomplete information and data dependencies, Ta. p ch´ı Tin ho. c va` Die`ˆu khieˆ’n ho. c 17 (3) (2001) 41–47. [3] Hoˆ` Thua`ˆn, Hoˆ` Caˆ’m Ha`, Da. i soˆ´ quan heˆ. va` quan dieˆ’m su .’ du. ng Null value treˆn moˆ. t moˆ h`ınh co. so.’ du˜. lieˆ.u mo` ., Ta. p ch´ı Tin ho. c va` Die`ˆu khieˆ’n ho. c 17 (4) (2001) 1–10. MOˆ. T CA´CH TIE´ˆP CAˆ. N DEˆ ’ XA´ˆP XI’ DU˜ . LIEˆ. U 121 [4] H. Thuan, T.T. Thanh, Fuzzy Functional Dependencies with Linguistic Quantifiers, Ta.p ch´ı Tin ho. c va` Die`ˆu khieˆ’n ho. c 18 (2) (2002) 97–108. [5] Mustafa LLKer Sozat, Adnan Yazici, A complete axiomatization for fuzzy functional and multivalued dependencies in fuzzy database relations, Fuzzy Set and Systems 117 (2001) 161–181. [6] Nguye˜ˆn Ca´t Hoˆ`, Tra`ˆn Tha´i So.n, Ve`ˆ khoa’ng ca´ch giu˜.a ca´c gia´ tri. cu’a bieˆ´n ngoˆn ngu˜ . trong da. i soˆ´ gia tu .’ , Ta. p ch´ı Tin ho. c va` Die`ˆu khieˆ’n ho. c 11 (1) (1995) 10–20. [7] Nguye˜ˆn Ca´t Hoˆ`, Tra`ˆn Tha´i So.n, Tra`ˆn D`ınh Khang, Leˆ Xuaˆn Vieˆ.t, Fuzziness measure, quantified semantic mapping and interpolative method of approximate reasoning in med- ical expert systems, Ta. p ch´ı Tin ho. c va` Die`ˆu khieˆ’n ho. c 18 (3) (2002) 237–252. [8] Nguyen Cat Ho, W. Wechler, Extended hedge algebras ans their application to fuzzy logic, Fuzzy Set and Systems 52 (1992) 259–282. [9] Nguye˜ˆn Ca´t Hoˆ`, Ly´ thuyeˆ´t taˆ.p mo` . va` coˆng ngheˆ. t´ınh toa´n me`ˆm, Heˆ. mo` ., ma.ng no .ron va` u´.ng du. ng, Nha` xuaˆ´t ba’n Khoa ho.c va` Ky˜ thuaˆ.t, na˘m 2001 (37–74). [10] Le Tien Vuong, Ho Thuan, A relational database extended by application of fuzzy set theory and linguistic variables, Computer and Artificial Intelligence 8 (2) (1989) 153–168. [11] E. Petry and P. Bosc, Fuzzy Databases Principles and Applications, Kluwer Academic Publishers, 1996. [12] S. Shensoi, A. Melton, Proximity relations in the fuzzy relational databases, Fuzzy Sets and Systems 21 (1987) 19–34. Nhaˆ. n ba`i nga`y 6 - 1 - 2006
File đính kèm:
- mot_cach_tiep_can_de_xap_xi_du_lieu_trong_co_so_du_lieu_mo.pdf