Log In
74 votes

Frames of $\text{1000 bits}$ are sent over a $10^6$ $\text{bps}$ duplex link between two hosts. The propagation time is $\text{25 ms}$. Frames are to be transmitted into this link to maximally pack them in transit (within the link).

What is the minimum number of bits $(I)$ that will be required to represent the sequence numbers distinctly? Assume that no time gap needs to be given between transmission of two frames.

  1. $I=2$
  2. $I=3$
  3. $I=4$
  4. $I=5$
in Computer Networks
edited by
Downvoting won't ace you rather explain question.
can someone plz explain the second part of the question..mainly in this part" no time gap needs to be given between transmission of two frames" .how it has been used in the question
Please explain me
Here they are not given the gbn or sr
then which one to consider..
And they ask for half duplex
How to approach for that
I think its similar to gbn protocol where they have mentioned window size which requires sequence no. ,but direct formula wont work here for gate questions.Here the catch is ACKs are always piggybacked which is given in the second part of the question.Now is Acks are piggybacked ,

Sender transmits one packet in 1 ms and receiver in 1 ms.Useful time = 2 ms

Total time from sending one packet from source to destination and back with piggybacked acks will take = 2 ms (total transmission time)+25 ms (sender to receiver propagation time)+25 ms (receiver to sender propagation time for Piggybacked Ack,which contains data as well as ack) = 52 ms

So,2 packets are sent in 52 ms timeframe from two sides,sender first packet reaches receiver in 26 ms after which receiver starts sending its data with ack of the sender added to it.By normal given book formula it is 52 packets we can pack,here its also same but both sender and receiver are packing 52 together 26 from sender,26 from receiver. Efficiency is also better here than normal case.
what is dulex mean here ?

what is the answer in both the cases

i used ceil of 1+2a .what is wrong with this approach ?


why we are not considering 1+2a here directly ?pls explain 


Link for $2^{nd}$ part  ->


@set2018 duplex can be full duplex half duplex any of them but assume full duplex by default 


This question is purely wordplay! The most important words are transit and maximal. 

There's a night and day difference in the meaning of words - TRANSMIT and TRANSIT.

Informally Transit is - When you order a package from say China and destination is say Delhi the tracking shows - 

China - Shenzhen - Kolkata  . . . . . . . .  Delhi.

Currently your package is stuck at customs in Kolkata and not reached the destination Delhi (your home). So you can say your package is in transit or according to question your frame is in transit and not delivered to your home or receiver, but in this question we are sending many frames per second and to be precise, here 1000 frames are in transit per second or Sender should send 1000 frames per second to utilize the link fully and in question they are asking - 

Maximal (not maximum) frames should be in transit i.e the maximum frames should be on the way from Sender to Receiver or simply put before the first frame reaches the destination, how many frames sender can put on the link, that we need to find. 

That's why it's only one way (Tp i.e the time which is in the hands of the acting Sender to bombard the channel/link with as many packets he can send, but B/W is 10^6 bps and Sender can only send data in bundles of 1000 bits because frame size is 1000 bits. So, 10^6 divided by 1000 gives you 1000 frames per second, but sender has allocated a fixed time for this Transmission which is the Tp time of 25 millisecond.) and there's no concept of RTT because of word transit.

So, Sender can send 1000 frames per second. So in 25 seconds sender can send 25000 frames, but sender doesn't have 25 seconds, sender has 25 milliseconds. So Sender can only send for 25 milliseconds thus - 25000*10^-3 will give you 25 frames per millisecond and that makes sense because when you calculate Tt it's 1ms i.e Sender takes 1 ms to put one frame on the link and thus in 25ms it can put 25 frames, thus verified, things are fine! So SWS in transit maximally can hold 25 frames and thus log(25) ceil = 5 bits.

More information ---- When you take the word TRANSMIT AND TRANSIT AS SAME, which indeed is wrong!

The below SWS = 51 packets when the word mentioned is TRANSMIT or Transmitted.

The reason we are getting N (SWS) = 51 packets and then 6 bits for sequence # field is wrong because we are calculating MAXIMUM packets (TRANSMITTED TO R (not sure of being successfully transmitted because no ACK, but trasmit nonetheless from S to R AND NOT IN TRANSIT to R) that S can send which includes the RTT of 2*25ms = 50ms and then you say it's 1 + 50 = 51 packets, but those are MAXIMUM packets and not maximal and on top of that those packets are not in transit because at least one packet has reached the destination, processed and ACKED. Considering 1ms for piggybacking, that's something different.

