COMP11120
Two hours
Note that the last two pages contain inference reules for natural deduction
UNIVERSITY OF MANCHESTER
SCHOOL OF COMPUTER SCIENCE
Mathematical Techniques for Computer Science
Date: Tuesday 19th January 2016
Time: 14:00 - 16:00
Please answer ALL THREE Questions
Use a SEPARATE answerbook for each SECTION.
This is a CLOSED book examination
The use of electronic calculators is permitted provided they are not programmable and do not store text
[PTO]
, COMP11120
Section A
1. a) Give a situation in which you, as a programmer, might be concerned with a function
being injective. How might you check that your implementation does indeed give
an injective function? (3 marks)
b) Consider the following function:
C C
z z · z.
i) Is this function injective? Justify your answer. (2 marks)
ii) Is this function surjective? Justify your answer. (5 marks)
c) Consider the binary operation on the set {a, b, c} given by the following table.
~ a b c
a a a c
b a b c
c a c c
i) Is the given operation commutative? Give a reason for your answer.
(2 marks)
ii) Is the given operation associative? Give a reason for your answer.
(4 marks)
d) Show that if
f:S T and g: T U
are two bijective functions then so is their composite (4 marks)
g◦ f : S U.
Page 2 of 7
Two hours
Note that the last two pages contain inference reules for natural deduction
UNIVERSITY OF MANCHESTER
SCHOOL OF COMPUTER SCIENCE
Mathematical Techniques for Computer Science
Date: Tuesday 19th January 2016
Time: 14:00 - 16:00
Please answer ALL THREE Questions
Use a SEPARATE answerbook for each SECTION.
This is a CLOSED book examination
The use of electronic calculators is permitted provided they are not programmable and do not store text
[PTO]
, COMP11120
Section A
1. a) Give a situation in which you, as a programmer, might be concerned with a function
being injective. How might you check that your implementation does indeed give
an injective function? (3 marks)
b) Consider the following function:
C C
z z · z.
i) Is this function injective? Justify your answer. (2 marks)
ii) Is this function surjective? Justify your answer. (5 marks)
c) Consider the binary operation on the set {a, b, c} given by the following table.
~ a b c
a a a c
b a b c
c a c c
i) Is the given operation commutative? Give a reason for your answer.
(2 marks)
ii) Is the given operation associative? Give a reason for your answer.
(4 marks)
d) Show that if
f:S T and g: T U
are two bijective functions then so is their composite (4 marks)
g◦ f : S U.
Page 2 of 7