9618/32 · May/June 2022 · Worked solutions

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

Question 1

Paper page 2 for Q1
Original paper page 2

Part 1(a) — solution

BuildingRegister.BuildingID  1067 2 BuildingRegister.BuildingGroup  "house"

Mark points

  • Include the ideas shown in the solution above.

Part 1(b)(i) — solution

  1. One mark: TYPE BuildingType = 2
  2. TYPE BuildingType = (house, bungalow, apartment, farm)

Mark points

  • One mark: TYPE BuildingType = 2
  • TYPE BuildingType = (house, bungalow, apartment, farm)

Part 1(b)(ii) — solution

DECLARE BuildingGroup : BuildingType 1

Mark points

  • Include the ideas shown in the solution above.

Part 1(b)(iii) — solution

BuildingRegister.BuildingGroup  house 1

Mark points

  • Include the ideas shown in the solution above.

Part 1(c)(i) — solution

PRIVATE OwnerName : STRING 1

Mark points

  • Include the ideas shown in the solution above.

Part 1(c)(ii) — solution

To ensure that attributes can only be accessed by the class’s own methods 2 To enforce encapsulation // ensure they are hidden

Mark points

  • Include the ideas shown in the solution above.

Question 2

Paper page 4 for Q2
Original paper page 4

Part 2(a) — solution

studies(sam, history). 2 tutors(nina, sam).

Mark points

  • Include the ideas shown in the solution above.

Part 2(b) — solution

freya, hua // hua, freya 1

Mark points

  • Include the ideas shown in the solution above.

Part 2(c) — solution

one mark for correct use of X 4 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). 2022 Page 4 of 9 9618/32 Cambridge International AS & A Level – Mark Scheme May/June 2022

Mark points

  • Include the ideas shown in the solution above.

Question 3

Paper page 5 for Q3
Original paper page 5

Part 3(a) — solution

  1. HTTP(S) (1) for sending and receiving web pages / hypertext documents (1)
  2. FTP (1) for sending and receiving files over a network / between devices (1)
  3. SMTP (1) for sending/uploading emails /push protocol (1)
  4. POP(3) (1) for receiving/downloading emails /pull protocol (1)
  5. IMAP (1) for receiving/downloading emails /pull protocol (1)

Mark points

  • HTTP(S) (1) for sending and receiving web pages / hypertext documents (1)
  • FTP (1) for sending and receiving files over a network / between devices (1)
  • SMTP (1) for sending/uploading emails /push protocol (1)
  • POP(3) (1) for receiving/downloading emails /pull protocol (1)
  • IMAP (1) for receiving/downloading emails /pull protocol (1)

Part 3(b) — solution

  1. Transport (1) handles packets (1)
  2. Internet (1) handles transmission of data using
  3. Network Access (Interface) // (Data) Link // Physical (1) Handles how data is physically sent (1)

Mark points

  • Transport (1) handles packets (1)
  • Internet (1) handles transmission of data using
  • Network Access (Interface) // (Data) Link // Physical (1) Handles how data is physically sent (1)

Question 4

Paper page 6 for Q4
Original paper page 6

Part 4(a) — solution

  1. An unsigned integer,12, is used instead of the last variable 2
  2. The variable Z is not a valid variable / missing an unsigned integer after the Z

Mark points

  • An unsigned integer,12, is used instead of the last variable 2
  • The variable Z is not a valid variable / missing an unsigned integer after the Z

Part 4(b) — solution

  1. <variable> ::= <letter><unsigned_integer>
  2. <unsigned_integer> ::= <digit>|<digit><digit>
  3. <digit> ::= 1 | 2 | 3
  4. <assignment_statement> ::= <variable> =
  5. <variable><operator><variable>

Mark points

  • <variable> ::= <letter><unsigned_integer>
  • <unsigned_integer> ::= <digit>|<digit><digit>
  • <digit> ::= 1 | 2 | 3
  • <assignment_statement> ::= <variable> =
  • <variable><operator><variable>

Part 4(c)(i) — solution

  1. variable = variable operator variable

Mark points

  • variable = variable operator variable

Part 4(c)(ii) — solution

  1. <assignment_statement>::=<variable>=
  2. <assignment_statement>::=<variable>= <variable><operator><variable>|<variable><operator>
  3. <operand>::=<variable>|<unsigned_integer>
  4. <assignment_statement>::=<variable>=
  5. <operand>::=<variable>|<unsigned_integer>
  6. <assignment_statement>::=<variable>=<operand><operator><operand>

