Reflection

I scored a 47/50, 94%

Q1

My answer: (B) 70 seconds

Correct answer: (C) 80 seconds

Q34

My answer: (C) Show that for one instance of the problem, a heuristic is needed to write an algorithm that is capable of providing a correct yes-or-no answer.

Correct answer: (B) Show that for one instance of the problem, no algorithm can be written that is capable of providing a correct yes-or-no answer.

This statement does not provide enough information to conclude that the problem is undecidable. This states that a heuristic is used for one instance of the problem. If it could be shown that an algorithm can be constructed that is always capable of providing a correct yes-or-no answer for all other instances of this problem, then this problem would be decidable.

A decidable problem is one for which an algorithm can be constructed to produce a correct output for all inputs. If, for one instance of the problem, this is not possible, then this problem cannot be decidable. Therefore, it must be undecidable.

Q49

My answer: (C)

Correct answer: (A)

This code segment traverses the list beginning with the second element, so it is correctly comparing only the student scores to the maximum possible score. However, the code segment will fail to check the last element in the list. When index is equal to the length of the list, the loop will terminate without comparing the last student score in the list to the maximum possible score.

The correct code segment traverses the list beginning with the second element, so it is correctly comparing only student scores to the maximum possible score, which is found by accessing scores[1]. The variable found will only be set to true when a student’s score equals the maximum possible score. The code also sets the number of iterations to LENGTH(scores) - 1 to reflect that the first list element (maximum score) is skipped.