Mock Exam

advertisement
Maths for Computing 2007-8
Mock Exam
10th December 2007
Time: 2 hours
Part 1
Answer all questions (10 marks per question)
1)
Convert the following decimal numbers to binary.
a)
b)
c)
510 (1.5 marks)
1310 (1.5 marks)
2210 (1.5 marks)
Convert the following binary numbers to hexadecimal
d)
e)
f)
11012 (1.5 marks)
010110012 (2 marks)
101011112 (2 marks)
2)
Which of the following statements are propositions? If the statement is a
proposition, give the truth value. (Give your reasoning)
(2 marks per part)
a)
b)
c)
d)
e)
3)
Amsterdam is the capital city of Belgium
Jane is a good boy
Feed the cat!
2+2 = 4
x <= 5
Give truth tables for the following expressions:
a)
b)
c)



~p
(p  q)
(~ p  q)  r
(2 marks)
(3 marks)
(5 marks)
4)
Give the enumerated form of the following sets:
a)
b)
c)
{x  N: 1 < x <= 20 and x is divisible by 4 (with no remainder)}
(3 marks)
{x  J: -2 < x < 4} (3 marks)
{x  J: x is divisible by 3 (with no remainder)} (4 marks)
5)
Give the predicate form of the following sets:
a)
{3, 6, 9, 12, 15, 18} (3 marks)
b)
{…, -6, -4, -2, 0, 2, 4, 6,…} (3 marks)
c)
{1, 0.5, 0.333Ý, 0.25, 0.2, …} (4 marks)
6)
If A = {a,b,c,d,e} and B = {0, 1}, give the following cross-products:

a)
B X A (4 marks)
b)
A X A (6 marks)
7)
Give the directed graph and matrix representation for the following relation,
acting on set C = {w,x,y,z}:
R1 = {(w,w),(w,x),(w,y),(x,w),(x,x),(x,y),(x,z),(y,w),(y,x),(y,y),(z,w),(z,y),(z,z)}
8)
State whether the following relations, all acting on the set of integer numbers,
are reflexive, irreflexive, symmetric, anti-symmetric or transitive. Also state whether
the relations are equivalence or partial order relations. Give reasoning
a) xRy if and only if x < y
b) xRy if and only if (x + y) >= 7
(5 marks)
(5 marks)
Part 2
Answer only four questions (16 marks per question)
9)
a) Prove De Morgan’s Law: A  B  A  B , using Venn diagrams.
(8 marks)
b) Prove the equivalence law: p  q  (p  q)  (q  p) using truth tables

(8 marks)
10)
Given the following 
sets:  = {x  N: x < 20}, A = {x: x is even}, B = {x: 4
< x < 13}, C = {x: x is divisible by 4}. Illustrate the following sets on Venn diagrams
and hence give their enumerated form. (4 marks per part)
a)
A 
b)

c)
A  C
d)
 C)


C




Given the following sets: D = {a,b,c,d,e} and E = {0,1,2,3} plus the relations
R1 (between sets D and E) =
{(a,0),(a,1),(a,2),(a,3),(b,0),(b,1),(b,3),(c,2),(d,1),(d,2),(e,0),(e,3)}
and R2 (between set E and E) =
{(0,0),(0,1),(0,2),(0,3),(1,1),(1,2),(1,3),(2,2),(2,3),(3,3)}
a)
Give the matrix representation of R1 (4 marks)
b)
Give the directed graph for R1 (4 marks)
c)
Give the matrix representation of R2 (4 marks)
d)
State whether R2 is reflexive, irreflexive, symmetric, anti-symmetric
and/or transitive, giving reasoning. (3 marks)
e)
Is R2 an equivalence or partial order relation? (give your reasoning)
(1 mark)
12)
State whether the following are well-defined functions. If they are, give the
Domain, Co-domain and Range and state whether the functions are one-to-one and/or
onto. If they are not, give your reasoning. (4 marks per part)
a)
b)
c)
d)
f: N → N, f(x) = 3x
g: R → J, g(x) = integer part of x
h: {1,2,3,4} → {0,1,2,3,4,5}, h(x) = x - 1
a: J → J, a(x) = x2
13)
For the following functions give the composite functions below. Bonus
marks for full simplification of the resultant expression.
f(x) = 3x + 2, g(x) = 2x2 - 1, h(x) = (x + 1)/2 : (4 marks per part)
a)
b)
c)
d)
hof
fog
hog
h-1(x)
Download