6.4 KiB
Page 516
Exercise Set 8.1
- As in Example 8.1.2, the congruence modulo $2$ relation
Eis defined from\mathbb{Z}to\mathbb{Z}as follows: For every ordered pair(m, n) \in \mathbb{Z} \times \mathbb{Z},
m E n \Leftrightarrow m - n \text{ is even}
a. Is 0 E 0? Is 5 E 2? Is (6, 6) \in E? Is (-1, 7) \in E?
b. Prove that for any even integer n, n E 0.
-
Prove that for all integers
mandn,m - nis even if, and only if, bothmandnare even or bothmandnare odd. -
The congruence modulo $3$ relation,
T, is defined from\mathbb{Z}to\mathbb{Z}as follows: For all integersmandn,
m T n \Leftrightarrow 3 | (m - n)
a. Is 10 T 1? Is 1 T 10? Is (2, 2) \in T? Is (8, 1) \in T?
b. List five integers n such that n T 0.
c. List five integers n such that n T 1.
d. List five integers n such that n T 2.
e. Make and prove a conjecture about which integers are related by T to 0,
which integers are related to T to 1, and which integers are related to T
to 2.
- Define a relation
Pon\mathbb{Z}as follows: For every ordered pair(m, n) \in \mathbb{Z} \times \mathbb{Z},
m P n \Leftrightarrow m \text{ and } n \text{ have a common prime factor}
a. Is 15 P 25?
b. Is 22 P 27?
c. Is 0 P 5?
d. Is 8 P 8?
- Let
X = \{a, b, c\}. Recall that\mathscr{P}(X)as follows: For all setsAandBin\mathscr{P}(X),
A \mathbf{J} B \Leftrightarrow A \cap B \neq \emptyset
a. Is \{a\} \mathbf{J} \{c\}?
b. Is \{a, b\} \mathbf{J} \{b, c\}?
c. Is \{a, b} \mathbf{J} \{a, b, c\}?
- Define a relation
Ron\mathbb{Z}as follows: For all integersmandn,
m R n \Leftrightarrow 5 | (m^2 - n^2)
a. Is 1 R (-9)?
b. Is 2 R 13?
c. Is 2 R (-8)?
d. Is (-8) R 2?
- Let
Abe the set of all strings of a's and b's of length4. Define a relationRonAas follows: For everys, t \in A,
s R t \Leftrightarrow s \text{ has the same first two characters as } t
a. Is abaa R abba?
b. Is aabb R bbaa?
c. Is aaaa R aaab?
d. Is baaa R abaa?
- Let
Abe the set of all strings of 0's, 1's, and 2's of length4. Define a relationRonAas follows: For everys, t \in A,
s R t \Leftrightarrow \text{ the same of the characters in } s \text{ equals the sum of the characters in } t
a. Is 0121 R 2200?
b. Is 1011 R 2101?
c. Is 2212 R 2121?
d. Is 1220 R 2111?
- Let
A = \{3, 4, 5\}andB = \{4, 5, 6\}and letRbe the "less than" relation. That is, for every ordered pair(x, y) \in A \times B,
x R y \Leftrightarrow x < y
State explicitly which ordered pairs are in R and R^{-1}.
- Let
A = \{3, 4, 5\}andB = \{4, 5, 6\}and letSbe the "divides" relation. That is, for every ordered pair(x, y) \in A \times B,
x S y \Leftrightarrow x | y
State explicitly which ordered pairs are in S and S^{-1}.
a. Suppose a function F: X \to Y is one-to-one but not onto. Is F^{-1} (the
inverse relation for F) a function? Explain your answer.
b. Suppose a function F: X \to Y is onto but not one-to-one. Is F^{-1} (the
inverse relation for F) a function? Explain your answer.
Draw the directed graphs of the relations defined in 13-18.
-
Define a relation
RonA = \{0, 1, 2, 3\}byR = \{(0, 0), (1, 2), (2, 2)\}. -
Define a relation
SonB = \{a, b, c, d\}byS = \{(a, b), (a, c), (b, c), (d, d)\}. -
Let
A = \{2, 3, 4, 5, 6, 7, 8\}and define a relationRonAas follows: For everyx, y \in A,
x R y \Leftrightarrow x | y
- Let
A = \{5, 6, 7, 8, 9, 10\}and define a relationSonAas follows: For everyx, y \in A,
x S y \Leftrightarrow 2 | (x - y)
- Let
A = \{2, 3, 4, 5, 6, 7, 8\}and define a relationTonAas follows: For everyx, y \in A,
x T y \Leftrightarrow 3 | (x - y)
- Let
A = \{0, 1, 3, 4, 5, 6\}and define a relationVonAas follows: For everyx, y \in A,
x V y \Leftrightarrow 5 | (x^2 - y^2)
Exercises 19-20 refer to unions and intersections of relations. Since relations
are subsets of Cartesian products, their unions and intersections can be
calculated as for any subsets. Given two relations R and S from A to B,
R \cup S = \{(x, y) \in A \times B | (x, y) \in R \text{ or } (x, y) \in S\}
R \cap S = \{(x, y) \in A \times B | (x, y) \in R \text{ and } (x, y) \in S\}
- Let
A = \{2, 4\}andB = \{6, 8, 10\}and define relationsRandSfromAtoBas follows: For every(x, y) \in A \times B,
x R y \Leftrightarrow x | y \text{ and } x S y \Leftrightarrow y - 4 = x
State explicitly which ordered pairs are in A \times B, R, S, R \cup S,
and R \cap S.
- Let
A = \{-1, 1, 2, 4\}andB = \{1, 2\}and define relationsRandSfromAtoBas follows: For every(x, y) \in A \times B,
x R y \Leftrightarrow |x| = |y| \text{ and } x S y \Leftrightarrow x - y \text{ is even}
State explicitly which ordered pairs are in A \times B, R, S, R \cup S,
and R \cap S.
- Define relations
RandSon\mathbb{R}as follows:
R = \{(x, y) \in \mathbb{R} \times \mathbb{R} | x < y\} \text{ and } S = \{(x, y) \in \mathbb{R} \times \mathbb{R} | x = y\}
That is, R is the "less than" relation and S is the "equals" relation on
\mathbb{R}. Graph R, S, R \cup S, and R \cap S in the Cartesian plane.
- Define relations
RandSon\mathbb{R}as follows:
R = \{(x, y) \in \mathbb{R} \times \mathbb{R} | x^2 + y^2 = 4\} \text{ and } S = \{(x, y) \in \mathbb{R} \times \mathbb{R} | x = y\}
Graph R, S, R \cup S, and R \cap S in the Cartesian plane.
- Define relations
RandSon\mathbb{R}as follows:
R = \{(x, y) \in \mathbb{R} \times \mathbb{R} | y = |x|\} \text{ and } S = \{(x, y) \in \mathbb{R} \times \mathbb{R} | y = 1\}
Graph R, S, R \cup S, and R \cap S in the Cartesian plane.
- In Example 8.1.7 consider the query SELECT Patient_ID#, Name FROM S WHERE
Primary_Diagnosis = X. The response query is the projection onto the first
two coordinates of the intersection of the database with the set
A_1 \times A_2 \times A_3 \times \{X\}.
a. Find the result of the query SELECT Patient_ID#, Name FROM S WHERE Primary_Diagnosis = pneumonia.
b. Find the result of the query SELECT Patient_ID#, Name FROM S WHERE Primary_Diagnosis = appendicitis.