# Calculating the distance between 2 stations in a transfer [closed]

Station A sends $1024 \times 10^{6}$ bits of data to station B over a 1Gbps wired link. Station A sends the data in packets of $8 \times 10^6$ bits. The whole transfer took 100 seconds to complete. If the signal speed is $2 \times 10^8 m/s$, how can I find the distance between the two stations? I'm also assuming all waiting, queueing and processing time are negligible.

Since each packet is $8 \times 10^6$ bits, total number of packets sent is $\frac{1024} {8}=128$ packets.

As the wired link has a capacity of 1Gbps, it feels like I could just send the whole file of $1024 \times 10^{6}$ bits of data from station A to station B in less than 1 second, wouldn't it?

How does the transfer take 100 seconds and how can I calculate the distance between the 2 stations based on the signal speed?

Update:

The other information provided to this problem were the server and client are directly connected with no processing and queueing delay. Although Station A waits for an acknowledgement packet from station B after sending a packet of data and before sending the next packet of data, the acknowledgement packet sizes are small and so its transmission times are negligible. The packet headers' overhead bits are small and also negligible.

It seems that everything is negligible and I have no other numbers to use to consider.

• How are you actually doing the transmitting? – Majenko Sep 23 '11 at 14:44
• Are you leaving out any formation, like your course being about sliding windows, communication with satellites on their way to Mars, or things like that? – Wouter van Ooijen Sep 23 '11 at 14:53
• I've throw in the other information provided to the problem as an update. I thought those information aren't very useful because all it says are those delay factors that are negligible. I believe the data is transmitted through packet switching. – xenon Sep 23 '11 at 16:05
• @Wouter van Ooijen: By sliding window, did you mean the sliding window of the buffer in the Automatic Repeat Request? If that's the one, how should I relate the ARQ to this problem? – xenon Sep 23 '11 at 16:08
• This sounds like a networking/software question to me, which are off-topic. If you were at the hardware/firmware level then it could be on-topic here. – Kellenjb Sep 23 '11 at 20:53

Calculating the distance is nearly impossible. You would have to send a block of data and measure the time between the last bit sent and the reception of an acknowledge. If you say that processing time is negligible so is transmission time. The delay between reception and acknowledging in the receiving computer is probably an order of magnitude longer than the time the signal takes to go back and forth (shouldn't that be forth and back?). If the distance is 10km a one way would take 50$\mu$s. How long would it take to dump a megabyte of data?

The 100 seconds is unusually long. The amount of data is probably the payload, and you'll have to add some overhead for header and CRC, but if your packets are 1MB long (which is long, for any protocol) the overhead will be far less than 1%. And then it looks like your assumption about negligible times is false.

edit
OK, let's, for argument's sake, presume processing time is effectively zero. You have to send 128 packets, which take 1 second each to transmit. Let's say distance between the stations is $D$, and one-way time $T$. Then the transmission of 1 packet takes $8ms + T$. The acknowledge take time $T$ to go back to station A. So turnaround time is $8ms + 2 \cdot T$. The 128 packets take 100 seconds, so

$128 \cdot (8ms + 2 \cdot T) = 100s$

Solving for $T$ gives us

$T = \dfrac{1}{2} \cdot \left( \dfrac{100s}{128} - 8ms \right) = 0.39s$

Then

$D = v \cdot T = 2 \cdot 10^8 m/s \cdot 0.39s = 77 \cdot 10^6m = 77 000 km$

I hope this is a hypothetical problem.

• I added all the other information provided to the problem, which I didn't have them in at first because I thought those weren't very useful to the problem. Since the packet size is $8 \times 10^6$bits, the overhead bits, as what you mentioned will take far less than 1%, then why would the assumption that the transmission time of the packet headers are negligible false? – xenon Sep 23 '11 at 16:03
• I agree with the calculation. I am somewhat disappointed that the person who made the problem did not choose a more meaningfull figure, like the geostationary orbit (~35000 km) or the earth-moon distance (~400000 km). – Wouter van Ooijen Sep 23 '11 at 18:30
• I believe that this is a hypothetical problem since it came from my school notes. I finally understand how the calculation works. Thanks for your help. :) – xenon Sep 23 '11 at 18:50
• @Wouter - That's what I thought as well. At 77000km there's nothing there! Unless you use station B as counterweight for a space lift :-) – stevenvh Sep 24 '11 at 5:39