ENS1161D_A2_v27_ECC_1_2017.doc
Page 2 of 8
Question 1
Consider the functions f, g and h, all defined on the set {0, 1, 2, 3, …, 12}
x
0
1
2
3
4
5
6
7
8
9
10
11
12
f(x)
0
5
10
4
3
1
12
7
11
9
2
8
6
x
0
1
2
3
4
5
6
7
8
9
10
11
12
g(x)
5
4
11
0
6
10
2
7
1
12
9
8
3
x
0
1
2
3
4
5
6
7
8
9
10
11
12
h(x)
3
6
0
10
9
5
2
12
1
7
11
4
8
(i)
Write down the values of:
g(f(h(7))) and h
–1
(g
–1
(3))
(ii)
Construct a table of values (like those shown above) for h(g
–1
(x)).
(iii)
Construct a table for f(f(x)).
What can you conclude about the inverse of f?
(iv)
Construct a table for h
–1
(x), and draw its graph on the grid provided on the last page.
[5 marks]
Question 2
Suppose there is a set of growers G = {a, b, c, d}, a set of retailers R = {e, f, g} and a set of customers
C = {m, n, p, q, r}.
There are two relations A and B
on
G
R
and R
C, respectively, defined by:
aAf, bAe, bAg, cAg, dAf,
and
eBn, fBp, fBq, gBm, gBr
xAy
means
"grower x sold goods to retailer y", and
yA
–1
x means "retailer y bought goods from grower x"
xBy
means
"retailer x sold goods to customer y", and
yB
–1
x means "customer y bought goods from retailer x"
(i)
Find the matrices M(A) and M(B) that represent the relations A and B.
(ii)
Find the matrices M(A)
T
and M(B)
T
that represent the relations A
–1
and B
–1
(iii)
Consider the query:
Which customers have received goods that came from
the same grower(s) as those goods received by customer p?
Find the logical matrix products
M(A) M(B) and then M(B)
T
M(A)
T
, and finally
M(B)
T
M(A)
T
M(A) M(B), and hence answer the query.
[ Hint:
To see a similar exercise, look at the "Application" on page 13 of Lecture 5.]
[1 + 1 + 3 = 5 marks]