0% found this document useful (0 votes)
14 views9 pages

Chap 1 Exercise

The document consists of exercises related to propositions, logical connectives, and truth values. It includes various tasks such as determining the truth values of statements, expressing compound propositions, and verifying logical equivalences. Additionally, it covers the use of truth tables and rules of inference in logical reasoning.

Uploaded by

xddoraxddd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views9 pages

Chap 1 Exercise

The document consists of exercises related to propositions, logical connectives, and truth values. It includes various tasks such as determining the truth values of statements, expressing compound propositions, and verifying logical equivalences. Additionally, it covers the use of truth tables and rules of inference in logical reasoning.

Uploaded by

xddoraxddd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Chap 1_Exercise

Exercise 1-1
1. Which of these sentences are propositions? What are the truth values of those that are propositions?
a) Boston is the capital of Massachusetts.
b) Miami is the capital of Florida.
c) 2 + 3 =5
d) 5 + 7 = 10
e) x + 2 =11
f) Answer this question
Ans: a) Yes, T b) Yes, F (Tallahassee) c) Yes, T d) Yes, F e) No f) No

5. Let p and q be the propositions “Swimming at the New Jersey shore is allowed” and “Sharks
have been spotted near the shore,” respectively. Express each of these compound propositions as an
English sentence.
a) ¬q b) p ^ q c) ¬pˇq d) p → ¬q
Ans:
a) Sharks have not been spotted near the shore.
b) Swimming at the New Jersey shore is allowed, and sharks have been spotted near the shore.
c) Swimming at the New Jersey shore is not allowed, or sharks have been spotted near the shore.
d) If swimming at the New Jersey is allowed, then sharks have not been spotted near the shore.

9. Let p and q be the propositions


p: You drive over 65 miles per hour.
q: You get a speeding ticket.
Write these propositions using p and q and logical connectives.
a) You do not drive over 65 miles per hour.
b) You drive over 65 miles per hour, but you do not get a speeding ticket.
c) You will get a speeding ticket if you drive over 65 miles per hour.
e) Driving over 65 miles per hour is sufficient for getting a speeding ticket.
g) Whenever you get a speeding ticket, you are driving over 65 miles per hour.
Ans:
a)¬p b) p ^ ¬q c)p → q e) p → q g) q → p

13. Determine whether each of these conditional statements is true or false.


a) If 1 + 1 = 2, then 2 + 2 = 5.
b) If 1 + 1 = 3, then 2 + 2 = 4.
c) If 1 + 1 = 3, then 2 + 2 = 5.
d) If monkeys can fly, then 1 + 1 = 3.
Ans: a) F, b) T, c) T, d) T
1
17. For each of these sentences, state what the sentence means if the or is an inclusive or (that is, a
disjunction) versus an exclusive or. Which of these meaning of or do you think is intended?
a) To take discrete mathematics, you must have taken calculus or a course in computer science.
b) When you buy a new car from Acme Motor Company, You get $2000 back in cash or a 2% car
loan.
c) Dinner for two includes two items from column A or three items from column B.
d) School is closed if more than 2 feet of snow falls or if the wind chill is below -100.
Ans: (先說明句子意義,再決定可能為 or 或 xor): a) or b) xor c) xor d) or

27. Construct a truth table for each of these compound propositions.


a) p ^ ¬p c) (pˇ¬q) → q e) (p → q) <-> (¬q → ¬p)
Ans:

37. Find the bitwise OR, AND, XOR of each of these pairs of bit strings.
a) 1011110, 0100001 b) 11110000, 10101010
Ans: a) OR: 1111111, AND: 0000000, XOR: 1111111
b) OR: 11111010, AND: 10100000, XOR:01011010

2
Exercise 1-2
5. Use a truth table to verify the distributive law
p ^ (qˇr) ≣ (p ^ q) ˇ (p ^ r)
Ans:

15. Determine whether (¬q ^ (p → q)) → ¬p is a tautology.


