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

T2 PropositionalLogic Exercises

This document provides a series of exercises in propositional logic. It includes problems assessing the validity or satisfiability of propositional logic statements using truth tables or equivalence rules. Additional problems involve determining if propositional logic statements are tautologies, satisfiable or unsatisfiable. Further exercises involve building a knowledge base from statements, using inference to answer questions, and solving logic puzzles through formalization and inference.

Uploaded by

Roshan Paudel
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
366 views

T2 PropositionalLogic Exercises

This document provides a series of exercises in propositional logic. It includes problems assessing the validity or satisfiability of propositional logic statements using truth tables or equivalence rules. Additional problems involve determining if propositional logic statements are tautologies, satisfiable or unsatisfiable. Further exercises involve building a knowledge base from statements, using inference to answer questions, and solving logic puzzles through formalization and inference.

Uploaded by

Roshan Paudel
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

EXERCISES PROPOSITIONAL LOGIC

1. [R+N, exercise 7.8] Decide whether each of the following sentences is valid,
unsatisfiable or neither. Use truth tables or equivalence rules
a. Smoke Smoke
b. Smoke Fire
c. (Smoke Fire) (Smoke Fire)
d. Smoke Fire Fire
e. ((Smoke Heat) Fire) ((Smoke Fire) (Heat Fire))
f. (Smoke Fire) ((Smoke Heat) Fire)
g. Big Dumb (Big Dumb)
h. (Big Dumb) Dumb
2. Determine whether each of the wffs in propositional logic
a) ((P (Q R)) (Q R)) P
b) ((PQ)R)(R(QP))
are i) a tautology.
ii) satisfiable but not a tautology. In this case give an interpretation that is a
model and another interpretation that is not a model.
iii) unsatisfiable.
Justify your answer choosing one of the methods presented in the course.
3. Justify your answers using the tools of formal logic and giving the steps of your solution
in detail. Name all the rules used in your derivations.
a. Is the following reasoning correct? Translate to wffs and apply inference to
verify it.
If the temperature and the pressure are constant then it
does not rain. The temperature remained constant. Thus, if it
rained, then the pressure did not remain constant.

b. Is the following reasoning correct? Translate to wffs and apply inference to


verify it.
Men eat when they are hungry. John always wears his best
suit to eat. At this moment John is not hungry. Therefore,
John is not wearing his best suit.
c. Is the following statement correct? Demonstrate it
False w, for any wff w

4. Consider the text:


There are only two formats for photos: round and square. Photos are either color or
black and white. Let me tell you about the photo I found yesterday. If the photo is
square, then it is a black and white picture. If it is round, it is a digital color picture. If
the photo is digital or in black and white, then it is a portrait. If it is a portrait, then it is a
picture of my friend

a) Build a knowledge base to represent the statements about the photo the author of the
previous text found yesterday.
Use the atoms A,B,C,D,E,F,G

Atom
A
B
C
D
E
F
G

Elementary statement about the world


The photo is in color
The photo is in black and white
The photo is square
The photo is round
The photo is digital
The photo is a portrait
The photo is a picture of my friend

Known world facts (True in our world)


1. There are only two formats for Photos:
round and square
2. Photos are either color or black and white

wff

3. If the photo is square, then it is a black


and white picture.
4. If it is round, it is a digital color picture
5. If the photo is digital or in black and
white, then it is a portrait
6. If it is a portrait, then it is a picture of my
friend .
b) Using inference, can you answer the authors question: Is the photo I found
yesterday the picture of my friend?

