In [1]:

```
#Variable declaration
O=800*1000; #Object size(Bytes)
S=536.*8; #max Segment Size(in bits)
RTT=0.1; #Round trip-time in sec
R=1.*10**6; #Transmission rate of the link from the server to the client in bps
#Calculations
Lmin=2*RTT+(O/R); #latency(msec)
# For minimum latency (S/R) +RTT -(W*S/R) = 0;Therefore
W=1+(RTT)/(S/R);
#Results
print 'The minimum possible latency is %d sec'%Lmin;
print 'The minimum window size is %.1f segments'%W;
```

In [2]:

```
import math
#Variable declaration
RTT=0.1; #Round trip-time in sec
MSS=536.*8; #Maximum segment size in bits
p=0.01;# packet loss probability for the path
RTO=5*RTT; #Retransmission time out(from eqn 14.2 on page 450)
#Calculations
R=0.93*MSS/(RTT*math.sqrt(p));
RR=MSS/(RTT*math.sqrt(1.33*p)+RTO*p*(1+32*p**2)*min(1,3*math.sqrt(0.75*p)));
#Results
print 'The upper bound of the throughput is %.4f Mbps'%(R*10**-6);
print 'The throughput with retransmission due to errors is %.4f Mbps'%(RR*10**-6);
```