Ans: a tautology
(¬q ^ (p → q)) → ¬p ≣ ¬(¬q ^ (¬pˇq))ˇ(¬p) ≣ (qˇ(p ^ ¬q))ˇ(¬p)
≣ ((qˇp) ^ (qˇ¬q))ˇ(¬p)≣(qˇp) ˇ(¬p) ≣ qˇT ≣ T

23. Show that (p → r) ^ (q → r) and (pˇq) → r are logically equivalent


Ans: (p → r) ^ (q → r) ≣ (¬pˇr) ^ (¬qˇr) ≣ (¬p ^ ¬q)ˇr ≣ ¬(pˇq)ˇr≣(pˇq) → r
(或用真值表列出)

3
Exercise 1-3
1. Let P(x) denote the statement “x≦4” What are the truth values?
a) P(0) b) P(4) c)P(6)
Ans: a) T b) T c) F

11. Let P(x) be the statement “x = x2.” If the domain consists of the integers, what are the truth
values?
a) P(0) b) P(1) c) P(2) d) P(-1) e) xP(x) f) xP(x )
Ans: a) T b) T c) F d) F e) T f) F

17. Suppose that the domain of the propositional function P(x) consists of integers 0, 1, 2, 3, and 4.
Write out each of these propositions using disjunctions, conjunctions, and negations.
a) xP(x) b) xP(x ) c) xP(x ) d) xP(x ) e) xP(x ) f) xP(x)
Ans: a)存在一個 x,使得 P(x)成立之解。所以,其解包含: P(0)  P(1)  P(2)  P(3)  P(4)
b) 對所有 x,P(x) 都成立,其解為: P(0)  P(1)  P(2)  P(3)  P(4)
c) P(0)  P(1)  P(2)  P(3)  P(4)
d) P(0)  P(1)  P(2)  P(3)  P(4)
e) ( P(0)  P(1)  P(2)  P(3)  P(4))
f) ( P(0)  P(1)  P(2)  P(3)  P(4))

31. Suppose that the domain of Q(x, y, z) consists of triples x, y, z, where x=0, 1, or 2, y=0 or 1, and
z=0 or 1. Write out these propositions using disjunctions and conjunctions.
a) yQ(0, y ,0) b) xQ(x,1,1) c) zQ (0,0, z ) d) xQ(x,0,1)
Ans: a) Q(0, 0, 0)  Q(0, 1, 0) b) Q(0,1,1)  Q(1,1,1)  Q(2,1,1) c) Q(0, 0, 0)  Q(0, 0, 1)
d) Q(0, 0, 1)  Q(1, 0, 1)  Q(2, 0, 1)

43. Determine whether x( P( x)  Q(x) ) and xP( x )  x Q(x) are logically equivalent. Justify
your answer.
Ans: Not logically equivalent.例如:P(x) 整數 x,x2 > x;Q(x) 整數 x,x2 < x;所以,
P(x)有些成立,有些不成立;Q(x)則永遠 false,所以,
x( P( x)  Q(x) ) 為假 (有些成立,有些不成立,所以,對所有 x 而言,則不一定成立);
xP( x )  x Q(x) 中,前件 F,後件 F,所以,整個 proposition 為 T

4
Exercise 1-4
27. Determine the truth value of each of these statements if the domain for all variables consists of all
integers.
a) nm(n 2  m) b) nm(n  m 2 ) c) nm(n  m  0) d) nm(n m  m)
e) nm(n 2  m 2  5) f) nm(n 2  m 2  6) g) nm(n  m  4  n  m  1)
h) nm(n  m  4  n  m  2) i) nmp( p  (n  m) / 2)
Ans: a)T b) T c) T d)T e)T f)F g)F h)T i) F

