Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
113
Добавлен:
20.03.2016
Размер:
715.49 Кб
Скачать

9. (a) The home team is ahead.

If the home team is ahead, then the fans are happy.

Therefore, the fans are happy.

9. (g) If the home team is ahead, then the visiting team is losing. If the home team is ahead, then the visiting team is not losing. Therefore, the home team is not ahead.

9. (i) The home team is ahead or the fans are happy.

If the home team is ahead, then the visiting team is losing.

If the fans are happy, then the visiting team is losing.

Therefore, the visiting team is losing.

11. Construct the truth table for

(p ^ (p ! q) ^ (q ! r)) ! r

Simplify this expression to one using only ^, _, and :. 11.

(p ^ (p ! q) ^ (q ! r)) ! r $ (:p _ :(:p _ q) _ :(:q _ r)) _ r

 

p

q

r

:p

:q

:p _ q

:q _ r

:p _ (:(:p _ q)) _ (:(:q _ r)) _ r

 

 

 

 

 

 

 

 

 

 

T

T

T

F

F

T

T

T

 

T

T

F

F

F

T

T

F

 

T

F

T

F

T

T

T

T

 

T

F

F

F

T

T

F

T

 

F

T

T

T

F

F

T

T

 

F

T

F

T

F

F

T

T

 

F

F

T

T

T

T

T

T

 

F

F

F

T

T

T

F

T

 

 

 

 

 

 

 

 

 

13.Let = (p _ q) ! (r ^ :s): For each of the following interpretations of p; q; r; and s, compute I( ) using the truth tables for :; _; ^; !; and $ :

(a)I(p) = T, I(q) = T, I(r) = T, and I(s) = F

(b)I(p) = T, I(q) = T, I(r) = F, and I(s) = F

(c)I(p) = F, I(q) = T, I(r) = T, and I(s) = T

(d)I(p) = F, I(q) = F, I(r) = T, and I(s) = T

13. (a) T

13. (b) F

13. (c) F

13.(d) T

15.Let = (:(p^q)) $ (:r _:s): For each of the following interpretations of p; q; r; and s, compute I( ) using the truth tables for :; _; ^; !; and $ :

(a)I(p) = T, I(q) = T, I(r) = F, and I(s) = T

(b)I(p) = T, I(q) = F, I(r) = F, and I(s) = F

(c)I(p) = F, I(q) = T, I(r) = F, and I(s) = T

(d)I(p) = F, I(q) = F, I(r) = F, and I(s) = T

15.(a) F

15. (b) T

15. (c) T

15.(d) T

17.Find formulas equivalent to the following formulas with all the negations \pushed inward to the proposition letters":

(a):(p ^ T )

(b)((p ! q) ! r) ! F

(c)((p ! q) ! r) ! T

(d)(p $ q) $ r

