0% found this document useful (0 votes)
8 views70 pages

Relation Discrete Math 17

The document contains exercises and answers related to discrete mathematics, specifically focusing on relations and partial orders. It includes ordered pairs for various relations between sets, properties of relations (reflexive, symmetric, antisymmetric, transitive), and examples involving real numbers and web pages. Each section provides detailed analysis and conclusions regarding the characteristics of the specified relations.

Uploaded by

dollkhann0011
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views70 pages

Relation Discrete Math 17

The document contains exercises and answers related to discrete mathematics, specifically focusing on relations and partial orders. It includes ordered pairs for various relations between sets, properties of relations (reflexive, symmetric, antisymmetric, transitive), and examples involving real numbers and web pages. Each section provides detailed analysis and conclusions regarding the characteristics of the specified relations.

Uploaded by

dollkhann0011
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 70

DISCRETE MATH

RELATION AND PARTIAL ORDER


EXERCISE

QUESTION:

b) ∈ R if and only if
List the ordered pairs in the relation R from A = {0, 1, 2, 3, 4} to B = {0, 1, 2, 3}, where (a,

a) a = b. b) a + b = 4.

c) a > b. d) a | b.

e) gcd(a, b) = 1 . f ) lcm(a, b) = 2.

ANSWER:

Here are the ordered pairs for each relation:

a) a = b:

R = {(0, 0), (1, 1), (2, 2), (3, 3)}

b) a + b = 4:

R = {(0, 4) - Not possible since 4 ∉ B, (1, 3), (2, 2), (3, 1), (4, 0) - Not possible since 4 ∉ B}

Corrected R = {(1, 3), (2, 2), (3, 1)}

c) a > b:

R = {(1, 0), (2, 0), (2, 1), (3, 0), (3, 1), (3, 2), (4, 0), (4, 1), (4, 2), (4, 3)}

d) a | b (a divides b):

R = {(0, 0), (1, 1), (1, 2), (1, 3), (2, 2), (2, 0), (3, 3), (3, 0)}

e) gcd(a, b) = 1 (greatest common divisor is 1):

R = {(0, 1), (0, 2), (0, 3), (1, 0), (1, 2), (1, 3), (2, 1), (2, 3), (3, 1), (3, 2), (3, 4) - Not possible since 4 ∉ B,
(4, 1), (4, 3)}

Corrected R = {(0, 1), (0, 2), (0, 3), (1, 0), (1, 2), (1, 3), (2, 1), (2, 3), (3, 1), (3, 2), (4, 1), (4, 3)

f) lcm(a, b) = 2 (least common multiple is 2):

R = {(1, 2), (2, 1), (2, 2)}

Note that for (b), (e), and (f), I've removed pairs with 4 since 4 ∉ B.

QUESTION:

a) List all the ordered pairs in the relation R = {(a, b) | a divides b} on the set {1, 2, 3, 4, 5,
6}.

b) Display this relation in tabular form.

ANSWER:

Here are the solutions:

a) Ordered Pairs:

R = {(1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6),

(2, 2), (2, 4), (2, 6),

(3, 3), (3, 6),

(4, 4),

(5, 5),

(6, 6)}

b) Tabular Form:

| |1|2|3|4|5|6|

|---|---|---|---|---|---|---|

|1|×|×|×|×|×|×|

|2| |×| |×| |×|


|3| | |×| | |×|

|4| | | |×| | |

|5| | | | |×| |

|6| | | | | |×|

In the table:

× indicates (a, b) ∈ R

(blank space) indicates (a, b) ∉ R

QESTION:

For each of these relations on the set {1, 2, 3, 4}, decide whether it is reflexive, whether it is
symmetric, whether it is antisymmetric, and whether it is transitive.

a) {(2, 2), (2, 3), (2, 4), (3, 2), (3, 3), (3, 4)}

b) {(1, 1), (1, 2), (2, 1), (2, 2), (3, 3), (4, 4)}

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)}

ANSWER:

Here are the results:

a) {(2, 2), (2, 3), (2, 4), (3, 2), (3, 3), (3, 4)}

- Reflexive: No (1 and 4 are not related to themselves)

- Symmetric: Yes (for every (a, b), (b, a) is also present)

- Antisymmetric: No (e.g., (2, 3) and (3, 2) but 2 ≠ 3)

- Transitive: No (e.g., (2, 3) and (3, 4) but (2, 4) is not guaranteed because of symmetry)
b) {(1, 1), (1, 2), (2, 1), (2, 2), (3, 3), (4, 4)}

- Reflexive: Yes (every element is related to itself)

- Symmetric: Yes (for every (a, b), (b, a) is also present)

- Antisymmetric: No (e.g., (1, 2) and (2, 1) but 1 ≠ 2)

- Transitive: No (e.g., (1, 2) and (2, 1) but (1, 1) is already guaranteed by reflexivity)

c) {(2, 4), (4, 2)}

- Reflexive: No (1, 2, 3 are not related to themselves)

- Symmetric: Yes (for every (a, b), (b, a) is also present)

- Antisymmetric: No (e.g., (2, 4) and (4, 2) but 2 ≠ 4)

- Transitive: No ((2, 4) and (4, 2) but (2, 2) is not present)

d) {(1, 2), (2, 3), (3, 4)}

- Reflexive: No (no element is related to itself)

- Symmetric: No (e.g., (1, 2) but not (2, 1))

- Antisymmetric: Yes (no pair (a, b) and (b, a) with a ≠ b)

- Transitive: Yes (e.g., (1, 2) and (2, 3) implies (1, 3), although (1, 3) is not present, there's no
counterexample)

e) {(1, 1), (2, 2), (3, 3), (4, 4)}

- Reflexive: Yes (every element is related to itself)

- Symmetric: Yes (for every (a, b), (b, a) is also present, trivially)

- Antisymmetric: Yes (no pair (a, b) and (b, a) with a ≠ b)

- Transitive: Yes (trivially, as only reflexive pairs exist)

f) {(1, 3), (1, 4), (2, 3), (2, 4), (3, 1), (3, 4)}

- Reflexive: No (2 and 4 are not related to themselves)


- Symmetric: No (e.g., (1, 3) and (3, 1) but (1, 4) and not (4, 1))

- Antisymmetric: No (e.g., (1, 3) and (3, 1) but 1 ≠ 3)

- Transitive: No (e.g., (1, 3) and (3, 1) implies (1, 1) which is not present)

QUESTION:

antisymmetric, and/or transitive, where (a, b) ∈ R if and only if


Determine whether the relation R on the set of all people is reflexive, symmetric,

a) a is taller than b.

b) a and b were born on the same day.

c) a has the same first name as b.

d) a and b have a common grandparent.

ANSWER:

Here are the determinations:

a) a is taller than b:

- Reflexive: No (a cannot be taller than themselves)

- Symmetric: No (if a is taller than b, b cannot be taller than a)

- Antisymmetric: Yes (if a is taller than b, b cannot be taller than a)

- Transitive: Yes (if a is taller than b, and b is taller than c, then a is taller than c)

b) a and b were born on the same day:

- Reflexive: Yes (a was born on the same day as themselves)

- Symmetric: Yes (if a and b share a birthday, b and a share a birthday)

- Antisymmetric: No (if a and b share a birthday, it doesn't imply a ≠ b)

- Transitive: Yes (if a and b share a birthday, and b and c share a birthday, then a and c share a birthday)
c) a has the same first name as b:

- Reflexive: Yes (a has the same first name as themselves)

- Symmetric: Yes (if a and b share a first name, b and a share a first name)

- Antisymmetric: No (if a and b share a first name, it doesn't imply a ≠ b)

- Transitive: Yes (if a and b share a first name, and b and c share a first name, then a and c share a first
name)

d) a and b have a common grandparent:

- Reflexive: Yes (a has a common grandparent with themselves)

- Symmetric: Yes (if a and b share a grandparent, b and a share a grandparent)

- Antisymmetric: No (if a and b share a grandparent, it doesn't imply a ≠ b)

- Transitive: No (if a and b share a grandparent, and b and c share a grandparent, it doesn't necessarily
imply a and c share a grandparent)

QUESTION:

antisymmetric, and/or transitive, where (a, b) ∈ R if and only if


Determine whether the relation R on the set of all Web pages is reflexive, symmetric,

a) everyone who has visitedWeb page a has also visited Web page b.

b) there are no common links found on both Web page a andWeb page b.

c) there is at least one common link onWeb page a and Web page b.

d) there is a Web page that includes links to both Web page a andWeb page b.

ANSWER:

Here are the determinations:

a) everyone who has visited Web page a has also visited Web page b:

- Reflexive: Yes (all visitors of a also visited a)

- Symmetric: No (if all visitors of a visited b, it doesn't imply all visitors of b visited a)
- Antisymmetric: Yes (if all visitors of a visited b, and all visitors of b visited a, then a and b have the
same visitors)

- Transitive: Yes (if all visitors of a visited b, and all visitors of b visited c, then all visitors of a visited c)

b) there are no common links found on both Web page a and Web page b:

- Reflexive: No (a may have links in common with itself)

- Symmetric: Yes (if a has no links in common with b, b has no links in common with a)

- Antisymmetric: No (having no common links doesn't imply a ≠ b)

- Transitive: No (a has no links in common with b, b has no links in common with c, doesn't imply a has
no links in common with c)

c) there is at least one common link on Web page a and Web page b:

- Reflexive: Yes (a has links in common with itself)

- Symmetric: Yes (if a has links in common with b, b has links in common with a)

- Antisymmetric: No (having common links doesn't imply a ≠ b)

- Transitive: No (a has links in common with b, b has links in common with c, doesn't imply a has links in
common with c)

d) there is a Web page that includes links to both Web page a and Web page b:

- Reflexive: Yes (a can be linked from itself or another page)

- Symmetric: Yes (if a is linked with b, b is linked with a)

- Antisymmetric: No (being linked together doesn't imply a ≠ b)

- Transitive: Yes (if a is linked with b, b is linked with c, then a is linked with c through the intermediate
page)

QUESTION:

antisymmetric, and/or transitive, where (x, y) ∈ R if and only if


Determine whether the relation R on the set of all real numbers is reflexive, symmetric,
a) x + y = 0. b) x = ±y.

c) x − y is a rational number.

d) x = 2y. e) xy ≥ 0.

f ) xy = 0. g) x = 1.

h) x = 1 or y = 1.

ANSWER:

Here are the determinations:

a) x + y = 0:

- Reflexive: No (x + x ≠ 0 unless x = 0)

- Symmetric: Yes (x + y = 0 implies y + x = 0)

- Antisymmetric: No (x + y = 0 and y + x = 0 don't imply x = y)

- Transitive: No (x + y = 0 and y + z = 0 don't imply x + z = 0)

b) x = ±y:

- Reflexive: Yes (x = ±x)

- Symmetric: Yes (x = ±y implies y = ±x)

- Antisymmetric: No (x = ±y doesn't imply x = y)

- Transitive: Yes (x = ±y and y = ±z imply x = ±z)

c) x − y is a rational number:

- Reflexive: Yes (x - x = 0, a rational number)

- Symmetric: Yes (x - y rational implies y - x rational)

- Antisymmetric: No (x - y rational doesn't imply x = y)

- Transitive: Yes (x - y rational and y - z rational imply x - z rational)


d) x = 2y:

- Reflexive: No (x ≠ 2x unless x = 0)

- Symmetric: No (x = 2y doesn't imply y = 2x)

- Antisymmetric: Yes (x = 2y and y = 2x imply x = y)

- Transitive: Yes (x = 2y and y = 2z imply x = 4z)

e) xy ≥ 0:

- Reflexive: Yes (x^2 ≥ 0)

- Symmetric: Yes (xy ≥ 0 implies yx ≥ 0)

- Antisymmetric: No (xy ≥ 0 doesn't imply x = y)

- Transitive: Yes (xy ≥ 0 and yz ≥ 0 imply xz ≥ 0 if y ≠ 0)

f) xy = 0:

- Reflexive: Yes (x^2 = 0 if x = 0)

- Symmetric: Yes (xy = 0 implies yx = 0)

- Antisymmetric: No (xy = 0 doesn't imply x = y)

- Transitive: No (xy = 0 and yz = 0 don't imply xz = 0)

g) x = 1:

- Reflexive: No (x ≠ 1 for x ≠ 1)

- Symmetric: No (x = 1 doesn't imply y = 1)

- Antisymmetric: Yes (x = 1 and y = 1 imply x = y)

- Transitive: No (x = 1 and y = 1 don't imply z = 1)

h) x = 1 or y = 1:

- Reflexive: No (x ≠ 1 or x ≠ 1 for x ≠ 1)
- Symmetric: Yes (x = 1 or y = 1 implies y = 1 or x = 1)

- Antisymmetric: No (x = 1 or y = 1 doesn't imply x = y)

- Transitive: No (x = 1 or y = 1 and y = 1 or z = 1 don't imply x = 1 or z = 1)

QUESTION:

antisymmetric, and/or transitive, where (x, y) ∈ R if and only if


Determine whether the relationR on the set of all integers is reflexive, symmetric,

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.

ANSWER:

Here are the determinations:

a) x ≡ y:

- Reflexive: Yes (x ≡ x)

- Symmetric: Yes (x ≡ y implies y ≡ x)

- Antisymmetric: Yes (x ≡ y and y ≡ x imply x = y)

- Transitive: Yes (x ≡ y and y ≡ z imply x ≡ z)

b) xy ≥ 1:

- Reflexive: Yes (x^2 ≥ 1 for all integers x ≠ 0, but fails for x = 0)

- Corrected Reflexive: No

- Symmetric: Yes (xy ≥ 1 implies yx ≥ 1)


- Antisymmetric: No (xy ≥ 1 doesn't imply x = y)

- Transitive: No (xy ≥ 1 and yz ≥ 1 don't imply xz ≥ 1)

c) x = y + 1 or x = y - 1:

- Reflexive: No (x ≠ x + 1 and x ≠ x - 1)

- Symmetric: Yes (x = y + 1 or x = y - 1 implies y = x - 1 or y = x + 1)

- Antisymmetric: No (x = y + 1 and y = x + 1 don't imply x = y)

- Transitive: No (x = y + 1 and y = z + 1 don't imply x = z + 1)

d) x ≡ y (mod 7):

- Reflexive: Yes (x ≡ x mod 7)

- Symmetric: Yes (x ≡ y mod 7 implies y ≡ x mod 7)

- Antisymmetric: No (x ≡ y mod 7 doesn't imply x = y)

- Transitive: Yes (x ≡ y mod 7 and y ≡ z mod 7 imply x ≡ z mod 7)

e) x is a multiple of y:

- Reflexive: Yes (x is a multiple of x)

- Symmetric: No (x multiple of y doesn't imply y multiple of x)

- Antisymmetric: Yes (x multiple of y and y multiple of x imply x = y or x = 0 or y = 0)

- Transitive: Yes (x multiple of y and y multiple of z imply x multiple of z)

f) x and y are both negative or both nonnegative:

- Reflexive: Yes

- Symmetric: Yes

- Antisymmetric: No

- Transitive: Yes
g) x = y^2:

- Reflexive: No (x ≠ x^2 unless x = 0 or x = 1)

- Symmetric: No (x = y^2 doesn't imply y = x^2)

- Antisymmetric: Yes (x = y^2 and y = x^2 imply x = y or x = 0)

- Transitive: No (x = y^2 and y = z^2 don't imply x = z^2)

h) x ≥ y^2:

- Reflexive: No (x < x^2 for x > 1)

- Symmetric: No (x ≥ y^2 doesn't imply y ≥ x^2)

- Antisymmetric: No (x ≥ y^2 doesn't imply x = y)

- Transitive: No (x ≥ y^2 and y ≥ z^2 don't imply x ≥ z^2)

QUESTION:

Show that the relation R = ∅on a nonempty set S is symmetric and transitive, but not
reflexive.

ANSWER:

Let's break it down:

Symmetric:

To show R is symmetric, we need to prove: (x, y) ∈ R implies (y, x) ∈ R.

Since R = ∅, there are no ordered pairs (x, y) ∈ R.

Thus, the implication "(x, y) ∈ R implies (y, x) ∈ R" is vacuously true.

Transitive:

To show R is transitive, we need to prove: (x, y) ∈ R and (y, z) ∈ R imply (x, z) ∈ R.


Again, since R = ∅, there are no ordered pairs (x, y) ∈ R or (y, z) ∈ R.

Thus, the implication "(x, y) ∈ R and (y, z) ∈ R imply (x, z) ∈ R" is also vacuously true.

Reflexive:

To show R is reflexive, we need to prove: for all x ∈ S, (x, x) ∈ R.

Since R = ∅ and S is nonempty, there exists at least one x ∈ S.

However, (x, x) ∉ R, since R has no elements.

Therefore, R is not reflexive.

QUESTION:

Show that the relation R = ∅ on the empty set S = ∅ is reflexive, symmetric, and transitive.

ANSWER:

When S = ∅, R = ∅ satisfies:

Reflexive:

For all x ∈ S, (x, x) ∈ R.

Since S = ∅, there are no x ∈ S to check.

Thus, the condition is vacuously true.

Symmetric:

For all x, y ∈ S, if (x, y) ∈ R, then (y, x) ∈ R.

Since R = ∅, there are no (x, y) ∈ R.

Thus, the implication is vacuously true.


Transitive:

For all x, y, z ∈ S, if (x, y) ∈ R and (y, z) ∈ R, then (x, z) ∈ R.

Since R = ∅, there are no (x, y) ∈ R or (y, z) ∈ R.

Thus, the implication is vacuously true.

In this case, R = ∅ on S = ∅ satisfies all three properties:

- Reflexive

- Symmetric

- Transitive

QUESTION:

Give an example of a relation on a set that is

a) both symmetric and antisymmetric.

b) neither symmetric nor antisymmetric.

ANSWER:

Here are examples:

a) Both Symmetric and Antisymmetric:

Let S = {a, b} and R = {(a, a), (b, b)}.

- Symmetric: (x, y) ∈ R implies (y, x) ∈ R (trivially true since only reflexive pairs exist)

- Antisymmetric: (x, y) ∈ R and (y, x) ∈ R imply x = y (true since only reflexive pairs exist)

This relation is both symmetric and antisymmetric, and it's also reflexive and transitive.

b) Neither Symmetric nor Antisymmetric:

Let S = {a, b, c} and R = {(a, b), (b, c), (a, c)}.

- Not Symmetric: (a, b) ∈ R but (b, a) ∉ R


- Not Antisymmetric: (a, c) ∈ R and (c, a) ∉ R don't imply a = c (but there's no (c, a) to begin with),
however (a, b) ∈ R and (b, a) ∉ R and a ≠ b

This relation is neither symmetric nor antisymmetric.

QUESTION:

Can a relation on a set be neither reflexive nor irreflexive?

ANSWER:

Yes, a relation on a set can be neither reflexive nor irreflexive.

A relation R on a set S is:

- Reflexive: For all x ∈ S, (x, x) ∈ R.

- Irreflexive: For all x ∈ S, (x, x) ∉ R.

To be neither reflexive nor irreflexive, a relation must:

- Have some reflexive pairs (x, x) ∈ R for some x.

- Lack some reflexive pairs (x, x) ∉ R for other x.

QUESTION:

Give an example of an irreflexive relation on the set of all people.

ANSWER:

Here's an example:

Let R be the relation "is a sibling of" on the set of all people.

- (x, y) ∈ R if and only if x and y are siblings.

This relation is irreflexive because:

- No person is their own sibling.


- For all people x, (x, x) ∉ R.

Other examples of irreflexive relations on the set of all people:

- "is a parent of"

- "is a child of"

- "is married to" (assuming monogamy)

- "lives in a different city than"

- "is taller than" (on the set of people with unique heights)

QUESTION:

Give an example of an asymmetric relation on the set of all people.

ANSWER:

Here's an example:

Let R be the relation "is a parent of" on the set of all people.

- (x, y) ∈ R if and only if x is a parent of y.

This relation is asymmetric because:

- If x is a parent of y, then y cannot be a parent of x.

- For all people x and y, if (x, y) ∈ R, then (y, x) ∉ R.

Other examples of asymmetric relations on the set of all people:

- "is older than"

- "is an ancestor of"

- "teaches" (assuming no self-teaching)

- "employs" (assuming no self-employment)

- "is superior to (in a hierarchy)"


QUESTION:

How many different relations are there from a set with m elements to a set with n
elements?

ANSWER:

The number of different relations from a set with m elements to a set with n elements is:

2^(mn)

To see why:

- Each element of the set with m elements can be related or not related to each element of the set with n
elements.

- There are mn pairs of elements (m choices from the first set, n choices from the second).

- Each pair can be either related (1) or not related (0).

- Thus, there are 2 choices for each of the mn pairs.

- By the product rule, the total number of relations is 2^mn.

QUESTION:

Let R be the relation R = {(a, b) | a < b} on the set of integers. Find

a) R−1.

b) R.

ANSWER:

Given R = {(a, b) | a < b} on the set of integers:

a) R^(-1) (Inverse Relation):

R^(-1) = {(b, a) | a < b}

= {(b, a) | b > a}

R^(-1) is the relation "is greater than".


b) There is no need to find R as it is already given:

R = {(a, b) | a < b}

This is the relation "is less than".

QUESTION:

Let R be the relation R = {(a, b) | a divides b} on the set of positive integers. Find

a) R^−1.

b) R.

ANSWER:

Given R = {(a, b) | a divides b} on the set of positive integers:

a) R^(-1) (Inverse Relation):

R^(-1) = {(b, a) | a divides b}

= {(b, a) | b is a multiple of a}

R^(-1) is the relation "is a multiple of".

b) R remains the same:

R = {(a, b) | a divides b}

R is the relation "divides".

QUESTION:

Let R be the relation on the set of all states in the United States consisting of pairs (a, b)
where state a borders state b. Find

a) R−1.

b) R
ANSWER:

Given R = {(a, b) | state a borders state b} on the set of all states in the United States:

a) R^(-1) (Inverse Relation):

R^(-1) = {(b, a) | state b borders state a}

R^(-1) is the same relation as R, since bordering is mutual.

b) R remains the same:

R = {(a, b) | state a borders state b}

QUESTION:

relation that equals the graph of f . That is, R = {(a, f (a)) | a ∈ A}. What is the inverse
Suppose that the function f from A to B is a one-toone correspondence. Let R be the

relation R−1?

ANSWER:

Given R = {(a, f(a)) | a ∈ A}, where f is a one-to-one correspondence (bijective function):

R^(-1) = {(f(a), a) | a ∈ A}

R^(-1) is the inverse relation, which is also the graph of the inverse function f^(-1).

Since f is bijective, f^(-1) exists and is a function from B to A.

Proof:

- For every (a, f(a)) ∈ R, there exists a unique a ∈ A.

- Since f is bijective, for every f(a) ∈ B, there exists a unique a ∈ A.

- Thus, (f(a), a) ∈ R^(-1) for every a ∈ A.

This shows that R^(-1) is indeed the graph of f^(-1), the inverse function.

QUESTION:
Let R1 = {(1, 2), (2, 3), (3, 4)} and R2 = {(1, 1), (1, 2),(2, 1), (2, 2), (2, 3), (3, 1), (3, 2), (3, 3),
(3, 4)} be relations from {1, 2, 3} to {1, 2, 3, 4}. Find

a) R1 ∪ R2.

b) R1 ∩ R2.

c) R1 − R2.

d) R2 − R1.

ANSWER:

Here are the answers:

a) R1 ∪ R2 (Union):

R1 ∪ R2 = {(1, 1), (1, 2), (2, 1), (2, 2), (2, 3), (3, 1), (3, 2), (3, 3), (3, 4)}

Note: This includes all pairs from both R1 and R2.

b) R1 ∩ R2 (Intersection):

R1 ∩ R2 = {(2, 3)}

Note: Only (2, 3) is common to both R1 and R2.

c) R1 − R2 (Difference):

R1 − R2 = {(1, 2), (3, 4)}

Note: These pairs are in R1 but not in R2.

d) R2 − R1 (Difference):

R2 − R1 = {(1, 1), (1, 2), (2, 1), (2, 2), (3, 1), (3, 2), (3, 3)}

Note: These pairs are in R2 but not in R1.

QUESTION:

Let A be the set of students at your school and B the set of books in the school library. Let
R1 and R2 be the relations consisting of all ordered pairs (a, b), where student a is required
to read book b in a course, and where student a has read book b, respectively. Describe the
ordered pairs in each of these relations.

a) R1 ∪ R2

b) R1 ∩ R2

c) R1 ⊕ R2

d) R1 − R2

e) R2 − R1

ANSWER:

Here are the descriptions:

a) R1 ∪ R2 (Union):

Ordered pairs (a, b) where student a is either required to read book b or has read book b (or both).

b) R1 ∩ R2 (Intersection):

Ordered pairs (a, b) where student a is required to read book b and has already read book b.

c) R1 ⊕ R2 (Symmetric Difference):

Ordered pairs (a, b) where student a is either required to read book b but hasn't read it yet or has read
book b but wasn't required to.

d) R1 − R2 (Difference):

Ordered pairs (a, b) where student a is required to read book b but hasn't read it yet.

e) R2 − R1 (Difference):

Ordered pairs (a, b) where student a has read book b but wasn't required to.

QUESTION:

Let R be the relation {(1, 2), (1, 3), (2, 3), (2, 4), (3, 1)}, and let S be the relation {(2, 1), (3,
1), (3, 2), (4, 2)}.Find S ◦R.

ANSWER:
To find S ◦ R (composition of relations), we match the second element of R with the first element of S:

R = {(1, 2), (1, 3), (2, 3), (2, 4), (3, 1)}

S = {(2, 1), (3, 1), (3, 2), (4, 2)}

Matching:

(1, 2) in R and (2, 1) in S => (1, 1) in S ◦ R

(1, 3) in R and (3, 1) in S => (1, 1) in S ◦ R

(1, 3) in R and (3, 2) in S => (1, 2) in S ◦ R

(2, 3) in R and (3, 1) in S => (2, 1) in S ◦ R

(2, 3) in R and (3, 2) in S => (2, 2) in S ◦ R

(2, 4) in R and (4, 2) in S => (2, 2) in S ◦ R

(3, 1) in R and (1 is not in S's domain)

Thus:

S ◦ R = {(1, 1), (1, 2), (2, 1), (2, 2)}

QUESTION:

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 S ◦R and R ◦ S?

ANSWER:

Given:

R = {(a, b) | a is a parent of b}

S = {(a, b) | a and b are siblings}

S ◦ R:

{(a, c) | ∃b (a is sibling of b and b is parent of c)}

= {(a, c) | a is an aunt/uncle of c}
S ◦ R is the relation "is an aunt/uncle of".

R ◦ S:

{(a, c) | ∃b (a is parent of b and b is sibling of c)}

= {(a, c) | a is a parent of c's sibling, or a is a parent of c}

R ◦ S includes:

- "is a parent of" (direct parent-child relationship)

- "is a parent of a sibling" (indirect, e.g., parent of someone's brother/sister)

QUESTION:

- Relations involve familial connections, but with different perspectives. R1 = {(a, b) ∈ R2 |


a > b}, the “greater than” relation,R2 = {(a, b) ∈ R2 | a ≥ b}, the “greater than or equal to”
relation,

R3 = {(a, b) ∈ R2 | a < b}, the “less than” relation,

R4 = {(a, b) ∈ R2 | a ≤ b}, the “less than or equal to” relation,

R5 = {(a, b) ∈ R2 | a = b}, the “equal to” relation,

R6 = {(a, b) ∈ R2 | a = b}, the “unequal to” relation.

Q1. Find

a) R1 ∪ R3. b) R1 ∪ R5.

c) R2 ∩ R4. d) R3 ∩ R5.

e) R1 − R2. f ) R2 − R1.

g) R1 ⊕ R3. h) R2 ⊕ R4.

Q2. Find

a) R2 ∪ R4. b) R3 ∪ R6.

c) R3 ∩ R6. d) R4 ∩ R6.

e) R3 − R6. f ) R6 − R3.

g) R2 ⊕ R6. h) R3 ⊕ R5.
Q3 Find

a) R1 ◦ R1. b) R1 ◦ R2.

c) R1 ◦ R3. d) R1 ◦ R4.

e) R1 ◦ R5. f ) R1 ◦ R6.

g) R2 ◦ R3. h) R3 ◦ R3.

Q5 Find

a) R2 ◦ R1. b) R2 ◦ R2.

c) R3 ◦ R5. d) R4 ◦ R1.

e) R5 ◦ R3. f ) R3 ◦ R6.

g) R4 ◦ R6. h) R6 ◦ R6.

ANSWER:

ANS1

a) R1 ∪ R3 = {(a, b) | a ≠ b} (unequal to)

b) R1 ∪ R5 = R1 (since R5 is a subset of R1's complement)

c) R2 ∩ R4 = {(a, b) | a = b} (equal to, R5)

d) R3 ∩ R5 = ∅ (empty set, no common elements)

e) R1 − R2 = ∅ (empty set, R1 is a subset of R2)

f) R2 − R1 = {(a, b) | a = b} (equal to, R5)

g) R1 ⊕ R3 = {(a, b) | a ≠ b} (unequal to)

h) R2 ⊕ R4 = ∅ (empty set, R2 and R4 are equivalent)

ANS2

a) R2 ∪ R4 = {(a, b) | a ≥ b or a ≤ b} = {(a, b) | any a, b}


b) R3 ∪ R6 = {(a, b) | a < b or a ≠ b} = {(a, b) | a ≠ b}

c) R3 ∩ R6 = R3 (since R3 is a subset of R6)

d) R4 ∩ R6 = {(a, b) | a ≤ b and a ≠ b}

e) R3 − R6 = ∅ (empty set, R3 is a subset of R6)

f) R6 − R3 = {(a, b) | a > b}

g) R2 ⊕ R6 = {(a, b) | a = b}

h) R3 ⊕ R5 = R3

ANS3

a) R1 ◦ R1 = R1 (greater than)

b) R1 ◦ R2 = R1

c) R1 ◦ R3 = {(a, b) | a > c and c < b}

d) R1 ◦ R4 = R1

e) R1 ◦ R5 = R1

f) R1 ◦ R6 = {(a, b) | ∃c (a > c and c ≠ b)}

g) R2 ◦ R3 = {(a, b) | ∃c (a ≥ c and c < b)}

h) R3 ◦ R3 = {(a, b) | ∃c (a < c and c < b)}

ANS4

a) R2 ◦ R1 = {(a, b) | ∃c (a ≥ c and c > b)}

b) R2 ◦ R2 = R2

c) R3 ◦ R5 = R3

d) R4 ◦ R1 = {(a, b) | ∃c (a ≤ c and c > b)}

e) R5 ◦ R3 = R3

f) R3 ◦ R6 = {(a, b) | ∃c (a < c and c ≠ b)}

g) R4 ◦ R6 = {(a, b) | ∃c (a ≤ c and c ≠ b)}


