Computer Science
Algorithms, databases and logic
- 1.
A sorted list contains 1024 distinct items. Explain binary search and give the worst-case number of midpoint comparisons to find an item or establish it is absent.
[4 marks] · no calculator - 2.
A table Enrolment(StudentID, StudentName, CourseID, CourseName) uses (StudentID, CourseID) as its key. StudentID determines StudentName and CourseID determines CourseName. Explain the normalisation problem and propose a decomposition into second normal form.
[4 marks] · no calculator - 3.
Simplify NOT(A AND B) using De Morgan's law. Evaluate the result when A = true and B = false.
[3 marks] · no calculator
Marking points are indicative, not an official mark scheme. Accept equivalent valid methods and supported interpretations that address the task; award each mark once without requiring the model wording.