0% found this document useful (0 votes)
94 views

hw7 Sol 2

This document contains notes from an introductory artificial intelligence course. It includes examples of representing sentences in first-order logic, definitions of predicates and vocabulary used, solutions to homework problems representing sentences in FOL, and identifying issues with a proposed definition. The document covers key concepts of first-order logic like predicates, quantifiers, and representing relationships between entities in a symbolic manner.

Uploaded by

Ravi Tej
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
94 views

hw7 Sol 2

This document contains notes from an introductory artificial intelligence course. It includes examples of representing sentences in first-order logic, definitions of predicates and vocabulary used, solutions to homework problems representing sentences in FOL, and identifying issues with a proposed definition. The document covers key concepts of first-order logic like predicates, quantifiers, and representing relationships between entities in a symbolic manner.

Uploaded by

Ravi Tej
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

CompSci 171: Intro AI

Homework 7

First-Order Logic
8.3
Is the sentence x,y x=y valid?
Valid.
An existentially quantified sentence is true in a model if it holds under
any extended interpretation in which its variables are assigned to
domain elements.
According to the standard semantics of FOL as given in the chapter,
every model contains at least one domain element.
Hence, for any model, there is an extended interpretation in which x
and y are assigned to the first domain element. In such an
interpretation, x=y is true.
8.6
Represent the following sentences in first order logic,
using a consistent vocabulary
Vocabulary:
Student(x), Person(x), Man(x), Barber(x), Expensive(x), Agent(x),
Insured(x), Smart(x),Politician(x): predicates satisfied by members of the
corresponding categories
F, G: French and German courses
x > y: x is greater than y;
Take(x, c, s): student x, course c, semester s
Pass(x, c): student x passes course c
Score(x, c): the score obtained by student x in course c in semester s;
Subject(c, f): the subject of course c is field f;
8.6
Buys(x, y, z): x buys y from z
Sells(x, y, z): x sells y to z
Shaves(x, y): person x shaves person y
Parent(x, y): x is a parent of y
Citizen(x, c, r): x is a citizen of country c for reason r
Resident(x, c): x is a resident of country c
Birthplace(x, u): person x born in country u
Citizen(x, u): person x is a citizen of country u
Parent(x, z): z is a parent of x
Fools(x, y, t): person x fools person y at time t
8.6
a) Some students took French in spring 2001.
x Student(x) Takes(x, F, Spring2001).
b) Every student who takes French passes it.
x, s Student(x) Takes(x, F, s) Passes(x, F, s).
c) Only one student took Greek in spring 2001.
x Student(x)Takes(x,G, Spring2001)y yxTakes(y,G,Spring2001).
d) The best score in Greek is always higher than the best score in French.
s x y Score(x,G,s) > Score(y,F, s).
e) Every person who buys a policy is smart.
x Person(x) (y, z Policy(y) Buys(x, y, z)) Smart(x).
f) No person buys an expensive policy.
x, y, z Person(x) Policy(y) Expensive(y) Buys(x, y, z).
8.6
g) There is an agent who sells policies only to people who are not
insured.
x Agent(x) y, z Policy(y) Sells(x, y, z) (Person(z)Insured(z)).
h) There is a barber who shaves all men in town who do not shave
themselves.
x y Barber(x) Man(y) Shaves(y, y) Shaves(x, y).
i) A person born in the UK, each of whose parents is a UK citizen or a UK
resident, is a UK citizen by birth.
x Person(x)Born(x,UK)(y Parent(y, x) (( r Citizen(y,UK, r))
Resident(y,UK))) Citizen(x,UK,Birth).
j) A person born outside the UK, one of whose parents is a UK citizen by
birth, is a UK citizen by descent.
x Person(x) Born(x,UK) (y Parent(y, x) Citizen(y,UK,Birth))
Citizen(x,UK,Descent).
8.6
k) Politicians can fool some of the people all of the time, and they can fool
all of the people some of the time, but they cant fool all of the people all
of the time.
x Politician(x) ( y t Person(y) Fools(x, y, t)) ( t y
Person(y) Fools(x, y, t)) ( t y Person(y) Fools(x, y, t))
8.7
Represent the sentence All Germans speak the
same languages in predicate calculus.
8.8
What axiom is needed to infer the fact Female(Laura)
given the facts Male(Jim) and Spouse(Jim, Laura)
8.15
Explain what is wrong with the following proposed
definition of adjacent squares in the wumpus world:

There are several problems with the proposed definition.


It allows one to prove, say Adjacent([1,1],[1,2]) but not
Adjacent([1,2],[1,1]); so we need an additional symmetry axiom.
It does not allow one to prove that Adjacent([1,1],[1,3]) is false,
so it needs to be written as

Finally, it does not work as the boundaries of the world, so some


extra conditions must be added

You might also like