h) R6 ◦ R6 = {(a, b) | ∃c (a ≠ c and c ≠ b)}

QUESTION:

Let R1 and R2 be the “divides” and “is a multiple of” relations on the set of all positive
integers, respectively. That is, R1 = {(a, b) | a divides b} and R2 = {(a, b) | a

is a multiple of b}. Find

a) R1 ∪ R2.

b) R1 ∩ R2.

c) R1 − R2.

d) R2 − R1.

e) R1 ⊕ R2.

ANSWER:

Here are the answers:

a) R1 ∪ R2:

{(a, b) | a divides b or a is a multiple of b} = {(a, b) | a ≤ b or b ≤ a}

This relation includes all pairs of positive integers.

b) R1 ∩ R2:

{(a, b) | a divides b and a is a multiple of b} = {(a, a) | a is a positive integer}

This relation includes only pairs of identical numbers (e.g., (1, 1), (2, 2), ...).

c) R1 − R2:

{(a, b) | a divides b but a is not a multiple of b} = {(a, b) | a < b and a divides b}

This relation includes pairs where a is a proper divisor of b.


d) R2 − R1:

{(a, b) | a is a multiple of b but a does not divide b} = {(a, b) | a > b and a is a multiple of b}

This relation includes pairs where a is a proper multiple of b.

e) R1 ⊕ R2:

{(a, b) | a divides b or a is a multiple of b, but not both}

This relation includes pairs where a divides b or a is a multiple of b, excluding pairs where a = b.

QUESTION:

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.

ANSWER:

Here are the answers:

a) R1 ∪ R2:

{(a, b) | a ≡ b (mod 3) or a ≡ b (mod 4)}

This relation includes pairs of integers where a and b have the same remainder when divided by either 3
or 4.
b) R1 ∩ R2:

{(a, b) | a ≡ b (mod 3) and a ≡ b (mod 4)}

This relation includes pairs of integers where a and b have the same remainder when divided by both 3
and 4, which implies a ≡ b (mod 12).

c) R1 − R2:

{(a, b) | a ≡ b (mod 3) but a ≢ b (mod 4)}

This relation includes pairs of integers where a and b have the same remainder modulo 3 but not modulo
4.

d) R2 − R1:

{(a, b) | a ≡ b (mod 4) but a ≢ b (mod 3)}

This relation includes pairs of integers where a and b have the same remainder modulo 4 but not modulo
3.

e) R1 ⊕ R2:

{(a, b) | a ≡ b (mod 3) or a ≡ b (mod 4), but not both}

This relation includes pairs of integers where a and b have the same remainder modulo 3 or modulo 4,
excluding pairs where they have the same remainder modulo both.

QUESTION:

List the 16 different relations on the set {0, 1}.

ANSWER:

Here are the 16 different relations on the set {0, 1}:

1. ∅ (empty relation)

= {(0, 0), (0, 1), (1, 0), (1, 1)}'s complement


2. {(0, 0)}

1. {(0, 1)}

2. {(1, 0)}

3. {(1, 1)}

4. {(0, 0), (0, 1)}

5. {(0, 0), (1, 0)}

6. {(0, 0), (1, 1)}

7. {(0, 1), (1, 0)}

8. {(0, 1), (1, 1)}

9. {(1, 0), (1, 1)}

10. {(0, 0), (0, 1), (1, 0)}

11. {(0, 0), (0, 1), (1, 1)}

12. {(0, 0), (1, 0), (1, 1)}

13. {(0, 1), (1, 0), (1, 1)}

14. {(0, 0), (0, 1), (1, 0), (1, 1)} (universal relation)

These relations can be classified based on properties like reflexivity, symmetry, transitivity, and
antisymmetry.

QUESTION:

How many of the 16 different relations on {0, 1} contain the pair (0, 1)?

ANSWER:

Eight relations out of the 16 different relations on {0, 1} contain the pair (0, 1):

1. {(0, 1)}

2. {(0, 0), (0, 1)}

3. {(0, 1), (1, 0)}

4. {(0, 1), (1, 1)}


5. {(0, 0), (0, 1), (1, 0)}

6. {(0, 0), (0, 1), (1, 1)}

7. {(0, 1), (1, 0), (1, 1)}

8. {(0, 0), (0, 1), (1, 0), (1, 1)} (universal relation)

QUESTION:

a) How many relations are there on the set {a, b, c, d}?

b) How many relations are there on the set {a, b, c, d}

that contain the pair (a, a)?

ANSWER:

a) Number of relations on {a, b, c, d}:

Since |{a, b, c, d}| = 4, there are 4 × 4 = 16 possible ordered pairs.

Each pair can either be included or excluded from a relation.

So, the total number of relations = 2^16 = 65536.

b) Number of relations containing (a, a):

Since (a, a) must be included, consider the remaining 15 pairs.

Each of these pairs can either be included or excluded.

So, the total number of relations containing (a, a) = 2^15 = 32768.

QUESTION:

How many relations are there on a set with n elements that are

a) symmetric? b) antisymmetric?

c) asymmetric? d) irreflexive?

e) reflexive and symmetric?


f ) neither reflexive nor irreflexive?

ANSWER:

Here are the answers:

a) Symmetric relations:

For n elements, there are n(n+1)/2 unique unordered pairs.

Each pair can be included or excluded, and diagonal pairs (x, x) can be included or excluded.

Total symmetric relations = 2^(n(n+1)/2 + n) = 2^(n(n+1)/2 + n)

b) Antisymmetric relations:

Total antisymmetric relations = 2^n (choose whether each element is related to others)

c) Asymmetric relations:

Asymmetric = Antisymmetric ∩ Irreflexive

Total asymmetric relations = 2^(n(n-1)/2)

d) Irreflexive relations:

Total irreflexive relations = 2^(n(n-1))

e) Reflexive and symmetric relations:

Total reflexive and symmetric relations = 2^(n(n-1)/2)

f) Neither reflexive nor irreflexive:

Total neither reflexive nor irreflexive = 2^(n^2) - 2^(n(n-1)) - 2^n

QUESTION:
How many transitive relations are there on a set with n elements if

a) n = 1?

b) n = 2? c) n = 3?

ANSWER:

Here are the answers:

a) n = 1:

There are 2 relations on a set with 1 element:

1. ∅ (empty relation)

2. {(a, a)} (reflexive relation)

Both are transitive.

b) n = 2:

There are 16 relations on a set with 2 elements.

13 of these relations are transitive:

- Reflexive relations with both pairs (a, b) and (b, a)

- Relations with only (a, a) or (b, b)

- Relations with only (a, b) or (b, a)

- Empty relation

c) n = 3:

There are 512 relations on a set with 3 elements.

232 of these relations are transitive.

QUESTION:

Show that the relation R on a set A is symmetric if and only if R = R−1, where R−1 is the
inverse relation.
ANSWER:

To show that R is symmetric if and only if R = R^(-1), we'll prove both directions:

Symmetric R implies R = R^(-1)

Assume R is symmetric.

By definition of symmetry: (a, b) ∈ R → (b, a) ∈ R

By definition of inverse relation: (a, b) ∈ R → (b, a) ∈ R^(-1)

Since R is symmetric, every (a, b) ∈ R has a corresponding (b, a) ∈ R.

Thus, R ⊆ R^(-1).

Conversely, every (b, a) ∈ R^(-1) corresponds to (a, b) ∈ R.

So, R^(-1) ⊆ R.

Combining: R = R^(-1)

R = R^(-1) implies symmetric R

Assume R = R^(-1).

Let (a, b) ∈ R.

Since R = R^(-1), (a, b) ∈ R^(-1).

By definition of inverse relation, (b, a) ∈ R.

Thus, (a, b) ∈ R → (b, a) ∈ R.

R is symmetric.

Therefore, R is symmetric if and only if R = R^(-1).

QUESTION:

the diagonal relation = {(a, a) | a ∈ A}.


Show that the relation R on a set A is antisymmetric if and only if R ∩ R−1 is a subset of

ANSWER:
To show that R is antisymmetric if and only if R ∩ R^(-1) ⊆ Δ, we'll prove both directions:

Antisymmetric R implies R ∩ R^(-1) ⊆ Δ

Assume R is antisymmetric.

Suppose (a, b) ∈ R ∩ R^(-1).

Then, (a, b) ∈ R and (b, a) ∈ R (since (a, b) ∈ R^(-1) → (b, a) ∈ R).

By antisymmetry, a = b (since (a, b) ∈ R and (b, a) ∈ R).

Thus, (a, b) = (a, a) ∈ Δ.

Hence, R ∩ R^(-1) ⊆ Δ.

R ∩ R^(-1) ⊆ Δ implies antisymmetric R

Assume R ∩ R^(-1) ⊆ Δ.

Suppose (a, b) ∈ R and (b, a) ∈ R.

Then, (a, b) ∈ R ∩ R^(-1).

Since R ∩ R^(-1) ⊆ Δ, (a, b) ∈ Δ.

Thus, a = b.

Hence, R is antisymmetric.

Therefore, R is antisymmetric if and only if R ∩ R^(-1) ⊆ Δ.

QUESTION:

Show that the relation R on a set A is reflexive if and only if the inverse relation R−1 is
reflexive.

ANSWER:

To show that R is reflexive if and only if R^(-1) is reflexive, we'll prove both directions:

Reflexive R implies reflexive R^(-1)

Assume R is reflexive.

By definition of reflexivity: ∀a ∈ A, (a, a) ∈ R.


By definition of inverse relation: ∀a ∈ A, (a, a) ∈ R → (a, a) ∈ R^(-1).

Thus, ∀a ∈ A, (a, a) ∈ R^(-1).

R^(-1) is reflexive.

Reflexive R^(-1) implies reflexive R

Assume R^(-1) is reflexive.

By definition of reflexivity: ∀a ∈ A, (a, a) ∈ R^(-1).

By definition of inverse relation: ∀a ∈ A, (a, a) ∈ R^(-1) → (a, a) ∈ R.

Thus, ∀a ∈ A, (a, a) ∈ R.

R is reflexive.

Therefore, R is reflexive if and only if R^(-1) is reflexive.

QUESTION:

Show that the relation R on a set A is reflexive if and only if the complementary relation R
is irreflexive.

ANSWER:

To show that R is reflexive if and only if R' (complementary relation) is irreflexive, we'll prove both
directions:

Reflexive R implies irreflexive R'

Assume R is reflexive.

∀a ∈ A, (a, a) ∈ R.