(e)(p $ q) $ F (Hint: Look for a way to simplify this last one.) (Note: The method given to \push negations inward" does not always give the shortest formula that is equivalent to the given formula and has : applied only to proposition letters.)

17. (a) :p

17. (b) ((:p _ q) _ :r)

17. (c) ((:p _ q) _ :r) _ T = T

17.(d) f[(p ^ :q) _ (q ^ :p)] _ rg ^ f:r _ ((:q _ q) ^ (:q _ p))g

17.(e) (p ^ :q) _ (q ^ :p)

19.Prove that a combinatorial network for

(x ^ y ^ z) _ (:x ^ y ^ z) _ (x ^ :y ^ z) _ (x ^ y ^ :z) can be simpli ed to a combinatorial network representing

(x ^ y) _ (x ^ z) _ (y ^ z)

(Hint: Replace x ^ y ^ z with (x ^ y ^ z) _ (x ^ y ^ z) as often as needed.) 19.

(x ^ y ^ z) _ (: x ^ y ^ z) _ (x ^ : y ^ z) _ (x ^ y ^ :z)

= (y ^ z ^ (x _ :x)) _ (x ^ y ^ z) _ (x ^ :y ^ z) _ (x ^ y ^ z) _ (x ^ y ^ :z)

=(y ^ z) _ (x ^ z ^ (y _ :y)) _ (x ^ y ^ (z _ :z))

=(x ^ y) _ (x ^ y) _ (y ^ z)

21.(a) The conjunction of n formulas p1; p2; : : : ; pn is de ned to be the formula (: : : ((p1 ^ p2) ^ p3) ^ : : :) ^ pn: For n = 0 there is a special case: The conjunction of zero formulas is de ned to be T. For n = 1, that conjunction simpli es to p1: Let be the conjunction of p1; p2; : : : ; pn: Prove that for any interpretation I; I( ) = T if and only if I(pi) = T for each i such that 1 i n: (Hint: Use induction.)

(b)Let be the formula

(: : : ((p1 $ p2) $ p3) $ : : :) $ pn

for n 1. For what interpretations I is I( ) = T ? (Hint: The answer involves counting how many of the pi's are T in I. Prove the result by induction on n:)

21. (a) Let n0 = 0: Let

T = fn 2 N : I( ) = T $ I(pi) = T for 1 i ng

(Base step) Let n0 = 0: The condition is vacuously satis ed as is just

T:

(Inductive step) Choose n such that n n0 and n 2 T : Assume that

I( ) = T $ I(pi) = T for 1 i n where = (: : : ((p1 ^ p2) ^ p3) ^

) ^ pn): Prove that n + 1 2 T : That is, prove that I( ) = T $ I(pi) = T for 1 i n + 1 where = (: : : ((p1 ^ p2) ^ p3) ^ ) ^ pn+1)g Let I be an interpretation of such that I( ) = T: Then we must have

(: : : ((p1 ^ p2) ^ p3) ^ ) ^ pn)

and pn+1 TRUE. By the induction hypothesis

(: : : ((p1 ^ p2) ^ p3) ^ ) ^ pn)

is TRUE if and only if I(pi) = T for 1 i n: Therefore, I( ) = T ! I(pi) = T for 1 i n + 1: Conversely, if I(pi) = T for 1 i n + 1 then I( ) = T: Therefore, n + 1 2 T :

By the Principle of Mathematical Induction we have T = N:

21. (b) We will prove I( ) = T $ an even number of p1; p2; : : : ; pn are F . The result is vacuously true for formulas with 0 or 1 terms. We use induction for the cases greater than or equal to 2. Let n0 = 2: Let

T = fn : I( ) = T $ an even number of p1; p2; : : : ; pn are F g

(Base step) p1 $ p2 is T if I(p1) = I(p2): So either there are 0 or 2 terms F .

(Inductive step) Choose n such that n n0 and n 2 T : Prove that n + 1 2 T : That is, assume that (: : : ((p1 $ p2) $ p3) $ ) $ pn) is true $ there are an even number of pi where 1 i n that are F and show that (: : : ((p1 $ p2) $ p3) $ ) $ pn+1) is true $ there are an even number of pi where 1 i n + 1 that are F: Let

(: : : ((p1 $ p2) $ p3) $ ) $ pn+1) be true. Either pn+1 is T or pn+1 is F: If pn+1 is T , then (: : : ((p1 $ p2) $ p3) $ ) $ pn) is true. By induction there are an even number of terms pi where 1 i n that are F . Therefore, there are an even number of of terms pi where 1 i n+1 that are FALSE. If pn+1 is FALSE, then (: : : ((p1 $ p2) $ p3) $ ) $ pn) is FALSE. By the inductive hypothesis there must be an odd number of terms pi where 1 i n that are FALSE. Since pn+1 is FALSE the total number of terms that is false in an even number. Therefore, n + 1 2 T .

By the Principle of Mathematical Induction T = fn : n 2 N and n 2g:

23.Prove both parts of Theorem 2.

23. Theorem 2(a) Let I be any interpretation. Then I(;) = T since there is no formula for which I can be FALSE.

