← IGCSE Computer Science Paper 1

Packets arriving out of order

Packets take different routes, so they may reach the destination in a different order from the one sent, e.g. packet 5 before packet 4. Order is not guaranteed.

Understanding Packets arriving out of order in IGCSE Computer Science Paper 1

What it does: Different routes mean different journey times, so the arrival order may not match the sending order. Packet numbers in the headers show the original order, so the destination can reorder the packets even if they arrived jumbled. Being sent first does not guarantee arriving first. A later packet on a faster route can overtake it. Packets can take different routes of different speeds, so a later packet can arrive before an earlier one.

Common mistakes: The comment says packet 5 arrives before packet 4, but this list has them in order. It should be [1, 2, 3, 5, 4]. Packets take different routes, so the order of arrival is not guaranteed. The variable should be False, which means the reorder step runs.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 121–130) and word search (Modules 121–141).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
Packets 1 to 6 are sent in order. Which statement is true about how they arrive?
They always arrive in the order 1 to 6They may arrive in a different order
Matches
Packets always arrive in the order they were sent
↓
Wrong: packets take different routes, so they may arrive in a different order. The order is not guaranteed.
Applying
Meanings
Term
packets arrive out of order
Meaning
Packets take different routes, so they may reach the destination in a different order from the one sent, e.g. packet 5 before packet 4. Order is not guaranteed.
Practice
SEND packet 4 via route A
Testing
Gaps
Sent 1 2 3 4 5, arrived 1 2 3 4
Check Answer
Spots
1# Packet 5 arrives before 4
2arrived = [1, 2, 3, 4, 5]

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Giraffe' badge — High Perspective, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. Packets 1 to 6 are sent in order. Which statement is true about how they arrive?
A. They always arrive in the order 1 to 6
B. They may arrive in a different order ✓
Packets can take different routes, so the order they arrive in is not guaranteed.
2. Why can packet 5 arrive before packet 4?
A. Packet 5 took a faster route ✓
B. Packet 5 was sent before packet 4
Packets are sent in order, but each can take a different route. A quicker route can let a later packet arrive first.
3. Is the order of arrival of packets guaranteed?
A. No, order is not guaranteed ✓
B. Yes, order is always guaranteed
Each packet may take a different route, so the arrival order can change.
4. What is the main reason packets arrive out of order?
A. They take different routes to the destination ✓
B. They are all sent at the same time on one wire
Different routes can take different amounts of time, so packets can arrive in a different order.
5. Packets arrive in the order 1, 2, 3, 5, 4. What has happened?
A. Packet 4 was lost and never sent
B. Packet 5 arrived before packet 4 ✓
Both packets arrived, but packet 5 got there first. This is arriving out of order.

Match the Pairs

Sent: 1, 2, 3, 4, 5 | Arrived: 1, 2, 3, 5, 4 → The packets arrived out of order because packet 5 reached the destination before packet 4
Packet 4: Route A (busy) | Packet 5: Route B (quiet) → Packet 5 can overtake packet 4 because it took a faster route
The order in which packets arrive is not guaranteed, because each packet may take a different route → arrival_order != sending_order
The destination uses the packet number in each header to put out-of-order packets back into the correct order → sort(packets, by packet_number)
Packets always arrive in the order they were sent → Wrong: packets take different routes, so they may arrive in a different order. The order is not guaranteed.
Packet 5 arrived before packet 4, so packet 4 must be lost → Wrong: packet 4 has not necessarily been lost. It may have taken a slower route and still be on its way.

Key Term

packets arrive out of order
Packets take different routes, so they may reach the destination in a different order from the one sent, e.g. packet 5 before packet 4. Order is not guaranteed.

Fill in the Blanks

1. Sent 1 2 3 4 5, arrived 1 2 3 5 4
Hint: Type the number of the packet that overtook packet 4 and arrived early.
2. IF arrivalOrder != sentOrder THEN
Hint: Type the keyword that starts a condition in pseudocode.
3. SORT packets BY packetNumber
Hint: Type the packet header field used to put packets back in the right order.
4. orderGuaranteed = FALSE
Hint: Type the Boolean value showing that the arrival order cannot be relied on.
5. IF packet5Arrived AND NOT packet4Arrived
Hint: Type the logical operator that reverses a Boolean value, so packet 4 is still missing.

Spot the Error

Question 1
A # Packet 5 arrives before 4
B arrived = [1, 2, 3, 4, 5]
C print(arrived)
Line B — The comment says packet 5 arrives before packet 4, but this list has them in order. It should be [1, 2, 3, 5, 4].
Question 2
A packets_sent = [1, 2, 3, 4]
B order_guaranteed = True
C if not order_guaranteed:
D print('Reorder needed')
Line B — Packets take different routes, so the order of arrival is not guaranteed. The variable should be False, which means the reorder step runs.
Question 3
A route_4 = 'short'
B route_5 = 'short'
C # So packet 5 arrives first
Line A — For packet 5 to arrive before packet 4, packet 4 must take the longer route. Packet 4's route should be 'long', not 'short'.
Question 4
A arrived = [5, 4, 6]
B sent = [4, 5, 6]
C if arrived == sent:
D print('Out of order')
Line C — The packets are out of order when the arrival order is different from the sent order. The test should use != not ==.
Question 5
A arrived = [3, 1, 2
B arrived.sort()
C print(arrived)
Line A — The list is missing its closing square bracket. It should be arrived = [3, 1, 2], showing packets that arrived out of order.

Student with a class code? Join your class →