This preview shows pages 1–9. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Section 1.1 Propositional Logic 1 CHAPTER 1
The Foundations: Logic and Proofs SECTION 1.1 Propositional Logic i‘vlanipulating propositions and constructing truth tables are straightforward. A truth table is constructed by
finding the truth values of compound propositions from the inside out; see the solution to Exercise 27, for
instance. This exercise set also introduces fuzzy logic. . Propositions must have clearly deﬁned truth values, so a proposition must be a declarative sentence with no free variables. a) This is a true proposition. b) This is a false proposition (Tallahassee is the capital). c) This is a true proposition. d) This is a false proposition. e) This is not a proposition (it contains a variable; the truth value depends on the value assigned to 3:). f) This is not a proposition, since it does not assert anything. . a) Today is not Thursday. b) There is pollution in New Jersey. (3) 2 + 1 51$ 3 d) It is not the case that the summer in Maine is hot and sunny. In other words, the summer in Maine is not
hot. and sunny, which means that it is not hot or it is not sunny. It is not correct to negate this by saying
“The summer in Maine is not hot and not sunny.” [For this part (and in a similar vein for part we need
to assume that there are welldeﬁned notions of hot and sunny; otherwise this would not be a proposition because of not having a deﬁnite truth value.) . This is pretty straightforward, using the normal words for the logical operators. 3.) 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. 6) Swimming at the New Jersey shore is not allowed, or sharks have been spotted near the shore. d) If swimming at the New Jersey shore is allowed, then sharks have not been spotted near the shore. e) If sharks have not been spotted near the shore, then swimming at the New Jersey shore is allowed. f) If swimming at the New Jersey shore is not allowed, then sharks have not been spotted near the shore. g) Swimming at the New Jersey shore is allowed if and only if sharks have not. been spotted near the shore.
h) Swimming at the New Jersey shore is not allowed; and either swimming at the New Jersey shore is allowed
or sharks have not been spotted near the shore. Note that we were able to incorporate the parentheses by
using the word “either” in the second half of the sentence. a) Here we have the conjunction p A g.
b) Here we have a conjunction of p with the negation of q. namely )3 A nq. Note that “but” logically means the same thing as “and.” 11. 13. 15. 17. Chapter 1 The Foundations: Logic and Proofs c) Again this is a conjunction: \p A iq. d) Here we have a disjunction, p Vq. Note. that V is the inclusive or, so the “(or both)" part of the English
sentence is automatically included. e) This sentence is a conditional statement, p —+ q. f) This is a conjunction of propositions, both of which are compound: (p V q) A (p a ﬁg). g) This is the biconditional p H q. . a) This is just the negation of p, so we write mp. b) This is a conjunction ("’but” means “and”): p A at]. c) The position of the word “if” tells us which is the antecedent and which is the consequence: p a q.
d) a —} sq e) The sufficient condition is the antecedent: p i) q. f) q A or) g) “Whenever” means “if”: q —r p. a) “But” is a logical synonym for “and” (although it often suggests that the second part of the sentence is
likely to be unexpected). So this is r A m. b) Because of the agreement about precedence, we do not need parentheses in this expression: op A q A r.
c) The outermost structure here is the conditional statement, and the conclusion part of the conditional
statement is itself a biconditional: r —) (q H up). (1) This is similar to part (b): at] A up A r. 9) This one is a little tricky. The statement that the condition is necessary is a conditional statement in one
direction, and the statement that this condition is not sufﬁcient is the negation of the conditional statement in
the other direction. Thus we have the structure (safe —> conditions) A ﬁ(conditions —> safe). Fleshing this out
gives our answer: (q —> (W' A op)) A i((ﬁr A —up) —r q). There are some logically equivalent correct answers
as well. f \Ve just need to remember that “whenever” means “if” in logic: ‘J/\ r ~> a .
. t) I 9 In each case, we simply need to determine the truth value of the hypothesis and the conclusion, and then use
the deﬁnition of the truth value of the conditional statement. The conditional statement is true in every case
except when the hypothesis (the “if” part) is true and the conclusion (the “then” part) is false. a) Since the hypothesis is true and the conclusion is false, this conditional statement is false. b) Since the hypothesis is false and the conclusion is true, this conditional statement is true. c) Since the hypothesis is false and the conclusion is false. this conditional statement is true. Note that the
conditional statement is false in both part (b) and part (c); as long as the hypothesis is false, we need look
no further to conclude that the conditional statement is true. (:1) Since the hypothesis is false. this conditional statement is true. a) Presumably the diner gets to choose only one of these beverages, so this is an exclusive or.
b) This is probably meant to be inclusive, so that long passwords with many digits are acceptable.
c) This is surely meant to be inclusive. If a student has had both of the prerequisites, so much the better. d) At ﬁrst glance one might argue that no one would pay with both currencies simultaneously, so it would
seem reasonable to call this an exclusive or. There certainly could be cases, however, in which the patron
would pay a portion of the bill in dollars and the remainder in euros. Therefore, an inclusive or seems better. a) If this is an inclusive or, then it is allowable to take discrete mathematics if you have had calculus or
computer science or both. If this is an exclusive 01, then a person who had both courses would not be allowed Section 1.1 19. 21. 23. Prop ositional Logic 3 to take discrete mathematicsionly someone who had taken exactly one of the prerequisites would be allowed
in. Clearly the former interpretation is intended; if anything, the person who has had both calculus and
computer science is even better prepared for discrete mathematics. b) If this is an inclusive or", then you can take the rebate, or you can sign up for the lowinterest loan, or you
can demand both of these incentives. If this is an exclusive or, then you will receive one of the incentives but
not both. Since both of these deals are expensive for the dealer or manufacturer, surely the exclusive or was
intended. c) lf this is an inclusive or, you can order two items from column A (and none from B), or three items from
column B (and none from A), or five items (two from A and three from B). If this is an exclusive or, which. it
surely is here, then you get your choice of the two A items or the three B items, but not both. d) lf this is an inclusive 07', then lots of snow, or extreme cold, or a combination of the two will close school.
If this is an exclusive 01‘, then one form of bad weather would close school but if both of them happened then school would meet. This latter interpretation is clearly absurd, so the inclusive or is intended. a) If the wind blows from the northeast, then it snows. [“Whenever” means “if.”] b) If it stays warm for a week, then the apple trees will bloom. [Sometimes word order is ﬂexible in English,
as it is here. Other times it is not~—"‘The man bit the dog” does not have the same meaning as “The dog bit
the man.”] c) If the Pistons win the championship, then they beat the Lakers. (1) If you get to the top of Long’s Peak, then you must have walked eight miles. [The necessary condition is
the conclusion] e) If you are world famous, then you will get tenure as a. professor. [The suﬁicient condition is the antecedent]
f) If you drive more than 400 miles, then you will need to buy gasoline. [The word “then” is sometimes
omitted in English sentences, but it is still understood] g) If your guarantee is good, then you must have bought your CD player less than 90 days ago. [Note that
“only if” does not mean “if”; the clause following the “only if” is the conclusion, not the antecedent] h) If the water is not too cold, then Jan will go swimming. [Note that “unless” really means “if not.” It also can be taken to mean “or.”] In each case there will be two statements. It is being asserted that the ﬁrst one holds true if and only if the
second one does. The order doesn’t matter, but often one order is more colloquial English. a) You buy an ice cream cone if and only if it is hot outside. b) You win the contest if and only if you hold the only winning ticket. c) You get promoted if and only if you have connections. d) Your mind will decay if and only if you watch television. e) The train runs late if and only if it is a day I take the train. Many forms of the answers for this exercise are possible. a) One form of the converse that reads well in English is “I will ski tomorrow only if it snows today.” “76
could state the contrapositive as “If I don’t ski tomorrow, then it will not have snowed today.” The inverse is
“If it does not snow today, then I will not ski tomorrow.” b) The proposition as stated can be rendered r‘If there is going to be a quiz, then I will come to class.” The
converse is “If I come to class, then there will be a quiz.” (Or, perhaps even better, “I come to class only if
there’s going to be a quiz”) The coutrapositive is “If I don’t come to class, then there won’t be a quiz." The
inverse is “If there is not going to be a quiz, then I don’t come to class." c) There is a variable (“a positive integer") in this sentence, so technically it is not a proposition. Nevertheless1
we can treat sentences such as this in the same way we treat propositions. Its converse is “A positive integer 25. 27. 29. Chapter 1 The Foundations: Logic and Proofs is a prime if it has no divisors other than 1 and itself.” (Note that this can be false, since the number 1
satisﬁes the hypothesis but not the conclusion.) The contrapositive of the original proposition is “If a positive
integer has a divisor other than 1 and itself, then it is not prime." (We are simplifying a bit here, replacing “does not have no divisors” by “has a divisor.” Note that this is always true, assuming that we are talking
about positive divisors.) The inverse is “If a positive integer is not prime, then it has a divisor other than 1 and itself.” A truth table will need 2” rows if there are n variables.
a) 21:2 b)24=16 c)26=64 d)2“:16 To construct the truth table for a compound proposition, we work from the inside out. In each case, we will
show the intermediate steps. In part (d), for example, we ﬁrst construct the truth table for p V q, then the
truth table for p A q, and ﬁnally combine them to get the truth table for (13 V q) a (pA q). For parts (a)
and (b) we have the following table (column three for part (a), column four for part B 1’ m m
T F F T
F T F T
For part (c) we have the following table.
in q 11 r V sq (in V W) ' q
T T F T T
T F T T F
F T F F T
F F T T F
For part (d) we have the following table.
‘P 9 pvt: 1M9 (Mildew/W)
T T T T T
T F T F F
F T T F F
F F F F T For part we have the following table. This time we have omitted the column explicitly showing the
negations of p and (1. Note that this true proposition is telling us that a conditional statement and its contrapositive always have the same truth value. p a peg nq—Wp (p—iqMiHI—Wp)
T T T T T
T F F F T
F T T T T
F F T T T For part (f) we have the following table. The fact that this proposition is not always true tells us that knowing
a conditional statement in one direction does not tell us that the conditional statement is true in the other direction.
in q p—>q q—iii (seal—Wq—ip)
T T T T T
T F F T T
F T T F F
F F T T T To construct the truth table for a compound proposition, we work from the inside out. In each case, we will
show the intermediate steps. In part (a), for example, we ﬁrst construct the truth table for p V q, then the Section 1.1 Propositional Logic 5 truth table for p 69 q, and ﬁnally combine them to get the truth table for (p V q) 7: (p GB 9). For parts (a),
(b), and (c) we have the following table (column five for part (a), column seven for part (b), column eight
for part. p q F_Vq Lear; (PVQ)—’(P@Ql F_/\q (pawlWow} (FVq)®(p/\q)
T T T F F T T F
T F T T T F F T
F T T T T F F T
F F F F T F T F For part (d) we have the following table. 'P (110 29qu FISH—W1 (P‘T’QlEBi—‘Pqu
TT F T F T
TF F F T T
FT T F T T
FF T T F T For part (e) we need eight rows in our truth table, because we have three variables. P q 7‘ F29 Tr P H q ‘11) <—> FT (F H q) 6% (no H ﬁr)
T T T F F T T F
T T F F T T F T
T F T F F F T T
T F F F T F F F
F T T T F F F F
F T F T T F T T
F F T T F T F T
F F F T T T T F
For part (f) we have the following table. P q 11 p836; 126911 (F®G)T(IJ€BTQ) T T F F T T T F T T F F F T F T F F F F T F T T 31. The techniques are the same as in Exercises 27~30. For parts (a) and (b) we have the following table (column
four for part (a), column six for part P a 11 p—Hq l) TP‘T'Q
T T F F F F
T F T T F T
F T F T T T
F F T T T F For parts ((2) and (d) we have the following table (columns six and seven, reSpectively). F q Farr 10 Fri—>6; (P—HIWHH‘CI) (PTQ)A(TPT*G)
T T T F T T T
T F F F T T F
F T T T T T T
F F T T F T F For parts (e) and (f) we have the following table (this time we have not explicitly shown the columns for
negation). Column ﬁve shows the answer for part (e), and column seven shows the answer for part (f 6 Chapter 1 The Foundations; Logic and Proofs p q p H q ﬁp H q (p H a) V (FF H «2) er) +> ﬁq (ﬁn H WI) <—> (p H 9)
T'F T F T T T
T F F T T F T
FT F T T F T
FF T F T T T 33. The techniques are the same as in Exercises ‘27—'32, except that. there are new three variables and therefore
eight rows. For part (a), we have Iq\/'r p—+('FQVI‘) J
a: 4 mmmqeaaa‘e
*rirquaHinw—3@Q
mawamama *2
aﬁmwaamm
Hawaﬁaﬁa For part. (b), we have J
13
A: J
’8
1
HS‘ aaaaaame
l WWWW€HHHE
mwaamwaae
"UrJﬁrT’TJiT'Tlvi ‘2
HalEH’TJM’TJ'TJ earner—Jamal Parts (0) and (d) we can combine into a single table. p q T Fee} 12 war (pHIWHJ—H") (LU—’QWW‘VP—H“)
T T T T F T T T
T T F T F T T T
T F T F F T T F
T F F F F T T F
F T T T T T T T
F T F T T F T F
F F T T T T T T
F F F T T F T F
For part (9) we have 10 q 1“ “qu w Ftpr1“ (P<—"1)V(“G"T”'l T T T T F F T T T F T F T T T F T F T T T T F F F T F F F T T F F F F F T F F F T T F F T T T T T F F F T T F T Finally, for part (f) we have Section 1.1 Propositional Logic 7 ‘1' 'Wan qu pryﬂHmHﬂ mmwweaeae
"U'TJF—ll—l'TJPUHHQ
ﬁHﬁHﬁHﬁQ
iirlii€ﬁ’11*~1ﬁl.é
Hawaiiansme
Hemeamwa
H'TJHW’TJQ’TJH Hewmwmee 35. This time the truth table needs 24 = 16 rows. Note the systematic order in which we list the possibilities. p q T’ s qu ri—as (pF)q)ﬁ—)(T(—)S)
T T T T T T T
T T T F T F F
T T F T T F F
T T F F T T T
T F T T F T F
T F T F F F T
T F F T F F T
T F F F F T F
F T T T F T F
F T T F F F T
F T F T F F T
F T F F F T F
F F T T T T T
F F T F T F F
F F F T T F F
F F F F T T T 37. a) bitwise OR = 111 1111; bitwise AND 2 000 0000; bitwise XOR = 111 1111
b) bitwise OR :— 1111 1010; bitwise AN'D : 1010 0000; bitwise XOR : 0101 1010
c) bitwise OR = 10 0111 1001; bitwise AND : 00 0100 0000; bitwise XOR = 10 0011 1001
d) bitwise OR = 11 11111111;bitwise AND 2 00 0000 0000; bitwise XOR = 11 1111 1111 39. For “Fred is not happy,” the truth value is 1 — 0.8 = 0.2.
For “John is not happy,” the truth value is 1 — 0.4 2 0.6. 41. For “Fred is happy, or John is happy,” the truth value is max(0.8,0.4) = 0.8. For “Fred is not happy, or John is not happy," the truth value is max(0.2,0.6) = 0.6 (using the result of
Exercise 39). 43. One great problemsolving strategy to try with problems like this, when the parameter is large (100 statements here) is to lower the parameter. Look at a simpler problem, with just two or three statements, and see if you
can ﬁgure out what’s going on. That was the approach used to discover the solution presented here.
a) Some number of these statements are true, so in fact exactly one of the statements must be true and the
other .99 of them must be false. That is what the 99rh statement is saying, so it is true and the rest are false.
b) The 100th statement cannot be true. since it is asserting that all the statements are false. Therefore it must
be false. That makes the ﬁrst statement true. Now if the 99°11 statement were true, then we would conclude
that statements 2 through 100 were false, which contradicts the truth of statement 99. 80 statement 99
must be false. That means that statement 2 is true. we continue in this way and conclude that statements
1 through 50 are all true and statements 51 through 100 are all false. 45. 47. 49. 51. 53. Chapter I The Foundations: Logic and Proofs
c) If there are an odd number of statements, then we’d run into a contradiction when we got to the middle. If there were just three statements, for example, then statement 3 would have to be false, making statement 1 true, and now the truth of statement. 2 would imply its falsity and its falsity would imply its truth. Therefore this situation cannot occur with three (or any odd number of) statements. It is a logical paradox, showing that in fact these are not statements after all. There are many correct answers to this problem, but all involve some sort of double layering, or combining a.
question about the kind of person being addressed with a question about the information being sought. One
solution is to ask this question: “If I were to ask you whether the right branch leads to the ruins, would you
say ‘yes’?” If the villager is a truth—teller, then of course he will reply “yes” if and only if the right branch
leads to the ruins. Now let us see what the liar says. If the right branch leads to the ruins, then he would say
“no” if asked whether the right branch leads to the ruins. Therefore, the truthful answer to your convoluted
question is “110.” Since he always lies, he will reply “yes.” 011 the other hand, if the right branch does not lead
to the ruins, then he would say “yes” if asked whether the right branch leads to the ruins; and so the truthful ‘3 answer to your question is “yes”; therefore he will reply “110: Note that in both cases, he gives the same
answer to your question as the truthteller; namely, he says “yes” if and only if the right branch leads to the
ruins. A more detailed discussion can be found in Martin Gardner’s Scientiﬁc American Book: of Mathematical
Puzzles and Diversions (Simon and Schuster, 1959), p. 25; reprinted as Hezt'aflert'agons and Other i‘l‘Iathematical Diversions: The F ﬁrst Scientific American Book of Puzzles and Games (University of Chicago Press, 1988). a) Since “whenever” means “if,” we have (3 —> p.
b) Since “but” means “and,” we have q/\ ’Ip.
c) This sentence is saying the same thing the sentence in part (a)1 so the answer is the same: q —> p. d) Again, we recall that “when” means “if” in logic: mq —> —p. Let m, n, la, and 2‘. represent the propositions “The system is in multiuser state,” “The system is operating
normally,” “The kernel is functioning,” and “The system is in interrupt mode,” respectively. Then we want
to make the following expressions simultaneously true by our choice of truth values for m, n, k, and '11: m H in, mi) ls, of: V 2', m ——> 11, oi. In order for this to happen, clearly i must be false. In order for em w—i i. to be true when i is false, the
hypothesis om must be false, so or must be true. Since we want In. <—> n. to be true, this implies that 71. must
also be true. Since we want 72 —» It to be true, we must therefore have 1: true. But now if k is true and i is
false, then the third specification, at”: Vi is false. Therefore we conclude that this system is not consistent. Let s be “The router can send packets to the edge system”; let a. be “The router supports the new address
space”; let T be “The latest software release is installed.” Then we are told s a a, a. 7) r, r a .3, and
no. Since a is false, the first conditional statement tells us that .9 must be false. From that we deduce from
the third conditional statement that r must be false. If indeed all three propositions are false, then all four
speciﬁcations are true, so they are consistent. This is similar to Example 17, about universities in New Mexico. To search for beaches in New Jersey, we
could enter NEW' AND JERSEY AND BEACHES. If we enter (JERSEY AND BEACHES) NOT NEW',
then we’ll get websites about beaches on the isle of Jersey, except for sites that happen to use the word “new”
in a different context (e.g., a recently opened beach there). If we were sure that the word “isle” was in the
name of the location, then of course we could enter ISLE AND JERSEY AND BEACHES. Section 1.1 55. 57. 59. 61. 63. 65. Propositional Logic 9 If A is a knight, then he is telling the truth, in which case B must be a knave. Since B said nothing, that
is certainly pOSsible. If A is a knave, then he is lying, which means that his statement that at least one of
them is a knave is false; hence they are both knights. That. is a contradiction. So we can conclude that A is
a knight and B is a knave. If A is a knight, then he is telling the truth, in which case B must be a knight as well, since A is not a knave.
(If p V q and op are both true, then q must be true.) Since B said nothing, that is certainly possible. If A
is a knave, then his statement is patently true, but that is a contradiction to the behavior of knaves. So we
can conclude that A is a knight and B is a knight. If A is a knight. then he should be telling the truth, but he is asserting that he is a knave. So that cannot
be. If A is a knave, then in order for his statement to be false, B must be a knight. So we can conclude that A is a knave and B is a knight. Because of the first piece of information that Steve has, let‘s assume first that Fred is not the highest paid.
Then Janice is. Therefore Janice is not the lowest paid, so by the second piece of information that Steve has,
Maggie is the highest paid. But that is a contradiction. Therefore we know that Fred is the highest paid.
Next let‘s assume that Janice is not the lowest paid. Then our second fact implies that Maggie is the highest
paid. But that contradicts the fact that Fred is the highest paid. Therefore we know that Janice is the lowest
paid. 80 it appears that the only hope of a consistent set of facts is to have Fred paid the most. Maggie next,
and Janice the least. (\Ve have just seen that any other assumption leads to a contradiction.) This assumption
does not contradict either of our two facts, since in both cases, the hypothesis is false. Let’s use the letters B, C, G, and H for the statements that the butler, cook, gardner, and handyman are
telling the truth, respectively. We can then write each fact as a. true proposition: B a C; n(C’ /\ G), which
is equivalent to nC V *C (see the discussion of De h'Iorgan’s law in Section 1.2); o(uG /\ nH), which is
equivalent to GV H; and H 7» nC. Suppose that B is true. Then it follows from the ﬁrst of our propositions
that 0 must also be true. This tells us (using the second proposition) that G must be false, whence the third
proposition makes H true. But now the fourth proposition is violated. Therefore we conclude that B cannot
be true. If fact, the argument we have just given also proves that C cannot be true. Therefore we know that
the butler and the cook are lying. This much already makes the first. second, and fourth propositions true,
regardless of the truth of G or H. Thus either the gardner or the handyman could be lying or telling the
truth; all we know [from the third proposition) is that at least one of them is telling the truth. This is often given as an exercise in constraint programming, and it is difﬁcult to solve by hand. The following
table shows a solution consistent with all the clues, with the houses listed from left. to right. Reportedly the solution is unique. NATIONALITY Norwegian Italian Englishman Spaniard Japanese
COLOR Yellow Blue Red White Green
PET Fox Horse Snail Dog Zebra J OB Diplomat Physician Photographer Violinist Painter
DRINK “later Tea Milk Juice Coffee In this solution the Japanese man owns the zebra, and the Norwegian drinks water. The logical reasoning
needed to solve the problem is rather extensive, and the reader is referred to the following website containing
the solution to a similar problem: http://mathforum.org/dr.math/problems/joseph8.5.97.html. ...
View
Full
Document
This note was uploaded on 02/18/2012 for the course MATH 640:244 taught by Professor Ming during the Spring '09 term at Rutgers.
 Spring '09
 Ming

Click to edit the document details