Problem 22: (4 points)
What time does a 12-hour clock read 78 hours after it reads 09:00?
a) 03:00
b) 02:00
c) 01:00
d) 00:00
Problem 23: (4 points)
Using Greedy Algorithm, which of the talks should be chosen from the following proposed set of talks
to schedule the largest number of talks?
Talks Starting Time Ending Time
Talk 1 09:00 09:30
Talk 2 09:00 09:15
Talk 3 09:20 10:00
Talk 4 10:00 10:20
Talk 5 10:00 10:15
Talk 6 10:15 11:15
a) Talk 1, Talk 3, Talk 5, Talk 6
b) Talk 2, Talk 3, Talk 5, Talk 6
c) Talk 1, Talk 3, Talk 4, Talk 6
d) Talk 2, Talk 3, Talk 4, Talk 6
Problem 24: (4 points)
A palindrome is a string that reads the same forward and backward. Put the following steps of an
algorithm, which determines whether a string of n characters is a palindrome, in the correct order.
1. if $a_i \neq a_{n+1-i}$ then answer: no
2. return answer
3. answer: yes
4. procedure palindrome ($a_1, a_2, \dots, a_n$ : integers)
5. for $i := 1$ to $\lfloor n/2 \rfloor$
a) 4, 3, 5, 1, 2
b) 4, 1, 5, 2, 3
c) 4, 5, 3, 1, 2
d) 3, 4, 1, 2, 5
Problem 25: (4 points)
What is the greatest common divisor of $2^7 \cdot 3^8 \cdot 7^7$ and $2^8 \cdot 5^5 \cdot 7^4 \cdot 11^2$.
a) $2^7 \cdot 7^7$
b) $2^7 \cdot 3^8 \cdot 7^4$
c) $2^8 \cdot 3^8 \cdot 5^5 \cdot 7^7 \cdot 11^2$
d) $2^7 \cdot 7^4$
6