- [30 points]
Decide if the following sentences are valid, unsatisfiable, or neither.
To do it, use the truth tables and equivalency rules in Chapter 7.
- Big ⇒ Big
- Big ⇒ Heavy
- (Big ⇒ Heavy) ⇒ (¬ Big ⇒ ¬ Heavy)
- Big ∨ Heavy ∨ ¬ Heavy
- ((Big ∧ Dense)⇒ Heavy) ⇔ ((Big ⇒ Dense) ∨ (Heavy ⇒ Dense))
- (Big ⇒ Dense) ⇒ ((Big ∧ Heavy) ⇒ Dense)
- Small ∨ Cute ∨ (Small ⇒ Cute)
- (Small ∧ Cute) ∨ ¬ Cute
- ((Rain ⇒ Wet) ∧ (Wet ⇒ Cold)) ⇒ (Rain ⇒ Cold)
- ((Rain ∨ Wet ) ∧ ( ¬ Wet ∨ Cold)) ⇒ ( Rain ∨ Cold )

- [15 points]
For each of the following formulas, state briefly if it is a
correct representation in propositional calculus of the sentence
"If Bill works and his father stays at home, then his mother is happy" or not
and explain why. The propositions used in the sentences should have an obvious
interpretation.
- BillWork ∧ DadHome ∧ MomHappy
- (BillWork ∧ DadHome) ⇒ MomHappy
- (BillWork ∨ DadHome) ⇒ MomHappy
- MomHappy ⇒ (BillWork ∧ DadHome)
- ¬ BillWork ∨ (¬ MomHappy ∨ DadHome)

- [25 points] Convert the following set of propositional clauses to CNF
- Cold ∧ Dry ⇒ Pleasant
- January ⇒ Winter ∧ Wet
- Winter ⇒ Dry
- Wet ⇒ Cold
- January

If you use python go to https://github.com/aimacode/aima-python/blob/master/intro.ipynb for instructions and links to the files you need. As always, look at https://github.com/aimacode/aima-python/blob/master/tests/test_logic.py for examples on how to use the code. The code (which includes examples) is at https://github.com/aimacode/aima-python/blob/master/logic.py.

If you use Lisp do:

(load "aima.lisp") (aima-load 'all) (aima-compile) ; only the first time. Do (aima-load 'logic) afterward (test 'logic) ; tests the functions in the logic packageRead the file logic/test-logic.lisp to see examples of how to call the functions you will need to use. Look in particular at how to write the logical connectors in the expressions.

To do resolution using the software, you first have to create
a database, which in this case has to be propositional:
` (setq kb (make-prop-kb)) `

Use `tell`

to add the knowledge,
and `ask`

to ask the question. Examples are in the logic test
file.

- [10 points] Create a propositional data base, include in it the clauses from problem 3 above and prove it is Pleasant using the program.
- [10 points] Create a propositional data base and represent 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."
- [10 points]
Use ask to answer the following questions from the data base you created
for the previous question:
- is the unicorn mythical?
- is the unicorn magical?
- is the unicorn horned?

Department of Computer Science and Engineering. All rights reserved.

Changes and corrections are in red.