% -------------------------------------------------------------------------
%  CS 716: Introduction to Communication Networks. Quiz 1: 26 Aug 2011
% -------------------------------------------------------------------------
\documentstyle[11pt]{article}
\renewcommand{\baselinestretch}{1.1}

\textwidth 6.75in
\textheight 9.75in
\topmargin -0.5in
\oddsidemargin -0.1in
\evensidemargin -0.1in

\newcommand{\bc}{\begin{center}}
\newcommand{\ec}{\end{center}}
\newcommand{\bi}{\begin{itemize}}
\newcommand{\ei}{\end{itemize}}
\newcommand{\be}{\begin{enumerate}}
\newcommand{\ee}{\end{enumerate}}
\newcommand{\im}{\item}

\begin{document}
\pagestyle{empty}

\begin{center}
{\large Department of Computer Science and Engg, IIT Bombay} \\ 
{\large CS 716: Introduction to Communication Networks} \hfill{Quiz 1: 26 Aug 2011; 11:00--12:20} \\ 
Handwritten notes permitted. No photocopies. \hfill{Weightage: 10\%, Max Marks -- 30}\\
\end{center}

\hline
\be

\im Answer the following in 5-6 sentences each: \hfill{\bf 15~marks}
\be
\im In ALOHA protocol, a station transmits whenever it has data. 
In slotted-ALOHA, a station transmits only at the beginning of the next time slot.
State one advantage of using slotted-ALOHA over ALOHA. State one drawback.
%-- Stations can collide only with other transmitting in their slot, so throughput doubles; Disadvantage is slot sync implementation complexity.

\im Your friend claims that the non-persistent CSMA protocol performs better than the 1-persistent CSMA protocol.
Do you agree? If yes, justify your answer. If not, give a counter-example scenario.
%-- Yes, if you assume that there are many nodes in the network and each having data to transmit (heavy load).
%-- No, under light load. Transmissions are so infrequent that the probability of finding medium free is high.

\im List the delay components that make up the end-­to-­end delay experienced by a packet from a source host to a destination host via intermediate routers. Also specify which of these delay components are constant and which variable?
% At Source: Lower layer processing (adding headers); Transmit Queue, time to transmit onto link; Propagation to router.
% At Destination: Time to receive from link, lower layer processing (removing headers).
% At Router: All destination delays (to receive from previous hop) + IP processing (routing table lookup) + All Source delays (for transmit to next hop).
\ee

\im Solve the following problems: \hfill{\bf 15~marks}
\be
\im You are working on your laptop and need a 2GB file that is on the server. The entire file is also on your pen drive 
but you have left the pen drive in another room. You have a dog, sitting beside you, that is trained to bring the pen drive to you. 
The average speed of the dog is 20 km/hour. For what range of distances does the dog have a higher data rate than a 100 Mbps Ethernet link?
%-- Compute how long does it take to transmit 2GB at 100 Mbps. This is the RTT for the dog. The distance works out to 4/9 of a KM.

\im Two nodes are communicating using the CSMA/CD protocol (as in Ethernet).
Suppose the bandwidth is 100 Mbps, the frame size is 1500 bytes and the propagation speed is $3 \times 10^8$ m/sec.
Calculate the maximum possible distance between the nodes such that the sender can detect if any collision occurs.
%-- Expected answer: 18 KM.
%-- transmit time for frame = [(1500*8)/100] microseconds. This should be equal to the RTT, for collision to be detected.
%-- distance = one-way propagation delay (RTT/2) * propagation speed.

\im Suppose there are N users who share a bottleneck link of bandwidth R bits/sec. Each user continuously
downloads files through this link, i.e., as soon as one download completes, the next download for that user begins. 
Assume that each file is of size F bits, and that each user gets an equal share of the link. What is the average
time to download a file?
%- Each user gets = R/N bps. File of F bits over a link of R/N => F*N/R seconds.

\ee
\ee
\hline 
\end{document}
