Docsity

Homework 2 Solutions for Discrete Structures | CS 173, Assignments of Discrete Structures and Graph Theory

Toggle sidebar
bg1
CS173 Discrete Mathematical Structures
Spring 2007
Homework #2 Solution
Due Sun 28/01/07, 8AM.
(50 points)
1) TRANSLATING SENTENCES INTO LOGICAL EXPRESSIONS
Let
I(x) be the statement “
x
has an Internet connection” and
C
(
x
,
y
) be the statement “
x
and
y
have
chatted over the Internet”. The universe of discourse for the variables
x
and
y
is the set of all
students in your class. Use quantifiers to express each of the following statements.
(14 points. 2 points each. H is bonus)
a) No one in the class has chatted with Bob over the Internet.
¬
∃
xC
(
x
,
Bob
) or
∀
x
¬
C
(
x
,
Bob
)
b) Sanjay has chatted over the Internet with everyone in the class except Joseph.
∀
x
[(
x
≠
Joseph
)
→
C
(
Sanjay
,
x
)]
c) Not everyone in your class has an Internet connection.
¬
∀
xI
(
x
) or
∃
x
¬
I
(
x
)
d) There is a student in your class who has chatted with everyone in your class over the Internet.
∃
x
∀
yC
(
x
,
y
)
e) There are two students in your class who have not chatted with each other over the Internet.
∃
x
∃
y
¬
C
(
x
,
y
)
f) Everyone except one student in your class has an Internet connection.
∃
x
(
¬
I
(
x
)
∧
∀
y
[(
y
≠
x
)
→
I
(
y
)])
g) Everyone in your class with an Internet connection has chatted over the Internet with at least
one other student in your class.
∀
x
(
I
(
x
)
→
∃
y
[(
y
≠
x
)
∧
C
(
x
,
y
)])
h) **Someone in your class has an Internet connection but has not chatted with anyone else in
your class.
∃
x
(
I
(
x
)
∧
∀
y
[(
y
≠
x
)
→
¬
C
(
x
,
y
)]) or
∃
x
(
I
(
x
)
∧
∀
y
[
C
(
x
,
y
)
→
(
y
=
x
)])
2)
SYMBOLIC LOGIC
Let
P
(
x
) ,
Q
(
x
) ,
R
(
x
) , and
S
(
x
) be the statements “
x
is a duck”, “
x
is one of my poultry”, “
x
is an
officer”, and “
x
is willing to waltz”, respectively. Express each of the following statements using
quantifiers, logical connectives, and
P
(
x
) ,
Q
(
x
) ,
R
(
x
) , and
S
(
x
) .
(14 points. 2 points each for a, b, c, and d. 6 points for e, approximately 0.5 point for each step in
derivation)
a) No ducks are willing to waltz.
¬
∃
x
(
P
(
x
)
∧
S
(
x
))
⇔
∀
x
(
S
(
x
)
→
¬
P
(
x
))
b) No officers ever decline to waltz.
¬
∃
x
(
R
(
x
)
∧
¬
S
(
x
))
⇔
∀
x
(
R
(
x
)
→
S
(
x
))
c) All my poultry are ducks.
∀
x
(
Q
(
x
)
→
P
(
x
))
d) My poultry are not officers.
∀
x
(
Q
(
x
)
→
¬
R
(
x
))
pf3

Partial preview of the text

Download Homework 2 Solutions for Discrete Structures | CS 173 and more Assignments Discrete Structures and Graph Theory in PDF only on Docsity!

CS173 Discrete Mathematical Structures

Spring 2007

Homework #2 Solution

Due Sun 28/01/07, 8AM.

(50 points)

1) TRANSLATING SENTENCES INTO LOGICAL EXPRESSIONS

