Questions
MAT210/CS110 FEB 2016
UNIVERSITI TEKNOLOGI MARA
PAHANG
TEST 2 MAT210
1 hour
Score
Full
marks
Name
ID UiTM
TOTAL
30
Lecturer
(Answer ALL Questions. Please attach your solution to question paper.)
1. Let R be a relation on A 1,4,7,10 , such that R is defined as
R a, b : a b 3, for all a, b A
a. List all the elements of R.
b. Determine if R is reflexive, symmetric, anti-symmetric and transitive. Give reason(s)
for your answer.
(7 marks)
2. Given the set A x Z : 3 x 3. If A1 and A2 are subsets of A such that
A1 x : x is odd and A2 x : x is even.
Determine if A1 and A2 form a partition of A. Provide reason(s) for your answer.
(3 marks)
3. Let
a.
b.
c.
d.
f : Z Z such that f x x 1.
Sketch the graph of f.
State the domain and range of f.
Determine if the function f is one-to-one. Give a reason for your answer.
Determine if the function f is onto. Give a reason for your answer.
(4 marks)
0.03
4. Find the value of
trunc 2.01
3.4
.
(2 marks)
5. Consider the following graph as shown in Figure 1.
Figure 1
a.
b.
c.
d.
e.
State a path of length 4 from vertex A to vertex I.
Does an Eulerian circuit exist in the graph? If it does not exist, give a reason.
Find a Hamiltonian circuit, if any. If it does not exist, give a reason.
Draw a connected subgraph containing all the vertices.
Draw a spanning tree with root at vertex D.
(7 marks)
6. Draw a full binary tree that represents the following mathematical expression.
a
d
c
1
b
xy
a. List down all the leaves.
b. State the ancestors of vertex x.
c. Determine the size of the tree.
(7 marks)
END OF QUESTION PAPER
Test 2 MAT210 February 2016
Suggested Solution
Question 1
a. R 1, 1, 1, 4, 1, 7, 1, 10 , 4,1, 4,4, 4,7, 4,10 , 7,4, 7,7, 7,10 , 10,7, 10,10
b. R is reflexive because for every x A , then x, x R .
R is not symmetric because 1,7 R but 7,1 R .
R is not anti-symmetric because 1,4 and 4,1 R , but 1 4 .
R is not transitive because 7,4 and 4,1 R , but 7,1 R .
Question 2
A 3,2,1,0,1,2,3 and subsets A1 - 3,-1,1,3, A2 - 2,0,2
, hence A1 and A2 form a partition of A.
A1 A2 A and A1 A2 O
Question 3
a.
7
6
5
4
3
2
1
b. Domain x : x Z and Range y : y Z , y 1
c. The function f is one-to-one because for every x1, x 2 Z , f x1 f x 2 if and only if
x1 x 2 .
d. The function f is not onto because the range of f is not equal to the codomain of f.
Question 4
0.03
trunc 2.01
3.4
1 4
4
2 16
2
Question 5
a. Path of length 4: A B E H I
( or any other acceptable answer)
b. Eulerian circuit does not exist in the graph because there are vertices with odd
degree.
c. Hamiltonian circuit exist: A B E I H D F G C A
(or any other acceptable answer)
d.
e.
D
Question 6
^
b
/
x
a. Leaves: a, c, d, b, 1, x, y, 1, 2
b. Ancestors of x: *, / , +, ^
c. Size of the tree: 17