Interactive end-of-chapter exercises


Car - Caravan Analogy

Consider the figure below, adapted from Figure 1.17 in the text, which draws the analogy between store-and-forward link transmission and propagation of bits in packet along a link, and cars in a caravan being serviced at a toll booth and then driving along a road to the next tollbooth.



Suppose the caravan has 10 cars, and that the tollbooth services (that is, transmits) a car at a rate of one car per 1 seconds. Once receiving serving a car proceeds to the next tool both, which is 200 kilometers away at a rate of 20 kilometers per second. Also assume that whenever the first car of the caravan arrives at a tollbooth, it must wait at the entrance to the tollbooth until all of the other cars in its caravan have arrived, and lined up behind it before being serviced at the toll booth. (That is, the entire caravan must be stored at the tollbooth before the first car in the caravan can pay its toll and begin driving towards the next tollbooth).



Question List


1. Once a car enters service at the tollbooth, how long does it take until it leaves service?

2. How long does it take for the entire caravan to receive service at the tollbooth (that is the time from when the first car enters service until the last car leaves the tollbooth)?

3. Once the first car leaves the tollbooth, how long does it take until it arrives at the next tollbooth?

4. Once the last car leaves the tollbooth, how long does it take until it arrives at the next tollbooth?

5. Once the first car leaves the tollbooth, how long does it take until it enters service at the next tollbooth?

6. Are there ever two cars in service at the same time, one at the first toll booth and one at the second toll booth? Answer Yes or No

7. Are there ever zero cars in service at the same time, i.e., the caravan of cars has finished at the first toll both but not yet arrived at the second tollbooth? Answer Yes or No




Solution


1. Service time is 1 seconds

2. It takes 10 seconds to service every car, (10 cars * 1 seconds per car)

3. It takes 10 seconds to travel to the next toll booth (200 km / 20 km/s)

4. Just like in the previous question, it takes 10 seconds, regardless of the car

5. It takes 19 seconds until the first car gets serviced at the next toll booth (10-1 cars * 1 seconds per car + 200 km / 20 km/s)

6. No, because cars can't get service at the next tollbooth until all cars have arrived

7. Yes, one notable example is when the last car in the caravan is serviced but is still travelling to the next toll booth; all other cars have to wait until it arrives, thus no cars are being serviced



That's incorrect

That's correct

The answer was: 1

Question 1 of 7

The answer was: 10

Question 2 of 7

The answer was: 10

Question 3 of 7

The answer was: 10

Question 4 of 7

The answer was: 19

Question 5 of 7

The answer was: No

Question 6 of 7

The answer was: Yes

Question 7 of 7

Try Another Problem

We gratefully acknowledge the programming and problem design work of John Broderick (UMass '21), which has really helped to substantially improve this site.

Copyright © 2010-2022 J.F. Kurose, K.W. Ross
Comments welcome and appreciated: kurose@cs.umass.edu