Let I(x) be the statement “x has an Internet connection” and C(x, y) be the statement “x and y have chatted over the Internet”. The universe of discourse for the variables x and y is the set of all students in your class. Use quantifiers to express each of the following statements. (14 points. 2 points each. H is bonus) a) No one in the class has chatted with Bob over the Internet. ¬∃xC(x, Bob) or ∀x¬C(x, Bob) b) Sanjay has chatted over the Internet with everyone in the class except Joseph. ∀x[(x ≠ Joseph) → C(Sanjay, x)] c) Not everyone in your class has an Internet connection. ¬∀xI(x) or ∃x¬I(x) d) There is a student in your class who has chatted with everyone in your class over the Internet. ∃x∀yC(x, y) e) There are two students in your class who have not chatted with each other over the Internet. ∃x∃y¬C(x, y) f) Everyone except one student in your class has an Internet connection. ∃x(¬I(x) ∧ ∀y[( y ≠ x) → I( y)]) g) Everyone in your class with an Internet connection has chatted over the Internet with at least one other student in your class. ∀x(I(x) → ∃y[( y ≠ x) ∧ C(x, y)]) h) **Someone in your class has an Internet connection but has not chatted with anyone else in your class. ∃x(I (x) ∧ ∀y[( y ≠ x) → ¬C(x, y)]) or ∃x(I (x) ∧ ∀y[C(x, y) → ( y = x)])

2) SYMBOLIC LOGIC

Let P(x) , Q(x) , R(x) , and S(x) be the statements “x is a duck”, “x is one of my poultry”, “x is an officer”, and “x is willing to waltz”, respectively. Express each of the following statements using quantifiers, logical connectives, and P(x) , Q(x) , R(x) , and S(x). (14 points. 2 points each for a, b, c, and d. 6 points for e, approximately 0.5 point for each step in derivation) a) No ducks are willing to waltz. ¬∃x(P(x) ∧ S(x)) ⇔ ∀x(S(x) → ¬P(x)) b) No officers ever decline to waltz. ¬∃x(R(x) ∧ ¬S(x)) ⇔ ∀x( R(x) → S(x)) c) All my poultry are ducks. ∀x(Q(x) → P(x)) d) My poultry are not officers. ∀x(Q(x) → ¬R(x))

e) Does (d) follow from (a), (b), and (c)? Show your reasoning using rules of inference. Yes. 1 ) ∀x(S(x) → ¬P(x)) Premise (a)

  1. S(c) → ¬P(c) Universal instantiation of (1)
  2. ∀x(R(x) → S(x)) Premise (b)
  3. R(c) → S(c) Universal instantiation of (3)
  4. R(c) → ¬P(c) Hypothetical syllogism of (2) and (4)
  5. P(c) → ¬R(c) Contrapositive of (5)
  6. ∀x(Q(x) → P(x)) Premise (c)
  7. Q(c) → P(c) Universal instantiation of (7)
  8. Q(c) → ¬R(c) Hypothetical syllogism of (8) and (6)
  9. ∀x(Q(x) → ¬R(x)) Universal generalization of (9)

3) MULTIPLE QUANTIFIERS

a) Let Q(x, y) be the statement “x + y = x - y”. If the universe of discourse for both variables is the set of integers, what are the truth values of the following? (5 points) i. ∃yQ(5, y) true ii. ∃xQ(x,4) false iii. ∀x∃yQ(x, y) true iv. ∀y∃xQ(x, y) false v. ∃y∀xQ(x, y) true

b) Determine the truth value of each of the following statements if the universe of discourse of each variable is the set of real numbers. (7 points) i. ∀x∃y(x^2 = y) true ii. ∀y∃x(x^2 = y) false iii. ∃x∀y(xy = 1) false iv. ∀x∃y(xy = 1) false v. ∀x∃y(x + y = 2 ∧ 2 x − y = 1) false vi. ∃x∃y(2x + 3 y = 8 ∧ 3 x − 4 y = 2) true vii. ∀x∀y∃z(z = 1 y + x

) false