ISP granted block of addresses starting with 188.50.0.0/16. So Total no of addresses available now is $2^{16}$=$65536$.
Group 1 has 30 medium size businesses each need 128 addresses.So we need $\log_{2}128=7$ bit to define each host.The prefix length for group 1 is then $32-7=25$.
The addresses are :-
1st business :- $188.50.0.0/25 -------188.50.0.127/25$
2nd business :-$188.50.0.128/25 -------188.50.0.255/25$
3rd business :-$188.50.1.0/25 -------188.50.1.127/25$
4th business :- $188.50.1.128/25 -------188.50.1.255/25$
so on
29th business:-$188.50.14.0/25 -------188.50.14.127/25$
30th business:-$188.50.14.128/25 -------188.50.14.255/25$
So total address used in group 1 is $30*128=3840$.
Group 2 has 50 small size businesses each need 64 addresses.So we need $\log_{2}64=6$ bit to define each host.The prefix length for group 2 is then $32-6=26$.
The addresses are :-
1st business :-$188.50.15.0/26 -------188.50.15.63/26$
2nd business :-$188.50.15.64/26 -------188.50.15.127/26$
3rd business :-$188.50.15.128/26 -------188.50.15.191/26$
4th business :- $188.50.15.192/26 -------188.50.15.255/26$
so on
49th business :- $188.50.27.0/26 -------188.50.27.63/26$
50th business :- $188.50.27.64/26 -------188.50.27.127/26$
So total address used in group 2 is $50*64=3200$.
Group 3 has 20 small household each need 32 addresses.So we need $\log_{2}32=5$ bit to define each host.The prefix length for group 3 is then $32-5=27$.
The addresses are :-
1st Household :- $188.50.27.128/27 -------188.50.27.159/27$
2nd Household :- $188.50.27.160/27 -------188.50.27.191/27$
3rd Household :- $188.50.27.192/27 -------188.50.27.223/27$
4th Household :- $188.50.27.224/27 -------188.50.27.255/27$
so on
19th Household :- $188.50.29.192/27 -------188.50.29.223/27$
20th Household:- $188.50.29.224/27 -------188.50.29.255/27$
So total address used in group 3 is $20*32=640$.
So total number of addresses still available =$65536-(3840+3200+640)$=$57856$.
Similar problem for Practice :- https://uomustansiriyah.edu.iq/media/lectures/5/5_2019_02_02!12_07_44_AM.pdf