# Assignment 5 Solution

\$30.00

Category:

## Description

Questions

This will be a non-coding homework. Please upload a digital copy of your solution on Grade Scope. Submitted les should be in PDF. You may also submit a scanned PDF of a handwritten solution, but please ensure that the scanned le is clearly legible.

1. Consider the following sentences and decide for each whether it is valid, unsatis able, or neither:

1. Smoke ) Smoke

1. Smoke ) Fire

1. Smoke _ Fire _ :Fire

1. (Smoke ) Fire) ) (:Smoke ) :Fire)

1. (Smoke ) Fire) ) ((Smoke _ Heat) ) Fire)

1. ((Smoke ^ Heat) ) Fire) , ((Smoke ) Fire) _ (Heat ) Fire))

Justify your answer using truth tables (worlds).

1. For each pair of atomic sentences, give the most general uni er if it exists:

1. P(A, B, B), P(x, y, z).

1. Q(y, G(A, B)), Q(G(x, x), y).

1. Older(Father(y), y), Older(Father(x), John).

1. Knows(Father(y),y), Knows(x,x).

1. Consider the following sentences:

John likes all kinds of food. Apples are food.

Chicken is food.

Anything anyone eats and isn’t killed by is food. If you are killed by something, you are not alive. Bill eats peanuts and is still alive. *

Sue eats everything Bill eats.

For rst-order syntax, feel free to use the following text le notation: | (for disjunction), & (for con-junction), – (for negation), => (for implication), <=> (for equivalence), E (for existential quanti cation, e.g., E x, y, Loves(x, y)), and A (for universal quanti cation, e.g., A x, y, Loves(x, y)).

1. Translate these sentences into formulas in rst-order logic.

1. Convert the formulas of part (a) into CNF (also called clausal form).

1

1. Prove that John likes peanuts using resolution.

1. Use resolution to answer the question, \What food does Sue eat?”

1. Use resolution to answer the question, \What food does Sue eat?” if, instead of the axiom marked with an asterisk above, we had:

If you don’t eat, you die.

If you die, you are not alive. Bill is alive.

1. Consider the following:

If the unicorn is mythical, then it is immortal, but if it is not mythical, then it is a mortal mammal. If the unicorn is either immortal or a mammal, then it is horned. The unicorn is magical if it is horned.

1. Represent the above information using a propositional logic knowledge base (set of sentences in propositional logic).

1. Convert the knowledge base into CNF

1. Can you use the knowledge base to prove that the unicorn is mythical? How about magical? Horned?

Justify your answers using resolution by providing corresponding resolution derivations. Make sure to clearly de ne all propositional symbols (variables) rst, then de ne your knowledge base, and nally give your derivations.

1. Prove each of the following assertions:

1. is valid if and only if T rue j= .

1. For any , F alse j= .

1. j= if and only if the sentence ( ) ) is valid.

1. j= if and only if the sentence ^ : is unsatis able.

Submission

Submit all solution les on Grade Scope.

Submit your solution in a le named hw5.pdf.

By submitting this homework, you agree to the following honor code.

You are encouraged to work on your own in this class. If you get stuck, you may discuss the problem with up to two other students, PROVIDED THAT YOU SUBMIT THEIR NAMES ALONG WITH YOUR ASSIGNMENT. ALL SOLUTIONS MUST BE WRITTEN UP INDE-PENDENTLY, HOWEVER. This means that you should never see another student’s solution before submitting your own. You may always discuss any problem with me or the TAs. YOU MAY NOT USE OLD SOLUTION SETS UNDER ANY CIRCUMSTANCES. Making your solu-tions available to other students, EVEN INADVERTENTLY (e.g., by keeping backups on github), is aiding academic fraud, and will be treated as a violation of this honor code.

You are expected to subscribe to the highest standards of academic honesty. This means that every idea that is not your own must be explicitly credited to its author. Failure to do this constitutes plagiarism. Plagiarism includes using ideas, code, data, text, or analyses from any other students or

2

individuals, or any sources other than the course notes, without crediting these sources by name. Any verbatim text that comes from another source must appear in quotes with the reference or citation immediately following. Academic dishonesty will not be tolerated in this class. Any student suspected of academic dishonesty will be reported to the Dean of Students. A typical penalty for a rst plagiarism o ense is suspension for one quarter. A second o ense usually results in dismissal from the University of California.

3

error: Content is protected !!