5. [R+N, exercise 7.9] Consider the text


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.
Can we prove that the unicorn is mythical? that the unicorn is magical? that the unicorn
is horned?
6. [R+N, exercise 7.11] Lets play minesweeper on a rectangular grid of [1..Nf] [1..Nc]
squares with M invisible mines scattered among them.
a. Let the atom Xij have value True when the square [i,j] contains mine. Write
down the assertion that there are exactly two mines adjacent to the square
[1,1] as a wff involving some atoms of the form Xij.
b. Generalize the expression obtained in (a) by explaining how to construct a
CNF sentence asserting that k of n neighbors contain mines.
c. How can an agent use DPLL to prove that a square has (or has not) a mine,
ignoring the global constraint that there are exactly M mines.
d. Suppose that the global constraint is constructed via your method from part
(b). How does the number of clauses depend on M, Nf, Nc? Suggest a way
to modify DPLL to prove that the global constraint does not need to be
represented explicitly.

e. Are any conclusions derived by the method in part (c) invalidated when the
global constraint is taken into account?
f. Give examples of configurations of probe values that induce long-term
dependencies such that the contents of a given unprobed square would give
info about the contents of a far-distant square (Hint: assume Nf = N, Nc = 1)
7. [From Nilsson 14.2] Heads you win; tails I lose Express these statements (plus other
statements that you may need about how coins are, what is losing and winning) in the
propositional calculus and then use resolution to answer the question Who wins?.
8. [From Nilsson 14.3] The following wffs are instances of axioms that are sometimes
used in the propositional calculus.
a. Implication introduction: P (QP)
b. Implication distribution: (P (QR)) ((P Q) (PR))
c. Contradiction realization: (Q P) ((QP) Q)
Use resolution refutation to prove each of these formulas.
9. [From Nilsson 14.4] Consider the following set of clauses
{P Q, P Q, P Q, P Q }
Try to determine whether they are satisfiable by
a. Set-of-support resolution (the initial set of support is the last clause)
b. Ancestry-filtered resolution
c. A strategy that violates both set-of-support and ancestry-filtered resolution
Show that input resolution is not a valid resolution strategy for this problem.
10. Using the methods of formal logic, formalize the following problems and solve the
riddles using inference
Lets hear Alceo, Safo and Catulo
Alceo says: The only ones who speak the truth here are Catulo and I
Safo states: Catulo is a lier
Catulo replies: Safo speaks the truth. Or maybe it is Alceo who lies
Assuming that the person who lies always lies and that the person who speaks the
truth is always truthful, who is sincere? Who lies?

Lets hear Anaximandro, Parmnides and Herclito


Anaximandro says: One should not trust Herclito
Parmnides states: Anaximandro and Herclito never lie
Herclito replies Parmnides has spoken the truth
Assuming that the person who lies always lies and that the person who speaks
the truth is always truthful, who is sincere? Who lies?

11. Using propositional logic and inference (no reasoning in natural language is allowed),
solve the following enigma
In the Roman Senate
(I)
Mark Anthony: "It was Cassius or Brutus (or both)."
(II)
Cassius: "I did not do it. Mark Anthony is lying"
(III) Brutus: "I did not do it"
Assuming that liars always lie, that truthful Romans always speak the truth, and that
only one of them is telling the truth, who did it? Who is telling the truth?
12. There are three chests (red, blue and green in color) with the inscriptions:
Red: The treasure is here.
Blue: The treasure is not here.
Green: The treasure is not in the red chest.
Knowing that only one chest contains a treasure and that, at most, one of the
inscriptions is correct, can you decide which chest contains the treasure?
Using the atoms
Atom R means The red chest contains the treasure.
Atom B means The blue chest contains the treasure.
Atom G means The green chest contains the treasure.
Atom RR means The inscription in the red chest is correct.
Atom BB means The inscription in the blue chest is correct.
Atom GG means The inscription in the green chest is correct.

a) Translate the sentences to wffs.


b) Using only inference (no truth tables or semiformal reasoning):
i) Demonstrate that (RRBBGG) is entailed by the knowledge base.
ii) Demonstrate that (RRBBGG) is entailed by the knowledge base.
iii) Demonstrate that (RRBBGG) is entailed by the knowledge base.
iv) Demonstrate that (RRBBGG) is entailed by the knowledge base.
c) Using these results, can you decide which chest contains the treasure?

You might also like