0% found this document useful (0 votes)
69 views3 pages

Homework 4: Dana Asbury November 12, 2015

This document contains homework problems involving first-order logic. Problem 1 involves translating statements about courses, food preferences, printers, textbooks, and teaching fishing into first-order logic. Problem 2 asks to demonstrate the validity of an inference about horses and animals by translating the statements into first-order logic with predicates and resolving the negated conclusion and premise. Problem 3 outlines how forward chaining can be implemented with breadth-first search by representing rules as pairs of antecedents and consequents and generating successor states by applying rules to expressions in the current state.

Uploaded by

DanaAsbury
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)
69 views3 pages

Homework 4: Dana Asbury November 12, 2015

This document contains homework problems involving first-order logic. Problem 1 involves translating statements about courses, food preferences, printers, textbooks, and teaching fishing into first-order logic. Problem 2 asks to demonstrate the validity of an inference about horses and animals by translating the statements into first-order logic with predicates and resolving the negated conclusion and premise. Problem 3 outlines how forward chaining can be implemented with breadth-first search by representing rules as pairs of antecedents and consequents and generating successor states by applying rules to expressions in the current state.

Uploaded by

DanaAsbury
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/ 3

Homework 4

Dana Asbury
November 12, 2015
Problem 1.a. B551 is a course at IU.
C(x, y) = x is a course at y
C(B551, IU ) = B551 is a course at IU
Problem 1.b. Mary likes all pastries except donuts.
Likes(x, y) = x likes y
P astry(x) = x is a pastry
Donut(x) = x is a donut
xP astry(x) Donut(x) Likes(M ary, x)
Problem 1.c. If a printer doesnt print its broken, unless its unplugged.
P rinter(x) = x is a printer
P rints(x) = x prints
Broken(x) = x is broken
U nplugged(x) = x is unplugged
xP rinter(x) P rints(x) Broken(x) U nplugged(x)
Problem 1.d. No student likes expensive textbooks.
Student(x) = x is a student
Expensive(x) = x is expensive
Book(x) = x is a book
Likes(x, y) = x likes y
xy(Student(x) Book(y) Expensive(y) Likes(x, y))
Problem 1.e. Teach someone to fish and she/he will have fish forever.
T each(x, y, z) = x teaches y to z
Has(x, y) = x has y forever
F ish(x) = x is fish
xyz(T each(x, y, z) F ish(z) Has(y, z))
Problem 2. From Horses are animals, it follows that The head of a horse is the head
of an animal. Demonstrate that this inference is valid by carrying out the following steps:

Problem a. Translate the premise and the conclusion into the language of first-order logic.
Use three predicates:
Head(h, x) = h is the head of x
Horse(x) = x is a horse
Animal(x) = x is an animal
Premise: x(Horse(x) Animal(x))
Conclusion: xy(Head(x, y) Horse(x) z(Head(x, z) Animal(z)))
Problem b. Negate the conclusion, and convert the premise and the negated conclusion
into conjunctive normal form.
Conclusion: xy((Head(x, y) Horse(x) z(Head(x, z) Animal(z)))) =
= xyz(((Head(x, y) Horse(x)) z(Head(x, z) Animal(z)))) =
= xyz(((Head(x, y) Horse(x)) (Head(x, z) Animal(z)))) =
= Head(X, Y ) Horse(X) (Head(X, z) Animal(z))
Premise: x(Horse(x) Animal(x)) =
= x(Horse(x) Animal(x)) = Horse(x) Animal(x)
Note that X and Y are Skolem constants.
So we have the four premises:
1. Head(X, Y )
2. Horse(X)
3. Head(X, z) Animal(z)
4. Horse(x) Animal(x)

Problem c. Use resolution to show that the conclusion follows from the premise.
Resolving 1. and 3. results in 5. Animal(z)
Resolving 5. and 4. results in 6. Horse(x)
Resolving 6. and 2. results in a contradiction, and thus we have proved our conclusion.

Problem 3. Sketch how a forward chaining process could be implemented by breadth-first


search. Assume that the system begins with a set of rules and a set of facts in working
memory.
Problem a. Each rule is represented as a pair of the antecedent and the consequent of the
implication. So P Q would be the pair (P, Q). The state will be represented as the set of
all logical expressions currently in memory, meaning our known facts (either atomic or more
complex logical expressions), and our implication rules represented as pairs. So our initial
state will be the set of known premises at the beginning of the forward chaining process.
Our goal state is a set of one (or possibly many) logical expressions. So for instance our goal
state will be a set containing Q, and our initial state is {P, (P, Q)}, so we can apply our
rule (P,Q) to P, and derive the state {P, (P, Q), Q}, Since this successor contains Q, then we
know we can reach our goal.

Problem b. To generate a successor to the current state we will try to apply a rule to a
logical expression (possibly another rule) in our state. So if the antecedent of a rule matches
an expression in memory, then we can add the consequent of the rule to our state and that
becomes our new successor state. So to generate all successor states we must try to apply
each rule to every expression in our state, and for each successful application of the rule to
the current set of expressions, we have generated a new state with one additional expression
(namely the consequent of the successful rule application).

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy