9618/31 · May/June 2025 · Worked solutions

Step-by-step solutions based on the mark scheme (not a mark-scheme dump).

Question 0

Part 0 — solution

1 1 0 1 0 1 1 1 0 1 1 1 0 1 0

Mark points

  • Include the ideas shown in the solution above.

Question 1

Paper page 2 for Q1
Original paper page 2

Part 1(a) — solution

  1. [M100] , M230, T101, T102, T120, T150)
  2. [M100] , M230, T101, T102, T120, T150)

Mark points

  • [M100] , M230, T101, T102, T120, T150)
  • [M100] , M230, T101, T102, T120, T150)

Part 1(b) — solution

One mark per mark point 4 MP1 TYPE Booking and ENDTYPE correct MP2 Declare used correctly for every field in the response MP3 Any four fields correct MP4 Remaining fields correct Example answer: TYPE Booking DECLARE BookingNumber : STRING DECLARE Destination : STRING DECLARE ClientName : STRING DECLARE ClientTelephone : STRING DECLARE DateOfDeparture : DATE DECLARE PickupAddress : STRING DECLARE TaxiUsed : Vehicle ENDTYPE University Press & Assessment 2025 Page 6 of 15 9618/31 Cambridge International AS & A Level – Mark Scheme May/June 2025

Mark points

  • Include the ideas shown in the solution above.

Part 1 — solution

0 0 1 1 0 1 0 1 1 0 0 0 1 0 1 University Press & Assessment 2025 Page 7 of 15 9618/31 Cambridge International AS & A Level – Mark Scheme May/June 2025

Mark points

  • Include the ideas shown in the solution above.

Question 2

Part 2(a) — solution

One mark per mark point 2 MP1 Correct mantissa MP2 Correct exponent Mantissa Exponent

Mark points

  • Include the ideas shown in the solution above.

Part 2(b) — solution

  1. number converted to binary e.g., positive binary version of 25.3125 = (0)11001.0101
  2. two’s complement version
  3. -32 + 4 + 2 + 0.5 + 0.125 + 0.0625 // -32 + 4 + 2 + 1/2 + 1/8 + 1/16
  4. movement of binary point seen (5 places)
  5. correct mantissa
  6. correct exponent

Mark points

  • number converted to binary e.g., positive binary version of 25.3125 = (0)11001.0101
  • two’s complement version
  • -32 + 4 + 2 + 0.5 + 0.125 + 0.0625 // -32 + 4 + 2 + 1/2 + 1/8 + 1/16
  • movement of binary point seen (5 places)
  • correct mantissa
  • correct exponent

Question 3

Paper page 4 for Q3
Original paper page 4

Part 3(a) — solution

One mark per mark point (Max 5) 5 One mark per mark point for purpose of Application Layer (Max 3) MP1 To provide services / interface with the user // access to applications, for example login, file transfer, network file access, email, etc MP2 To provide mechanisms for securing communication e.g. encryption/authentication MP3 To define/provide protocols used to allow the exchange of data/communication // to contain programs that exchange data MP4 Error detection and recovery mechanisms to handle application specific errors One mark per mark point for purpose of Transport Layer (Max 3) MP5 To provide logical communication between applications running on different hosts // To ensure that data is delivered to the correct application process on the destination machine MP6 To ensure error-free, end-to-end delivery of data between a source and a destination, in sequence // to provide error recovery techniques such as error detection codes and automatic repeat request MP7 To break data into segments when sent and to reconstruct when received // To reassemble segments at destination MP8 To regulate network connections // to provide flow control mechanisms to prevent data loss.

Mark points

  • Include the ideas shown in the solution above.

Part 3(b) — solution

One mark per mark point (Max 4) 4 MP1 Data are broken into equal sized packets MP2 Data packets have headers containing information such as the IP addresses of the sender and receiver MP3 Each packet of data is sent independently to the destination // Packets don’t necessarily follow the same route MP4 Each packet is sent via the most optimum path available MP5 Packets don’t necessarily arrive in the order they were sent // Packets are reconstructed at the destination in the correct order MP6 Missing / damaged packets are re-sent University Press & Assessment 2025 Page 8 of 15 9618/31 Cambridge International AS & A Level – Mark Scheme May/June 2025

Mark points

  • Include the ideas shown in the solution above.

Question 4

Part 4(a) — solution

One mark per mark point 4 MP1 Any two nodes added correctly with correct data (6, 15, 41, 66) and arrows MP2 Remaining two nodes added with correct data (6, 15, 41, 66) and all nodes with connecting arrows starting from pointer boxes MP3 Correct null pointers (-1) added throughout MP4 … with no entries in other pointer boxes and all nodes correctly positioned and connected Root pointer Left pointer Data Right pointer

Mark points

  • Include the ideas shown in the solution above.

Part 4(b) — solution

One mark per mark point 2 MP1 A technique used to solve problems using a function/procedure/subroutine that calls itself (general case) MP2 … until the terminating condition / base case is achieved, when no further recursive calls are made

Mark points

  • Include the ideas shown in the solution above.

Part 4(c) — solution

  1. Stack

Mark points

  • Stack

Question 5

Paper page 6 for Q5
Original paper page 6

Part 5(a) — solution

  1. Z = A.B.C.D + A.B.C.D + A.B.C.D + A.B.C.D + A.B.C.D + A.B.C.D

Mark points

  • Z = A.B.C.D + A.B.C.D + A.B.C.D + A.B.C.D + A.B.C.D + A.B.C.D

Part 5(b)(i) — solution

Answer: AB

Two marks if no errors present 2 One mark if one error present AB CD 00 01 11 10

Mark points

  • Correct result: AB

Part 5(b)(ii) — solution

Answer: AB

One mark for each correct loop 2 AB CD 00 01 11 10

Mark points

  • Correct result: AB

Part 5(b)(iii) — solution

  1. One correct Boolean term
  2. Boolean terms and operator correct and no other terms present

Mark points

  • One correct Boolean term
  • Boolean terms and operator correct and no other terms present

Question 6

Part 6 — solution

One mark for each mark point (Max 4) 4 MP1 The interpreter translates the source code one line at a time MP2 If the line is syntax error free it is executed MP3 It is not stored in executable format MP4 If an error is found, the program halts with an error message MP5 Each line must be translated every time it is run, including lines running multiple times for example in loops University Press & Assessment 2025 Page 11 of 15 9618/31 Cambridge International AS & A Level – Mark Scheme May/June 2025

Mark points

  • Include the ideas shown in the solution above.

Question 7

Paper page 8 for Q7
Original paper page 8

Part 7(a) — solution

One mark for each correct answer 2 #Jd7 – must begin with a member of the group uppercase // cannot begin with a symbol C%6A – the fourth character cannot be a member of the group uppercase // the fourth character must be either a symbol, digit or lowercase

Mark points

  • Include the ideas shown in the solution above.

Part 7(b) — solution

  1. <uppercase> ::= A | C | E | G | J
  2. <passcode> ::= <uppercase><code>
  3. <code> ::= <lowercase>|<symbol>|<digit>

Mark points

  • <uppercase> ::= A | C | E | G | J
  • <passcode> ::= <uppercase><code>
  • <code> ::= <lowercase>|<symbol>|<digit>

Question 8

Paper page 10 for Q8
Original paper page 10

Part 8(a) — solution

One mark for each mark point 2 MP1 Running multiple processes concurrently MP2 … which benefits process management by allowing more tasks to complete than would be the case if they had to run one task after another.

Mark points

  • Include the ideas shown in the solution above.

Part 8(b) — solution

One mark for each mark point (Max 3) 4 MP1 The processes are queued as they arrive MP2 Processes with the shortest burst time are executed first MP3 It is a pre-emptive scheduling function // When a process with a shorter burst time arrives the existing process is replaced by the shorter process. MP4 The scheduler will continue to choose shorter processes over longer processes if they continue to be added to the queue can cause starvation for longer jobs One mark for benefit (Max 1) e.g. MP5 Processes with a short burst time are processed very quickly MP6 Waiting time is minimised University Press & Assessment 2025 Page 12 of 15 9618/31 Cambridge International AS & A Level – Mark Scheme May/June 2025

Mark points

  • Include the ideas shown in the solution above.

Question 9

Paper page 10 for Q9
Original paper page 10

Part 9(a) — solution

One mark for each mark point (Max 2) 2 MP1 Ensure security/privacy when using the internet MP2 Data encryption MP3 Identification / authentication of client and server

Mark points

  • Include the ideas shown in the solution above.

Part 9(b) — solution

One mark for each mark point (Max 2) 2 MP1 When transmitting authentication data e.g. passwords, session cookies MP2 When transmitting data that must be protected from modification on its way to or from a server e.g. user input, or results from the server MP3 When transmitting data classified as non-public.

Mark points

  • Include the ideas shown in the solution above.

Question 10

Part 10(a) — solution

One mark for each mark point (Max 2) 2 MP1 A graph is used in AI to record relationships between entities MP2 … using vertices / nodes and edges MP3 for example, to represent places on a map and the distances between them, in order to find the shortest route.

Mark points

  • Include the ideas shown in the solution above.

Part 10(b) — solution

One mark for each mark point (Max 4) 4 MP1 Artificial neural networks are designed to work in the same way as the human brain MP2 ANNs provide the architecture and algorithms for learning from the data MP3 They have a large number of connected processing units / nodes MP4 … that are arranged in layers / interconnected and work together to process data MP5 Deep learning models learn from data by adjusting the weights/biases of the connections between neurons MP6 They use multiple hidden layers to extract complex features and to make predictions University Press & Assessment 2025 Page 13 of 15 9618/31 Cambridge International AS & A Level – Mark Scheme May/June 2025

Mark points

  • Include the ideas shown in the solution above.

Question 11

Paper page 12 for Q11
Original paper page 12

Part 11(a) — solution

One mark per mark point 5 MP1 Two correct attributes (PatientID : INTEGER and Doctor : STRING) MP2 SetTreatments(…) and SetMedications(…) seen MP3 … and appropriate parameters, with string data types MP4 GetPatientID() and GetDoctor() seen MP5 SetDateSeen(…) and GetDateSeen fully correct with appropriate parameter and correct data type in setter. Appointment DateSeen : DATE PatientID : INTEGER Doctor : STRING Treatments : STRING Medications : STRING SetDateSeen(NewDate : DATE) SetPatientID(PatientNumber : INTEGER) SetDoctor(DoctorID : STRING) SetTreatments(NewTreatments : STRING) SetMedications(NewMedications : STRING) GetDateSeen() GetPatientID() GetDoctor() GetTreatments() GetMedications()

Mark points

  • Include the ideas shown in the solution above.

Part 11(b)(i) — solution

Encapsulation 1

Mark points

  • Include the ideas shown in the solution above.

Part 11(b)(ii) — solution

One mark for each mark point (Max 2) 2 MP1 Inheritance is where a derived class takes properties / behaviours attributes / methods MP2 … of a parent / super class / base class MP3 The attributes / methods / properties taken from the parent / super class / base class can also be extended / copied / used / changed / overwritten / overridden in the subclass. University Press & Assessment 2025 Page 14 of 15 9618/31 Cambridge International AS & A Level – Mark Scheme May/June 2025

Mark points

  • Include the ideas shown in the solution above.

Question 12

Part 12 — solution

  1. IF Item = "" THEN

Mark points

  • IF Item = "" THEN

Question 36

Part 36 — solution

  1. 1 3 -1 15 -1 -1 41
  2. 1 6 -1 -1 66 -1

Mark points

  • 1 3 -1 15 -1 -1 41
  • 1 6 -1 -1 66 -1