By definition of complement: (a, a) ∉ R' ∀a ∈ A.

R' is irreflexive.

Irreflexive R' implies reflexive R

Assume R' is irreflexive.

∀a ∈ A, (a, a) ∉ R'.

By definition of complement: (a, a) ∈ R ∀a ∈ A.


R is reflexive.

Therefore, R is reflexive if and only if R' is irreflexive.

QUESTION:

Let R be a relation that is reflexive and transitive. Prove that Rn = R for all positive
integers n.

ANSWER:

Since R is reflexive and transitive, we'll prove R^n = R for all positive integers n.

Base case (n = 1):

R^1 = R (by definition)

Inductive step:

Assume R^k = R for some positive integer k.

We need to show R^(k+1) = R.

R^(k+1) = R^k ∘ R (by definition of relation composition)

= R ∘ R (using the inductive hypothesis R^k = R)

Since R is transitive, R ∘ R ⊆ R.

Since R is reflexive, R ⊆ R ∘ R.

Thus, R ∘ R = R.

Hence, R^(k+1) = R.

By mathematical induction, R^n = R for all positive integers n.

QUESTION:

Let R be the relation on the set {1, 2, 3, 4, 5} containing the ordered pairs (1, 1), (1, 2), (1,
3), (2, 3), (2, 4), (3, 1),(3, 4), (3, 5), (4, 2), (4, 5), (5, 1), (5, 2), and (5, 4).Find

a) R2.

b) R3.
c) R4.

d) R5.

ANSWER:

To find R^2, R^3, R^4, and R^5, we'll compute the composition of R with itself:

R^2:

Composition of R with itself:

(1, 1), (1, 2), (1, 3), (1, 4), (1, 5)

(2, 1), (2, 3), (2, 4)

(3, 1), (3, 2), (3, 3), (3, 4), (3, 5)

(4, 1), (4, 2), (4, 3), (4, 4), (4, 5)

(5, 1), (5, 2), (5, 3), (5, 4), (5, 5)

R^3:

Composition of R^2 with R:

(1, 1), (1, 2), (1, 3), (1, 4), (1, 5)

(2, 1), (2, 2), (2, 3), (2, 4), (2, 5)

(3, 1), (3, 2), (3, 3), (3, 4), (3, 5)

(4, 1), (4, 2), (4, 3), (4, 4), (4, 5)

(5, 1), (5, 2), (5, 3), (5, 4), (5, 5)

R^4:

Since R^3 already contains all possible pairs, R^4 = R^3.

R^5:

Similarly, R^5 = R^3.

Observation:
R^3 is the universal relation (contains all possible pairs).

Thus, R^n = R^3 for all n ≥ 3.

QUSTION:

Let R be a reflexive relation on a set A. Show that Rn is reflexive for all positive integers n.
Since R is reflexive, ∀a ∈ A, (a, a) ∈ R.

ANSWER:

We'll show R^n is reflexive for all positive integers n:

Base case (n = 1):

R^1 = R is reflexive.

Inductive step:

Assume R^k is reflexive for some positive integer k.

We need to show R^(k+1) is reflexive.

R^(k+1) = R^k ∘ R

For any a ∈ A:

(a, a) ∈ R^k (since R^k is reflexive)

(a, a) ∈ R (since R is reflexive)

By composition, (a, a) ∈ R^k ∘ R = R^(k+1)

Thus, ∀a ∈ A, (a, a) ∈ R^(k+1).

R^(k+1) is reflexive.

By mathematical induction, R^n is reflexive for all positive integers n.

QUESTION:

LetR be a symmetric relation. ShowthatRn is symmetric for all positive integers n. Since R
is symmetric, (a, b) ∈ R → (b, a) ∈ R.
ANSWER:

We'll show R^n is symmetric for all positive integers n:

Base case (n = 1):

R^1 = R is symmetric.

Inductive step:

Assume R^k is symmetric for some positive integer k.

We need to show R^(k+1) is symmetric.

R^(k+1) = R^k ∘ R

Suppose (a, b) ∈ R^(k+1).

Then, ∃c ∈ A such that (a, c) ∈ R^k and (c, b) ∈ R.

Since R^k is symmetric, (c, a) ∈ R^k.

Since R is symmetric, (b, c) ∈ R.

By composition, (b, a) ∈ R^k ∘ R = R^(k+1).

Thus, (a, b) ∈ R^(k+1) → (b, a) ∈ R^(k+1).

R^(k+1) is symmetric.

By mathematical induction, R^n is symmetric for all positive integers n.

QUESTION:

List the triples in the relation {(a, b, c) | a, b, and c are integers with 0 < a < b < c < 5}.

ANSWER:

Here are the triples in the relation:

{(1, 2, 3), (1, 2, 4), (1, 3, 4),

(1, 2, 5), (1, 3, 5), (1, 4, 5),

(2, 3, 4), (2, 3, 5), (2, 4, 5),

(3, 4, 5)}.
These 10 triples satisfy the conditions:

0<a<b<c<5

where a, b, and c are integers.

QUESTION:

Which 4-tuples are in the relation {(a, b, c, d) | a, b, c, and d are positive integers with abcd
= 6}?

ANSWER:

Here are the 4-tuples in the relation:

{(1, 1, 1, 6), (1, 1, 2, 3), (1, 1, 3, 2),

(1, 1, 6, 1), (1, 2, 1, 3), (1, 2, 3, 1),

(1, 3, 1, 2), (1, 3, 2, 1), (1, 6, 1, 1),

(2, 1, 1, 3), (2, 1, 3, 1), (2, 3, 1, 1),

(3, 1, 1, 2), (3, 1, 2, 1), (3, 2, 1, 1),

(6, 1, 1, 1)}

These 16 4-tuples satisfy the condition:

abcd = 6

where a, b, c, and d are positive integers.

QUESTION:

The 3-tuples in a 3-ary relation represent the following attributes of a student database:
student ID number, name, phone number.

a) Is student ID number likely to be a primary key?


b) Is name likely to be a primary key?

c) Is phone number likely to be a primary key?

ANSWER:

Here are the answers:

a) Yes, student ID number is likely to be a primary key.

Reason: Student ID numbers are typically unique and assigned to each student, making them an ideal
primary key.

b) No, name is unlikely to be a primary key.

Reason: Names are not unique (multiple students can share the same name), making them unsuitable as a
primary key.

c) No, phone number is unlikely to be a primary key.

Reason:

1. Phone numbers can be shared (e.g., family members or roommates).

2. Phone numbers can change over time (e.g., when a student moves or changes carriers).

3. Some students might not have a phone or prefer not to provide their number.

A primary key should be unique, stable, and not nullable, making student ID number the most suitable
choice.

In relational databases, a primary key:

1. Uniquely identifies each record.

2. Does not change.


3. Cannot be null.

Using student ID number as the primary key ensures data consistency and efficient querying.

QUESTION:

The 4-tuples in a 4-ary relation represent these attributes of published books: title, ISBN,
publication date, number of pages.

a) What is a likely primary key for this relation?

b) Under what conditions would (title, publication date) be a composite key?

c) Under what conditions would (title, number of pages)N be a composite key?

ANSWER:

Here are the answers:

a) ISBN (International Standard Book Number) is a likely primary key for this relation.

Reason: ISBN is:

1. Unique: Each book has a distinct ISBN.

2. Immutable: ISBN does not change.

3. Non-nullable: Every published book has an ISBN.

b) (Title, publication date) could be a composite key under these conditions:

1. Each title is published only once (no reprints or new editions).

2. No two books with the same title are published on the same date.

c) (Title, number of pages) is unlikely to be a composite key because:

1. Multiple books can have the same title and page count (e.g., different authors or editions).
2. Page count can change between editions.

QUESTION

The 5-tuples in a 5-ary relation represent these attributes

of all people in the United States: name, Social Security

number, street address, city, state.

a) Determine a primary key for this relation.

b) Under what conditions would (name, street address)

be a composite key?

c) Under what conditions would (name, street address,

city) be a composite key?

ANSWER:

Here are the answers:

a) Social Security number (SSN) is the primary key for this relation.

Reason: SSN is:

1. Unique: Each person has a distinct SSN.

2. Immutable: SSN does not change.

3. Non-nullable: Every U.S. citizen and resident has an SSN.

b) (Name, street address) would not be a reliable composite key.

Reason:

- Multiple people can share the same name (e.g., family members).

- Multiple people can live at the same address (e.g., roommates, family members).
c) (Name, street address, city) still wouldn't be a reliable composite key.

Reason:

- Multiple people can share the same name and live at the same address in the same city.

- People with the same name can move to the same address in the same city.

QUESTION:

What do you obtain when you apply the projection P2,3,5 to the 5-tuple (a, b, c, d, e)?

ANSWER:

When you apply the projection P2,3,5 to the 5-tuple (a, b, c, d, e), you obtain:

(b, c, e)

Projection P2,3,5 selects the 2nd, 3rd, and 5th components from the original 5-tuple.

In general, projection Pi,j,k... selects the i-th, j-th, k-th,... components from the original tuple.

QUESTION:

Which projection mapping is used to delete the first, second, and fourth components of a 6-
tuple?

ANSWER:

To delete the first, second, and fourth components of a 6-tuple, you would use the projection mapping:

P3,5,6

This projection selects the 3rd, 5th, and 6th components, effectively deleting the 1st, 2nd, and 4th
components.

For example, applying P3,5,6 to the 6-tuple:

(a, b, c, d, e, f)

Would result in:


(c, e, f)

QUESTION:

How many components are there in the n-tuples in the table obtained by applying the join
operator J3 to two tables with 5-tuples and 8-tuples, respectively?

ANSWER:

When applying the join operator J3 to two tables with:

5-tuples (a, b, c, d, e)

8-tuples (f, g, h, i, j, k, l, m)

The resulting table will have n-tuples with:

5 + 8 = 13

components.

The resulting 13-tuples will have the form:

(a, b, c, d, e, f, g, h, i, j, k, l, m)

Note that J3 typically denotes a natural join or equi-join on the third attribute, but the number of
components in the resulting tuples is determined by the total number of attributes from both tables.

QUESTION:

Let R be the relation on the set {0, 1, 2, 3} containing the ordered pairs (0, 1), (1, 1), (1, 2),
(2, 0), (2, 2), and (3, 0). Find the

a) reflexive closure of R.

b) symmetric closure of R.

ANSWER:
Given relation R:

R = {(0, 1), (1, 1), (1, 2), (2, 0), (2, 2), (3, 0)}

