#page no. 253
import math
Y=2.#prpogation path-loss exponent
r2=10.**3.
r1=10.
delPr=20.*math.log10(r2/r1)**2.#log(r2/r1)*20dB/decade
print '%s %d %s' %('difference between the recieved signal strength is =',delPr,'dB')
imp=delPr+20#impact
print '%s %d %s' %('effect of shadow fading causes difference between the recieved signal strength to exceed to',imp,'dB')
outrad=40#out of bound radiations
print '%s %d %s' %('IMPACT is out-of-bound radiations exceeds the desired signal strength by',imp-outrad,'dB')
#page no.255
Bt=12.5*10.**6.
Bg=10.**3.
Bc=30.*10.**3.
N=(Bt-2.*Bg)/Bc#no. of channels
print'%s %d %s' %('no. of channels available in an FDMA system is',N,'channels')
#page no. 256
TS=5.*10.**6.#total spectrum
CBW=25000.#bandwidth (channel)
ns=TS/CBW
nspd=2.
nd=ns/nspd#Number of simultaneous calls
print'%s %d %s' %('Number of simultaneous calls=',nd,'calls')
#page no. 259
Bt=25.*10.**6.#allocated spectrum
Bc=200.*10.**3.#channel bandwidth
Bg=0.#no guard band
m=8.#no. of speech channels
N=m*(Bt-2.*Bg)/Bc
print'%s %d' %('no. of simultaneous subscribers a GSM system can accommodate is =',N )
#page no. 263
N=156.25#total bits
nov=40.25#overhead bits
FReff=(1.-nov/N)*100.#frame efficiency
print'%s %.1f %s' %('the frame efficiency is',FReff,'%')
#page no. 285
import math
TDR=1.*10.**6.
G=0.5
SmaxALOHA=G*math.e**(-2.*G)*TDR# throughput
print'%s %d %s' %('max. throughput of ALOHA with large no.of subscibers with transmission rate of 1Mbps is =',round(SmaxALOHA*10**(-3)),'kbps')
Stdma=100/100*TDR
print'%s %.f %s' %('throughput of a TDMA network with transmission rate of 1Mbps is =',Stdma*10**(-6),'Mbps')
Saloha=TDR
print'%s %.f %s' %('throughput of ALOHA with 1 subsciber with transmission rate of 1Mbps =',Saloha*10**(-6),'Mbps')