CS:4420讲解、辅导Intelligence留学生、Python,Java/c++编程设计讲解 调试Web开发|辅导留学生Prolog
- 首页 >> OS编程 CS:4420 Artificial Intelligence
Spring 2019
Homework 4
Part A
Due: Friday, March 29 by 11:59pm
This assignment has two parts, A and B, both to be done individually. This document describes
Part A which is a written assignment.
Write your solutions in a text editor or word processor and submit on ICON a printout of the file
in PDF format. Make sure you add your name. Handwritten solutions are acceptable only if your
handwriting is legible and you submit a scan of the work and as a single file. No photographs,
please.
1 Domain Modeling in First-Order Logic
1. Do Problem 8.9 from the textbook. Report just the question number and for each alternative
in the question your classification.
Example:
f. (i) - (2)
(ii) - (1)
(iii) - (3)
(iv) - (1)
2. For this problem and the next you should use only the relation and function symbols in
Figure 1. Do not introduce your own symbols.
(a) Translate each of the following FOL sentences in good, natural English (they should have
no x’s or y’s). Note that, for readability, square brackets are also used as parentheses.
i. x [P erson(x)y (P erson(y) ∧ Needs(x, y))]
ii. x [Loves(M ary, x) Loves(John, x)]
iii. x [P erson(x) y (Has(x, y) ∧ Heart(y))]
iv. x [P erson(x)y z (P arent(x, y) ∧ P arent(x, z) ∧ (y = z))]
v. s [(Student(s) ∧ Likes(s, AI)) Likes(s, CS4420)]
vi. [x y (P erson(y) Likes(y, x))]
1Predicate Intended Meaning
American(x) x is American
Bug(x) x is a (software) bug
Class(x) x is a class
Drinks(x,y) x drinks y
From(x,y) x is from y
Good(x) x is good
Grandparent(x,y) y is a grandparent of x
Has(x,y) x has y
Heart(x) x is a heart
In(x,y) x is in y
Knows(x,y) x knows y
Likes(x,y) x likes y
Loves(x,y) x loves y
Museum(x) x is a museum
Predicate Intended Meaning
Needs(x,y) x needs y
Parent(x,y) y is a biological parent of x
Person(x) x is a person
Program(x) x is a program
Student(x) x is a student
Teaches(x,y) x teaches y
Tease(x,y,z) x teases y at time z
Time(x) x is a time
Visited(x,y) x visited y
Wants(x,y) x wants y
Wine(x) x is a kind of wine
Wrote(x,y) x wrote y
Function Intended Meaning
mother(x) the biological mother of x
Figure 1:
vii. x y [Bug(x) ∧ P rogram(y) ∧ W rote(John, y) ∧ In(x, y)]
viii.y Needs(M ary, y)
ix.x P arent(x, mother(x))
x.x (P erson(x) Knows(x, mother(x)))
(b) Translate each of the following English statements to FOL. Use only logical symbols
from the set {, , ∧, ∨, , , , =}. You can use the constant symbols F red, Jane,
F rance, Louvre, with the expected meaning.
Make sure you use parentheses to avoid ambiguous readings of your sentences.
i. Students love museums.
ii. Not every student likes a good museum.
iii. Some Americans like wines from France.
iv. Americans who love wines from France dislike American wines.
v. Jane visited all the museums in France except the Louvre.
vi. Fred knows any museum visited by Jane.
vii. Everyone knows someone from France.
viii. Fred likes all kinds of wine.
ix. Fred drinks only wine.
x. Everybody has exactly two parents.
xi. Not everyone knows someone with a French mother.
xii. Those who know Jane’s mother love her.
xiii. You cannot dislike people you love.
xiv. Jane only loves people with a good heart.
xv. No one has something that everybody wants.
22 Validity and Entailment in FOL with equality
For the problems below it is helpful to recall that all interpretations in FOL are assumed to have
a non-empty domain.
1. For each FOL sentence below say whether it is valid or not and briefly explain why. Specifi-
cally, for each valid sentence argue informally but precisely why every possible interpretation
makes the sentence true; for each invalid sentence describe an interpretation that makes the
sentence false.
2. Optional, Extra credit
Let Γ be the knowledge base {M arried(J im, Laura), (J im = George)} and
let α be the sentence ?M arried(George, Laura).
(a) Argue informally but convincingly that Γ does not entail α.
(b) Provide enough FOL sentences that when added to Γ ensure that Γ |= α.
3
Spring 2019
Homework 4
Part A
Due: Friday, March 29 by 11:59pm
This assignment has two parts, A and B, both to be done individually. This document describes
Part A which is a written assignment.
Write your solutions in a text editor or word processor and submit on ICON a printout of the file
in PDF format. Make sure you add your name. Handwritten solutions are acceptable only if your
handwriting is legible and you submit a scan of the work and as a single file. No photographs,
please.
1 Domain Modeling in First-Order Logic
1. Do Problem 8.9 from the textbook. Report just the question number and for each alternative
in the question your classification.
Example:
f. (i) - (2)
(ii) - (1)
(iii) - (3)
(iv) - (1)
2. For this problem and the next you should use only the relation and function symbols in
Figure 1. Do not introduce your own symbols.
(a) Translate each of the following FOL sentences in good, natural English (they should have
no x’s or y’s). Note that, for readability, square brackets are also used as parentheses.
i. x [P erson(x)y (P erson(y) ∧ Needs(x, y))]
ii. x [Loves(M ary, x) Loves(John, x)]
iii. x [P erson(x) y (Has(x, y) ∧ Heart(y))]
iv. x [P erson(x)y z (P arent(x, y) ∧ P arent(x, z) ∧ (y = z))]
v. s [(Student(s) ∧ Likes(s, AI)) Likes(s, CS4420)]
vi. [x y (P erson(y) Likes(y, x))]
1Predicate Intended Meaning
American(x) x is American
Bug(x) x is a (software) bug
Class(x) x is a class
Drinks(x,y) x drinks y
From(x,y) x is from y
Good(x) x is good
Grandparent(x,y) y is a grandparent of x
Has(x,y) x has y
Heart(x) x is a heart
In(x,y) x is in y
Knows(x,y) x knows y
Likes(x,y) x likes y
Loves(x,y) x loves y
Museum(x) x is a museum
Predicate Intended Meaning
Needs(x,y) x needs y
Parent(x,y) y is a biological parent of x
Person(x) x is a person
Program(x) x is a program
Student(x) x is a student
Teaches(x,y) x teaches y
Tease(x,y,z) x teases y at time z
Time(x) x is a time
Visited(x,y) x visited y
Wants(x,y) x wants y
Wine(x) x is a kind of wine
Wrote(x,y) x wrote y
Function Intended Meaning
mother(x) the biological mother of x
Figure 1:
vii. x y [Bug(x) ∧ P rogram(y) ∧ W rote(John, y) ∧ In(x, y)]
viii.y Needs(M ary, y)
ix.x P arent(x, mother(x))
x.x (P erson(x) Knows(x, mother(x)))
(b) Translate each of the following English statements to FOL. Use only logical symbols
from the set {, , ∧, ∨, , , , =}. You can use the constant symbols F red, Jane,
F rance, Louvre, with the expected meaning.
Make sure you use parentheses to avoid ambiguous readings of your sentences.
i. Students love museums.
ii. Not every student likes a good museum.
iii. Some Americans like wines from France.
iv. Americans who love wines from France dislike American wines.
v. Jane visited all the museums in France except the Louvre.
vi. Fred knows any museum visited by Jane.
vii. Everyone knows someone from France.
viii. Fred likes all kinds of wine.
ix. Fred drinks only wine.
x. Everybody has exactly two parents.
xi. Not everyone knows someone with a French mother.
xii. Those who know Jane’s mother love her.
xiii. You cannot dislike people you love.
xiv. Jane only loves people with a good heart.
xv. No one has something that everybody wants.
22 Validity and Entailment in FOL with equality
For the problems below it is helpful to recall that all interpretations in FOL are assumed to have
a non-empty domain.
1. For each FOL sentence below say whether it is valid or not and briefly explain why. Specifi-
cally, for each valid sentence argue informally but precisely why every possible interpretation
makes the sentence true; for each invalid sentence describe an interpretation that makes the
sentence false.
2. Optional, Extra credit
Let Γ be the knowledge base {M arried(J im, Laura), (J im = George)} and
let α be the sentence ?M arried(George, Laura).
(a) Argue informally but convincingly that Γ does not entail α.
(b) Provide enough FOL sentences that when added to Γ ensure that Γ |= α.
3