DM Assignment 1 Questions
DM Assignment 1 Questions
address youin the ways described. If you cannot determine 63. A detective ha
what these two people are, can you draw any conclusions? From the stori
Asays Atleast one of us is a knave and B says nothing. cluded that if
cook;the cook
56. 14 says "The two of us are both knights" and B says "A
is a knave." truth; the gard
and if the har
57, A says "I am a knave or B is a knight" and B says nothing.
lying. For eac
58 Both A and B say I amn a knight." termine whet
59. Asays "We are both knaves" and B says nothing. Explain your
Exercises 60-65 are puzzles that can be solved by translat 644 Fourfriends
ing statements into logical exxpressions and reasoning fromn thorized acce
these expressions using truth tables. statements tu
60.)The police have three suspects for the murder of Mr. "Carlos did i
Cooper: Mr. Smith, Mr. Jones, and Mr. Williams. Smith, "Diana did it
Jones, and Williams each declare that they did not kill Idid it."
Cooper. Smith also states that Cooper was a friend a) If the auth
of Jones and that Williams disliked him. Jones also states
suspects
reasoning
that he did not knowCooper and that he was outof town b) If the aut
saw
the dayCooper was killed, Williams also states that he
of the killing
who did
both
and B says A Unen sO 1s the
cook; the cook and thegardener cannot
truth; thc gardener and the handyman both be telling the
says nothing. and if the handyman is telling the truthare not both lying:
lying. For each of the four witnesses, can the then the cook is
termine whether that person is telling the truth detective de
bthing. or lying?
dby translat Explain your reasoning.
644 Four friends have been identified as
asoning from suspects for an unau
thorized access into acomputer system. They have
statements to
made
arder of Mr. the investigating authorities. Alice
"Carlos did it." John said I did not do it." Carlos said said
ams. Smith,
did not kill Diana did it." Diana said "Carlos lied when he said that
I did it."
as a friend
a) If the authorities also know that exactly one of the four
es also statesiiFAE suspects is telling the truth, who did it? Explain your
out of town
sthat he saw reasoning.irist drt sia obizrcob
b) If the authorities also know that exactly one is lying,
fthe killing who did it? Explain your reasoning.
ed him. Can 65. Solve this famous logic puzzle, attributed to
Albert
Einstein, and known as the zebra puzzle.Five men wvith
n0cent men
different nationalities and with different jobs ive in con
f the guilty secutive houses on a street. These houses are painted
different colors. The men have different pets and have dif
1-28
les is a tautology, IWe will study
Igornithms. questions Such as this in
1
conditional
n d e r s t a n d
computer s
are called the an cquivalent, negations but not
nd S. disjunctions and predicate 1
ter H. M.Shefier and C. volves
qVr, notion of q
pVg, "p Vq, true
statements.
disjurctions
logical oneratar NAND.
58/ Howmany of the can be made
simultaneously
objects of :
quivalent to pAq). q v , and g V g, and r?
of truth values to p,
logical operator NOR. by an assignment
p V gVs, p V rVs,
Predica
quivalent to Vc). of the disjunctions
59. How many qVr V S,q V r V S ,
that (!) is a functionally V ¬s, pVqV S,
-pV
VrVs, and p vr V¬s can be made Statement
operators. -pVq V ¬s, p
simultaneously true by an assignment of
truth values to "x >
ycquivalcnt to-p.
-) is logically cquivaient to P, 9, r, and s? "com
(b). and Exercise 49. that Acompound proposition is satisfiable if there is an assign and
tof truth values to the variables in the compound propo "com
lete collection of iogical
Sition that makes the compound proposition true.o are often
K0. Which of these compound propositions are satisfiable?
gically equivalent 1o p ’ statement
. (pvqv-r)a(pV~qV¬s) A(p Vr V ¬s) ^ will discL
mplete coliection of iog (-pv-gV ¬s) ^(p Vqv¬s)
b) (-pv~qvr)a-pvqvs) A(pv The
ivalent. (-pvorV ¬s) A
(p VqVr) A(p
qv¬s)A statemen
c) (pv4 Vr)a(pv
¬qVs) VVs) the stater
rare not equivalent, so A(g v r Vs) ^
ssociative. ("pvrv s) A(-pv qv¬s) A(pV -g the predi
(-py
of compound proposi- 61. Explain ~4V s) ^(-p V¬r V¬s)
V )A
how an the prop
ppositional variables p algorithm for becomes
thet
statements
animals as a pet.
x = x'" If the domain Con- ncgations,
11. Pr) be the statement
Let the truth values? a) BxP(x
sists of the integers, what are c) Yx((x
hours b) P(1) c) P(2)
a) P(0) e) Bx(
nsists e) Bx P(«) f) YxP(x)
d) P(-1) 21. For each
ns in
the statement "x +1> 2x." If the domain
12) Let Q«) be values? statemen
consists of all integers,
what are these truth false.
b) Q(-1) c) Q1)
a) Q(0) a) Ever
e) V r 0 ( r ) )B-0)
d) Bx Qr) b) Eve
ota," g) VxnQr) c) Eve
statements if
hool. value of each of these
13. Determine the
truth d) No
of all integers.
the domain consists
n) b) Bn(2n = 3n) 22. For ea
a) Vn(n +1>
iou d) Vn(n'> n)statements if
statem
c) Bn(n=-n) false.
Determine the truth value
of each of these
is 2 6 a) E
domain consists of all real numbers.lo
main he ab) x(r < ) o b) T
a) Bx(x=-1) ) o c) E
) Yx((-) =) d) Vx(2x> d) S
students at your school. P ) consists of the integers 3, and 4.
school who can speak Rus cach of these propositions using disjunctions, conjunc
+. tions, and negations.
schoolwho can speak Rus a) BrP() b) Vx P«) c) x-Px)
w C++. d) P(r) e) rP(*) f) - P ( )
oleither can speak Russian 18.Suppose that the domain of the propositional function
P(r)consists of the integers -2, -1, 0, 1, and 2. Write
can speak Russian or knows out each of these propositions using disjunctions, con
junctions, and negations.
has a cat." let D(a) be the c) JxP(x)
a) rP(«) b) VxP(x)
et F()be the statement "x e) -xP(x) f) ¬xP(x)
f these statements in terms d) Vr¬P(x)
ers, and logical connectives. 19. Suppose that the domain of the propositional function
students in your class. P(«) consists of the integers 1, 2, 3, 4, and 5. Express
these statements without using quantifiers, instead using
acat, a dog. and a ferret.
ave a cat, a dog.or a ferret. only negations, disjunctions, and conjunctions.
s has a cat and a ferret, but a) rP(*) b) YxP)
c) - rP(r) d) -x P(x)
2s a cat, a dog, and a ferret. e) x((x #3) -’ P(r)) VJx¬P(r)
nals, cats, dogs, and ferrets, 20.) Suppose that the domain of the propositional function
class who has one of these Pr) consists of -5, -3, -1, 1, 3, and 5. Express these
statements without using quantifiers, instead using only
="If the domain con ncgations, disjunctions, and conjunctions.
the truth values? a) Bx P(x) b) VxPx)
c) P2) c) Vx(x#1)’ P(x) d) Br((r >0) AP)
x) f) xPK) e) Bx(-P(x)) AV(x < 0) -’ P())
the which the
consistofalpeoj
ain c) Everythill
correct
place 35. Find a c
condition,
place,
in
Nothing
correct consists
riendly. hom d) the
was not
is not in
c o n d i t i o n .
who
Class
vour tools a) x(
of
c) One
operators,.
becen in a
movic.
iogc
inexcellent condition.
using
logical c) Yx
coursc in statements
taken a
s
Express cach ofthese 36. Find a
into iog
29. predicates, and quantifiers.
quanti
statements tautologies.
hesc
and iogica
are tautology. consis
contradiction isa
propositions
quantitiens,
a) Some
S,
nconsiSt o
the
students
The negation of a can be a a)
b) contingencies
of two
consist of all peopic.
c) The
disjunction c) Y.
ecelular phonc. tautology. tautology. 37. Expr
sOCT aforeign
moVIC.
of twotautologies is a
The conjunction quan
ess wto cannot SWIm
domain of thepropositional function P(*, y)
Juppose the
ss cat solve quadratic 30. consists of pairs x and y, where x is 1, 2,
or 3 and yis a)
ics not ant to t ICh. 1,2, or 3.Write out these propositions using disjunctions
sinto iogical expressios and conjunctions.
b)
I iogical conectives. a) Bx P, 3) b) VyP(1, y)
c) By-P(2, y) d) Vx¬P(*, 2)
31. Suppose that the domain of Q,y, z) consists of triples
perfect.
A, y, z, where x= 0, 1, or 2, y=0or 1, and z =0or l. c)
perfect. Write out these propositions using disjunctions and
nd or soneone is ot junctions. con
a) VyQ0, y, 0)
nts C) 37 b) rQ(N, 1, 1)
1-49
40. Express
34. Express the negation of these propositions using quanti- cates, qu
iers, and then express the negation in English. a) Whe
a) Some drivers do not obey the speed limit. disk
b) AllSwedish movies are serious. b) No
c) No one can keep a secret. no
wo positive integers is positive. 23 Determine the truth value of each of these statements
two negative integers is not neces if the domain of each variable consists of all real
numbers.
eof the sum of two integers does not a) Vxy(r?= y) b) xy(x = y)
he absolute values of these integers. c) Bxy(xy = 0) d) Bxy(x + y y + x)
ntifiers, logical connectives, and e) Vx(x #0’y(xy = 1))
rs to express the statement that f) Bxy(y #0’ xy = 1)
is the sum of the squares of four g) Vxy(x +y= 1)
h) Jxy(x + 2y = 2^ 2x + 4y = 5)
iers, logical connectives, and math i) Vxly(r +y =2A 2x - y = 1)
xpress the statement that there is a ) Vxydz(z = (x + y)/2)
not the sum of three squares. 29. Suppose the domain of the propositional function P(*, y)
e mathematical statements using consists of pairs x and y, where x is 1, 2, or 3 and y is
logical connectives, and mathe 1, 2, or 3. Write out these propositions using disjunctions
and conjunctions.
a) VryP(*, y) b) xy P(x, y)
negative real numbers is positive. c) BxyPx,y) d) yx P(x,v)
real number and itself is zero.
number has exactly two square 30. Rewrite each of these statements so that negations ap
ear only within predicates (that is, so that no negation
nber does not have a square root is outside a quantifier or an expression involving logical
connectives).
nested quantifications into an En a) -yx P(x, y) b) ¬ryP(x. y)
oresses a mathematical fact, The c) -3y(Qy) AV¬R(a, y))
asists of all real numbers. d) ¬y(axR(x, y)v VrSu, y))
e) dy(x3zT(x, y,z) v arVzU(r, y, ))
31. Expressthe negations of each of these statements so that
ifiers, and in English. nathernatics. b)
Every student in this class likes seen a Yxy(P
a) class who has never
Thereis a student in this
same nc
b)
computer. every Astatement i
There is a student in this class who has takcn
e)
mathematics course offered at
this school. if it is of the f
class who hasbeen in at least
d) There is astudent in this
one room of every building on campuS.
universally where each
39. Find a counterexample, if possible, to these variables
quantified statements, where the domain for all quantifier or
consists of all integers. is a predica
a) Vrvy(x? = y2 ’x= y) ary(Pa.
b) Vy(y² ) c) Vxy(xy x) Bx P(x)v
40, Find a counterexample, if possible, to these universally occur first).
quantified statements, where the domain for all variables Every s
consists of all integers. predicates, T
a) Vxdy(x= 1/y) b) Yxly(y² -x<100) tifiers is equ
c) VrVyr' y') Exercise 51
41. Use quantifiers to express the associative law for multi- *50. Put these
plication of real numbers. logical ec
Table 2 in
|-62
1-6
distributive laws of multi-
quantifiers to express
the
omain for 42. Use numbers.
addition for real
plication over
logical connectives to express the
43. Use quantifiers and polynomial of
ers. Then polynomial (that is,
gation is fact that every linear where the coefficient
degree 1) with real coefficients and
gation in
one real root.
"It is not of xis nonzero, has exactly
express the fact
44)Use quantifiers and logical connectives to coefficients
lars play that a quadratic polynomial with real number
has at most two real roots.
atted with 45. Determine the truth value of the statement xy(Iy = 1)
if the domain for the variables consists of
xactly two a) the nonzero real numbers.
b) the nonzero integers.
this book.
e in every
the positive real numbers.
46, Betermine the truth value of the statement ry(r<y)
if the domain for the variables consists of
iers. Then
egation is a) the positive real numbers.
egation in b) the integers.
"It is not c) thenonzero real numbers.
47. Show that the two statements
-ry P(x, v) and
actly two VayPa, y), where both quantifiers over the first
variable in P(a, y) have the same domain,
rkdexcept quantifiers over the second variable in Pr, v)and both
have the
same domnain, are logically equivalent.
"Tofu is healthy
not
t Youdo not cattofu."Cheeseburgers are
healthy to cat."
I am not 15. F
dreaming orhallucinating."
am either
,» IfIam hallucinating, Isee elephants run
dreaming." a
Ose
Yx(¬0x) VS«), Vx(R(*) ’¬S(), and r-P)
are true, then Bx-R(«) is true. mat)
30. Use resolution to show the hypotheses "Allen is a bad boy veri
real
or Hillary is a good girl" and "Allen is a good boy or David ence
is happy" imply the conclusion d girl or und
of two odd integers
18, Prove that if nis an integer and 3n
mof two even inte +2 is even, then n is
evenusing
a) a proof by contraposition.
ris an even numlr b) aproof by contradiction.
19. Prove the proposition P(0), where P(n) is
ative, of an even "Ifn is a positive integer grcater than 1,the proposition
then n'>n."
ct prof. What kind of proof did you usc?
n integers, where20.rove the proposition P(1), where P(n) is the proposi
Cven. What kind tion "If nis a positive integer, then n > n"What kind of
proof did you use?
Nuct of two odd 21. Let P(n) be the proposition "If a and
b are positive real
numbers, then (a + by > a" + b" Prove that P(1) is
id integer is the true. What kind of proof did you use?
22. Showthat if you pick three socks from a
ing just blue socks and black socks, you mustdrawer contain
nn+2 is not a
pair of blue socks or a pair of black socks. get either a
at the sum of an 23. Show that at least 10 of any 64
days chosen must fall on
is irational. the same day of the week.
tof two rational 24. Show that at least 3 of any 25 days chosen must fall in
same month of the year. the
irational num 25. Usea proof by contradiction to show that there is no ratio
nal number r for which r+rt1=0.
that r =
[Hint: Assume
aonzero rational a/b is a root, wherea and b are integers and a/b
onal. is in lowest terms. Obtain an equation involving
rational. by multiplying by b'. Then look at whether a integers
cach odd or even.] and b are
1/x is rational.
at if x+ y >2, Prove that if n is a positive integer, then n is
only if 7n +4 is even. even if and
: lory> 1. 27. Prove that if nis apositive
is even, then m integer, then n is odd if and
only if 5n +6 is odd.
28.)Prove that m²=n'if and only if m
odd, thenn is 29. Prove or disprove that if =n or m=-n.
mn = 1, then either m= ml and n are integers such that
and n -1. and n =l, or else m = 1
30. Show that these
aand b are real three statements are cquivalent, where
numbers: (i) a is less than b,
(i) the
86 1/The Foundations: Logic and Proofs
average of aandb is greater than a, and (üi) the average 36. Show th
of aandb is less than b. to be eq
31. Showthat these statements about the integer x are equiv
lent: (i) 3x + 2 is even, (ii) x +5 is odd, (iii) x* is even. 37. Show t
32. Showthat these statements about the real number x are shown
cquivalent: () x is rational, (ii) x/2 is rational, and (ii) statem
3x - 1isrational. Ps ’
33. Show that these statements about the real number x are 38. Finda
equivalent: (i) x is irational, (ii) 3x + 2is irrational, (iii) intege
x/2 is irrational. intege
39, Prove
34. Is this reasoning for finding the solutions of the equation
/2x2-1=xcorrect? (1) V2r? -l=xis given; (2) is grea
What
2x2-1= , obtained by squaring both sides of (1);(3)
40. UseE
x?-l=0, obtained by subtracting x² from both sides
of (2); (4)(x- 1)(x + 1) =0, obtained by factoring the gers a
ational, (iii) integer
integers. can
numbers aj, az,....a
39, Provethat at least one of the real up
he equation than or cqual to the average of these numbers
is greater stat
s given: (2) use?
What kind of proof did you to
es of (1); (3) Exercise 39 to show that if the first 10 positive inte. in
m both sides 40. Use any order, there exist
around a circle, in
Tactoring the gers are placed locations around the circle
in consecutive
1, which fol three integers E
than or equal to 17.
=0. that have a sum greater four statements are
is an integer, these
of Va+3= 41. Prove that if n odd, (iiü) 3n + 1 is
wen: (2)x+ equivalent: (i) n is even, (ii) n + l is
oth sides of odd, (iv) 3n is even. are
these four statements about the integer n
btractingx+ (42: Prove that even, (iii) n' is odd.
equivalent: (i) n² is odd, (i)1-n is
-1)(x 6),
side of 3); (iv) n²+ lis even.
(4) because
d Strategy