Docsity

Propositional Logic – Solved Homework 2 | CAP 4621, Assignments of Computer Science

Toggle sidebar
bg1
Homework 2
This assignment is due on Wednesday, October 20, 2004. There will be no ex-
tension for this homework since we are on a tight schedule: Midterm will be on
October 22, and the solution will be available after class on October 20. The as-
signment is somewhat longer than the previous one; therefore, you are advised to
start working on it immediately, and seek help on the problems if needed. Each
problem is equally weighted. As always, show all works.
Problem 1 – Propositional Logic
A) Given the interpretation P=true and Q=false, determine the truth values of the
followings:
1. [(P∨Q) =⇒Q]⇐⇒ [P∧ ¬Q],
2. [(P∧Q) =⇒Q] =⇒[P∧Q].
B) Using truth tables, show that the following sentences are valid:
1. (P∧Q)⇐⇒ ¬(¬P∧ ¬Q),
2. [(P=⇒Q)∧(P=⇒R)] ⇐⇒ [P=⇒(Q∧R)].
C) Consider a vocabulary with only four propositions, A, B, C, D. How many
models are there for the following sentences?
1. (A∧B)∨(B∧C),
2. A∧B,
3. A∧B∧(A∨C=⇒B).
1
pf3
pf4
pf5
pf8

Partial preview of the text

Download Propositional Logic – Solved Homework 2 | CAP 4621 and more Assignments Computer Science in PDF only on Docsity!

Homework 2

This assignment is due on Wednesday, October 20, 2004. There will be no ex- tension for this homework since we are on a tight schedule: Midterm will be on October 22, and the solution will be available after class on October 20. The as- signment is somewhat longer than the previous one; therefore, you are advised to start working on it immediately, and seek help on the problems if needed. Each problem is equally weighted. As always, show all works.

Problem 1 – Propositional Logic

A) Given the interpretation P=true and Q=false, determine the truth values of the followings:

  1. [(P ∨ Q) =⇒ Q] ⇐⇒ [P ∧ ¬Q],
  2. [(P ∧ Q) =⇒ Q] =⇒ [P ∧ Q].

B) Using truth tables, show that the following sentences are valid:

  1. (P ∧ Q) ⇐⇒ ¬(¬P ∧ ¬Q),
  2. [(P =⇒ Q) ∧ (P =⇒ R)] ⇐⇒ [P =⇒ (Q ∧ R)].

C) Consider a vocabulary with only four propositions, A, B, C, D. How many models are there for the following sentences?

  1. (A ∧ B) ∨ (B ∧ C),
  2. A ∧ B,
  3. A ∧ B ∧ (A ∨ C =⇒ B).

Problem 2 – Propositional Logic

A)(Problem 7.4 on page 237) Prove each of the following assertions:

  1. α is valid if and only if (iff) T rue |= α.
  2. For any α, F alse |= α.
  3. α |= β iff the sentence (α =⇒ β) is valid.
  4. α |= β iff the sentence (α ∧ ¬β) is unsatisfiable.

B) (Problem 7.8 on page 237) Decide whether each of the following sentences is valid, unsatisfiable, or neither. Verify your decisions using truth tables or the equivalence rules of Figure 7.11.

  1. Smoke =⇒ Smoke,
  2. (Smoke =⇒ F ire) =⇒ (¬Smoke =⇒ ¬F ire),
  3. (Smoke =⇒ F ire) =⇒ ((Smoke ∧ Hear) =⇒ F ire),
  4. (Big ∧ Dumb) ∨ ¬Dumb.

Problem 4 – Inference

A) Suppose you are given the following collection of sentences as your knowledge base KB, show that KB |= (S ∨ R).

  1. P ,
  2. (Q ∧ W ),
  3. (P ∧ Q) =⇒ (S ∨ Z),
  4. (A ∨ R ∨ ¬Z),
  5. ¬A.

B) Suppose your KB is the following collection of sentences in first-order logic:

  1. ∀X [ p(X) =⇒ q(X) ],
  2. ∀X [ p(X) =⇒ [ ∃ Y w(Y ) ] ],
  3. ∀X ∀Y [ [ q(X) ∧ w(Y ) ] =⇒ s(X) ],
  4. p(Steve). Show that s(Steve) is a logical consequence using resolution. (First, transform KB and the negated query into CNFs. Then apply resolution rule).

Problem 5 – FOL These are problems that require some thought.

  1. (Problem 8.3) Is the sentence ∃x, y x = y valid? Explain.
  2. (Problem 8.5) Write down a logical sentence such that every world in which it is true contains exactly one object.
  3. (Problem 8.13) Explain what is wrong with the following proposed defini- tion of the set membership predicate ∈: ∀x, s [ x ∈ {x|s} ] ∀x, s [ x ∈ s =⇒ ∀y x ∈ {y|s} ].

Problem 6 – FOL Suppose we have a vocabulary with just one relation LOVES(x , y)

(and =, of course), and only two constants, ME and MYBABY. Write an expres- sion φ that corresponds to the following oldie: Everybody loves my baby (1) my baby loves nobody but me... (2) Now,

  1. Argue that the following expression is valid φ |= (MYBABY = ME).
  2. Give a proof of (MYBABY = ME). (This unintended conclusion shows the dangers of naively translating natural language utterances into first-order logic.)
  3. Write a more careful version of φ, one not susceptible to this criticism.

Problem 8 – Statements with Quantifiers

For the English-FOL pairs below, provide an interpretation that shows that each FOL sentence does not represent the English sentence above it. Briefly explain your answers. A)

All movie stars are envied. ∀X [ movie star(X) ∧ envied(X) ]

B)

All children, when healthy like ice cream. ∀X [ child(X) =⇒ [ healthy(X) ∨ ¬likes(X, ice cream) ] ]

Problem 9 – Short Answers

Some of the questions below ask you to define terms that we did not cover in class. However, you should be able to find them (and hence understand them) from the textbook.

  1. If an FOL sentence is true for all interpretations, then it is said to be what?
  2. What is semidecidable? Is first-order logic semidecidable? Is propositional logic semidecidable?
  3. What is the primary difference between propositional and first-order logic? O.K., we didn’t cover this in class. The answer is ”The ontological commit- ment made by each language” is different..... What does this mean?
  4. Is propositional logic declarative or procedural? In this context, what does “declarative” mean? How about “procedural”?
  5. Does propositional logic possess “compositionality”? What does it mean?
  6. What is refutation completeness?
  7. Given a true sentence in first-order logic, we can always prove it. This is the content of which famous theorem?
  8. Suppose we have a logical system that can describe integers. That is, all theorems about integers can be written as true sentences in this logical sys- tem. Can this logical system be complete? What does the conclusion mean? What famous theorem of G˝odel is this?