Download Solutions to the Quiz 2 (2016)

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Solutions to the Quiz 2 (2016)
I601 Logic and Discrete Mathematics
A1. Find a counterexample, if possible, to these universally quantified statements,
where the domain for all variables consists of all integers.
a) ∀x∃y(x = 1/y)
b) ∀x∃y(y 2 − x < 100)
c) ∀x∀y(x2 6= y 3 )
S o l u t i o n.
Part (a): This is to compute y = 1/x. Counterexamples are x ∈ {2, 3, 4, . . .} (then y is not
integer) or x = 0 (y cannot be computed at all).
Part (b): Counterexamples are x ∈ {−100, −101, −102, −103, . . .}. y 2 is non-negative, so it
cannot be less than 100 + x for x < −99.
Part (c): Two counterexamples are x = y = 0 and x = y = 1.
B1. Find a counterexample, if possible, to these universally quantified statements,
where the domain for all variables consists of all integers.
a) ∀x∀y(x2 = y 2 → x = y)
b) ∀x∃y(y 2 = x)
c) ∀x∀y(xy > x))
S o l u t i o n.
Part (a): A counterexample is x = 1 and y = −1 or x = −2 and y = 2 etc.
Part (b): Counterexamples are all negative x or x that is equal to a positive integer that is not
perfect square, for example x = −4 or x = 5.
Part (c): This statement is invalid whenever x > 0 and y < 1, or x < 0 and y > 1. Hence, for
instance, x = 17 and y = −1 is a counterexample.
A2. Determine the truth value of each of these statements if the domain of each
variable consists of all real numbers. Provide explanatory comments.
a) ∀x∃y(x2 = y)
b) ∀x∃y(x = y 2 )
c) ∀x(x 6= 0 → ∃y(xy = 1))
d) ∀x∃y(x + y = 1)
e) ∃x∃y(x + 2y = 2 ∧ 2x + 4y = 5)
S o l u t i o n.
a) True. The domain of the quadratic function is all real numbers.
b) False. The square of a number is always non-negative. The equality cannot be valid for x < 0.
c) True. y = 1/x is defined for every x 6= 0.
d) True.y = 1 − x is defined for every real number x.
e) False. The equations are contradicting.
B2. Determine the truth value of each of these statements if the domain of each
variable consists of all real numbers. Provide explanatory comments.
a) ∃x∀y(xy = 0)
b) ∃x∃y(x + y 6= y + x)
c) ∃x∀y(y 6= 0 → xy = 1)
d) ∀x∀y∃z(z = (x + y)/2)
e) ∀x∃y(x + y = 2 ∧ 2x − y = 1)
S o l u t i o n.
a) True. If x = 0, then xy = 0 for every y.
b) False. The commutative law for addition says that changing the order of the operands does
not change the result.
c) False. Whatever x 6= 0 we choose, y has only one value that makes the equality true: y = 1/x.
d) True. z is defined for any x and y.
e) False. The both equations are valid only for the values x = y = 1.
A3. Express the negations of each of the statements in the problem 2 so that all
negation symbols immediately precede predicates.
S o l u t i o n.
a)
¬(∀x∃y(x2 = y)) ≡ ∃x∀y¬(x2 = y) ≡
≡ ∃x∀y(x2 6= y)
b)
¬∀x∃y(x = y 2 ) ≡ ∃x∀y¬(x = y 2 ) ≡
≡ ∃x∀y(x 6= y 2 )
c)
¬∀x(x 6= 0 → ∃y(xy = 1)) ≡ ∃x ¬(x 6= 0 → ∃y(xy = 1)) ≡
≡ ∃x ¬(¬(x 6= 0) ∨ ∃y(xy = 1)) ≡
≡ ∃x ¬(x = 0 ∨ ∃y(xy = 1)) ≡
≡ ∃x(¬(x = 0) ∧ ¬∃y(xy = 1)) ≡
≡ ∃x(x 6= 0 ∧ ∀y ¬(xy = 1)) ≡
≡ ∃x(x 6= 0 ∧ ∀y(xy 6= 1)) ≡
d)
¬∀x∃y(x + y = 1) ≡ ∃x∀y ¬(x + y = 1) ≡
≡ ∃x∀y(x + y 6= 1)
e)
¬ ∃x∃y(x + 2y = 2 ∧ 2x + 4y = 5) ≡ ∀x∀y ¬(x + 2y = 2 ∧ 2x + 4y = 5) ≡
≡ ∀x∀y(¬(x + 2y = 2) ∨ ¬(2x + 4y = 5)) ≡
≡ ∀x∀y((x + 2y 6= 2) ∨ (2x + 4y 6= 5))
B3. Express the negations of each of the statements in the problem 2 so that all
negation symbols immediately precede predicates.
S o l u t i o n.
a)
¬ ∃x∀y(xy = 0) ≡ ∀x∃y ¬(xy = 0) ≡
≡ ∀x∃y(xy 6= 0)
b)
¬ ∃x∃y(x + y 6= y + x) ≡ ∀x∀y ¬(x + y 6= y + x) ≡
≡ ∀x∀y(x + y = y + x)
c)
¬ ∃x∀y(y 6= 0 → xy = 1) ≡ ∀x∃y ¬(y 6= 0 → xy = 1) ≡
≡ ∀x∃y ¬(¬(y 6= 0) ∨ xy = 1) ≡
≡ ∀x∃y(¬¬(y 6= 0) ∧ ¬(xy = 1)) ≡
≡ ∀x∃y(y 6= 0 ∧ xy 6= 1)
d)
¬ ∀x∀y∃z(z = (x + y)/2) ≡ ∃x∃y∀z ¬(z = (x + y)/2) ≡
≡ ∃x∃y∀z(z 6= (x + y)/2)
e)
¬ ∀x∃y(x + y = 2 ∧ 2x − y = 1) ≡ ∃x∀y ¬(x + y = 2 ∧ 2x − y = 1) ≡
≡ ∃x∀y(¬(x + y = 2) ∨ ¬(2x − y = 1)) ≡
≡ ∃x∀y(x + y 6= 2 ∨ 2x − y 6= 1)
Related documents