You are on page 1of 14

Activity 1.

Sets and Set Operations (40 pts) d) {a, {a}, {a, {a}}} = 3

1. List the members of these sets 4. Find the power set of each of these
sets, where a and b are distinct elements.
a) {x | x is a real number such that x 2 = 1} =
{-1;1} a) {a} =

b) {x | x is a positive integer less than 12} = b) {a, b} =


{1,2,3,4,5,6,7,8,9,10,11}
c) {∅, {∅}} =
c) {x | x is the square of an integer and x <
100} = {1,4,9,16,25,36,49,64,81} Use set builder notation to give a
description of each of these sets.
d) {x | x is an integer such that x2 = 2} =
nothing a.) {0, 3, 6, 9, 12}

2. Determine whether each of these


statements is true or false. b.) {-3, -2, -1, 0, 1, 2, 3}

a) x ∈ {x} – TRUE – (The set {x} has


exactly one element) c.) {m, n, o, p}

b) {x} ⊆ {x} – TRUE – (Every set is a For each of these pairs of sets, determine
subset of itself) whether the first is a subset of the second,
the second is a subset of the first or neither
c) {x} ∈ {x} – FALSE – (A set is a subset of is a subset of the other.
itself, but is not and element of itself)
a.) The set of airline flights from New
d) {x} ∈ {{x}} – TRUE – (Here the set which York to New Delhi, the set of
has x as its only element is, in turn, the nonstop airline flights from New York
only element of the set on the right) to New Delhi
Ans: The first is a subset of the
e) ∅ ⊆ {x} – TRUE (The empty set is a second, but the second is not the
subset of every set) subset of the first.
b.) The set of people who speak
f ) ∅ ∈ {x} – FALSE (The only element of English, the set of people who speak
the set {x} is x) Chinese
Ans: Neither is a subset of the
3. What is the cardinality of each of these
other
sets?
c.) The set of flying squirrels, the set of
a) {a} = 1 living creatures that can fly
Ans: The first is subset of the
b) {{a}} = 1 second, but the second is not a
subset of the first.
c) {a, {a}} = 2
a.)The set of people who speak English, the
set of people who speak English with an
Australian Accent

Ans:

b.)The set of fruits, the set of citrus fruits

Ans:

c.)The set of students studying discrete


mathematics, the set of students studying
data structures

Ans:

Determine whether each of these pairs of


sets are equal.

a.) {1,3,3,3,5,5,5,5,5}, {5, 3, 1} – YES


b.) {{1}}, {1,{1}} – NO
c.) ∅, {∅}

Suppose that A = {2,4,6}, B = {2,6}, C={4,6},


and D = {4,6,8}. Determine which of these
sets are subsets of which other of these
sets.

Ans: Every set is a subset of itself


A and D are not subsets of any other set
listed
B is a subset of A
C is a subset of both A and D
Let A = {a,b,c,d} and B = {y,z} Find
a.) A x B
Ans:
8 sets
{(a,y), (a,z), (b,y), (b,z), (c,y), (c,z),
(d,y), (d,z)}

b.) B x A
Ans:
{(y,a), (y,b), (y,c), (y,d), (z,b), (z,c),
(z,d)}
FUNCTIONS

Functions can be represented graphically in


several ways:
RELATIONS
 Relationships between elements of
sets are represented using the
structure
 Relationship between a program and
its variables
 Pairs of cities linked by airline flights
in a network
 Most direct way to express a
relationship between elements of
two sets is to use ordered pairs.
 Ordered pairs = binary relations

Binary relation Definition: Let A and B be


two sets. A binary relation from A to B is a
subset of a Cartesian product A x B.
 Let R  A x B means R is a set of
ordered pairs of the form (a,b) where
a  A and b  B.
 We use the notation a R b to denote
(a,b)  R and a R b to denote (a,b)
 R. If a R b, we say a is related to b
by R
Example: Let A={a,b,c} and B={1,2,3}.
 Is R={(a,1),(b,2),(c,2)} a relation
from A to B? Yes.
 Is Q={(1,a),(2,b)} a relation from
A to B? No.
 Is P={(a,a),(b,c),(b,a)} a relation
from A to A? Yes
Representing binary relations • We can
graphically represent a binary relation R as
follows: • if a R b then draw an arrow from a
to b. a  b

Example: • Let A = {0, 1, 2}, B = {u,v} and R


= { (0,u), (0,v), (1,v), (2,u) } • Note: R  A x
B.

RELATION PROPERTIES
Six properties of relations we will study:
 Reflexive
 Irreflexive
 Symmetric
 Asymmetric
 Antisymmetric
 Transitive
Definition (reflexive relation) : A relation R
on a set A is called reflexive if (a,a)  R for
every element a  A.

Example 1:
 Assume relation Rdiv ={(a b), if a |b}
on A = {1,2,3,4}
 Is Rdiv reflexive?
 Rdiv = {(1,1), (1,2), (1,3), (1,4), (2,2),
(2,4), (3,3), (4,4)}
 Answer: Yes. (1,1), (2,2), (3,3), and
(4,4)  A.
 Rdiv ={(a b), if a |b} on A = {1,2,3,4}
 Rdiv = {(1,1), (1,2), (1,3), (1,4), (2,2),
(2,4), (3,3), (4,4)}
 A relation R is reflexive if and only if
MR has 1 in every position on its
main diagonal.
 Relation Rfun on A = {1,2,3,4}
defined as:
 Rfun = {(1,2),(2,2),(3,3)}.
 Is Rfun reflexive?
 No. It is not reflexive since (1,1) 
Rfun.

Properties of relations Definition


(irreflexive relation): A relation R on a set
A is called irreflexive if (a,a)  R for every a
 A.

Example 1:
 Assume relation R≠ on A={1,2,3,4},
such that a R≠ b if and only if a ≠ b.
 Is R≠ irreflexive?
 R≠ = …
 Assume relation R≠ on A={1,2,3,4},
such that a R≠ b if and only if a ≠ b
 Is R≠ irreflexive?
 R≠={(1,2),(1,3),(1,4),(2,1),(2,3),(2,4),
(3,1),(3,2),(3,4),(4,1),(4,2),(4,3)}
 Answer: Yes. Because (1,1),(2,2),
(3,3) and (4,4)  R≠
 R≠ on A={1,2,3,4}, such that a R≠ b
if and only if a ≠ b.
 R≠={(1,2),(1,3),(1,4),(2,1),(2,3),(2,4),
(3,1),(3,2),(3,4),(4,1),(4,2),(4,3)}
 A relation R is irreflexive if and only
if MR has 0 in every position on its
main diagonal.
 Rfun on A = {1,2,3,4} defined as:
 Rfun = {(1,2),(2,2),(3,3)}.
 Is Rfun irreflexive?
 Answer: No. Because (2,2) and (3,3)
 Rfun

Definition (symmetric relation): A relation


R on a set A is called symmetric if
 a, b  A (a,b)  R  (b,a)  R.

You might also like