Mark points

  • <assignment_statement>::=<variable>=
  • <assignment_statement>::=<variable>= <variable><operator><variable>|<variable><operator>
  • <operand>::=<variable>|<unsigned_integer>
  • <assignment_statement>::=<variable>=
  • <operand>::=<variable>|<unsigned_integer>
  • <assignment_statement>::=<variable>=<operand><operator><operand>

Question 5

Paper page 8 for Q5
Original paper page 8

Part 5 — solution

SIMD (1) many/array processors execute the same instruction using different data sets (1) 6 MISD (1) many processors (using different instructions) use the same data set (1) MIMD (1) many processors (using different instructions) using different data sets (1)

Mark points

  • Include the ideas shown in the solution above.

Question 6

Paper page 9 for Q6
Original paper page 9

Part 6(a) — solution

1 mark per correct output column 2 INPUT OUTPUT A B E F

Mark points

  • Include the ideas shown in the solution above.

Part 6(b)(i) — solution

Half adder 1

Mark points

  • Include the ideas shown in the solution above.

Part 6(b)(ii) — solution

Purpose of E: Sum 2 Purpose of F: Carry 2022 Page 7 of 9 9618/32 Cambridge International AS & A Level – Mark Scheme May/June 2022

Mark points

  • Include the ideas shown in the solution above.

Question 7

Paper page 10 for Q7
Original paper page 10

Part 7(a) — solution

Any three from 3 MP1 enquiry made to Certificate Authority (CA) MP2 enquirer’s details checked by CA MP3 if enquirer details verified by CA then public key is agreed MP4 CA creates/issues certificate that includes the enquirers public key MP5 encrypting data sent to/by CA with the CA’s public/private key

Mark points

  • Include the ideas shown in the solution above.

Part 7(b)(i) — solution

MP1 The message is hashed with (the agreed hashing algorithm)… 3 MP2 … to produce a message digest MP3 The message digest is then encrypted with the sender’s private key to form the digital signature

Mark points

  • Include the ideas shown in the solution above.

Part 7(b)(ii) — solution

Any four from 4 MP1 The message together with the digital signature is decrypted using the receiver’s private key MP2 The digital signature received is decrypted with the sender’s public key to recover the message digest sent MP3 The decrypted message received is hashed with the agreed hashing algorithm to reproduce the message digest of the message received MP4 The two message digests are compared MP5 … if they are the same the message has not been altered // if they are different the message has been altered

Mark points

  • Include the ideas shown in the solution above.

Question 8

Paper page 11 for Q8
Original paper page 11

Part 8(a) — solution

INTEGER 4

Mark points

  • Include the ideas shown in the solution above.

Part 8(b)(i) — solution

The list to be searched must be ordered/sorted 1 2022 Page 8 of 9 9618/32 Cambridge International AS & A Level – Mark Scheme May/June 2022

Mark points

  • Include the ideas shown in the solution above.

Part 8(b)(ii) — solution

  1. MP7 … or there is only one item left in the list and it is not the item searched for // lower bound > / = upper bound

Mark points

  • MP7 … or there is only one item left in the list and it is not the item searched for // lower bound > / = upper bound

Part 8(b)(iii) — solution

As the number of items in the list increases the time to search the list increases 1

Mark points

  • Include the ideas shown in the solution above.

Part 8(c) — solution

MP1 Linear search O(n) and Binary search O(log2n) / O(Log n) 3 MP2 time to search increases linearly in relation to the number of items in the list for a linear search and logarithmically for a Binary search MP3 time to search increases less rapidly for a binary search and time to search increases more rapidly for a linear search

Mark points

  • Include the ideas shown in the solution above.

Question 9

Paper page 12 for Q9
Original paper page 12

Part 9 — solution

// LENGTH(MyList) - 1 Index + 1 "Value not found" (or any similar phrase)

Mark points

  • Include the ideas shown in the solution above.

Part 9 — solution

To trap (some) runtime errors 4 To prevent a program halting unexpectedly To produce meaningful error messages for these errors Example divide by zero // end of file // file not found 2022 Page 9 of 9

Mark points

  • Include the ideas shown in the solution above.