CS 336 Pre-Test 3 Solutions
Relations and Functions
4. Relations
1)
* For each of the following sets, state whether or not it is a partition of {0, 1, 2, 3, 4, 5, 6, 7,
8, 9, 10}.
a)
{{0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}}
This is a partition
b)
{
∅
, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}}
This is a not partition since it contains the empty set and also has no subset containing 0.
c)
{{1, 2}, {3, 4}, {5, 6}, {7, 8}, {9, 10}}
This is a not partition since it has no subset containing 0.
d)
{{1, 2}, {2, 3}, {3, 4}, {4, 5}, {5, 6}, {6, 7}, {7, 8}, {8, 9}, {9, 10}}
This is a not partition since it has no subset containing 0 and several elements are
contained in distinct subsets.
2)
* For each of the following relations, state which of these properties hold:
reflexivity, symmetry, transitivity, and antisymmetry.
a)
“equality” defined on strings
This is reflexive(since
(
)
(
)
a
b
a
b
=
⇒
=
), symmetric(since
(
)
(
)
a
b
b
a
=
⇒
=
),
transitive(since
(
)
(
)
a
b
b
c
a
c
=
∧
=
⇒
=
),
and antisymmetric (since
(
)
(
)
a
b
b
a
a
b
=
∧ =
⇒
=
).
b)
“inequality” defined on strings
This is not reflexive (since
( 1
1 )
< ≠<
:
), symmetric (since
(
)
(
)
a
b
b
a
≠
⇒
≠
), not
transitive(since
( 1
2
2
1 )
< ≠<
∧ <
≠<
but
( 1
1 )
< ≠<
:
), and not antisymmetric
(since
( 1
2
2
1 )
< ≠<
∧ <
≠<
but
1
2
< ≠<
).
c)