Homework #1 Chapter 2 - City University of New York

Homework #1

Chapter 2

1. The logical operator "" is read "if and only if." P Q is defined as being equivalent to (PQ) (QP). Based on this definition, show that P Q is logically equivalent to (PQ) (PQ)

a) By using truth table

The logical operator is read if and only if. P Q is defined as being equivalent to (P Q) (Q P). Based on this definition, show logical equivalence of P Q and P Q P Q:

P Q P Q Q P P Q P Q P Q P Q P Q

TT T

T

T

T

T

T

TF F

T

F

T

F

F

FT T

F

F

T

F

F

FF T

T

T

F

F

T

b) By a series of substitution using equivalence laws

P Q (P Q) (Q P)

( by definition of )

(? P Q) (? Q P)

( a b ? a b )

((? P Q) ? Q) ((? P Q) P)

( dist law: a (bc) a b a c)

(? P ? Q) (Q ? Q) (? P P) (Q P)

(? P ? Q) (Q P)

( a ? a nil )

? (P Q) (Q P)

(de Morgan's law)

(P Q) (Q P)

(a b ? a b )

2. Jane Doe has four dependents, a steady income of $30,000, and $15,000 in her savings account. Add the appropriate predicates describing her situation to the general investment advisor discussed in the class and perform the unifications and inferences needed to determine her suggested investment.

amount_saved(15000). earnings(30000, steady). dependents(4).

minincome(X) = 15000 + 4000X minsavings(X) = 5000X minincome(4) = 15000 + 4000 * 4 = 15000 + 16000 = 31000 minsavings(4) = 5000 * 4 = 20000 Using (5), (9), and (11) under the substitution { 15000/X, 4/Y }, we have: amount_saved(15000) dependents(4) ? greater(15000, minsavings(4))

savings_account(inadequate). amount_saved(15000) dependents(4) ? greater(15000, 20000)

savings_account(inadequate). 12. savings_account(inadequate). Using (1) and (12), our conclusion is:

investment(savings).

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download