MACM 101 — Discrete Mathematics I
Outline Solutions to Exercises on Functions and Relations
1.
Make a list of pairs, construct the matrix, and draw the graph of the relation
R
from the set
A
=
{
0
,
1
,
2
,
3
,
4
}
to the set
B
=
{
0
,
1
,
2
,
3
}
such that
(
a,b
)
∈
R
if and only if
a
+
b
= 4
.
The set of paier
R
=
{
(1
,
3)
,
(2
,
2)
,
(3
,
1)
,
(4
,
0)
}
; the matrix
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
1
0
0
0
,
and the graph
0
1
2
3
4
0
1
2
3
B
A
2.
Prove that
(
A
∪
B
)
×
C
= (
A
×
C
)
∪
(
B
×
C
)
.
Method 1.
We have
(
A
∪
B
)
×
C
=
{
(
a,b
)

a
∈
A
∪
B
∧
b
∈
C
}
=
{
(
a,b
)

(
a
∈
A
∨
a
∈
B
)
∧
b
∈
C
}
=
{
(
a,b
)

(
a
∈
A
∧
b
∈
C
)
∨
(
a
∈
B
∧
b
∈
C
)
}
=
{
(
a,b
)

a
∈
A
∧
b
∈
C
} ∪ {
(
a,b
)

(
a
∈
B
∧
b
∈
C
)
}
= (
A
×
C
)
∪
(
B
×
C
)
.
Method 2.
We show that
(
A
∪
B
)
×
C
⊆
(
A
×
C
)
∪
(
B
×
C
)
, and that
(
A
×
C
)
∪
(
B
×
C
)
⊆
(
A
∪
B
)
×
C
.
(
A
∪
B
)
×
C
⊆
(
A
×
C
)
∪
(
B
×
C
)
. Take an element
(
a,b
)
from
(
A
∪
B
)
×
C
. Then
a
∈
A
∪
B
, and hence
a
∈
A
or
a
∈
B
. Since
b
∈
C
, in the former case we have
(
a,b
)
∈
A
×
C
, wand in the latter case we have
(
a,b
)
∈
B
×
C
. In either case
(
a,b
)
∈
(
A
×
C
)
∪
(
B
×
C
)
.
(
A