Академический Документы
Профессиональный Документы
Культура Документы
6
b) A ∩∅={x | x ∈ A ∧ x ∈ ∅} = {x | x 19.
The number of people visited the buffet is
∈ A ∧ F}={x | F}=∅ 10+10+7 = 27
12.
a) {4,6}
b) {0,1,2,3,4,5,6,7,8,9,10} 20.
c) {4, 5, 6, 8, 10} The number of players who play only
d) {0,2,4, 5,6,7,8,9,10} soccer = 5
13. The number of players who play only
tennis = 6
The number of players who play only
golf = 8
given game = 3
22.
a) {(0, 0),(0, 1),(0, 3),(1, 0),(1, 1),(1, 3),(3,
0),(3, 1), (3, 3)} b) {(1, 1), (1, 2), (1, a), (1,
b), (2, 1), (2, 2), (2, a), (2, b),(a, 1),(a, 2),(a,
a),(a, b),(b, 1),(b, 2),(b, a),(b, b)}
23.
a) {−1, 0, 1}
b) Z− {0, 1}
14.
c) ∅
n(A) = 35, n(B) = 57, n(A ∩ B) = 12
15.
Therefore, Number of people speaking
English only = 57
Lesson 2 Answers
1.
a) p ∧ q b) p ∧ ¬q c) ¬p ∧ ¬q d) p ∨ q e)
p → q f) (p ∨ q) ∧ (p →¬q) g) q ↔ p
2.
a) ¬p b) p ∧ ¬q c) p → q d) ¬p → ¬q e) p
→ q f) q ∧ ¬p g) q → p
3.
a) r ∧¬p b) ¬p∧q ∧r c) r → (q ↔ ¬p) d) ¬
q∧ ¬p ∧ r e) (q →(¬r ∧ ¬p)) ∧ ¬((¬r ∧
¬p) → q) f) (p ∧ r) → ¬q
6.
4. a) Bitwise OR is 111 1111; bitwiseAND is
a) Converse: “I will ski tomorrow only if it 000 0000; bitwiseXORis 111 1111. b)
snows today.” Contrapositive: “If I do not Bitwise OR is 1111 1010; bitwise AND is
ski tomorrow, then it will not have snowed 1010 0000; bitwise XOR is 0101 1010. c)
today.” Inverse: “If it does not snow today, Bitwise OR is 10 0111 1001; bitwise AND
then I will not ski tomorrow.” b) Converse: is 00 0100 0000; bitwise XOR is 10 0011
“If I come to class, then there will be a 1001. d) Bitwise OR is 11 1111 1111;
quiz.” Contrapositive: “If I do not come to bitwise AND is 00 0000 0000; bitwise XOR
class, then there will not be a quiz.” Inverse: is 11 1111 1111.
“If there is not going to be a quiz, then I 7.
don’t come to class.” c) Converse: “A
positive integer is a prime if it has no 8.
divisors other than 1 and itself.”
Contrapositive: “If a positive integer has a
divisor other than 1 and itself, then it is not
prime.” Inverse: “If a positive integer is not
prime, then it has a divisor other than 1 and
itself.” 2
5.
a) T b) T c) F
12.
a) There is a student who spends more than
5 hours every weekday in class. b) Every
student spends more than 5 hours every
weekday in class. c) There is a student who
does not spend more than 5 hours every
weekday in class. d) No student spends more
than 5 hours every weekday in class
9. 13.
a) Every comedian is funny. b) Every person
is a funny comedian. c) There exists a
person such that if she or he is a comedian,
10. then she or he is funny. d) Some comedians
are funny
14.
a) ∃x(P (x) ∧ Q(x)) b) ∃x(P (x) ∧ ¬Q(x))
c) ∀x(P (x)∨Q(x)) d) ∀x¬(P (x) ∨ Q(x))
15. Let P (x) be the statement “x = x2.” If
the domain consists of the integers, what are
these truth values? a) P (0) b) P (1) c) P (2)
d) P (−1) e) ∃xP (x) f ) ∀xP (x)
16.
a) T b) T c) T d) T
17.
a) P (0) ∨ P (1) ∨ P (2) ∨ P (3) ∨ P (4) b)
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))
18.
a) ∃xH (x) and ∃x(C(x) ∧ H (x)), where
H (x) is “x can speak Hindi” b) ∀xF (x) and
∀x(C(x) → F (x)), where F (x) is “x is
friendly” c) ∃x¬B(x) and ∃x(C(x) ∧
¬B(x)), where B(x) is “x was born in
11. California” d) ∃xM(x) and
∃x(C(x)∧M(x)), where M(x) is “x has Thai)). e) If we let H (x) be “x plays
hockey,” then we have ∃x ¬H (x) if the
been in a movie” e) ∀x¬L(x) and ∀x(C(x)
→ ¬L(x)), where L(x) is “x has taken a domain is just your classmates, or ∃x(Y (x)
course in logic programming” ∧ ¬H (x)) if the domain is all people. If we
19.
let P (x, y) mean that person x plays game y,
Let Y (x) be the propositional function that x
is in your school or class, as appropriate. a) then we can rewrite this last one as ∃x(Y
If we let V (x) be “x has lived in Vietnam,” (x) ∧ ¬P (x, hockey))
then we have ∃xV (x) if the domain is just
your schoolmates, or ∃x(Y (x) ∧ V (x)) if
the domain is all people. If we let D(x, y)
mean that person x has lived in country y,
then we can rewrite this last one as ∃x(Y
(x) ∧ D(x, Vietnam)). b) If we let H (x) be
“x can speak Hindi,” then we have ∃x¬H
(x) if the domain is just your schoolmates, or
∃x(Y (x) ∧ ¬H (x)) if the domain is all
people. If we let S(x, y) mean that person x
can speak language y, then we can rewrite
this last one as ∃x(Y (x) ∧ ¬S(x, Hindi)).
c) If we let J (x), P (x), and C(x) be the
propositional functions asserting x’s
knowledge of Java, Prolog, and C++,
respectively, then we have ∃x(J (x) ∧ P (x)
∧ C(x)) if the domain is just your
schoolmates, or ∃x(Y (x) ∧ J (x) ∧ P (x)
∧ C(x)) if the domain is all people. If we let
K(x, y) mean that person x knows
programming language y, then we can
rewrite this last one as ∃x(Y (x) ∧ K(x,
Java) ∧ K(x, Prolog) ∧K(x, C++)). d) If
we let T (x) be “x enjoys Thai food,” then
we have ∀x T (x) if the domain is just your
classmates, or ∀x(Y (x) → T (x)) if the
domain is all people. If we let E(x, y) mean
that person x enjoys food of type y, then we
can rewrite this last one as ∀x(Y (x) → E(x,
c) {(2, 4), (4, 2)} d) {(1, 2), (2, 3), (3, 4)} e)
{(1, 1), (2, 2), (3, 3), (4, 4)} f ) {(1, 3), (1,
4), (2, 3), (2, 4), (3, 1), (3, 4)}
3. Determine whether the relation R on the
set of all Web pages is reflexive, symmetric,
antisymmetric, and/or transitive, where (a,
b) ∈ R if and only if a) everyone who has
visited Web page a has also visited Web
page b. b) there are no common links found
on both Web page a and Web page b. c)
there is at least one common link on Web
page a and Web page b. d) there is a Web
page that includes links to both Web page a
and Web page b.
4. Determine whether the relation R on the
set of all integers is reflexive, symmetric,
antisymmetric, and/or transitive, where (x,
y) ∈ R if and only if a) x = y. b) xy ≥ 1. c) x
= y + 1 or x = y − 1. d) x ≡ y (mod 7). e) x is
a multiple of y. f ) x and y are both negative
or both nonnegative. g) x = y2. h) x ≥ y2.
5. Let R1 and R2 be the “congruent modulo
3” and the “congruent modulo 4” relations,
respectively, on the set of integers. That is,
R1 = {(a, b) | a ≡ b (mod 3)} and R2 = {(a,
b) | a ≡ b (mod 4)}. Find a) R1 ∪ R2. b) R1
∩ R2. c) R1 − R2. d) R2 − R1. e) R1 ⊕ R2.
6. Let R be the relation on the set of people
consisting of pairs (a, b), where a is a parent
of b. Let S be the relation on the set of
people consisting of pairs (a, b), where a and
b are siblings (brothers or sisters). What are
Lesson 3: S ◦ R and R ◦ S?
1. List the ordered pairs in the relation R 7. (Recognize whether several important
from A = {0, 1, 2, 3, 4} to B = {0, 1, 2, 3}, relations are reflexive or not.) Which of the
where (a, b) ∈ R if and only if a) a = b. b) a following statements are True and which are
+ b = 4. c) a>b. d) a | b. e) gcd(a, b) = 1. f ) False? (a) (∀x ∈ R)(x = x).
lcm(a, b) = 2. (b) (∀x ∈ R)(x 6= x).
2. For each of these relations on the set {1,
2, 3, 4}, decide whether it is reflexive, (c) (∀x ∈ R)(x < x).
whether it is symmetric, whether it is (d) (∀x ∈ R)(x ≥ x).
antisymmetric, and whether it is transitive.
a) {(2, 2), (2, 3), (2, 4), (3, 2), (3, 3), (3, 4)} (e) (∀a ∈ N)(a | a).
b) {(1, 1), (1, 2), (2, 1), (2, 2), (3, 3), (4, 4)}
8. (Be able to show a relation is an (1, 2), (1, 3), (2, 1), (2, 3), (3, 1), (3, 2), (4,
equivalence.) On the set of real numbers R = 1), (4, 3)} f) {(1, 2), (2, 1), (2, 2)}
{x : −∞ < x < ∞} define the relation S = {(x, 2.
y) : x, y ∈ R, and x − y is an integer} a) Transitive b) Reflexive, symmetric,
transitive c) Symmetric d) Antisymmetric e)
Reflexive, symmetric, antisymmetric,
transitive f) None of these properties
3.
a) Reflexive, transitive b) Symmetric c)
Symmetric d) Symmetric
4.
a) Symmetric b) Symmetric, transitive c)
Symmetric d) Reflexive, symmetric,
transitive e) Reflexive, transitive f)
Reflexive, symmetric, transitive g)
Antisymmetric h) Antisymmetric, transitive
5.
a) {(a, b) | a − b ≡ 0, 3, 4, 6, , 8, or 9 (mod
12)} b) {(a, b) | a ≡ b (mod 12)} c) {(a, b) | a
− b ≡ 3, 6, or 9 (mod 12)} d) {(a, b) | a − b ≡
4 or 8 (mod 12)} e) {(a, b) | a − b ≡ 3, 4, 6,
8, or 9 (mod 12)}
6.
◦R = {(a, b) | a is a parent of b and b has a
sibling}, R ◦ S = {(a, b) | a is an aunt or
uncle of b}
7.
a) Answer: This is True. Equality is a
reflexive relation.
b) Answer: This is False. Not equal is not a
reflexive relation.
c) Answer: This is False. Less than is not a
reflexive relation.
d) Answer: This is True. Greater than or
equal is a reflexive relation.
e) Answer: This is True. Divides is a
reflexive relation. (f) (∀X ∈ 2 U)(X ⊆ X).
8.
Lesson 3 Answers: (a) The relation is reflexive: For every real
1. number x, x − x is the integer 0. (b) The
a) {(0, 0), (1, 1), (2, 2), (3, 3)} b) {(1, 3), (2, relation is symmetric: For all real numbers x
2), (3, 1), (4, 0)} c) {(1, 0), (2, 0), (2, 1), (3, and y, if x − y is an integer, then y − x is an
0), (3, 1), (3, 2), (4, 0), (4, 1), (4, 2), (4, 3)} integer. (c) The relation is transitive: For all
d) {(1, 0), (1, 1), (1, 2), (1, 3), (2, 0), (2, 2), real numbers x, y, and z, if x − y is an
(3, 0), (3, 3), (4, 0)} e) {(0, 1), (1, 0), (1, 1), integer and y − z is an integer, then (x − y) +
(y − z) = x − z is an integer. This
equivalence has infinitely many equivalence
classes. For each x ∈ R, the equivalence
class for x is [x] = {x + k : k ∈ Z}
2. Type of Graph:
3. Type of Graph:
a) 2.
b) 3.
c) 4.
d) 5.
e) 6.
f) 7.
23. determine whether the given graph has 27.
an Euler circuit. Construct such a circuit
when one exists. If no Euler circuit exists,
determine whether the graph has an Euler
path and construct such a path if one exists.
5.
v = 6; e = 6; deg(a) = 2, deg(b) = 4, deg(c) =
1, deg(d) = 0, deg(e) = 2, deg(f ) = 3; c is
pendant; d is isolated.
6.
v = 9; e = 12; deg(a) = 3, deg(b) = 2, deg(c)
= 4, deg(d) = 0, deg(e) = 6, deg(f ) = 0;
deg(g) = 4; deg(h) = 2; deg(i) = 3; d and f
are isolated.
7.
v = 4; e = 7; deg−(a) = 3, deg−(b) = 1,
deg−(c) = 2, deg−(d) = 1, deg+(a) = 1,
deg+(b) = 2, deg+(c) = 1, deg+(d) = 3
8.
5 vertices, 13 edges; deg−(a) = 6, deg+(a) =
1, deg−(b) = 1, deg+(b) = 5, deg−(c) = 2,
deg+(c) = 5, deg−(d) = 4, deg+(d) = 2,
deg−(e) = 0, deg+(e) = 0
9. 19.
Bipartite Isomorphic
10. 20.
Not bipartite a) Yes b) No c) No
11. 21.
a) Path of length 4; not a circuit; not simple
b) Not a path c) Not a path d) Simple circuit
of length 5 3
22.
a) 1 b) 0 c) 2 d) 1 e) 5 f) 3
23.
Neither
24.
12. No Euler circuit; a, e, c, e, b, e, d, b, a, c, d
25.
a, b, c, d, c, e, d, b, e, a, e, a
26.
. Neither
27.
No Euler circuit; a, d, e, d, b, a, e, c, e, b, c,
b, e
28.
13. a, b, c, d, e, a is a Hamilton circuit.
29.
f, e, d, a, b, c is a Hamilton path.
30
16
14.
15.
16.
Isomorphic
17.
Isomorphic
18.
Not Isomorphic