0% found this document useful (0 votes)
24 views7 pages

IS184101 - LDS - GASAL - 2019 - QB - FINALEXAM - V01 - ALL - MARKING - SCHEME - UPDATED - 46. Umar AlHaddad

The document is a final examination for a Bachelor's Degree in Information Systems program. It contains 7 questions testing logic and discrete mathematics concepts. The exam is closed book, to be taken on Friday, December 13, 2019 for 100 minutes. The questions cover topics like sets, number theory, combinatorics, and recursive functions.

Uploaded by

zerasand
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views7 pages

IS184101 - LDS - GASAL - 2019 - QB - FINALEXAM - V01 - ALL - MARKING - SCHEME - UPDATED - 46. Umar AlHaddad

The document is a final examination for a Bachelor's Degree in Information Systems program. It contains 7 questions testing logic and discrete mathematics concepts. The exam is closed book, to be taken on Friday, December 13, 2019 for 100 minutes. The questions cover topics like sets, number theory, combinatorics, and recursive functions.

Uploaded by

zerasand
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

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

Course : Logic and Discrete Structure CLASS : A, B, C, D, IUP

Convenor : Ahmad Muklason, Eko Wahyu Tyas D. Type : CLOSED BOOK

Time Limit : 100 minutes Day/Date : FRIDAY, 13/12/2019

Answer ALL the following questions in any order and complete each answer with a brief
justification!

1. [MARK 14] Some sets are defined as follows:


A = {x | x is a real number such that x2 = 1}
B = {x | x is a positive integer less than 12}
C = {x | x is the square of an integer and x < 100}
D = {x | x is an integer such that x2 = 2}

Answer the following questions based on the sets listed on question 1?


a. List the member(s) of each set.
b. Power set of A.
c. is D subset of A?
d. is  proper subset of D?
e. |B - C| =
f. A⊕B=
g. C  D =

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

2. [MARK 12] Find each of these values.


a. The quotient and remainder when−1 is divided by 23.
b. 90 hours before it reads 11:00 on a 24-hour clock.
c. Integers between −100 and 100 that are congruent to −1 modulo 25
d. Positive integers less than 12 which are relatively prime to 12

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.

3. [MARK 9] How many strings of eight English letters are there:


a. that contain no vowels, if letters cannot be repeated?
b. that start with a vowel, if letters cannot be repeated?
c. that contain exactly one vowel, if letters can be repeated?

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

Each correct answer without a brief justification counts 1.5 points.

4. [MARK 10] Using mathematical induction prove that the sum of the first n even positive integers

is n2+ n or in formal way:

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

5. [MARK 10] What is the value of S, defined as


ANSWER:
The looping can be illustrated as follow:
i j 2i + 1 S
2 1 5 5
2 2 5 10
2 3 5 15

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

So, we get the final value of S is 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.

6. [MARK 10] Suppose a function f, is defined recursively as:


function f (x: a positive integer) {
if x=1, return 10
if x=2, return 20
else, return x + f(x-1)
}

What is the value of the following functions?


a. f (5)
b. f (5) – f (2)

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

7. [MARK 15] Suppose set A is defined as A = {10, 8, 6, 1, 2, 3, 5} and Rn is a relation defined as


follow:
R1 = {(a, b) | b = a+1}
R2 = {(a, b) | b = a+2}
R3 = {(a, b) | b = 2a}
R4 = {(a, b) | b ≥ a}

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

b. if (a, b)  R2 and (b, c)  R1, then (a, c)  R1 o R2,


so, we got R1 o R2, = {(3,6)}
R1 o R2 is not reflexive since there is no (1, 1), (2, 2) and so on. R 1 o R2 is irreflexive. R1 o R2
is not symmetric since there is no (6, 3). R1 o R2 is asymmetric, antisymmetric, and transitive.
R I S As An T
0 1 0 1 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

a. Draw the graph represented by the matrix


b. Intuitively, without using any algorithm, how many color (minimum) required to color the
graph? Or in other words, how many time slots (minimum) required to timetable the
courses?

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.

You might also like