DM 2022 Spring MID
DM 2022 Spring MID
ID NUMBER: SECTION:
MIDTERM EXAMINATION
1 HOUR 30 MINUTES
EXAMINATION DURATION:
ADDITIONAL MATERIALS
ALLOWED TO BE USED:
(1) FOLLOW ANY INSTRUCTIONS GIVEN BY PROCTORS.
COMPLIANCE IS REQUIRED! DO NOT ARGUE WITH A PROCTOR,
YOU GET "F" FOR MISBEHAVING + other possible complications.
SPECIAL INSTRUCTIONS
(2) ONCE YOU ARE ALLOWED TO OPEN THE EXAMINATION BOOKLET,
YOU MUST PUT ONLY YOUR ID ON EVERY ODD PAGE
(do NOT write your name)
DISCRETE Mathematics MSC 2050 Mid-term exam - Page 2 of 6 8th week of Spring 2023
STUDENT’s ID:
2. (6 points)Encircle the true statements. There are penalty points for wrong answers.
• Cardinality of the union of two finite sets is equal to the sum of their cardinalities
• Countable union of countable sets is also countable.
• Power set of countable set is also countable.
• If A = {, b, c} and B = {1, 2, 3, 4} then there is onto function from B to A.
• Any subset of uncountable set is also uncountable.
• If A = {, b, c} and B = {, b} then A ∩ B = B
• The set of rational numbers is uncountable set.
• There is a one-to-one correspondence from Q to N
DISCRETE Mathematics MSC 2050 Mid-term exam - Page 3 of 6 8th week of Spring 2023
3. (7 points)Solve the problems given below:
a) (4 points)Write an algorithm in pseudocode which multiplies two 3 × 3 matrices.
b) (3 points)Give big-O estimate for the number of additions.
DISCRETE Mathematics MSC 2050 Mid-term exam - Page 4 of 6 8th week of Spring 2023
STUDENT’s ID:
4. (8 points)Find 11644 mod 645 using the algorithm of Modular exponentiation by following the steps:
a) (1 point)Find binary expansion of 644
b) (2 points)How many steps in this algorithm(loop)?
b) (3 points)Write each step of the algorithm into table.
c) (2 points)Can we apply Fermat’s little theorem to this problem? Justify.
644 = ________________________2
i poer
DISCRETE Mathematics MSC 2050 Mid-term exam - Page 5 of 6 8th week of Spring 2023
5. (5 points)Encrypt the message STOP POLLUTION using Caesar cipher for k=23:
DISCRETE Mathematics MSC 2050 Mid-term exam - Page 6 of 6 8th week of Spring 2023