a) Reflexive Closure of R:

The reflexive closure of R, denoted by r(R), adds all missing pairs of the form (a, a) to R.

r(R) = R ∪ {(a, a) | a ∈ {0, 1, 2, 3} and (a, a) ∉ R}

r(R) = {(0, 1), (1, 1), (1, 2), (2, 0), (2, 2), (3, 0), (0, 0), (3, 3)}

b) Symmetric Closure of R:

The symmetric closure of R, denoted by s(R), adds all missing pairs of the form (b, a) whenever (a, b) ∈
R.

s(R) = R ∪ {(b, a) | (a, b) ∈ R}

s(R) = {(0, 1), (1, 1), (1, 2), (2, 0), (2, 2), (3, 0), (1, 0), (0, 2), (0, 3)}

QUESTION:

Let R be the relation {(a, b) | a divides b} on the set of integers. What is the symmetric
closure of R?

ANSWER:

The relation R is defined as:

R = {(a, b) | a divides b}

The symmetric closure of R, denoted by s(R), adds all missing pairs of the form (b, a) whenever (a, b) ∈
R.

s(R) = R ∪ {(b, a) | (a, b) ∈ R}

= {(a, b) | a divides b} ∪ {(b, a) | a divides b}

= {(a, b) | a divides b or b divides a}

In other words, s(R) is the relation where a and b are integers that divide each other.
QUESTION:

Howcan the directed graph representing the reflexive closure of a relation on a finite set be
constructed from the directed graph of the relation?

ANSWER:

To construct the directed graph representing the reflexive closure of a relation R on a finite set, follow
these steps:

1. Start with the directed graph of the original relation R.

2. For each vertex (node) in the graph, add a self-loop (an edge from the vertex to itself) if it doesn't
already exist.

This ensures that every vertex is related to itself, satisfying the reflexive property.

Example:

Original Relation R:

Vertices: {a, b, c}

Edges: {(a, b), (b, c), (c, a)}

Reflexive Closure r(R):

Vertices: {a, b, c}

Edges: {(a, b), (b, c), (c, a), (a, a), (b, b), (c, c)}

By adding self-loops to each vertex, we obtain the directed graph representing the reflexive closure r(R).

QUESTION:

How can the directed graph representing the symmetric closure of a relation on a finite set
be constructed from the directed graph for this relation?

ANSWER:
To construct the directed graph representing the symmetric closure of a relation R on a finite set, follow
these steps:

1. Start with the directed graph of the original relation R.

2. For each directed edge (a, b) in the graph:

a. If there is no edge (b, a), add it.

b. If there is already an edge (b, a), no action is needed.

This ensures that every pair of vertices has edges in both directions, satisfying the symmetric property.

Example:

Original Relation R:

Vertices: {a, b, c}

Edges: {(a, b), (b, c), (c, a)}

QUESTION:

Suppose that the relation R on the finite set A is represented by the matrix MR. Show that
the matrix that represents the reflexive closure of R is MR ∨ In.

ANSWER:

Let's break it down:

MR = [mij] is the matrix representing relation R on set A.

mij = 1 if (i, j) ∈ R

mij = 0 if (i, j) ∉ R

The reflexive closure r(R) adds self-loops to R.

Reflexive closure matrix = MR' = [m'ij]

m'ij = 1 if (i, j) ∈ r(R)

m'ij = 0 if (i, j) ∉ r(R)


Since r(R) adds self-loops:

m'ij = 1 if i = j (self-loops)

m'ij = mij if i ≠ j (original edges)

In is the identity matrix:

In = [δij] where δij = 1 if i = j and δij = 0 if i ≠ j

Now, compute MR ∨ In (Boolean matrix OR):

(MR ∨ In)ij = 1 if (MR)ij = 1 or Inij = 1

= 1 if (i, j) ∈ R or i = j

This matches the definition of the reflexive closure matrix MR':

MR' = MR ∨ In

Thus, the matrix representing the reflexive closure of R is indeed MR ∨ In.

Note: Boolean matrix operations are used here, where:

1 ∨ 1 = 1, 1 ∨ 0 = 1, 0 ∨ 1 = 1, 0 ∨ 0 = 0

QUESTION:

Suppose that the relation R on the finite set A is represented by the matrix MR. Show that
the matrix that represents the symmetric closure of R is MR ∨Mt R.

ANSWER:

Let's break it down:

MR = [mij] is the matrix representing relation R on set A.

mij = 1 if (i, j) ∈ R

mij = 0 if (i, j) ∉ R

The symmetric closure s(R) adds reverse edges to R.

Symmetric closure matrix = MS = [sij]

sij = 1 if (i, j) ∈ s(R)


sij = 0 if (i, j) ∉ s(R)

MS can be constructed by adding MR and its transpose, MtR.

MtR = [mji] (transpose of MR)

(MR ∨ MtR)ij = 1 if (MR)ij = 1 or (MtR)ij = 1

= 1 if (i, j) ∈ R or (j, i) ∈ R

This matches the definition of the symmetric closure matrix MS:

MS = MR ∨ MtR

Thus, the matrix representing the symmetric closure of R is indeed MR ∨ MtR.

QUESTION:

When is it possible to define the “irreflexive closure” of a relation R, that is, a relation that
contains R, is irreflexive, and is contained in every irreflexive relation that contains R?

ANSWER:

The irreflexive closure of a relation R can be defined if and only if R does not already contain any self-
loops, i.e., (a, a) ∉ R for all a in the domain.

Reason:

- If R contains self-loops, there's no smallest irreflexive relation containing R.

- Removing self-loops from R would create a smaller irreflexive relation.

- Hence, no unique irreflexive closure exists.

When R has no self-loops, the irreflexive closure can be constructed by:

1. Removing all self-loops from the transitive closure of R (if necessary).

2. Taking the intersection of all irreflexive relations containing R.

QUESTION:
Let R be the relation on the set {1, 2, 3, 4, 5} containing the ordered pairs (1, 3), (2, 4), (3,
1), (3, 5), (4, 3), (5, 1), (5, 2), and (5, 4).

Find

a) R2. b) R3. c) R4.

d) R5. e) R6. f ) R∗

ANSWER:

To compute the powers of R, we'll use the following relation:

R = {(1, 3), (2, 4), (3, 1), (3, 5), (4, 3), (5, 1), (5, 2), (5, 4)}

a) R² (Composition of R with itself)

R² = {(1, 1), (1, 5), (2, 3), (3, 3), (3, 1), (4, 1), (4, 5), (5, 3), (5, 4), (5, 1)}

b) R³

R³ = {(1, 3), (1, 1), (1, 4), (2, 1), (2, 5), (3, 5), (3, 3), (3, 1), (4, 3), (4, 4), (5, 1), (5, 2), (5, 5)}

c) R⁴

R⁴ = {(1, 1), (1, 3), (1, 5), (2, 3), (2, 1), (2, 4), (3, 1), (3, 3), (3, 5), (4, 1), (4, 3), (4, 5), (5, 3), (5, 1), (5, 4),
(5, 2)}

d) R⁵

R⁵ = {(1, 1), (1, 3), (1, 5), (1, 4), (2, 1), (2, 3), (2, 5), (2, 4), (3, 1), (3, 3), (3, 5), (4, 1), (4, 3), (4, 5), (5, 1),
(5, 2), (5, 3), (5, 4), (5, 5)}

e) R⁶

R⁶ = {(1, 1), (1, 3), (1, 5), (1, 4), (1, 2), (2, 1), (2, 3), (2, 5), (2, 4), (3, 1), (3, 3), (3, 5), (4, 1), (4, 3), (4, 5),
(5, 1), (5, 2), (5, 3), (5, 4), (5, 5)}

f) R* (Transitive closure)

R* = {(1, 1), (1, 3), (1, 5), (1, 4), (1, 2), (2, 1), (2, 3), (2, 5), (2, 4), (3, 1), (3, 3), (3, 5), (4, 1), (4, 3), (4, 5),
(5, 1), (5, 2), (5, 3), (5, 4), (5, 5)}

Note that R⁵ = R⁶ = R*, indicating that the transitive closure is reached at R⁵.

QUESTION:
Let R be the relation that contains the pair (a, b) if a and b are cities such that there is a
direct non-stop airline flight from a to b. When is (a, b) in

a) R2?

b) R3?

c) R∗?

ANSWER:

Let's break it down:

R = {(a, b) | there is a direct non-stop flight from city a to city b}

a) (a, b) ∈ R²:

There is a city c such that:

1. There is a direct non-stop flight from a to c.

2. There is a direct non-stop flight from c to b.

In other words, you can fly from a to b with one stop (at city c).

b) (a, b) ∈ R³:

There are cities c and d such that:

1. There is a direct non-stop flight from a to c.

2. There is a direct non-stop flight from c to d.

3. There is a direct non-stop flight from d to b.

In other words, you can fly from a to b with two stops (at cities c and d).

c) (a, b) ∈ R* (Transitive closure):

There exists a sequence of cities c₁, c₂, ..., cₙ such that:

1. There is a direct non-stop flight from a to c₁.

2. There is a direct non-stop flight from c₁ to c₂.

...
n. There is a direct non-stop flight from cₙ to b.

In other words, you can fly from a to b with any number of stops (zero or more).

R* represents the connectivity of cities by flights, regardless of the number of stops.

QUESTION:

Let R be the relation on the set of all students containing the ordered pair (a, b) if a and b
are in at least one common class and a = b. When is (a, b) in

a) R2?

b) R3?

c) R∗?

ANSWER:

Let's break it down:

R = {(a, b) | a and b are in at least one common class and a ≠ b}

a) (a, b) ∈ R²:

There exists a student c such that:

1. a and c are in at least one common class.

2. c and b are in at least one common class.

In other words, a and b have a common acquaintance (c) through a shared class.

b) (a, b) ∈ R³:

There exist students c and d such that:

1. a and c are in at least one common class.

2. c and d are in at least one common class.

3. d and b are in at least one common class.


In other words, a and b are connected through a chain of two mutual acquaintances.

c) (a, b) ∈ R* (Transitive closure):

There exists a chain of mutual acquaintances (c₁, c₂, ..., cₙ) such that:

1. a and c₁ are in at least one common class.

2. c₁ and c₂ are in at least one common class.

...

n. cₙ and b are in at least one common class.

In other words, a and b are connected through any number of mutual acquaintances.

R* represents the connectivity of students through shared classes, regardless of the length of the
connection chain.

QUESTION:

