Question

1.Indicate which of the following Prolog constructs correctly state, "All squares adjacent to a wumpus have...

1.Indicate which of the following Prolog constructs correctly state, "All squares adjacent to a wumpus have a stench."

stench(X) :-
    adjacentToWumpus(X).

stench(X) :-
    square(X),
    adjacentToWumpus(X).

square(X) :-
    adjacentToWumpus(X),
    stench(X).

adjacentToWumpus(X) :-
    square(X),
    stench(X).

2.When the expression:

∀x∃y (Man(x) ∧ Object(y) ⇒ Desires(x, y))

is converted to:

∀x(Man(x) ∧ Object(F(y)) ⇒ Desires(x, F(y)))

what is F(y)?

a ground term

a unifier

a Skolem function

unknown

3.Given the following knowledge base:

Knows(John, Jane)
Knows(John, Bill)
Wealthy(y)
Greedy(Jane)
Generous(Bill)

which of the following unifications will result in a substitution that satisfies the query, "Who does John know who is greedy?" (select all that apply):

UNIFY(Knows(John, Greedy(x)), Knows(John, y))

UNIFY(Knows(John, Greedy(x)), Knows(John, Bill))

UNIFY(Knows(John, Greedy(x)), Wealthy(y))

UNIFY(Knows(John, Greedy(x)), Knows(y, Greedy(Jane))

UNIFY(Knows(John, Greedy(x)), Generous(y))

4.What name is given to a literal value substituted for a variable in an expression that uses a universal quantifier?

Skolem constant

substitution

answer literal

ground term

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1. Option D is correct.

Option A is incorrect. The construct says that X has stench if X is adjacent to Wumpus. The construct doesn't state what X is. There could be stench in other squares also.

Option B is incorrect because the construct says that X has stench if it is a square and if it is adjacent to Wumpus. But the statement in the question says that all squares adjacent to Wumpus have stench but not vice versa.

Option C is incorrect because the construct says that X is a square if it has stench and if it is adjacent to Wumpus.

Option D is correct because the construct says the X is adjacent to Wumpus if it is a square and if it has stench. This is clearly conveyed from the input statement.

2.Option C is correct.

Option A is incorrect because a ground term doesn't contain any variable.

Option B is incorrect because a unifier makes two atoms resolvable.

Option C is correct because a Skolem function f(y) can replace every existentially quantified variable y.

Option D is incorrect because f(y) is a Skolem function.

3. Option A and D are correct.

Option A is correct because it is of the form of a most general unifier that resolves to Greedy(x)/y

Option B is incorrect because it resolves to Greedy(x)/Bill but according to our knowledge base Bill is generous.

Option C is incorrect because Knows and Wealthy cannot be unified

Option D is correct because it resolves to a redundant unification i.e., Greedy(x)/Greedy{Jane) and y/John

Option E is incorrect because Knows and Generous cannot be unified.

4 Option C is correct.

Option A is incorrect because Skolem constant replaces existential quantifiers.

Option B is incorrect because substitution can be used to replace sub-expressions or variables or terms.

Option C is correct because a literal is an atomic formula or its negation.

Option D is incorrect because a ground term doesn't contain any variables.

Add a comment
Know the answer?
Add Answer to:
1.Indicate which of the following Prolog constructs correctly state, "All squares adjacent to a wumpus have...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT