A declarative language is used to represent the following facts about a school. 01 teaches(alan, mathematics). 02 teaches(ioana, geography). 03 teaches(nina, history). 04 teaches(alan, statistics). 05 06 studies(ahmed, history). 07 studies(freya, history). 08 studies(kim, history). 09 studies(freya, geography). 10 studies(hua, mathematics). 11 studies(hua, statistics). 12 studies(hua, geography) 13 14 tutors(alan, kim). 15 tutors(alan, hua). 16 tutors(alan, freya). 17 tutors(nina, ahmed). These clauses have the following meaning: Clause Meaning 01 Alan teaches mathematics. 06 Ahmed studies history. 14 Alan is Kim's tutor.
- (a)More facts are to be included. Sam studies history and Nina is his tutor. Write the additional clauses to record these facts. 18 19[2]
- (b)Using the variable Student, the goal: studies (Student, history) returns Student = freya, ahmed, kim Write the result returned by the goal: studies (Student, geography) Student =[1]
- (c)Write the goal, using the variable X, to find all the students who have a tutor that teaches them. For example, Hua has Alan for a tutor and is also taught mathematics by Alan.[4]
Mark scheme
Marking points from the official mark scheme (May/June 2022). The mark or mark type is shown in brackets.
- [2] studies (sam, history). tutors(nina, sam).
- [1] freya, hua // hua, freya
- [4] one mark for correct use of X one mark for two other variables in correct positions one mark for three correct clauses in any order one mark for correct syntax teaches (R, S), studies (X, S), tutors(R, X).
Write your answer and get it marked
On Oracle Prep you can write or photograph your own answer and have it marked by AI against this mark scheme, with feedback on what you missed.
Sign up free →