HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
  1. Problems
  2. /A message is sent as 6 packets, numbered 1 to 6…
HardComputer ScienceHigh School (9–10)Computer Science › Data TransmissionNumericalConceptualIGCSE

A message is sent as 6 packets, numbered 1 to 6…

StemPy LabContributed by StemPy Lab

Try it on paper first. A hint, the key idea and the worked solution are here when you need them.

A message is sent as 666 packets, numbered 111 to 666. Because of packet switching, the packets reach the receiver in this order:

3, 1, 6, 2, 5, 4\displaystyle 3,\ 1,\ 6,\ 2,\ 5,\ 43, 1, 6, 2, 5, 4
  1. How many packets has the receiver stored at the moment packet 666 arrives (counting packet 666)?
  1. Which packet number arrives last?
  1. Explain why the receiver cannot simply join the payloads in the order they arrive, and say when it puts them in order.

Check your answer

Work it out on paper, then type your number. The answer itself stays hidden.

Need a reminder? The key ideaShowHide

Data is broken down into packets. Each packet has a header (destination address, packet number, originator's address), a payload (the data) and a trailer (marks the end). In packet switching, each packet could take a different route, a router controls the route, packets may arrive out of order, and they are reordered once the last one has arrived. The number of packets is the file size divided by the payload size, rounded up.

The worked solution

Have you tried it?

Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, go through the solution one step at a time, and check each step against your own.

Step 1. Count to packet 6. The list is 3,1,6,…3, 1, 6, \dots3,1,6,… Packet 666 is the third to arrive, so the receiver has 333 packets stored.

Step 2. The last arrival. The last number in the list is 444.

Step 3. Why not join them as they come? Each packet could take a different route, and the routes are not equally fast. Joining in arrival order would give the pieces in the order 3,1,6,2,5,43, 1, 6, 2, 5, 43,1,6,2,5,4, which is nonsense.

Step 4. When to reorder. The receiver waits until the last packet (packet 444) has arrived. Then it sorts the packets by the packet number in each header and joins the payloads.

Check. Sorting 3,1,6,2,5,43, 1, 6, 2, 5, 43,1,6,2,5,4 gives 1,2,3,4,5,61, 2, 3, 4, 5, 61,2,3,4,5,6, with no number missing.

Answer: (a) 333. (b) Packet 444. (c) The packets arrive out of order; they are reordered by packet number once the last one has arrived.

Log in to save this for later
← All Problems
← A song file of 5500 bytes is sent in packets with a payload of at most 500 bytes…A photo of 36 000 bytes is sent in 24 packets of equal size… →
More onComputer Science › Data Transmission

Discussion (0)

Log in to join the discussion.

Loading…

More on this topic

  1. A sender uses an automatic repeat query to send 8 packets, one at a time…Hard
  2. The valid book number 9781861978769 is typed into a library system, but the 7th and 8th digits are…Medium
  3. A library adds a new book. The first twelve digits of its 13-digit ISBN are 978186197876…Easy
  4. A computer sends the byte 01001101 to a device using an echo check…Easy
  5. The block of bytes 87, 142, 203 and 61 is sent with its checksum, worked out as the total bmod 256…Hard
All problems on this topic →