Question 25 2013 · October-November · Paper 33 · 88 marks
Reveal official mark-scheme answer
The answer for this question is in the official mark scheme: open the mark scheme.
Show text version of question
Question 25
passed_theory_test(X) AND passed_driving_test(X, V).
These clauses have the following meaning:
Clause Explanation 1 The minimum age for a car licence is 18 8 Shen is aged 21 13 Tain has a licence Person X is able to drive vehicle V if person X has a 15 licence, and the age A of person X is greater than or equal to the minimum age L to drive vehicle V
Question 11
Part (a)
List the clause numbers for the rules in this knowledge base. For
Examiner's Use
Part (b)
Show the output produced from theses clauses:
(i)
passed_driving_test(Who, car).
(ii)
able_to_drive(ho, motorbike).
(iii)
NOT(has_licence(shen)).
Part (c)
Write a clause to output:
(i)
all qualified motorbike drivers.
(ii)
all drivers who have passed the theory test but not a driving test.
Question 12
Part (d)
To produce the output from a clause, the inference engine uses a process called For
backtracking. Examiner's Use
Consider the clause:
able_to_drive(ho, motorbike).
List the order in which clauses are used to produce the output. For each clause, describe the result that it returns.
Question 13
5 Book titles are stored in the file Book.txt. For An algorithm is to be designed to perform a serial search of the file for a requested book. Examiner's Use The algorithm will use the variables shown in the table.
Part (a)
Study the table and the algorithm and fill in the gaps.
Identifier Data Type Description Book.txt FILE Serial file of book titles
NextBook STRING Book title read from the file
IsFound
SearchBook The requested book
//Serial search algorithm
OPENFILE Book.txt FOR OUTPUT
INPUT
IsFound ← FALSE
REPEAT
FILEREAD next book data value and assign to NextBook
IF = SearchBook
THEN
IsFound ← TRUE
OUTPUT "FOUND"
ENDIF
UNTIL (IsFound = TRUE) OR
IF
THEN
OUTPUT "Book title was NOT FOUND"
ENDIF
Question 14
Part (b)
There are 250 book titles in the file. For
Examiner's Use How many book titles on average will be read to find a requested book title?
Part (c)
The book titles in Book.txt are read to the array BookTitle.
(i)
What condition is put on the BookTitle array contents for a binary search to be
used?
The following is a recursive function for the binary search algorithm.
FUNCTION BinarySearch(ThisArray, FindValue, Low, High) : INTEGER IF High < Low THEN RETURN -1 // not found ELSE Middle ← INT((High + Low) / 2) IF ThisArray[Middle] > FindValue THEN BinarySearch(ThisArray, FindValue, Low, Middle – 1) ELSE IF ThisArray[Middle] < FindValue THEN BinarySearch(ThisArray, FindValue, Middle + 1, High) ELSE RETURN Middle // found ENDIF ENDIF ENDIF ENDFUNCTION
(ii)
How can you recognise that the function is recursive?
Question 15
(iii)
A binary search is carried out on the following test data in the BookTitle array. For
Examiner's BookTitle Use
1 100 Great Artists 2 C++ Made Easy 3 Computing Glossary 4 Database Theory 5 Great Cricket Matches 6 History Of Television 7 Networking 8 Particle Physics 9 String Theory 10 Tortoise Care 11 Visiting China
The trace diagram shown below is for the function call:
BinarySearch(BookTitle, "Tortoise Care", 1, 11)
BinarySearch(BookTitle, "Tortoise Care", 1, 11) High < Low is FALSE Middle = 6 BookTitle[6] > "Tortoise Care" is FALSE BookTitle[6] < "Tortoise Care" is TRUE BinarySearch(BookTitle, ........................)
High < Low is FALSE ................... BookTitle[9] > "Tortoise Care" is FALSE BookTitle[9] < "Tortoise Care" is TRUE ............................................
High < Low is FALSE Middle = 10 ........................................ BookTitle[10] < "Tortoise Care" is FALSE RETURN 10 ENDFUNCTION
............
ENDFUNCTION
Fill in the gaps in the trace diagram.
Question 16
Question 6
Part (a)
State where the computer’s boot file would be stored. For
Explain how the boot file is used to make the computer system ready for use. Examiner's Use
Part (b)
(i)
Explain what is meant by an interrupt.
(ii)
An example of an interrupt generated by a hardware device is the process in which
a printer signals that it is out of paper.
Give two further examples of interrupts, one which is hardware generated, and one which is generated by an executing program.
Hardware generated
Program generated
Part (c)
In a multiprogramming environment several processes are concurrently loaded into
main memory. Each process is in one of three states: RUNNING, READY, SUSPENDED.
Explain these three terms.
RUNNING
READY
SUSPENDED
Question 17
Question 7
Part (a)
Below are some terms and definitions for devices used for networking. For
Examiner's Use
(i)
Match up each device on the left with its definition. Draw a line connecting each
description to the appropriate network device.
(ii)
Complete the missing component name.
Hardware or software to control Router unauthorised access to a private network
Hardware used to convert Bridge analogue signals to digital signals (and vice versa)
Hardware used to connect nodes Firewall in a circuit switching network
Circuit board which connects the Switch computer to a network
Device to direct packets across a Modem packet switched network
Device used to connect two bus network segments to allow communication between all nodes
Question 18
Part (b)
(i)
Networks use a variety of different media for communication. For
Examiner's Use Name and describe two of these media.
Medium 1
Medium 2
(ii)
A new communication link is to be constructed in a network.
Name one factor that will be considered when deciding on the medium to be used.
Question 19
Question 20
reasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the publisher will be pleased to make amends at the earliest possible opportunity.
University of Cambridge International Examinations is part of the Cambridge Assessment Group. Cambridge Assessment is the brand name of University of Cambridge Local Examinations Syndicate (UCLES), which is itself a department of the University of Cambridge.
Why this question appears here
98% assigned-topic match · Computational thinking and problem-solving › Recursion
Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.
Permanent source page: Educate A Change · From 9691_w13_qp_33.pdf