31. Express the negations of each these statements so that all negation symbols immediately precede
predicates.
a) xyzT ( x, y , z ) b) xyP( x, y )  xyQ( x, y ) c) xy ( P( x, y )  zR ( x, y , z ))
d) xy ( P( x, y )  Q ( x, y ))
Ans: a) (xyzT ( x, y , z ))  xyzT ( x, y , z )
b) xyP( x, y )  xyQ( x, y )
c) xy (P( x, y )  zR( x, y , z ))
d) xy ( P( x, y )  Q( x, y ))

33. Rewrite each of these statements so that negations appear only within predicates.
a) xyP( x, y ) b) yxP( x, y ) c) yx( P( x, y )  Q( x, y ))
d) (xyP( x, y )  xyQ ( x, y ))
e) x(yz( P( x, y, z )  zyP( x, y, z))
Ans: a) xyP( x, y ) b) yxP( x, y ) c) yx (P( x, y )  Q( x, y ))
d) (xyP( x, y )  xyQ( x, y )) e) x (yz (P( x, y, z )  zyP( x, y, z ))

5
Exercise 1-5
15. For each of these arguments determine whether the argument is correct or incorrect and explain
why.
a) All students in this class understand logic. Xavier is a student in this class. Therefore, Xavier
understands logic.
b) Every computer science major takes discrete mathematics. Nana is taking discrete mathematics.
Therefore, Nana is a computer science major.
c) All parrots(鸚鵡) like fruit. My pet bird is not a parrot. Therefore, my pet bird does not like fruit.
d) Everyone who eat granola(燕麥) every day is healthy. Linda is not healthy. Therefore, Linda does
not eat granola every day.
Ans: a) C b) I c)I d) C

23. Identify the error or errors in this argument that supposedly shows that if xP(x)  xQ( x) is
true then x (P(x)  Q ( x)) is true.
1. xP(x)  xQ( x) Premise
2. xP(x) Simplification from (1)
3. P(c) Existential instantiation from (2)
4. xQ(x) Simplification from (1)
5. Q(c) Existential instantiation from (4)
6. P(c)  Q(c ) Conjunction from (3) & (5)
7. x (P(x)  Q ( x)) Existential generalization
Ans: Error. Step 5 is incorrect for using the parameter c (the same as step 3).

29. Use rules of inference to show that if x(P(x)  Q( x )), x (Q(x)  S ( x)),
x (R(x)  S ( x)), and xP(x), are true, then xR(x), is true.
Ans: 解題技巧:以 GPS 方式找起點與終點的中間解,再繼續找中間解,直到連接起起點
與終點。
終點: xR(x),
起點:四個已知條件
中間:S(x)
再找中間:Q(x)
此時,可與已知連結:
1. xP(x), ??
2. P(c), ??
3. x(P(x)  Q( x )), ??
4. P(c)  Q (c),
5. Q(c)
6. x (Q(x)  S ( x)),
7. Q(c)  S (c), from (5)

6
8. S(c)
9. x (R(x)  S ( x)), ??
10. R(c)  S (c ),
11. R(c),
12. xR(x), is true.

33. Use resolution to show that the compound proposition


( p  q )  (p  q)  ( p  q )  (p  q) is not satisfiable.
Ans:
( p  q )  ( p  q )  ( p  q )  ( p  q )
 ((( p  q )  p)  (( p  q)  q ))  ((( p  q)  p )  (( p  q )  q))
 ((q  p)  ( p  q ))  ((q  p )  ( p  q ))
 q  q
 False (Not satisfiable)

7
Exercise 1-6
(證明常用方式:直接證法、反向證法( q  p )、矛盾證法)
1. Use a direct proof to show that the sum of two odd integers is even.
Ans: Let n= 2K+1, m=2h+1 be odd integers. Then n + m = 2(k+h) + 2 = 2(k+h+1) is even. (直接證
法)

9. Use a proof by contradiction to prove that the sum of an irrational number and a rational number is
irrational.
Ans: Suppose that r is rational and i is irrational and s = r + i is rational. Then, s – r = i is rational
(contradiction). So, the sum of an irrational number and a rational number is irrational.

13. Prove that if x is irrational, then 1/x is irrational.


