1. Trang chủ
  2. » Tất cả

Trí tuệ nhân tạo hcmus bài tập lý thuyết 7

5 5 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Nội dung

Môn Cơ sở Trí tuệ Nhân tạo Bài tập lý thuyết 7 Câu 1 Cho một KB như sau a All hounds howl at night b Anyone who has any cats will not have any mice c Light sleepers do not have anything which howls at.

Mơn: Cơ sở Trí tuệ Nhân tạo Bài tập lý thuyết Câu Cho KB sau: a All hounds howl at night b Anyone who has any cats will not have any mice c Light sleepers not have anything which howls at night d John has either a cat or a hound e (Conclusion) If John is a light sleeper, then John does not have any mice Dùng hợp giải để chứng minh (phủ định) kết luận Bài làm: Bước 1: Viết câu dạng FOL a All hounds howl at night ∀ x [Hound(x) ⇒ Howl(x)] b Anyone who has any cats will not have any mice ∀ x ∀ y [Have(x, y) ∧ Cat(y) ⇒ ¬∃ z [Have(x, z) ∧ Mouse(z)]] c Light sleepers not have anything which howls at night ∀ x [LightSleeper(x) ⇒ ¬∃y [Howl(y) ∧ Have(x,y)]] d John has either a cat or a hound ∃x [Have(John,x)) ∧(Cat(x) ∨ Hound(x))] e (Conclusion) If John is a light sleeper, then John does not have any mice LightSleeper(John) ⇒ ¬∃x [Have(John,x) ∧ Mouse(x)] Phủ định kết luận là: ¬(LightSleeper(John) ⇒ ¬∃x [Have(John,x) ∧ Mouse(x)]) Bước 2: Biến đổi câu dạng clausal form a ∀ x [Hound(x) ⇒ Howl(x)] ¬Hound(x) ∨ Howl(x) b ∀ x ∀ y [Have(x, y) ∧ Cat(y) ⇒ ¬∃ z[Have(x, z) ∧ Mouse(z)]] ∀ x ∀ y [Have(x, y) ∧ Cat(y) ⇒ ∀ z ¬[Have(x, z) ∧ Mouse(z)]] ∀ x ∀ y∀ z [¬(Have(x, y) ∧ Cat(y)) ∨ ¬[Have(x, z) ∧ Mouse(z)]] ¬Have(x, y) ∨ ¬Cat(y) ∨ ¬Have(x, z) ∨ ¬Mouse(z) c ∀ x [LightSleeper(x) ⇒ ¬∃y [Howl (y) ∧ Have(x,y)]] ∀ x [LightSleeper(x) ⇒ ∀ y ¬[Howl (y) ∧ Have(x,y)]] ∀ x ∀ y [¬LightSleeper(x) ∨ ¬[Howl (y) ∧ Have(x,y)]] ¬LightSleeper(x) ∨ ¬Howl (y) ∨ ¬Have(x,y) d ∃x[Have(John,x)) ∧(Cat(x) ∨ Hound(x))] Have(John,a) ∧(Cat(a) ∨ Hound(a)) e ¬(LightSleeper(John) ⇒ ¬∃x [Have(John,x) ∧ Mouse(x)]) ¬ (¬LightSleeper(John) ∨ ¬∃x [Have(John,x) ∧ Mouse(x)]) LightSleeper(John) ∧ ∃ x [Have(John,x) ∧ Mouse(x)] LightSleeper(John) ∧Have(John,b) ∧ Mouse(b) Kết ta KB sau: ¬Hound(x) ∨ Howl(x) ¬Have(x, y) ∨ ¬Cat(y) ∨ ¬Have(x, z) ∨ ¬Mouse(z) ¬LightSleeper(x) ∨ ¬Howl (y) ∨ ¬Have(x,y) Have(John,a) Cat(a) ∨ Hound(a) LightSleeper(John) Have(John,b) Mouse(b) Bước 3: Hợp giải KB Hợp giải được: Howl(a) ∨ Cat(a) 10 Hợp giải được: ¬Have(x, y) ∨ ¬Cat(y) ∨ ¬Have(x, b) 11 Hợp giải 10 được: ¬Have(John, y) ∨ ¬Cat(y) 12 Hợp giải 11 được: Howl(a) ∨ ¬Have(John, a) 13 Hợp giải 12 được: Howl(a) 14 Hợp giải 13 được: ¬LightSleeper(x) ∨ ¬Have(x,a) 15 Hợp giải 14 được: ¬LightSleeper(John) 16 Hợp giải 15: FALSE => chứng minh kết luận “If John is a light sleeper, then John does not have any mice” Câu Cho KB sau: a Every child loves Santa b Everyone who loves Santa loves any reindeer c Rudolph is a reindeer, and Rudolph has a red nose d Anything which has a red nose is weird or is a clown e No reindeer is a clown f Scrooge does not love anything which is weird g (Conclusion) Scrooge is not a child Dùng hợp giải để chứng minh (phủ định) kết luận Bài làm: Bước 1: Viết câu dạng FOL a Every child loves Santa ∀ x [Child(x) ⇒ Love(x, Santa)] b Everyone who loves Santa loves any reindeer ∀ x [Love(x, Santa) ⇒ ∀ y [Reindeer(y) ⇒ Love(x, y)]] c Rudolph is a reindeer, and Rudolph has a red nose Reindeer(Rudolph) ∧ Have-red-nose(Rudolph) d Anything which has a red nose is weird or is a clown ∀ x [Have-red-nose(x) ⇒(Weird(x) ∨ Clown(x))] e No reindeer is a clown ∀ x [Reindeer(x) ⇒ ¬Clown(x)] f Scrooge does not love anything which is weird ∀ x [Love(Scrooge, x) ⇒ ¬Weird(x)] g (Conclusion) Scrooge is not a child ¬Child(Scrooge) Phủ định kết luận là: Child(Scrooge) Bước 2: Biến đổi câu dạng clausal form a ∀ x [Child(x) ⇒ Love(x, Santa)] ¬Child(x) ∨ Love(x, Santa) b ∀ x [Love(x, Santa) ⇒ ∀ y [Reindeer(y) ⇒ Love(x, y)]] ∀ x∀ y [Love(x, Santa) ⇒ [Reindeer(y) ⇒ Love(x, y)]] ¬Love(x, Santa) ∨ ¬Reindeer(y) ∨ Love(x, y) c Reindeer(Rudolph) ∧ Have-red-nose(Rudolph) d ∀ x [Have-red-nose(x) ⇒(Weird(x) ∨ Clown(x))] ¬Have-red-nose(x) ∨Weird(x) ∨ Clown(x) e ∀ x [Reindeer(x) ⇒ ¬Clown(x)] ¬Reindeer(x) ∨ ¬Clown(x) f ∀ x [Love(Scrooge, x) ⇒ ¬Weird(x)] ¬Love(Scrooge, x) ∨ ¬Weird(x) g Child(Scrooge) Kết ta KB sau: ¬Child(x) ∨ Love(x, Santa) ¬Love(x, Santa) ∨ ¬Reindeer(y) ∨ Love(x, y) Reindeer(Rudolph) Have-red-nose(Rudolph) ¬Have-red-nose(x) ∨Weird(x) ∨ Clown(x) ¬Reindeer(x) ∨ ¬Clown(x) ¬Love(Scrooge, x) ∨ ¬Weird(x) Child(Scrooge) Bước 3: Hợp giải KB Hợp giải được: Love(Scrooge, Santa) 10 Hợp giải được: ¬Reindeer(y) ∨ Love(Scrooge, y) 11 Hợp giải được: ¬Clown(Rudolph) 12 Hợp giải và 11 được: Weird(Rudolph) 13 Hợp giải 12 được: ¬Love(Scrooge, Rudolph) 14 Hợp giải 10 13 được: ¬Reindeer(Rudolph) 15 Hợp giải 14: FALSE => chứng minh kết luận “Scrooge is not a child”

Ngày đăng: 03/04/2023, 18:03

w