My main intention was to tell "the words TRANSIT and MAXIMAL" even the link is full duplex restricts us to find max # of transmissions in only one side like a half duplex kind of!


 those packets are not in transit because at least one packet has reached the destination, processed and ACKED

brilliant answer by you.  really transit word  was playing a key role.

if nothing is mentioned about piggybacking in this question then we should not talk about it.


@iarnav sir it was really a brilliant explaination..

can you please also explain..that when we have to divide/ multiply the Bandwidth by 2, in cases of full or half duplex links

Thank you very much for this clarity.
I got the difference between transit and transmit but what is the difference between maximal and maximum in here....what would be the effect in answer if we have maximum in place of macimum?
Amazing answer, thank you. One question though, why do we need sequence numbers anyway? What purpose do they serve in this specific question.


not 51 frame only 50 

total frame = RTT/TT

50 ms /1 ms= 50 frame 

anyway thank you for sharing good information  



No, the SWS is equal to the no. of frames transmitted in Transmission Time + Round Trip Time.

It's 50 not 51
it will be 51 only , "1 packet is put into link even before(or at the same moment) the start of propagation time (because that packet only going to start propagation time countdown)"

@dr_Jackal 51 is max frame  send 

but in question mention pt=25ms ,  then rtt =50ms  


frame size 1000 then 50000/1000=50  


refer this  

16 Answers

101 votes
Best answer

Bandwidth won't be halved in full duplex.

Propagation time is given as $25\ ms$. 

Bandwidth $=10^6\ bps$. 

So, to fully utilize the channel, we must send $10^6$ bits into the channel in a second, which will be $1000$ frames per second as each frame is $1000$ bits.

Now, since the propagation time is $25\ ms,$ to fully pack the link we need to send at least $1000\times 25\times 10^{-3}=25$ frames.

So, we need $\lceil\log_{2} 25\rceil=5\text{ bits}.$

Correct Answer: $D$

edited by
Once the packet is sent, it will take 25 ms for the last bit of that packet to reach destination. ACK will take 25 ms to reach back. Assuming ack is of negligible length, between the last bit of packet and the ack packet we have a total of 50 ms time. Why can't we fill all that 50 ms with packets (each taking 1ms for transmission), making a total of 50 packets stuffed during that time period (instead of 25)?
@Arjun Sir what would be the window size in this case? because window size is number of frames in 1 RTT, so would it be 25 or 50 ?
Is this approach correct?:

Transmission time = $1000/10^6 = 1 msec$
Since we have to maximally pack the transit, we modify the formula for utilization a bit as:

