Sliding window protocol



The answer given is 5 which we get when we solve it using the formula 2*a.
My doubt is when do we use the formula (1 + 2*a) to find the optimal window size ?


propagation : 10^6/(210^8)sec = 5 mSec
round trip time : 10millisec
number of bytes we can transmit in 10millisec : 10
10^(-3) * 128 * (10^3)*(1/8) = 160Bytes
number packets is 160B/32B = 5packets.
It is optimal window
But i dont know about that formula how to use .


go to this link and see, for max utilisation the window size should be (1 + 2a)
but here we are only considering 2a