IS184101 - LDS - GASAL - 2019 - QB - FINALEXAM - V01 - ALL - MARKING - SCHEME - UPDATED - 46. Umar AlHaddad
IS184101 - LDS - GASAL - 2019 - QB - FINALEXAM - V01 - ALL - MARKING - SCHEME - UPDATED - 46. Umar AlHaddad
Answer ALL the following questions in any order and complete each answer with a brief
justification!
ANSWER:
a. A = {1, -1};
B = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11};
C = {0, 1, 4, 9, 16, 25, 36, 49, 64, 81};
D = (since 2 is not an integer)
b. P (A) = {, {1}, {-1}, {1, -1}};
c. Yes (The empty set is a subset of all sets (including itself!))
d. No (The empty set is a proper subset of all sets other than the empty set)
e. B – C = {2, 3, 5, 6, 7, 8, 10, 11}; |B - C| = 8
f. A ⊕ B = {-1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11};
g. C D =
MARKING SCHEME:
Point (a) counts for 4 marks, 1 mark for each correct list of the set member(s)
Point (c) and (d) count for 1 mark
Each correct answer for point (b), (e), (f) and (g) count for 2 marks.
1
FINAL EXAMINATION
SEMESTER GASAL 2019/2020
Bachelor’s Degree in Information Systems Program
Faculty of Information and Communication Technology
Institut Teknologi Sepuluh Nopember
Sukolilo Campus, Surabaya 60111. 031 – 5999944
ANSWER:
a. Quotient (q) = -1; Remainder (r) = 22
b. 90 mod 24 = 18; 18 hours before 11:00 = 17:00
c. We just need to start at -1 and repeatedly subtract or add 25 until we exceed the desired
range. Thus, the negative values we seek are -1, -26, -51, and -76, and the positive values
are 24, 49, 74, and 99.
d. Two numbers are relatively prime, if they have no common factor except 1. The positive
integers less than 12 are {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}. 12 and {2, 4, 6, 8, 10} have 2 as a
common factor. 12 and {3, 9} have 3 as a common factor. {1, 5, 7, 11} are left. These
numbers have no common factor with 12 except 1.
MARKING SCHEME:
Each correct answer with a brief justification counts 3 points.
Each correct answer without a brief justification counts 1.5 points.
ANSWER:
a. There are 26 - 5 = 21 non-vowels (consonants) choices for the first slot in our string, but
only 20 choices for the second slot, 19 for the third, and so on. So, the answer is 21 · 20 ·
19 · 18 · 17 · 16 · 15 · 14 = 8,204,716,800.
b. This is similar to part (a), except that there are only five choices in the first slot, and we are
free to choose from all the letters not used so far, rather than just the consonants. Thus,
the answer is 5 · 25 · 24 · 23 · 22 · 21 · 20 · 19 = 12,113,640,000.
c. The best way to do this is first to decide where the vowel goes (8 choices), then to decide
what the vowel is to be (A, E, I, O, or U – 5 choices), and then to fill the remaining slots with
any consonants (217 choices, since one slot has already been filled). Therefore, the answer
is 8 · 5 · 217 = 72,043,541,640.
MARKING SCHEME:
Each correct answer with a brief justification counts 3 points.
2
FINAL EXAMINATION
SEMESTER GASAL 2019/2020
Bachelor’s Degree in Information Systems Program
Faculty of Information and Communication Technology
Institut Teknologi Sepuluh Nopember
Sukolilo Campus, Surabaya 60111. 031 – 5999944
4. [MARK 10] Using mathematical induction prove that the sum of the first n even positive integers
ANSWER:
Step 1: Base case: We prove that it is correct for the smallest value of n, i.e. 1. Show P(1) is true:
1
P(1) = 2(i ) = 12 + 1
i =1
=2=2
Step 2: Hypothesis Step: We assume that it is correct for integer k, i.e. we assume that P(k) is true.
k
P(k ) = 2i = k 2 + k
i =1
Step 3: Inductive step: We prove that, given the assumption on step 2, it also true for k+1.
We show that P(k+1) is true
k +1
P(k + 1) = 2i = (k + 1) 2 + (k + 1)
i =1
k +1
2i = (k + 1)
i =1
2
+ k +1
k
2(k + 1) + 2i = (k + 1) 2 + k + 1
i =1
2(k + 1) + k 2 + k = (k + 1) 2 + k + 1
k 2 + 3k + 2 = k 2 + 3k + 2
The last equation shows that P(k+1) is true.
MARKING SCHEME:
Step 1 counts for 2 marks
Step 2 counts for 2 marks
Step 3 counts for 6 marks
3
FINAL EXAMINATION
SEMESTER GASAL 2019/2020
Bachelor’s Degree in Information Systems Program
Faculty of Information and Communication Technology
Institut Teknologi Sepuluh Nopember
Sukolilo Campus, Surabaya 60111. 031 – 5999944
2 4 5 20
3 2 7 27
3 3 7 34
3 4 7 41
4 3 9 50
4 4 9 59
MARKING SCHEME:
Correct answer without justification (the table) counts for 4 marks.
Correct answer with correct justification (the table) counts for 6 marks.
Wrong answer with partially correct justification (the table): each correct step counts for 1 mark.
ANSWER:
a. f (5) = 5 + f (4) = 5 + 4 + f (3) = 5 + 4 + 3 + f (2) = 5 + 4 + 3 + 20 = 32
b. f (5) – f (2) = 32 – 20 = 12
MARKING SCHEME
Each correct answer with correct justification counts for 5 marks
Each correct answer without justification count for 2 marks
Define the properties of the following relations, whether reflexive, irreflexive, symmetric,
asymmetric, anti-symmetric, and transitive respectively as 6-bit string (1 represents yes, 0
4
FINAL EXAMINATION
SEMESTER GASAL 2019/2020
Bachelor’s Degree in Information Systems Program
Faculty of Information and Communication Technology
Institut Teknologi Sepuluh Nopember
Sukolilo Campus, Surabaya 60111. 031 – 5999944
represents 0). For instance, if the relation has all the properties except reflexive and symmetric the
bit string will be: 010111.
a. R4
b. R1 o R2
c. R2 Ս R3
ANSWER:
R1 = {(a, b) | b = a+1} = {(1, 2), (2, 3), (5, 6)}
R2 = {(a, b) | b = a+2} = {(1, 3), (3, 5), (6, 8), (8, 10)}
R3 = {(a, b) | b = 2a} = {(1, 2), (3, 6), (5, 10)}
R4 = {(a, b) | b ≥ a} = {(1, 2), (1, 3), (1, 5), (1, 6), (1, 8), (1, 10), (2, 2), (2, 3), (2, 5), (2, 6), (2, 8), (2, 10),
(3, 3), (3, 5), (3, 6), (3, 8), (3, 10), (5, 5), (5, 6), (5, 8), (5, 10), (6, 6), (6, 8), (6, 10), (8, 8), (8, 10), (10, 10)}
a. R4 = {(1, 1 ), (1, 2), (1, 3), (1, 5), (1, 6), (1, 8), (1, 10), (2, 2), (2, 3), (2, 5), (2, 6), (2, 8), (2, 10), (3,
3), (3, 5), (3, 6), (3, 8), (3, 10), (5, 5), (5, 6), (5, 8), (5, 10), (6, 6), (6, 8), (6, 10), (8, 8), (8, 10), (10,
10)}
R4 is reflexive since a (a, a) R4. R4 is not irreflexive since a (a, a) R4. R4 is not
symmetric since there is (1, 2) but (2, 1) is not in R4. R4 is not asymmetric since there is (1, 1)
in R4. R4 is anti-symmetric since a, b A, ((a, b) R (b, a) R4) a=b; or a, b A,
((a, b) R a b) (b, a) R4). R4 is transitive.
R I S As An T
1 0 0 0 1 1
c. R2 Ս R3 = {(1, 2), (1, 3), (3, 5), (3, 6), (5, 10), (6, 8), (8, 10)}
R2 Ս R3 is not reflexive since there is no (1, 1), (2, 2) and so on. R2 Ս R3 is irreflexive. R2 Ս R3
is not symmetric since there is no (2, 1). R2 Ս R3 is asymmetric, anti-symmetric, but not
transitive since there is (1,3) and (3,6) but there is not (1,6).
R I S As An T
0 1 0 1 1 0
MARKING SCHEME
Each point (a-c) counts for 5 marks.
In each point, for each wrong item (R, I, … T) subtracts 1 mark.
5
FINAL EXAMINATION
SEMESTER GASAL 2019/2020
Bachelor’s Degree in Information Systems Program
Faculty of Information and Communication Technology
Institut Teknologi Sepuluh Nopember
Sukolilo Campus, Surabaya 60111. 031 – 5999944
8. [MARK 20] Graph is defined is a set of nodes or vertices V and set of edges E that connect two
adjacent nodes, i.e. G= {E, V}. A graph is very powerful discrete structure used in computer
science to solve many difficult computational problems. One of the applications is used to solve
course timetabling problem. In this case, a course is represented as a node or vertex; if two
courses have common students meaning that the two courses can not be scheduled in the same
time, the two nodes representing the two courses are connected by an edge. The course
timetabling problem then could be considered as graph coloring problem. Given that a color
represents a time slot and two adjacency nodes (connected by an edge) cannot be assigned with
the same color representing the time slot, the problem is to color every node in the graph using
total number of different colors as minimum as possible.
Below is an adjacency matrix representing a graph for a course timetabling problem, the value 1
in the cell represents that the courses in the respective row and column could not be assigned in
the same color or in other words adjacent to each other, 0 represents the vice versa:
r/c A B C D E F
A 0 1 0 0 1 0
B 1 0 0 0 1 0
C 1 0 0 1 0 0
D 0 1 1 0 0 0
E 1 1 0 0 0 1
F 0 0 0 0 1 0
ANSWER:
a. The graph should show like this:
6
FINAL EXAMINATION
SEMESTER GASAL 2019/2020
Bachelor’s Degree in Information Systems Program
Faculty of Information and Communication Technology
Institut Teknologi Sepuluh Nopember
Sukolilo Campus, Surabaya 60111. 031 – 5999944
b. From the description in question 8, we know that: a color represents a time slot and two
adjacency nodes (connected by an edge) cannot be assigned with the same color. Intuitively, we
can color the nodes with minimum 3 colors as shown by the figure. Please have a look that there
is not any edge connect two nodes with the same color.
MARKING SCHEME
a. Correct graph counts for 10 marks (deduct evenly for partially correct graph).
b. Correct answer with brief justification counts for 10 marks.