$1 = (N \times 1)/(1 + 25)$ (25 because we need not care for the ACK's propagation time)
Here $N$ is the window size.
$\rightarrow N = 26$
$\rightarrow 2^n - 1 = 26 \rightarrow n = \left \lceil log_2{27} \right \rceil = 5$

"Window size is the number of frames in 1 RTT" is wrong. When we need 100% efficiency then window size is the number of frames in 1 RTT and here it is not the case where we need 100% efficiency.
@Arjun.. Nowhere in the question it is given that acknowledgment is piggybacked
@Arjun Sir, RTT as calculated by you is 52 in this case and we want to maximally pack the channel. So why dont we consider sending frames for 52 unit of time, why only 25? Please explain

Hemant Parihar Doesn't "maximally pack the packets" and 100% efficiency mean the same???  RTT in this example is 52. Why we are considering during propagation time of data from sender only.. Sender can send frames even after receiver starts sending acknowlegement. Why are not considering that time, when we have to maximally pack the frames.. Kindly explain 


Can we send data when ack is coming in reverse direction in half duplex link?

 @sushmita Do not you think if this will happen then it will become full duplex link ?


Can anyone guide me where am I heading wrong?

Becoz transmission is possible from a to b and b to a also so  sir capacity of full duplex =2*propogation delay * bandwidth =2*25*(10^-3)*10^6 i.e = 50*10^3= 50 frames for identifying log(50)base 2 = 6 bits are required.

Please correct me if i am wrong
@sushmita the derivation of that formula is like

in Tt sec -> 1 pkt is transmitted, then in 1 sec -> 1/Tt packet is transmitted

Now as Arjun sir said Ack will be piggybacked, here the general formula is

Optimal win size = (Tt + RTT) * 1/ Tt (Packets per second * seconds gives total packets)

Now as sir said Tp will not be considered as they are piggybacked but now the Tt will be considered from receiver. so it becomes

optimal win size= (Tt(during sending) + Tp(traveling from S to D ) + Tt of Ack) * 1/Tt

you will get the answer.

Don't blindly follow 1+2a it is straightforward case. Many manipulation can be done in RTT.

But after reading the question it is very difficult to think given full duplex ack is not considered.

I feel the question just uses the concept of bandwidth delay product. We don't need to bring in all the concepts of stop and wait or sliding window here.

bandwidth is 106bps which means per second 106 bits are put onto the channel.

So in 1ms 103 bits are transmitted on the channel.

At t=0ms a bunch of 103 bits starts to get transmitted which is finally on the channel at t=1ms.

At t=1ms 2nd bunch of 103 bits is transmitted and is finally on the channel at t=2ms and the previous 103 bits has traveled by some distance.

At t=2ms 3rd bunch of 103 bits is transmitted and is finally on the channel at t=3ms and the 2nd 103 bits has traveled by some distance and the first has traveled a further more.

This continues till t=25ms when the first bunch  just reaches the destination ( as 25ms is the propagation delay) and 25th bunch just got transmitted on the channel.

At this instant the channel is filled with 25*103bits = 25 frames.

So to represent 25 frames we need 5 bits.




Channel utilization = 2*Tp *bandwidth

                                = 50 x 103 bits

total data send =  50 x 103 bits

Frame size = 1000 bits

 No of frames we sent   =   50 x 103 bits /  1000 bits 

                                         = 50 frames

we you tell me where I'm wrong ??

My question is I understood your logic clearly but If in xam in the question paper they didn't mention anything about full-duplex and half-duplex....

and "6 bits" is also there in the options

then I have serious doubt in it  :3


yes right but I read in one of the previous comments that duplex by default means full duplex, also Sir took it as full duplex.

But now there might be this confusion that why aren't we considering the frames being piggybacked from the other end. They are also present in the channel. In that way a total of around 50 packets will be there at the same time in the channel. But the sequence no. wrt to End A and End B are different. A can send at most 25 frames to fill up the channel which requires 5 bits and same for the receiver. They individually require 5 bits.



Oh yes  MiNiPanda :p


Sir how to decide when to use which formula

1/+2a or some other one

@Khushal...Read above all comment , you will get answer.

Sequence number is based on bytes of all combined frames the why we calculated log of number of frames?
Excellent elaboration ..
36 votes

BW both the sides will be 106​ ​bps for a full-duplex channel/wire/link.

We are actually only considering transit to one side while transmission of the packets to fully pack them in the link(106 bps). So, instead of the general approach of taking 1+2a packets, here we are taking 1+a packets since we are only considering the time of 1 Tp, we need to keep the link full for 1 Tp.

So, Min. no. of packets required = 1 + a = 1 + 25/1 = 26 packets.

Min. no. of bits required = log2​(26) = 5 bits.

So, 5 bits are enough to pack one side of the link while the frames are in transit.

Actually, both the hosts will send data packets and acknowledgements, but for both the sides, 5 bits are enough individually to fully pack 106​ bits from both the sides(full-duplex). Here, to keep things simple, I have only discussed considering one sender and one receiver only.  

For optimal case, when we also consider the time of the acknowledgement coming back, that time also packets can be kept on transmitting in the channel,

So, Min. no. of packets required = 1 + 2a = 1 + 2*25/1 = 51 (doesn't matter if the ack. is piggybacked or not).

and Min. no. of bits req = log2​(51) = 6 if we want this kind of link utilization.

Again, here also for simplicity, only considered one sender and one receiver.

But in reality both the hosts will act as source and destination simultaneously. Obviously, the acknowledgements will be piggybacked in such a practical case.

edited by
18 votes

When the link is duplex do we have to take Bandwidth  = B/2 ?

My solution:

reshown by
I have a doubt in your approach.Why did you half the given bandwidth?
As mentioned in solution why should we half the given bandwidth when it is duplex?

Thank you in advance.
No , i case of duplex link bandwidth wont be divided by 2
I have also taken the same approach But not sure about "When the link is duplex do we have to take Bandwidth  = B/2 ?"

Can anyone tell?
11 votes

Answer (D).

Given, propagation time =25 ms.

Time required to transmit 1 frame = 1000 bits (frame size)/ 10^6 bps(bandwidth) = 1 ms

To fully utilize the channel, we need to transmit frames for propagation time(25 ms), 25 frames.

therefore, minimum no. of bits required for numbering 25 frames is = log2 (25) = 5 bits.

edited by
I just have 1 question if it would have not been given that the channel is duplex. Then

"To fully utilize the channel, we need to transmit frames for propagation time(25 ms)"

wil change to

"To fully utilize the channel, we need to transmit frames for round trip time which is 2*propagation time=(50ms) ??
4 votes

Duplex simply means both sender and receiver can send and receive the signals which is bydefault as we know.

Tx = 1ms (1 frame data put on cable) 

Tp = 25ms (25 frame data can be put on cable in this time if we fully utilize the link).

Total time : 1 + 25 = 26 ms (from frist bit of of first frame put on cable to last bit of frame reached to receiver)

So to fully utilize the link we must use the link for 26 ms (26 frames need to transmit)

frames numbered as 0,1,2,3,...25 thus we need 26 different sequence numbers

therefore bits rewuired for sequence number = ceil(log 26) = 5

3 votes

For Half Duplex, Capacity of the channel = BW * Tp
So we get capacity = $10^6$ b/s * 25 * 10 ^ -3 s
                               = 25 * $10^3 bits$

so a channel can contain 25 * $10^3 bits$ but we are sending only frames of 1000 bits
Therefore, the total no. of frames we are sending with its full channel capacity = 25 * 1000/1000 = 25 frames.
For this much frames the seq.numbers nedded are 25.
And required are $Ceil(\log_{2}25)$ = 5 bits

edited by
2 votes

5 bits

according to me , the question doesnot asking about how many maximum packet we could sent it is asking how many maximum packet we can send while transit(meaning during transmission only) and significance of giving duplex here is together ack also came we can get data parallely
why RTT = PT in full duplex?
1 vote
Propagation time is given as 25 ms.

Bandwidth = 106 bps.

So, to fully utilize the channel, we must send 106 bits into the channel in a second, which will be 1000 frames per second as each frame is 1000 bits. Now, since the propagation time is 25 ms, to fully pack the link we need to send at least 1000 * 25 * 10-3 = 25 frames. Since, to represent 25 frames we need 25 distinct index numbers. Thus, minimum no. of bits required to do this will be 5 (2^5=32) as 4 will not be enough (2^4=16, not enough to represent 25 distinct no.)
@Arjun  Sir ,why we are not considering the other tp for acknowledgement. in this time, we can sent more 25 packets.

Related questions

16 votes
4 answers
In which one of the following page replacement policies, Belady's anomaly may occur? FIFO Optimal LRU MRU
asked Sep 22, 2014 in Operating System Kathleen 3.9k views
54 votes
6 answers
Frames of $1000\text{ bits}$ are sent over a $10^6$ bps duplex link between two hosts. The propagation time is $25ms$. Frames are to be transmitted into this link to maximally pack them in transit (within the link). Let $I$ be the minimum number of ... wait before starting transmission of the next frame? (Identify the closest choice ignoring the frame processing time) $16ms$ $18ms$ $20ms$ $22ms$
asked Apr 23, 2016 in Computer Networks jothee 12.6k views
20 votes
6 answers
$S \to aSa \mid bSb\mid a\mid b$ The language generated by the above grammar over the alphabet $\{a,b\}$ is the set of: all palindromes all odd length palindromes strings that begin and end with the same symbol all even length palindromes
asked Sep 22, 2014 in Theory of Computation Kathleen 5.3k views
35 votes
6 answers
Let $G(x)$ be the generator polynomial used for CRC checking. What is the condition that should be satisfied by $G(x)$ to detect odd number of bits in error? $G(x)$ contains more than two terms $G(x)$ does not divide $1+x^k$, for any $k$ not exceeding the frame length $1+x$ is a factor of $G(x)$ $G(x)$ has an odd number of terms.
asked Sep 22, 2014 in Computer Networks Kathleen 11.2k views