23. Theorem 2(b) ()) Let S = f 1; ; k g and let I be any interpretation. Suppose I satis es S. This means that I( ) = T for every 2 S. Therefore I( 1)^I( 2)^ ^I( k ) = T by de nition of conjunction. Since the interpretation I assigns the same truth values to every proposition in each i the above can be rewritten as I( 1 ^ 2 ^ ^ k ) = T .

(() Suppose I( 1 ^ 2 ^ ^ k ) = T . Then by the de nition of conjunction I( i) = T for 1 i k. Recall that S = f ij1 i kg. Therefore I( ) = T for every 2 S, thus I satis es S.

25.(a) Prove both parts of Theorem 4.

(b)Show that the converses to both parts of Theorem 4 need not be true.

(c)Does Theorem 4(a) remain true if the word tautology is replaced with satis able?

25. (a) Let and

be tautologies. and

are logically equivalent

if for every interpretation I, I( ) = I(

).

For every interpretation I,

I( ) = T by de nition of a tautology. Similarly, for every interpretation

I, I(

) = T . Thus I( ) = T = I( ) for every interpretation I. Therefore

and

are logically equivalent.

 

 

 

 

25. (b) Let and

be unsatis able. Then there exists no interpretation I

such that I( ) = T . Therefore I( ) = F for all interpretations. Similarly,

there exists no interpretation I such that I(

) = T , therefore I( ) = F

for all interpretations. Thus I( ) = F = I(

) for every interpretation I.

Therefore and

are logically equivalent.

 

 

 

25. (c) Suppose and

are satis able. We show that and

need not be

logically equivalent by construction. Let = p_q and let = p^q. Let the

interpretation I1 be de ned as I1(p) = T , I1(q) = F . Note that I1( ) = T ,

thus is satis able. Let the interpretation I2

be de ned as I2(p) = T ,

I2(q) = T . Note that I2( ) = T , thus

is satis able. However, and

are not logically equivalent because I1( ) = T and I1(

) = F . Thus

Theorem 5(a) does not remain true if the word \tautology" is replaced

with \satis able".

 

 

 

 

 

 

De nition. A formula

 

is an alphabetic substitution of a formula if

is formed from by replacing every occurrence of some proposition letter p in with some proposition letter q where q does not occur in : (Note: The relation of being an alphabetic substitution is symmetric, but not re exive or transitive.) De ne to be an alphabetic variant of if there is a nite sequence of formulas 0; 1; : : : ; n where 0 = ; each i+1 is an alphabetic substitution of i ; and n = :

27.The rst stage of the method described to \push negations inward" was a method to eliminate !'s and $'s. Prove that in the method to eliminate them, the process of substituting always stops. Consider, for example, the substitution in the formula

(p $ q) $ (r $ s)

If the substitution is rst performed on the second $, the resultant formula is

((p $ q) ! (r $ s)) ^ ((r $ s) ! (p $ q))

which has more $'s to replace than in the original formula! At rst sight one might expect that, if the substitutions are made in the wrong order, the process might continue generating more $'s at each stage, and the process might continue forever. (Hint: Instead of just counting the number of $ symbols, put a weight on each $ symbol, with the weight of the $ symbol in $ dependent upon the number of $'s in and . If the correct method of calculating weights is used, it can be shown that the total of the weights of the $'s decreases with each substitution.)

27.De ne a weight w of a formula as follows.

For a proposition letter p, w(p) = 1.

w(T ) = w(F ) = 1.

w(: ) = w( ) + 3.

w( _ ) = w( ^ ) = w( ) + w( ) + 3:

w(

! ) = w( ) + w( ) + 7.

w(

$ ) = 2(w( ) + w( )) + 18.

Now we show that, each time we eliminate a $ or a !, the weight w of the formula is reduced.

We replace ( $ ) with ( ! ) ^ ( ! ). Note the weights of those two subformulas:

w(( ! ) ^ ( ! )) = w( ! ) + w( ! ) + 3

=(w( ) + w( ) + 7) + (w( ) + w( ) + 7) + 3 < 2(w( ) + w( )) + 18

=w( $ )

We replace ( ! ) with ((: ) _ ( )):

w((: ) _ ( )) = w(: ) + w( ) + 3

= (w( ) + 3) + w( ) + 3

<

w(

) + w( ) + 7

=

w(

! )

Thus with each application we reduce the weight w of the subformula. But we usually replace a subformula with an equivalent subformula. So suppose that 1 is a subformula of , and that we form 0 by replacing one occurrence of 1 with a formula 2. And suppose that w( 1) > w( 2 ).

Lemma: For 1; 2; ; 0 as above, w( ) > w( 0).

The Lemma is proved by induction on formulas . The base case is = 1, for which the result is immediate. We do just one the inductive cases; the rest are analogous. Suppose = ( 1 _ 2), where the substitution is done in 1. Then 0 = ( 10 _ 2). Then,

w( 0) = w( 10 ) + w( 2) + 3

<

w( 1) + w( 2 + 3 (by inductive hypothesis)

=

w( )

So each time we eliminate an occurrence of $ or !, we reduce the weight w of the formula. So, ultimately, the process of elimination must stop.

2.6 Exercises

1. Write DNFs and CNFs corresponding to each of the truth tables shown.

(a)

p

q

r

Truth Value

 

 

 

 

 

 

T

T

T

T

 

T

T

F

T

 

T

F

T

T

 

T

F

F

F

 

F

T

T

F

 

F

T

F

F

 

F

F

T

T

 

F

F

F

F

 

 

 

 

 

(c)

p

q

r

Truth Value

 

T

T

T

T

 

T

T

F

T

 

T

F

T

F

 

T

F

F

T

 

F

T

T

F

 

F

T

F

F

 

F

F

T

T

 

F

F

F

F

 

 

 

 

 

(b)

p

q

r

Truth Value

 

 

 

 

 

 

 

 

 

T

T

T

 

F

 

 

T

T

F

 

T

 

 

T

F

T

 

F

 

 

T

F

F

 

T

 

 

F

T

T

 

F

 

 

F

T

F

 

F

 

 

F

F

T

 

T

 

 

F

F

F

 

T

 

 

 

 

 

 

 

(d)

p

q

r

s

Truth Value

 

T

T

T

T

F

 

T

T

F

T

F

 

T

T

F

F

T

 

T

F

T

F

T

 

F

T

T

T

F

 

F

T

T

F

T

 

F

T

F

T

T

 

F

F

F

F

T

 

 

 

 

 

 

 

(e)

p

q

r

s

Truth Value

 

(f )

p

q

r

s

Truth Value

 

T

T

T

T

F

 

 

T

T

T

F

T

 

T

T

F

T

T

 

 

T

T

F

F

F

 

T

F

T

F

T

 

 

T

F

F

F

T

 

F

T

F

T

F

 

 

F

T

T

F

T

 

F

T

F

F

T

 

 

F

T

F

T

F

 

F

F

T

F

F

 

 

F

F

T

F

F

 

F

F

F

F

F

 

 

 

 

 

 

 

1.(a) DNF: (P ^ Q ^ R) _ (P ^ Q ^ :R) _ (P ^ :Q ^ R) _ (:P ^ :Q ^ R) CNF: (P _ :Q _ R) ^ (:P _ Q _ :R) ^ (:P _ Q _ R) ^ (:P _ :Q _ :R)

1.(b) DNF: (P ^Q^:R)_(P ^:Q^:R)_(:P ^:Q^R)_(:P ^:Q^:R) CNF: (P _ Q _ R) ^ (P _ :Q _ R) ^ (:P _ Q _ :R) ^ (:P _ Q _ R)

1.(c) DNF: (P ^ Q ^ R) _ (P ^ Q ^ :R) _ (P ^ :Q ^ :R) _ (:P ^ :Q ^ R) CNF: (P _ :Q _ R) ^ (:P _ Q _ :R) ^ (:P _ Q _ R) ^ (:P _ :Q _ :R)

1.(d) DNF: (P ^ :Q ^ R ^ :S) _ (P ^ Q ^ :R ^ :S) _ (:P ^ Q ^ R ^ :S) _ (:P ^ :Q ^ :R ^ :S) _ (:P ^ Q ^ :R ^ S)

CNF: (P _ Q _ R _ S) ^ (P _ Q _ :R _ S) ^ (:P _ Q _ R _ S)

1. (e) DNF: (:P ^ Q ^ :R ^ :S) _ (P ^ :Q ^ R ^ :S) _ (P ^ Q ^ :R ^ S)

CNF: (:P _ :Q _ :R ^ :S) ^ (P _ Q _ R _ S) ^ (:P _ Q _ :R _ S) ^ (:P _ :Q _ R _ :S)

1. (f) DNF: (P ^ :Q ^ :R ^ :S) _ (:P ^ Q ^ R ^ :S) _ (P ^ Q ^ R ^ :S) CNF: ( P Q R S) (P Q R S) ( P Q R S)

3.Which of the following DNF formulas are satis able? If the formula is satis able, give an interpretation that satis es it. If it is not satis able, explain why not.

(a)(a ^ b ^ c) _ (c ^ :c ^ b)

(b)(a ^ b ^ c ^ d ^ :b) _ (c ^ d ^ :c ^ e ^ f )

(c)(a ^ b ^ c) _ (:a ^ :b ^ :c)

3.(a) Satis able: I(a) = T; I(b) = T; I(c) = T

3. (b) b ^ :b in the rst term makes the rst term false in all cases. The c ^ :c in the second term makes that term false in all cases. Therefore, the formula is always false and hence not satis able.

3.(c) Satis able: I(a) = T; I(b) = T; I(c) = T

5.Find formulas in CNF equivalent to each of the following formulas:

(a):(p ^ T )

(b)((p ! q) ! r) ! F

(c)((p ! q) ! r) ! T

(d)(p $ q) $ r

(e):(p $ q) $ r

(f)((p _ q) ! r) ^ (r ! :(p _ q))

(g)(:r) ! (((p _ q) ! r) ! :q)

5.(a)

 

p

p ^ T

:(p ^ T )

:(:(p ^ T ))

 

 

 

 

 

 

 

T

T

F

T

 

 

 

 

 

 

 

 

F

F

T

F

 

 

 

 

 

 

: p

 

 

 

 

5. (b)

p q r :((p ! q) ! r) ! F )

 

T

T

T

T

 

 

T

T

F

F

 

 

T

F

T

T

 

 

T

F

F

T

 

 

 

 

 

 

 

 

F

T

T

T

 

 

F

T

F

F

 

 

 

 

 

 

 

 

F

F

T

T

 

 

F

F

F

F

 

 

 

 

 

 

 

 

 

 

 

 

 

:((p ^ q ^ r) _ (p ^ :q ^ r) _ (p ^ :q ^ :r) _ (:p ^ :q ^ r))

(:p _ :q _ :r) ^ (:p _ q _ :r) ^ (:p _ q _ r) ^ (p _ q _ :r) ^ (p _ q _ :r)

5. (c)

p q r X = ((p ! q) ! r) ! T :X

 

T

T

T

 

T

F

 

 

 

 

 

 

 

 

 

 

 

T

T

F

 

T

F

 

 

T

F

T

 

T

F

 

 

 

 

 

 

 

 

 

 

 

T

F

F

 

T

F

 

 

F

T

T

 

T

F

 

 

 

 

 

 

 

 

 

 

 

F

T

F

 

T

F

 

 

F

F

T

 

T

F

 

 

 

 

 

 

 

 

 

 

 

F

F

F

 

T

F

 

 

 

 

 

 

 

 

 

:F ! T

 

 

 

 

 

 

5. (d) (p $ q) $ r

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

p q r

p $ q

(p $ q) $ r

 

 

 

 

 

 

 

 

 

 

 

 

 

T

T

T

T

T

 

 

 

 

 

 

 

 

 

 

 

 

 

T

T

F

T

F

 

 

 

 

T

F

T

F

F

 

 

 

 

 

 

 

 

 

 

 

 

 

T

F

F

F

T

 

 

 

 

F

T

T

F

F

 

 

 

 

 

 

 

 

 

 

 

 

 

F

T

F

F

T

 

 

 

 

F

F

T

T

T

 

 

 

 

 

 

 

 

 

 

 

 

 

F

F

F

T

F

 

 

 

 

 

 

 

 

 

 

 

 

:(p ^ q ^ r) _ (p ^ :q ^ :r) _ (:p ^ q ^ :r) _ (:p ^ :q ^ r)) (:p _ :q _ :r) ^ (:p _ q _ r) ^ (p _ :q _ r) ^ (p _ q _ :r))

