# Homework 2 (FCN)
## 1
a) The assumption is that the paradigm is that it is a unicast.
b) IP multicast is a way to send data to groups of interested receiver in a single transmission after the data is uploaded to the server. It optimises the use of comunication bandwidth by sending the file to all clients at the same time. In this case, the data will be distributed from the sender as a root to the clients which act as leaves. The data is sent once then replicated along the router going to the clients. Since it is sent once along the path to the clients, it is optimising the network bandwidth.
c) It is easier to deploy P2P sharing on the internet because it does not require routers to copy the files sent over through the multicast tree. So long as the end servers or the end computers can deliver the requested file, it is easier to deploy a P2P sharing protocol.
## 2
a) Consider a distribution scheme where server sends a file to each client in parallel at the rate of $u_s/N$, which is less than $d_{min}$. This means that each client receives at the maximum at the rate of $u_s/N$. For each file F that needs to be received by N clients, the time taken would be $F/ (u_sN^{-1})$ which is equal to $NF/u_s$. Since the time necessary for all the clients to receive file F is $NF/u_s$, therefore the overall distribution time would be $NF/u_s$.
b) Consider a ditribution scheme where the server sends files to each client in parallel at the limiting rate of $d_{min}$. This means that each client receives the file at a limiting rate of $d_{min}$. Since each client will need $F/d_{min}$ time to receive the file, the overall distribution time will be $F/d_{min}$.
c) We know that $D_{CS}$ ≥ max {$NF/u_s$, $F/d_{min}$} (Equation 1) [from section 2.6 in Textbook]
Suppose that $u_s/N ≤ d_{min}$.
From Equation 1 it is defined that $D_{CS} ≥ NF/u_s$
However from part a) it is shown that $D_{CS}$ ≤ $NF/u_s$
Combining the 2 equations give the following:
$D_{CS} = NF/u_s$ when $u_s/N ≤ d_{min}$. [Equation 2]
As such, it can be shown that:
$D_{CS} = F/d_{min}$ when $u_s/N ≥ d_{min}$ [Equation 3]
Combining Equation 2 and 3 will result in general, the following:
Minimum distribution time = max {$NF/u_s$, $F/d_{min}$}