Suppose that the relation R is reflexive. Show that R∗ is reflexive.

ANSWER:

Since R is reflexive, we know:

∀a ∈ A, (a, a) ∈ R

We need to show that R* is reflexive:

∀a ∈ A, (a, a) ∈ R*

By definition of R*, we have:

(a, a) ∈ R* iff ∃n ≥ 0, (a, a) ∈ R^n

Since R is reflexive, we have:

(a, a) ∈ R^0 (by definition of R^0, the identity relation)

(a, a) ∈ R^1 (since R is reflexive)

...

(a, a) ∈ R^n (for all n ≥ 0, by induction)


Therefore, (a, a) ∈ R* for all a ∈ A.

Thus, R* is reflexive.

QUESTION:

Suppose that the relation R is symmetric. Show that R∗ is symmetric.

ANSWER:

Since R is symmetric, we know:

∀a, b ∈ A, (a, b) ∈ R ⇒ (b, a) ∈ R

We need to show that R* is symmetric:

∀a, b ∈ A, (a, b) ∈ R* ⇒ (b, a) ∈ R*

By definition of R*, we have:

(a, b) ∈ R* iff ∃n ≥ 0, (a, b) ∈ R^n

Assume (a, b) ∈ R*. Then, ∃n ≥ 0, (a, b) ∈ R^n.

Case 1: n = 0

(a, b) ∈ R^0 ⇒ a = b (identity relation)

⇒ (b, a) ∈ R^0 ⇒ (b, a) ∈ R*

Case 2: n > 0

(a, b) ∈ R^n ⇒ ∃c₁, ..., cₙ₋₁, (a, c₁) ∈ R, (c₁, c₂) ∈ R, ..., (cₙ₋₁, b) ∈ R

Since R is symmetric:

(b, cₙ₋₁) ∈ R, (cₙ₋₁, cₙ₋₂) ∈ R, ..., (c₁, a) ∈ R

⇒ (b, a) ∈ R^n ⇒ (b, a) ∈ R*

Thus, R* is symmetric.

QUESTION:

Suppose that the relation R is irreflexive. Is the relation R2 necessarily irreflexive


ANSWER:

No, R² is not necessarily irreflexive.

Counterexample:

R = {(a, b), (b, a), (a, c), (c, b)}

R is irreflexive since (a, a), (b, b), and (c, c) are not in R.

However:

R² = {(a, a), (a, c), (b, b), (b, a), (c, b), (c, c)}

R² is not irreflexive since (a, a), (b, b), and (c, c) are in R².

This occurs because R² allows "round-trip" connections:

(a, b) ∈ R and (b, a) ∈ R ⇒ (a, a) ∈ R²

Irreflexivity is not preserved under squaring or transitive closure.

QUESTION:

Which of these relations on {0, 1, 2, 3} are equivalence relations? Determine the properties
of an equivalence relation that the others lack.

a) {(0, 0), (1, 1), (2, 2), (3, 3)}

b) {(0, 0), (0, 2), (2, 0), (2, 2), (2, 3), (3, 2), (3, 3)}

c) {(0, 0), (1, 1), (1, 2), (2, 1), (2, 2), (3, 3)}

d) {(0, 0), (1, 1), (1, 3), (2, 2), (2, 3), (3, 1), (3, 2),

(3, 3)}

e) {(0, 0), (0, 1), (0, 2), (1, 0), (1, 1), (1, 2), (2, 0),

(2, 2), (3, 3)}

ANSWER:

Equivalence relations must satisfy three properties:


1. Reflexivity: (a, a) ∈ R for all a.

2. Symmetry: (a, b) ∈ R ⇒ (b, a) ∈ R.

3. Transitivity: (a, b) ∈ R and (b, c) ∈ R ⇒ (a, c) ∈ R.

Here are the results:

a) {(0, 0), (1, 1), (2, 2), (3, 3)}:

Equivalence relation.

b) {(0, 0), (0, 2), (2, 0), (2, 2), (2, 3), (3, 2), (3, 3)}:

Not reflexive (missing (1, 1)).

Not transitive ((0, 2) and (2, 3) but no (0, 3)).

c) {(0, 0), (1, 1), (1, 2), (2, 1), (2, 2), (3, 3)}:

Equivalence relation.

d) {(0, 0), (1, 1), (1, 3), (2, 2), (2, 3), (3, 1), (3, 2), (3, 3)}:

Not transitive ((1, 3) and (3, 2) but no (1, 2)).

e) {(0, 0), (0, 1), (0, 2), (1, 0), (1, 1), (1, 2), (2, 0), (2, 2), (3, 3)}:

Not transitive ((0, 1) and (1, 2) but no (0, 2) is actually present, however (2, 1) and (1, 0) but no (2, 0) is
actually present).

Only (a) and (c) are equivalence relations.

QUESTION:

Which of these relations on the set of all people are equivalence relations? Determine the
properties of an equivalence relation that the others lack.

a) {(a, b) | a and b are the same age}

b) {(a, b) | a and b have the same parents}

c) {(a, b) | a and b share a common parent}

d) {(a, b) | a and b have met}

e) {(a, b) | a and b speak a common language}


ANSWER:

Equivalence relations must satisfy three properties:

1. Reflexivity: (a, a) ∈ R for all a.

2. Symmetry: (a, b) ∈ R ⇒ (b, a) ∈ R.

3. Transitivity: (a, b) ∈ R and (b, c) ∈ R ⇒ (a, c) ∈ R.

Here are the results:

a) {(a, b) | a and b are the same age}:

Equivalence relation.

b) {(a, b) | a and b have the same parents}:

Equivalence relation.

c) {(a, b) | a and b share a common parent}:

Equivalence relation.

d) {(a, b) | a and b have met}:

Not transitive (a met b, b met c, but a may not have met c).

e) {(a, b) | a and b speak a common language}:

Equivalence relation.

(a), (b), (c), and (e) are equivalence relations.

(d) lacks transitivity.

QUESTION:

Which of these relations on the set of all functions from Z to Z are equivalence relations?
Determine the properties of an equivalence relation that the others lack.

a) {(f, g) | f (1) = g(1)}

b) {(f, g) | f (0) = g(0) or f (1) = g(1)}

c) {(f, g) | f (x) − g(x) = 1 for all x ∈ Z}


d) {(f, g) | for some C ∈ Z, for all x ∈ Z, f (x) −

g(x) = C}

e) {(f, g) | f (0) = g(1) and f (1) = g(0)}

ANSWER:

Equivalence relations must satisfy three properties:

1. Reflexivity: (a, a) ∈ R for all a.

2. Symmetry: (a, b) ∈ R ⇒ (b, a) ∈ R.

3. Transitivity: (a, b) ∈ R and (b, c) ∈ R ⇒ (a, c) ∈ R.

Here are the results:

a) {(f, g) | f(1) = g(1)}:

Equivalence relation.

b) {(f, g) | f(0) = g(0) or f(1) = g(1)}:

Not transitive (f(0) = g(0), g(1) = h(1) but no f(0) = h(0) and no f(1) = h(1)).

c) {(f, g) | f(x) − g(x) = 1 for all x ∈ Z}:

Not reflexive (f(x) - f(x) = 0 ≠ 1), not symmetric (f(x) - g(x) = 1 but g(x) - f(x) = -1).

d) {(f, g) | for some C ∈ Z, for all x ∈ Z, f(x) − g(x) = C}:

Equivalence relation.

e) {(f, g) | f(0) = g(1) and f(1) = g(0)}:

Not reflexive (f(0) ≠ f(1) usually), not symmetric (f(0) = g(1) and f(1) = g(0) but g(0) ≠ f(1) and g(1) ≠
f(0)).

(a) and (d) are equivalence relations.

(b) lacks transitivity.

(c) and (e) lack reflexivity and symmetry.

QUESTION:
Show that the relation R consisting of all pairs (x, y) such that x and y are bit strings of
length three or more that agree except perhaps in their first three bits is an equivalence
relation on the set of all bit strings of length three or more.

ANSWER:

To show that R is an equivalence relation, we must prove that R satisfies three properties:

1. Reflexivity

2. Symmetry

3. Transitivity

Reflexivity:

For any bit string x of length three or more, x agrees with itself except perhaps in its first three bits (since
they are the same). Therefore, (x, x) ∈ R.

Symmetry:

Suppose (x, y) ∈ R. Then x and y agree except perhaps in their first three bits. This implies that y and x
agree except perhaps in their first three bits. Hence, (y, x) ∈ R.

Transitivity:

Suppose (x, y) ∈ R and (y, z) ∈ R. Then:

- x and y agree except perhaps in their first three bits.

- y and z agree except perhaps in their first three bits.

From these, we can conclude that x and z agree except perhaps in their first three bits (since y's first three
bits may differ from x's and z's, but x and z will still agree beyond the first three bits). Therefore, (x, z) ∈
R.

Thus, R satisfies reflexivity, symmetry, and transitivity, making R an equivalence relation on the set of all
bit strings of length three or more.
QUESTION:

Let R be the relation on the set of ordered pairs of positive integers such that ((a, b), (c, d))
∈ R if and only if a + d = b + c. Show that R is an equivalence relation.

ANSWER:

To show that R is an equivalence relation, we must prove that R satisfies three properties:

1. Reflexivity

2. Symmetry

3. Transitivity

Reflexivity:

For any ordered pair (a, b), we have:

a+b=b+a

Therefore, ((a, b), (a, b)) ∈ R.

Symmetry:

Suppose ((a, b), (c, d)) ∈ R. Then:

a+d=b+c

Rearranging, we get:

c+b=d+a

Therefore, ((c, d), (a, b)) ∈ R.

Transitivity:

Suppose ((a, b), (c, d)) ∈ R and ((c, d), (e, f)) ∈ R. Then:

a+d=b+c

c+f=d+e
Adding these equations and canceling d, we get:

a+f=b+e

Therefore, ((a, b), (e, f)) ∈ R.

Thus, R satisfies reflexivity, symmetry, and transitivity, making R an equivalence relation.

QUESTION:

Which of these relations on {0, 1, 2, 3} are partial orderings?

Determine the properties of a partial ordering that

the others lack.

a) {(0, 0), (1, 1), (2, 2), (3, 3)}

b) {(0, 0), (1, 1), (2, 0), (2, 2), (2, 3), (3, 2), (3, 3)}

c) {(0, 0), (1, 1), (1, 2), (2, 2), (3, 3)}

d) {(0, 0), (1, 1), (1, 2), (1, 3), (2, 2), (2, 3), (3, 3)}