5. (e)

p q r X = :((p $ q) $ r) :X

 

T

T

T

T

F

 

 

T

T

F

F

F

 

 

 

 

 

 

 

 

 

T

F

T

F

T

 

 

 

 

 

 

 

 

 

T

F

F

T

F

 

 

F

T

T

F

T

 

 

 

 

 

 

 

 

 

F

T

F

T

F

 

 

F

F

T

T

F

 

 

 

 

 

 

 

 

 

F

F

F

F

T

 

 

 

 

 

 

 

 

:((p ^ :q ^ r) _ (:p ^ q ^ r) _ (:p ^ :q ^ :r))

(:p _ q _ :r) ^ (p _ :q _ :r) ^ (p _ q _ r)

5. (f)

p q r X = ((p _ q) ! r) ^ (r ! :(p _ q)) :X

 

T

T

T

F

T

 

 

T

T

F

F

T

 

 

 

 

 

 

 

 

 

T

F

T

F

T

 

 

T

F

F

F

T

 

 

 

 

 

 

 

 

 

F

T

T

F

T

 

 

F

T

F

F

T

 

 

 

 

 

 

 

 

 

F

F

T

T

F

 

 

F

F

F

T

F

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

:((p^q^r)_(p^q^:r)_(p^:q^r)_(p^:q^:r)_(:p^q^r)_(:p^q^:r))

