Computer Science Paper2018 Ms
Computer Science Paper2018 Ms
Markscheme
November 2018
Computer science
Higher level
Paper 1
16 pages
www.ibpastpapers.com
–2– N18/4/COMSC/HP1/ENG/TZ0/XX/M
www.ibpastpapers.com
–3– N18/4/COMSC/HP1/ENG/TZ0/XX/M
Section A
1. (a) Award [1] for identifying the nature of a network and [1] for a development of the
first point up to [2 max].
A group of computers and other computing hardware devices that are linked
together through communication channels/cables/wirelessly;
To enable communication (sharing files, sharing information) between
systems/among a wide range of users; [2]
(b) Award [1] for a definition of the term bandwidth and [1] for a description of an
issue caused by low bandwidth up to [2 max].
Bandwidth indicates the maximum amount of data that can be transferred from
one point to another in a unit of time;
Low bandwidth means slow network performance / extended duration when
transferring large amounts of data / loss of users’ time (money) / the whole area
(of the users) is not covered; [2]
www.ibpastpapers.com
–4– N18/4/COMSC/HP1/ENG/TZ0/XX/M
3. Award [3 max].
Award [1] for a logic diagram representing A OR B with 2 inputs, 1 output and 3 logic
gates.
Award [1] for the OR gate having 2 inputs, one of which is NOT A.
Award [1] for another input to the OR gate, which is A AND B.
[3]
4. (a) Award [1] for each possible compatibility issue identified up to [2 max].
(b) Award [1] for identifying how VPN will allow employees to communicate and [1]
for a development up to [2 max].
(c) Award [1] for identifying an issue and [1] for an expansion up to [2 max].
www.ibpastpapers.com
–5– N18/4/COMSC/HP1/ENG/TZ0/XX/M
5. Award [4 max].
Packet switching entails data being separated into specially formatted units (packets);
Each packet contains data and information such as packet number, address that
identifies the sending computer and intended recipient, etc;
Packets are routed from source to destination using (different) network switches and
routers;
Using these addresses, network switches and routers determine how best to transfer
the packet on the path to its destination;
Packets are reassembled at the destination (using packet numbers);
If any of packets is missing it should be retransmitted; [4]
6. Award [3 max].
Method isEmpty() returns True if there are no elements on the stack, False
otherwise;
It is important to call this method in logical expression/condition in algorithm constructs
such as branches and loops ( if/while);
Before popping an element from the stack / popStack();
To prevent errors/stack underflow/program crash; [3]
7. Award [3 max].
Prioritizing enables execution of the (highest priority) process until a higher priority
task enters;
The OS/scheduler put processes (jobs) in the right place in a queue in order of priority
(accept examples, an I/O operation has higher priority than calculations because it
uses less CPU time);
Time slicing allows process to execute for a fixed time/each process is given a fixed
period of time (time slice) for which the process is allowed to run/;
The scheduler is run once every time slice to choose the next process to run;
Note: Award [1 max] if evident that the scheduler software is responsible for
organizing all of the processes that need servicing/responsible for looking at what
resources are available (CPU time and peripheral devices) /responsible for making
decisions about what order to put all the processes in (when to start any particular
process, and when to finish it); [3]
www.ibpastpapers.com
–6– N18/4/COMSC/HP1/ENG/TZ0/XX/M
Section B
(ii) Award [1] for the answer saying that the function of OS in primary memory
management is allocation of specific memory blocks to individual programs
and [1] for reallocation up to [2 max].
Note to examiners: Award only [1] an answer such as “OS maintains file
allocation table”. [2]
www.ibpastpapers.com
– 7– N18/4/COMSC/HP1/ENG/TZ0/XX/M
5E; [1]
28/256; [1]
(iii) Award [1] for identifying why this byte could not be used to represent
characters such as those in Chinese and [1] for an expansion up to
[2 max].
A B C
0 0 1
0 1 0
1 0 0
1 1 1
[2]
www.ibpastpapers.com
– 8– N18/4/COMSC/HP1/ENG/TZ0/XX/M
9. (a) Award [1] for the answer identifying improved programmer productivity and [1] for
making reference to machine independence up to [2 max].
HLL saves programmer from knowing details of computer architecture (and using
all the specific (machine) instructions);
So giving more time to creating/developing the best way of coding a
problem/process of coding is simpler and more understandable; [2]
Award [1] for an answer stressing the usefulness of sub-procedures in any of the
following
Program organization;
Program coding;
Program testing;
Maintenance;
Etc.
Simpler testing;
Each part of the program could be separately tested;
By the programmer who created the code or someone else in the team of
programmers;
Reusable code;
Sub-procedures already written/tested could be used in various programs;
Award marks for description of a specific example collections (in Java or any
other programming language) such as arrays, dictionaries, sets, lists, trees (they
www.ibpastpapers.com
– 9– N18/4/COMSC/HP1/ENG/TZ0/XX/M
have some characteristics in common, but also each of them has different way of
organizing the data elements/objects they contain).
Award [1] for initialization and for outputting correct result (COUNTER).
Award [1] for using collection methods.
Award [1] for correct loop.
Award [1] for retrieving a number (ELEMENT) from the collection.
Award [1] for if statement within the loop.
Award [1] for correct condition in if statement.
Award [1] for increasing COUNTER if needed.
Example answer:
COUNTER = 0
NUMBERS.resetNext()
loop while NUMBERS.hasNext()
ELEMENT = NUMBERS.getNext()
if ELEMENT >= -1 and ELEMENT <= 1 then // abs(ELEMENT) <= 1
COUNTER = COUNTER + 1
end if
end loop
output COUNTER
www.ibpastpapers.com
– 10 – N18/4/COMSC/HP1/ENG/TZ0/XX/M
10. (a) (i) Award [1] for each hardware security measure identified up to [1 max].
Retina scans;
Locked doors;
Alarms;
Protection of equipment within the building; [1]
(ii) Award [1] for each software security measure identified up to [1 max].
Use of passwords;
Different access rights;
Encryption; [1]
(b) Award [1] for each network security measure identified up to [1 max].
Encryption;
UserID;
Trusted MAC addresses; [1]
www.ibpastpapers.com
– 11 – N18/4/COMSC/HP1/ENG/TZ0/XX/M
Example 1
www.ibpastpapers.com
– 12 – N18/4/COMSC/HP1/ENG/TZ0/XX/M
Example 2
[5]
www.ibpastpapers.com
– 13 – N18/4/COMSC/HP1/ENG/TZ0/XX/M
The size of the dynamic list does not have to be predetermined as in an array;
The size of the dynamic list is not fixed whilst the size of an array is always fixed;
If names are sorted they can be added/deleted (more easily) by changing the
pointers without having to shuffle the names;
As records can be dynamically added/deleted the memory is better used because
there are no wasted / missing spaces as in an array; [3]
(b) Award [1] for a node containing two fields / data(name) and link (pointer) to the
next node and [1] for showing an external pointer pointing to the first vegetable
on the list, and null pointer in the last node, and pointers which link the nodes in
alphabetical order up to [2 max].
[2]
Note: award marks for clearly labelled diagrams in candidates’ answers. [4]
(ii) Award [1] for identifying a reason why deleting the first node is different to
deleting other nodes and [1] for an expansion up to [2 max].
www.ibpastpapers.com
– 14 – N18/4/COMSC/HP1/ENG/TZ0/XX/M
Award [1] for clearly a binary tree and the root is Potato.
Award [1] for the correct left subtree.
Award [1] for the correct right subtree.
[3]
www.ibpastpapers.com
– 15 – N18/4/COMSC/HP1/ENG/TZ0/XX/M
A = 3 and B = 3; [1]
(ii) Award [1] for identifying a reason why the algorithm may not work and [1]
for suggesting a solution up to [2 max].
The algorithm does not correctly swap the values because the value of B is
overwritten/lost in the second line of the algorithm;
To obtain the correct result the line B = TEMP should be swapped with the
line A = B / the order of statements should be changed as follows:
TEMP = A
A = B
B = TEMP [2]
Example 1:
swapRows(MAT, K, L)
loop for C from 0 to 3
T = MAT[K][C]
MAT[K][C] = MAT[L][C]
MAT[L][C] = T
end loop
end swapRows
Example 2:
Award [1] for the loop changing column indexes.
Award [1] for the using/calling method swap().
Award [1], [1] for each correct parameter in swap method call.
105; [1]
ROUNDS[2][3]; [1]
www.ibpastpapers.com
– 16 – N18/4/COMSC/HP1/ENG/TZ0/XX/M
Award [1] for the correct outer loop (loops through the array TOTALS).
Award [2 max] for correct determination of MINIM / the position of smallest
element in part of array TOTALS (range should be from J + 1 to 5), [1] for minor
error.
Award [1] for correct condition / to check whether swaps are needed or not.
Award [1] for correct swap of elements in array TOTALS.
Award [1] for correct swap of elements in array PLAYERS.
Award [1] for correct swap of rows in two-dimensional array ROUNDS.
Example answer:
loop for J from 0 to 5
MINIM = J
loop for I from J + 1 to 5
if TOTALS[I] < TOTALS[MINIM]:
MINIM = I
end if
end loop
if MINIM != J
swap(TOTALS[MINIM],TOTALS[J])
swap(PLAYERS[MINIM], PLAYERS [J])
swapRows(ROUNDS, MINIM, J)
end if
end loop [6]
www.ibpastpapers.com