e) {(0, 0), (0, 1), (0, 2), (1, 0), (1, 1), (1, 2), (2, 0),

(2, 2), (3, 3)}

ANSWER:

A partial ordering must satisfy three properties:

1. Reflexivity: (a, a) ∈ R for all a.

2. Antisymmetry: (a, b) ∈ R and (b, a) ∈ R ⇒ a = b.

3. Transitivity: (a, b) ∈ R and (b, c) ∈ R ⇒ (a, c) ∈ R.

Here are the results:

a) {(0, 0), (1, 1), (2, 2), (3, 3)}

Partial ordering (trivial one, equality).

b) {(0, 0), (1, 1), (2, 0), (2, 2), (2, 3), (3, 2), (3, 3)}
Not antisymmetric: (2, 3) and (3, 2) but 2 ≠ 3.

c) {(0, 0), (1, 1), (1, 2), (2, 2), (3, 3)}

Partial ordering.

d) {(0, 0), (1, 1), (1, 2), (1, 3), (2, 2), (2, 3), (3, 3)}

Partial ordering.

e) {(0, 0), (0, 1), (0, 2), (1, 0), (1, 1), (1, 2), (2, 0), (2, 2), (3, 3)}

Not antisymmetric: (0, 1) and (1, 0) but 0 ≠ 1,

not transitive: (0, 1) and (1, 2) but no (0, 2) is actually present.

(a), (c), and (d) are partial orderings.

(b) and (e) lack antisymmetry and/or transitivity.

QUESTION:

Which of these relations on {0, 1, 2, 3} are partial orderings? Determine the properties of a
partial ordering that the others lack.

a) {(0, 0), (2, 2), (3, 3)}

b) {(0, 0), (1, 1), (2, 0), (2, 2), (2, 3), (3, 3)}

c) {(0, 0), (1, 1), (1, 2), (2, 2), (3, 1), (3, 3)}

d) {(0, 0), (1, 1), (1, 2), (1, 3), (2, 0), (2, 2), (2, 3), (3, 0), (3, 3)}

e) {(0, 0), (0, 1), (0, 2), (0, 3), (1, 0), (1, 1), (1, 2),(1, 3), (2, 0), (2, 2), (3, 3)}

ANSWER:

A partial ordering must satisfy three properties:

1. Reflexivity: (a, a) ∈ R for all a.

2. Antisymmetry: (a, b) ∈ R and (b, a) ∈ R ⇒ a = b.

3. Transitivity: (a, b) ∈ R and (b, c) ∈ R ⇒ (a, c) ∈ R.

Here are the results:


a) {(0, 0), (2, 2), (3, 3)}

Not reflexive: missing (1, 1).

b) {(0, 0), (1, 1), (2, 0), (2, 2), (2, 3), (3, 3)}

Not antisymmetric: (2, 3) and (3, 2) but 2 ≠ 3.

c) {(0, 0), (1, 1), (1, 2), (2, 2), (3, 1), (3, 3)}

Not antisymmetric: (1, 2) and (3, 1) but 1 ≠ 3 and 2 ≠ 3.

d) {(0, 0), (1, 1), (1, 2), (1, 3), (2, 0), (2, 2), (2, 3), (3, 0), (3, 3)}

Not antisymmetric: multiple pairs.

e) {(0, 0), (0, 1), (0, 2), (0, 3), (1, 0), (1, 1), (1, 2), (1, 3), (2, 0), (2, 2), (3, 3)}

Not antisymmetric: multiple pairs.

None of the relations are partial orderings.

All relations lack either reflexivity, antisymmetry, or both.

QUESTION:

Is (S,R) a poset if S is the set of all people in the world and (a, b) ∈ R, where a and b are
people, if

a) a is taller than b?

b) a is not taller than b?

c) a = b or a is an ancestor of b?

d) a and b have a common friend?

ANSWER:

Here are the results:

a) a is taller than b

Not reflexive: (a, a) ∉ R (a is not taller than himself)

Not symmetric: (a, b) ∈ R ⇒ (b, a) ∉ R (if a is taller than b, b is not taller than a)
Transitive: (a, b) ∈ R and (b, c) ∈ R ⇒ (a, c) ∈ R (if a is taller than b and b is taller than c, a is taller than
c)

Not a poset.

b) a is not taller than b

Reflexive: (a, a) ∈ R (a is not taller than himself)

Not antisymmetric: (a, b) ∈ R and (b, a) ∈ R but a ≠ b (a and b can have the same height)

Transitive: (a, b) ∈ R and (b, c) ∈ R ⇒ (a, c) ∈ R (if a is not taller than b and b is not taller than c, a is not
taller than c)

Not a poset.

c) a = b or a is an ancestor of b

Reflexive: (a, a) ∈ R (a = a)

Antisymmetric: (a, b) ∈ R and (b, a) ∈ R ⇒ a = b (if a is an ancestor of b and b is an ancestor of a, a = b)

Transitive: (a, b) ∈ R and (b, c) ∈ R ⇒ (a, c) ∈ R (if a is an ancestor of b and b is an ancestor of c, a is an


ancestor of c)

Poset.

d) a and b have a common friend

Reflexive: (a, a) ∈ R (a has a common friend with himself)

Not antisymmetric: (a, b) ∈ R and (b, a) ∈ R but a ≠ b (having a common friend is symmetric)

Not transitive: (a, b) ∈ R and (b, c) ∈ R ¬⇒ (a, c) ∈ R (a and b have a common friend, b and c have a
common friend, but a and c may not)

Not a poset.

Only (c) is a poset.

QUESTION:
Is (S,R) a poset if S is the set of all people in the world and (a, b) ∈ R, where a and b are
people, if

a) a is no shorter than b?

b) a weighs more than b?

c) a = b or a is a descendant of b?

d) a and b do not have a common friend?

ANSWER:

Here are the results:

a) a is no shorter than b

Reflexive: (a, a) ∈ R (a is no shorter than himself)

Antisymmetric: (a, b) ∈ R and (b, a) ∈ R ⇒ a = b (if a is no shorter than b and b is no shorter than a, a
and b are the same height)

Transitive: (a, b) ∈ R and (b, c) ∈ R ⇒ (a, c) ∈ R (if a is no shorter than b and b is no shorter than c, a is
no shorter than c)

Poset.

b) a weighs more than b

Not reflexive: (a, a) ∉ R (a does not weigh more than himself)

Not symmetric: (a, b) ∈ R ⇒ (b, a) ∉ R (if a weighs more than b, b does not weigh more than a)

Transitive: (a, b) ∈ R and (b, c) ∈ R ⇒ (a, c) ∈ R (if a weighs more than b and b weighs more than c, a
weighs more than c)

Not a poset (lacks reflexivity).

c) a = b or a is a descendant of b

Reflexive: (a, a) ∈ R (a = a)

Antisymmetric: (a, b) ∈ R and (b, a) ∈ R ⇒ a = b (if a is a descendant of b and b is a descendant of a, a


=b)
Transitive: (a, b) ∈ R and (b, c) ∈ R ⇒ (a, c) ∈ R (if a is a descendant of b and b is a descendant of c, a is
a descendant of c)

Poset.

d) a and b do not have a common friend

Not reflexive: (a, a) ∉ R (a has himself as a friend)

Not antisymmetric: (a, b) ∈ R and (b, a) ∈ R but a ≠ b (not having a common friend is symmetric)

Not transitive: (a, b) ∈ R and (b, c) ∈ R ¬⇒ (a, c) ∈ R (a and b have no common friend, b and c have no
common friend, but a and c may have a common friend)

Not a poset.

(a) and (c) are posets.

(b) and (d) are not posets due to lack of reflexivity and/or antisymmetry and/or transitivity.

QUESTION:

Which of these are posets?

a) (Z,=) b)
b) (Z, =)
c) (Z,≥)
d) (Z, | )

ANSWER:

Here are the results:

a) (Z, =)

Reflexive: Yes (a = a)

Antisymmetric: Yes (a = b and b = a ⇒ a = b)

Transitive: Yes (a = b and b = c ⇒ a = c)

Poset.
b) (Z, ≡) (assuming ≡ means congruence modulo some fixed integer)

Reflexive: Yes (a ≡ a)

Antisymmetric: No (a ≡ b and b ≡ a ⇒ a ≡ b, but a ≠ b possible)

Transitive: Yes (a ≡ b and b ≡ c ⇒ a ≡ c)

Not a poset (lacks antisymmetry).

c) (Z, ≥)

Reflexive: Yes (a ≥ a)

Antisymmetric: Yes (a ≥ b and b ≥ a ⇒ a = b)

Transitive: Yes (a ≥ b and b ≥ c ⇒ a ≥ c)

Poset.

d) (Z, | ) (assuming | means divides)

Reflexive: Yes (a | a)

Antisymmetric: No (a | b and b | a ⇒ a = ±b, but a ≠ b possible)

Transitive: Yes (a | b and b | c ⇒ a | c)

Not a poset (lacks antisymmetry).

(a) and (c) are posets.

(b) and (d) are not posets due to lack of antisymmetry.

QUESTION:

Which of these are posets?

a) (R,=) b) (R,<) c) (R,≤) d) (R, =)

ANSWER:
Here are the results:

a) (R, =)

Reflexive: Yes (a = a)

Antisymmetric: Yes (a = b and b = a ⇒ a = b)

Transitive: Yes (a = b and b = c ⇒ a = c)

Poset.

b) (R, <)

Not reflexive: (a, a) ∉ R (a is not less than a)

Antisymmetric: Yes (a < b ⇒ ¬(b < a))

Transitive: Yes (a < b and b < c ⇒ a < c)

Not a poset (lacks reflexivity).

c) (R, ≤)

Reflexive: Yes (a ≤ a)

Antisymmetric: Yes (a ≤ b and b ≤ a ⇒ a = b)

Transitive: Yes (a ≤ b and b ≤ c ⇒ a ≤ c)

Poset.

d) (R, ≡) (assuming ≡ means "is approximately equal to")

Not reflexive: (a, a) ∉ R (a is not approximately equal to a in general)

Not antisymmetric: (a ≡ b and b ≡ a ⇒ a ≈ b, but a ≠ b)

Not transitive: (a ≡ b and b ≡ c ¬⇒ a ≡ c)

Not a poset.

(a) and (c) are posets.


(b) is not a poset due to lack of reflexivity.

(d) is not a poset due to lack of reflexivity, antisymmetry, and transitivity.

You might also like