Ans: Proof by contraposition (反向證法): If 1/x were rational, 1/x = p/q for some integers p and
q(≠0). Since 1/x ≠ 0, then p≠0. We can obtain x = q/p is a rational. It implies that “if x is
irrational, then 1/x is irrational.”

21. Let P(n) be the proposition “If a and b are positive real numbers, then (a+b)n ≥an + bn.” Prove
that P(1) is true. What kind of proof did you use?
Ans: P(1): (a + b)1 = a + b ≥a1 + b1. (direct proof)

27. Prove that if n is a positive integer, then n is odd if and only if 5n + 6 is odd.
Ans: (i) if n is odd, then 5n + 6 is odd
Let n = 2k+1, then 5n + 6 = 5(2k+1) + 6 = 2(5k+5) + 1 is odd.
(ii) if 5n + 6 is odd, then n is odd
(反向證法): If n is even, n = 2k. Then 5n + 6 = 5(2k) + 6 = 2(5k+3) is even. It implies “if 5n + 6
is odd, then n is odd.”

33. Show that these statements about the real number x are equivalent: (i) x is irrational, (ii) 3x+2 is
irrational, (iii) x/2 is irrational.
Ans: (i) -> (ii)
(反向證法) Suppose 3x+2 is rational, then (3x+2) = p/q (q≠0). Then, x =p/3q – 2/3 is
rational.
(ii) -> (i)
同上,Suppose x is rational, then x = p/q (q≠0). 3x+2 = 3p/q + 2 is rational.
(i) -> (iii)
類似 (i) -> (ii)
(iii) -> (i)
類似 (ii) -> (i)
(ii) -> (iii) 與(ii) -> (i) 證明相同, (iii)->(ii) 與 (i) -> (ii) 證明相同

8
Exercise 1-7
3. Prove that if x and y are real numbers, then max(x, y)+min(x, y) = x + y.
Ans: Two cases:
1: If x≦y, then max(x, y)+min(x, y) = y + x = x+ y
2. If x> y, then max(x, y)+min(x, y) = x+ y

13. Show that each pf these statements can be used to express the fact that there is a unique element x
such that P(x) is true. (即 ! xP( x ) )
a) xy ( P( y )  x  y )
b) xP( x)  xy ( P( x )  P( y )  x  y )
c) x ( P( x )  y ( P( y )  x  y ))
Ans:
a) 說明存在一個 x,使得 P(y) is true, then y=x. 且 x=y, P(y) is true (即 P(x) is true).所以,P(y)
除了 y=x 時,P(x) 才為真,否則皆為假。
b) 第一句:存在一個 x,使 P(x) is ture. 第二句:對所有 x, y,要 P(x)^ P(y)為真,則 x=y.
所以,只有存在一個 x = y 時,整個才為真。
c) 第一句:存在一個 x,使 P(x) is ture. 而且,當所有其他數值 y,使得 P(y)為真,則 x=y.
所以,只有存在一個 x = y 時,整個才為真。

27. Prove that there is no positive integer n such that n2+n3 =100.
Ans: 所有正整數 n3 > 100, 當 n>4. 所以,只要考慮 n=1, n=2, n=3, n=4 帶入均不符, 所以,
There is no positive integer n such that n2+n3 =100.

37. Verify the 3x+1 conjecture (一種轉換,若一數值為偶數,則除 2;奇數則進行函數轉換(例


如: T(x) = 3x + 1)) for these integers.
a) 6 b) 7 c)17 d) 21
Ans: a) 6 -> 3 -> 10 -> 5 -> 16 -> 8 -> 4 -> 2 -> 1
b) 7 -> 22 -> 11 -> 34 -> 17 -> 52 -> 26 -> 13 -> 40 -> 20 -> 10 -> 5 -> 16 -> 8 -> 4 -> 2 -> 1
c) 17 -> 52 -> 26 … (同上)
d) 21 -> 64 -> 32 -> 16 -> 8 -> 4 -> 2 ->1

You might also like