(:p _ :q _ :r) ^ (:p _ :q _ r) ^ (:p _ q _ :r) ^ (:p _ q _ r) ^ (p _ :q _ :r) ^ (p ^ :q ^ r)

5. (g)

 

 

 

 

q _ q

(p _ q) ! r

X =

(:r) ! X

 

 

 

p q r

((p _ q) ! r) ! :q

 

 

 

 

 

 

 

 

 

 

 

 

T

T

T

T

T

F

T

F

 

 

T

T

F

T

F

T

T

F

 

 

 

 

 

 

 

 

 

 

 

 

T

F

T

T

T

T

F

T

 

 

T

F

F

T

F

T

T

F

 

 

 

 

 

 

 

 

 

 

 

 

F

T

T

T

T

F

T

F

 

 

F

T

F

T

F

T

T

F

 

 

 

 

 

 

 

 

 

 

 

 

F

T

F

T

F

T

T

F

 

 

F

F

F

F

T

T

T

F

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CNF: :(p ^ :q ^ r) DNF: (:p _ q _ :r)

7.Which of the following formulas in CNF are tautologies? Explain, as in Example 6.

(a)(a _ b _ c) ^ (c _ :c _ b)

(b)(a _ b _ c _ d _ :b) ^ (c _ d _ :c _ e _ f )

(c)(a _ b _ c) ^ (:a _ :b _ :c)

7.Only (b) is a tautology. In the rst term of (b) both b and :b occur so that term is always true. In the second term c and :c occur so that term is always true. For (a) the interpretation I(a) = F ; I(b) = F ; and I(c) = F makes (a) false. The interpretation I(a) = F ; I(b) = F ; and I(c) = F makes (c) false.

Соседние файлы в папке Student Solutions Manual