For each assignment, the problem numbers and due date will be specified in the Course Schedule.
Problems that are not included in the assignment are exercises only.
Note: problems on topics that are not yet covered in class will keep being updated.
Solutions for assignments and exercise problems on covered topics will be posted after the assignments
are graded each time.
Survey Problem
1
1.1
Introduction to Internet
W&P, P1.1
2 Points. How many hosts can one have on the Internet if each one needs a distinct IP address?
1.2
8 Points. Imagine that all routers have 17 ports. There are 216 hosts to be connected. Assume you
can organize the hosts and routers any way you like. Your goal is to (i) design the network structure so
as to minimize the number of routers required, and (ii) based on the network design in (i), assign the
addresses to minimize the size (number of entries) of the routing table required in each router.
(a) 4 Points. Describe your network structure and explain why your design gives the minimum number
of routers.
(b) 4 Points. Describe your scheme for assigning addresses and routing. Explain why your design
gives the minimum routing table size in each router.
There exist theoretical lower bounds on the number of routers and the size of the routing table. Point
out these lower bounds explicitly in your solution, and use them to verify your design.
1.3
W&P, P1.4
3 Points. Assume that a host A in Berkeley sends packets with a bit rate of 100Mbps to a host B
1
in Boston. Assume also that it takes 130ms for the first acknowledgment to come back after A sends
the first packet. Say that A sends one packet of 1Kbyte and then waits for an acknowledgment before
sending the next packet, and so on. What is the long-term average bit rate of the connection? Assume
now that A sends N packets before it waits for the first acknowledgment. Express the long-term average
bit rate of the connection as a function of N . [Note: 1 Mbps = 106 bits per second; 1 ms = 1 millisecond
= 103 second.]
1.4
4 Points. A horizontal and vertical parity check of size K by L takes (K 1) binary sequences each of
length (L 1) bits and outputs K binary sequences each of length L bits such that if these sequences
are arranged into an K by L matrix, then each row and each column will have an even number of 1s.
The parity check works as follows. To send (K 1) data sequences each of length (L 1) bits, the
sender sends the K by L matrix. The receiver checks the parity of each row and each column. If there
is any row or column that has odd parity, an error is detected.
(a) 2 Points. Give an example of a pattern of six errors that cannot be detected by horizontal and
vertical parity checks.
(b) 2 Points. Find the number of different patterns of four errors that will not be detected by horizontal
and vertical parity checks.
1.5
2 Points. Customers arrive at a fast food restaurant at a rate of five per minute and wait to receive
their order for an average of 10 minutes. Customers eat in the restaurant with probability 1/2 and take
out their order without eating with probability 1/2. A meal requires an average of 20 minutes. What
is the average number of customers in the restaurant?
1.6
3 Points. Two nodes A and B need to be connected via a communication link. On average, it is
estimated that 1000 packets will arrive at A destined for B each second, each packet having an average
size of 1 Kbyte. There are two design choices: (i) you build a single link with rate 10Mbps between
A and B, (ii) you build two parallel 5Mbps links, and send a packet arriving at A randomly via either
link. Assume each link is equipped with an infinite sized buffer. Assuming the M/M/1 formula for the
delay on a link, compute the average packet delay in each case. Which design choice is better? Can
you explain why? You may ignore packet propagation times.
1.7
W&P: P2.6
3 Points. Consider a router in the backbone of the Internet. Assume that the router has 24 ports,
each attached to a 1Gbps link. Say that each link is used at 15% of its capacity by connections that
have an average throughput of 200kbps. How many connections go through the router at any given
time? Say that the connections last an average of 1 minute. How many new connections are set up
that go through the router in any given second, on average?
1.8
W&P, P2.7
4 Points. We would like to transfer 20 KB (1 Byte=8 bits) file across a network from node A to node
F. Packets have a length of 1 KB (neglecting header). The path from node A to node F passes through
5 links, and 4 intermediate nodes. Each of the links is a 10 km optical fiber with a rate of 10 Mbps
(assume speed of light in optical fiber is 2.0 108 m/s). The 4 intermediate nodes are store-and-forward
devices, and each intermediate node must perform a 50 s routing table look up after receiving a packet
before it can begin sending it on the outgoing link. How long does it take to send the entire file across
the network?
1.9
W&P, P2.9
3 Points. Consider the case of GSM cell phones. GSM operates at 270.88 Kbps and uses a spectrum
spanning 200 KHz. What is the theoretical SNR (in dB) that these phones need for operation? In
reality, the phones use a SNR of 10 dB. Use Shannons theorem to calculate the theoretical capacity
of the channel, under this signal-to-noise ratio. How does the utilized capacity compare with the
theoretical capacity?
1.10
IP addresses
2 Points. Consider an IPv4 subnet with private IP address space 166.111.8.0/24. If each IP interface
in the subnet needs a distinct IP address, then how many IP interfaces can there be in the subnet?
[Hint: to obtain the right answer, please look up what is a broadcast address online.]
1.11
Network operations
6 Points. Assume that host A sends a file of 20 KByte (1 Byte=8 bits) to host F. Host A segments the
file into 22 packets, each of 1 KB (why 22 packets instead of 20?). The path from A to F passes through
5 links and 4 routers. Each link is a 10km optical fiber with 10 Mbps capacity (the speed of light in an
optical fiber is 2.0 108 m/s). East router performs a 50s routing table look up after receiving a whole
packet, before forwarding the packet to an output port. How long does it take for the file to reach F?
(Assume that a router can look up the routing table for multiple packets simultaneously.)
Ethernet
2.1
W&P, P3.2
3 Points. Consider the Slotted ALOHA MAC protocol. There are N nodes sharing a medium, and
time is divided into slots. Each packet takes up a single slot. If a node has a packet to send, it
attempts transmission with a certain probability. The transmission succeeds if no other node attempts
transmission in that slot.
Now, suppose that we want to give differentiated services to these nodes, i.e., we want different nodes
to get a different share of the medium. The scheme we choose works as follows: If node i has a packet
to send, it will try to send the packet with probability pi . Assume that every node has a packet to
send all times. In such a situation, will the nodes indeed get a share of the medium in the ratio of their
probability of access?
2.2
W&P, P3.4
4 Points. Consider a commercial 10 Mbps Ethernet configuration with one hub (i.e., all end stations
are in a single collision domain).
(a) 2 Point. Find the Ethernet efficiency for transporting 512 byte packets (including Ethernet overhead) assuming that the propagation delay between the communicating end stations is always 25.6 s,
and that there are many pairs of end stations trying to communicate.
(b) 2 Points. Recall that the maximum efficiency of Slotted Aloha is 1/e. Find the threshold for the
frame size (including Ethernet overhead) such that Ethernet is more efficient than Slotted Aloha if the
fixed frame size is larger than this threshold. Explain why Ethernet becomes less efficient as the frame
size becomes smaller.
2.3
W&P, P3.5
4 Point. Ethernet standards require a minimum frame size of 512 bits in order to ensure that a node
can detect any possible collision while it is still transmitting. This corresponds to the number of bits
that can be transmitted at 10 Mbps in one roundtrip time. It only takes one propagation delay, however,
for the first bit of an Ethernet frame to traverse the entire length of the network, and during this time,
256 bits are transmitted. Why, then, is it necessary that the minimum frame size be 512 bits instead
of 256?
2.4
6 Points. In the network shown in Figure 1, all of the devices want to transmit at an average rate
of R Mbps, with equal amounts of traffic going to every other node. Assume that all of the links are
half-duplex and operate at 100Mbps and that the medium access control protocol is perfectly efficient.
Thus, each link can only be used in one direction at a time, at 100Mbps. There is no delay to switch
from one direction to the other.
1. 3 Points. What is the maximum value of R?
2. 3 Points. The hub is now replaced with another switch. What is the maximum value of R now?
Figure 1: An ethernet. Each circle represents a host, that wants to send an aggregate of R Mbps traffic,
evenly to other hosts.
2.5
6 Points. Consider the network topology shown in Figure 2, where 1, 2, . . . , 8 denote 8 switches
interconnecting 9 Ethernets.
1. 3 Points. Determine which links get deactivated after the Spanning Tree protocol runs, and
indicate them on the diagram by putting a small X through the deactivated links.
2. 3 Points. A disgruntled employee wishes to disrupt the network, so she plans on unplugging
central bridge switch 8. How does this affect the spanning tree and the paths that Ethernet
packets follow?
2.6
Aloha
(a) (Equal Share). Assume that n hosts share a medium using the slotted ALOHA protocol: at
every time slot, each host attempts to send a packet with probability p. A host succeeds to send a
packet at a given time slot if and only if it is the only host that sends a packet at that time slot.
1. 2 Points. What is the probability that a host sends a packet successfully at a give time slot?
2. 2 Points. What is the probability P{a packet sent} that a packet be sent at a given time slot?
3. 4 Points. What choice of p maximizes the probability P{a packet sent}? How does this maximum
probability behave as n ?
(b) (Unequal Share). Assume that n hosts share a medium using the slotted ALOHA protocol, but
at every time slot, each host attempts to send a packet with a different probability. More specifically,
let N := {1, . . . , n} denote the collection of hosts and assume that host i attempts to send a packet
with probability pi (0, 1) at every time slot for i = 1, . . . , n.
1. 2 Points. What is the probability Pi := P{i sends a packet successfully} that host i N sends
a packet successfully at a given time slot?
2. 2 Points. What is the ratio P1 : P2 : P3 : : Pn ? This ratio characterizes the share of medium
among the hosts. Is the share of medium proportional to the probabilities pi that hosts attempt
to send packets, i.e., is the ratio P1 : P2 : P3 : : Pn equal to p1 : p2 : p3 : : pn ?
Pn
Pn
3. (*) 5 Points. Assume i=1 pi = 1 and let P := i=1 Pi denote the probability that a packet gets
successfully transmitted at a given time slot. Prove that (p1 , p2 , p3 , . . . , pn ) = (1/n, 1/n, . . . , 1/n)
minimizes P , i.e., (1/n, 1/n, . . . , 1/n) is the solution to
min
n
X
i=1
pi
(1 pj )
j6=i
s.t. 0 pi 1,
n
X
pi = 1.
i = 1, . . . , n;
i=1
3
3.1
Routing
Longest prefix matching (exercise)
output port
1
2
Which outport should a packet be forwarded to, if its destination IP address is 166.111.8.28?
3.2
Consider the network topology depicted in Figure 3. Each link is marked with its weight/cost.
3.3
Dynamic routing
NN
NN
NN
NN
NN
(c) 2 points. Use the links flow rates you obtained in (b) as the links costs. Again, fix those link
costs, and compute the new shortest paths from station 0 to all other stations, using the Bellman-Ford
algorithm (and show the steps), and calculate the new link rates using the new shortest paths.
(d) 1 point. If this procedure is repeated, will the routing ever converge?
3.4
Consider the case where H1 sends 2Mbps traffic to H2 via one of two links as in Figure 5, either
through R1 or through R2. Consider the dynamic routing case where the routing table is updated
every 3 minutes. When the routing table is updated, the link weight at a link is computed by the
following equation:
weight =
Assume that at t = 0, the routing table is updated, and at t = 1ms, H1 starts sending traffic to H2.
Give the traffic throughput through Routers R1 and R2 at t = 1, 4, 7, . . . minutes.
3.5
Consider the network given in Figure 6. Each point represents a router, connected to its neighbors via
links of capacity 1. The links form the ring. Lable the routers by x [0, 1), and give router 0 two
labels: 0 and 1. Assume that all traffic have the same destination: router 0. Let r(x) denote the traffic
arrival rate at router x for x [0, 1), and assume r(x) = 2x.
2Mbps
R1
2Mbps
H1
H2
4Mbps
R2
4Mbps
Figure 5: A sends packets of 1KB to B via a 1Mbps link with 20KB buffer.
Let ds (y) := supx(0,y) ds (x, y) denote the maximum queueing delay over links x (0, y), i.e.,
+
over the links that forward packets clockwise. And let d+
s (y) := supx(y,1) ds (x, y) denote the
maximum queueing delay over links x (y, 1), i.e., over the links that forward packets counter
clockwise. What is d+
s (y) and ds (y)?
Assume that the propagation delay d
i (x) from x to 0 (clockwise) is x, and that the propagation
delay d+
(x)
from
x
to
1
(counter-clockwise)
is 1 x. Each router x has two paths, clockwise or
i
counter-clockwise, to forward packets to the destinationrouter 0(1). Label the clockwise path
by superscript - and the counter-clockwise path by superscript +, and define costs
D+ (x, y)
+
:= d+
s (y) + di (x),
D (x, y)
:= d
s (y) + di (x)
for the two paths. For what values of x is D+ (x, y) equal to D (x, y)?
Let x(y) denote the x where D+ (x, y) = D (x, y). Use matlab (or other tools) to draw x(y) as y
increases from 0 to 1, when does the line intersect z(y) = y?
9
Let y denote the y (0, 1) where x(y) intersects z(y). Show that
0<x<y
y<x<1
when y = y . That is, when x < y , the left path has smaller cost, and the right path has bigger
cost. This is considered stationary. Give an interpretation of why this is called stationary.
(b) (Dynamic Routing). Lets extend (a) to the dynamic routing case where routing y is updated
over time. Let y k denote the routing strategy at time k = 0, 1, 2 . . . and assume y k+1 = x(y k ) for
k = 0, 1, 2, . . . For what initial values of y0 does the sequence {yk }y0 converge?
3.6
The forward error correction code discussed in the lecture (and textbook) can be represented in the
matrix form as in Figure 7, i.e., C = P A, where C is a k m matrix that represents m encoded packets
C1 C2 C3
P1 P2 P3
Cm
Pn
for j = 1, . . . , m.
1 1
0 1
Let A =
0 0
1 0
0 1 0 1
0 0 1 1
1 1 0 1
1 1 0 1
3.7
Consider a wireless network with nodes X and Y exchanging packets via an access point Z. For simplicity,
we assume that there are no link-layer acknowledgments. Suppose that X sends packets to Y at rate
2R packets/sec and Y sends packets to X at rate R packets/sec; all the packets are of the maximum
10
size allowed. The access point uses network coding. That is, whenever it can, it sends the exclusive
or of a packet from X and a packet from Y instead of sending the two packets separately.
(a) 2 points. What is the total rate of packet transmissions by the three nodes without network
coding?
(b) 2 points. What is the total rate of packet transmissions by the three nodes with network coding?
11
4
4.1
Internetworking
W&P, P6.1
(a) 2 points. How many IP addresses need to be leased from an ISP to support a DHCP server (with
L ports) that uses NAT to service N clients at the same time, if every client uses at most P ports?
(b) 2 points. If M unique clients request an IP address every day from the above mentioned DHCP
server, what is the maximum lease time allowable to prevent new clients from being denied access
assuming that requests are uniformly spaced throughout the day, and that the addressing scheme used
supports a max of N clients at the same time?
4.2
(a) Consider a type D subnet (there are 256 IP addresses in a type D network, and one of these IP
addresses is used for broadcasting). Assume that 15 IP addresses are assigned to servers, then how
many hosts can this subnet support if there is no DHCP service nor NAT service?
(b) Assume that there is a DHCP server in the subnet, and that each host connects to the Internet 8
hours a day. How many hosts can this subnet support?
(c) Assume that the DHCP server also runs the NAT protocol, and can use up to 2000 TCP ports for
each dynamic IP address. Also assume that each host needs 20 TCP connections. How many hosts can
this subnet support?
12
5
5.1
Transport
W&P, P7.1
(a) 2 points. Suppose you and two friends named Alice and Bob share a 200 Kbps DSL connection to
the Internet. You need to download a 100 MB file using FTP. Bob is also starting a 100 MB file transfer,
while Alice is watching a 150 Kbps streaming video using UDP. You have the opportunity to unplug
either Alice or Bobs computer at the router, but you cannot unplug both. To minimize the transfer
time of your file, whose computer should you unplug and why? Assume that the DSL connection is the
only bottleneck link, and that your connection and Bobs connection have a similar round trip time.
(b) 2 points. What if the rate of your DSL connection were 500 Kbps? Again, assuming that the DSL
connection were the only bottleneck link, which computer should you unplug?
5.2
W&P, P7.2
As shown in Figure 8, station A has an unlimited amount of data to transfer to Station E. Station A
uses a sliding window transport protocol with a fixed window size. Thus, station A begins a new packet
transmission whenever the number of unacknowledged packets is less than W and any previous packet
being sent from A has finished transmitting.
The size of the packets is 10000 bits (neglect headers). So for example if W > 2, station A would start
sending packet 1 at time t = 0, and then would send packet 2 as soon as packet 1 finished transmission,
at time t = 0.33 ms. Assume that the speed of light is 3 108 meters/sec.
station(a)SupposestationBissilent,andthatthereisnocongestionalongtheacknowledgement
B and station A both use the window size W . What throughput would A and B path
get for their
flows? How much average delay do packets of both flows incur?
fromCtoA.(Theonlydelayacknowledgementsfaceisthe propagationdelaytoandfromthe
(c) 4 points.
What theaveragethroughput
average throughput and
delays
would A and B get for their flows if A and B both
satellite.)Plot
asa
functionofwindowsizeW.Whatistheminimum
used window
size
0.5W
?
What
would
be
the
average
throughput and delay for each flow if A used a
windowsizethatAshould choosetoachieveathroughputof30Mbps?CallthisvalueW*.With
window size of W and B used a window size of 0.5W ?
this choiceofwindowsize,whatistheaveragepacketdelay(timefromleavingA toarrivingat
E)?
Suppose
now that station B also has an unlimited amount of data to send to E, and that
5.3 (b)
W&P,
P7.3
stationBandstationAbothusethewindowsizeW*.What throughputwouldAandBgetfor
As shown
Figure 9, flows 1 and 2 share packetsofboth
a link with capacity
C = 120 Kbps. There is no other
theirinflows?Howmuchaveragedelaydo
flowsincur?
bottleneck.
The
round
trip
time
of
flow
1
is
0.1
sec
and
that
of
flow
is 0.2 sec.andBbothused
Let x1 and x2 denote
(c)WhataveragethroughputanddelayswouldAandBgetfortheir2 flowsifA
the rates obtained by the two flows, respectively. The hosts use AIMD to regulate their flows. That
windowsize0.5W*?Whatwouldbetheaveragethroughput anddelayforeachflowifAuseda
is, as long as x1 + x2 < C, the rates increase linearly over time: the window of a flow increases by one
windowsizeofW*andBusedawindow
sizeof0.5W*?
packet every round trip time. Rates are estimated
as the window size divided by the round-trip time.
Assume that as soon as x1 + x2 > C, the hosts divide their rates x1 and x2 by the factor = 1.1.
4.W&P:P7.3[4points]
Asshowninthefigure,flows1and2sharealinkwithcapacityC=120Kbps. Thereisnoother
bottleneck.Theroundtriptimeofflow1is0.1secandthatofflow 2is0.2sec.Let x1 and x2
Figure 9: Two flows sharing a link.
10
(a) 3 points.
Draw the evolution of the vector (x1 , x2 ) over time.
(b) 3 points. What is the approximate limiting value for the vector?
5.4
W&P, P7.4
5.5
Assume that a host A in Los Angeles sends packets, each of 1KByte, to a host B in San Francisco,
through a connection of 100Mbps capacity. Also assume that the round-trip time of each packet is a
constant of 130ms (no jitter).
(a) If A uses the window flow control mechanism with a constant window size W , then what is the
average bit rate of the connection as a function of W ? What happens as W increases to infinity?
(b) Now consider the case where W fluctuates, at a much slower timescale than the round-trip time
(this is not true in the TCP protocol) as in Figure 10. What is the average rate of the connection
assuming Wmax is not too big?
14
W
Wmax
Wmin
2T
time
Figure 10: Window size W fluctuates piecewise linearly in time, from Wmin to Wmax , in periods of
length T , which is assumed to be much bigger than the round-trip time.
5.6
Flows 1 and 2 share a link (the only bottleneck link) with capacity C = 20Mbps as in Figure 11. The
round-trip time of flow 1 is 1 = 0.1s while that of flow 2 is 2 = 0.2s (assume that there is no jitter).
Let x1 and x2 denote the throughput of flows 1 and 2 respectively. The hosts use AIMD to regulate
their flows:
When x1 + x2 C, the throughput x1 and x2 increase linearly over time: the window of a flow
increases by one packet every round-trip time. Assume that the packet size is 1.5KBytes.
When x1 + x2 > C, the hosts divide their window size by the factor = 1.1. Assume that flow 1
and 2 decrease their window sizes at most once every 0.2ms.
Throughput is estimated as the window size divided by the round-trip time.
Host
ow 1
Host
Host
ow 2
Host
Figure 11: Two flows share a bottleneck link. The bottleneck link is highlighted in red.
(a) Assume that at time t = 0, the window size of both flows is 1. Draw the evolution of the vector
(x1 , x2 ) over time. [Hint: use matlab.]
(b) What is the approximate limiting behavior for the vector? You will notice that the end-point of
the vector moves on a line that go through the origin as time evolves, and you are required to give the
slope of this line.
(c) Repeat (a) and (b) for = 1.2, 1.3, 1.4, 1.5. Can you find out how the slope depends on ?
5.7
Consider the case where A sends packets of 1KB to B via a 1Mbps link with 20KB buffer as in Figure 12.
The propagation delay (round-trip time with the buffer being empty) is assumed to be 20ms. Assume
15
20KB
A
1Mbps
Figure 12: A sends packets of 1KB to B via a 1Mbps link with 20KB buffer.
that A uses TCP Vegas as the transmission control protocol, i.e., it keeps track of the minimum roundtrip time min and the current round-trip time , and updates the window size W according to
W W 1 if W
W
> min
min
W
otherwise
where , are TCP parameters. The parameters are chosen < to introduce hysteresis, which can
reduce the fluctuation in window size W .
Now we try to analyze the steady-state of this scenario. We start with making the following simplifications: at steady state, one has
W
W
( + )/2
=
.
min
min
Assume = 2.8 and = 3.2.
(a) If min observed by A is equal to the round-trip time without queueing delay, which is 20ms, then
what is the window size W at steady state? How many packets are there in the buffer?
(b) If min observed by A is equal to the round-trip time without queueing delay, plus e = 10ms, i.e.,
30ms, then what is the window size W at steady state? How many packets are there in the buffer?
(c) At what value of e will the buffer be full? Let e denote this value. What happens if e > e ?
16
6.1
4 points. Show that if f is locally Lipschitz at x0 then it is continuous at x0 , i.e., given any > 0
there exists a = () > 0 such that kf (x) f (x0 )k < for all x B (x0 ).
6.2
Convex sets
(a) 6 points. (Examples of convex sets). Three types of convex setsaffine set, second-order
cone, and the collection of semidefinite matricesare of particular interest in convex optimization, since
optimization over these convex sets has found efficient algorithms. Below we prove that these sets are
indeed convex.
1. (Affine set). Let A Rmn and b Rm for some m, n 1. Show that the set
C = {x Rn | Ax = b}
is convex.
2. (Second-order cone). Let n 1. For a vector x = (x1 , x2 , . . . , xn ) Rn , introduce the `2 norm
q
kxk := x21 + x22 + + x2n .
Show that the set
C = {(x, t) Rn R | kxk t}
is convex.
3. (Collection of semidefinite matrices). Let n 1 and Snn denote the collection of symmetric nn
real matrices. A matrix A Snn is called positive semidefinite, if xT Ax 0 for any x Rn . Let
A 0 denote A being positive semidefinite. Show that the set
C = {A Snn | A 0}
is convex.
(b) (Exercise only. Operations preserving convexity). We will explore several set operations
that preserve convexity. These operations are of fundamental importance to the convex optimization
theory.
1. (Linear transformation). Let X and Y be two linear spaces and f : X Y be linear. For example,
consider X = Rn , Y = Rm , and f Rmn . Show that if A X is convex, then
f (A) = {f (x) | x A}
is convex. Also show that if B Y is convex, then
f 1 (B) = {x X | f (x) B}
is convex.
17
2. (Arbitrary concatenation). Let X and Y be two linear spaces and A X, B Y be convex. The
product space
X Y := {(x, y) | x X, y Y}
with + and defined by
(x1 , y1 ) + (x2 , y2 ) := (x1 + x2 , y1 + y2 ),
(x, y) := (x, y),
(x1 , y1 ), (x2 , y2 ) X Y;
R, (x, y) X Y
is also a linear space (you dont need to show this). For example, if X = Rm and Y = Rn for some
m, n 1, then X Y = Rm+n . Show that the direct product
A B := {(x, y) | x A, y B}
is convex. (*) Argue that the direct product of arbitrary number of convex sets is convex.
3. (Finite sum). Let X be a linear space and A, B X be convex. Show that the set
A + B := {a + b | a A, b B}
is convex. Argue that the sum of finite convex sets is convex.
4. (Arbitrary intersection). Let X be a linear space and A, B X be convex. Show that the
intersection A B is convex. Argue that the intersection of arbitrary number of convex sets is
convex.
5. (Union?). Let X be a linear space and A, B X be convex. Give an example where the union
A B is nonconvex. Hint: It suffices to consider X = R.
6.3
18
6.4
Consider the following optimization problem. Let x Rn be the optimization variable and f , g1 , . . . , gk
be scalar functions defined on Rn where k 1. Let A Rmn and b Rm be given. The optimization
problem is as follows.
(P) : min f (x)
s.t. Ax = b;
gi (x) 0,
i = 1, . . . , k,
when f, g1 , g2 , . . . , gk are convex, (P) is called convex. Use the knowledge we gained in previou problems
to show that the feasible set
C = {x | Ax = b, gi (x) 0 for i = 1, . . . , k}
is convex. Hint: The set C is the intersection of k + 1 convex sets.
6.5
We will work through the duality theory in a simple case. Consider Problem (P) in Problem 2.3. Let
Rm , Rk+ = [0, )k , and define
L(x, , ) := f (x) + T (Ax b) + T g(x)
where g(x) = (g1 (x), g2 (x), . . . , gk (x))T .
(a) (Unconstrained optimization). Let L(, ) := minxRn L(x, , ) denote the unconstrained
optimization over x for a fixed , . Assume that Problem (P) has an optimal solution and denote it
by x . Show that L(, ) f (x ) for any Rm and Rk+ .
(b) (Dual problem). Consider the dual problem
(D) : max L(, )
s.t. 0.
Assume (D) has an optimal solution and denote it by ( , ).
1. Show that L( , ) f (x )
bound for Problem (P).
Pk
i=1
2. Assume now f, g1 , g2 , . . . , gk are convex. Show that the equality is attained if and only if
x L(x , , ) = 0.
3. Show that if there exists (x, , ) such that x is feasible for (P), (, ) is feasible for (D),
x L(x, , ) = 0, and i gi (x) = 0 for i = 1, . . . , k, then x solves (P) and (, ) solves (D).
These are called the KKT conditions.
19
6.6
Convex functions
4 points. For each of the following functions, determine if it is convex, concave, or neither.
f (x) = ex 1 on R.
f (x) = x1 x2 on (x1 , x2 ) R2 | x1 > 0, x2 > 0 .
f (x) = x11x2 on (x1 , x2 ) R2 | x1 > 0, x2 > 0 .
f (x) = x1 /x2 on (x1 , x2 ) R2 | x1 > 0, x2 > 0 .
6.7
6 points. Consider a linear network with L links indexed by 1, . . . , L, each of capacity c = 1. There
are L + 1 flows indexed by 0, . . . , L. Flows l = 1, . . . , L traverse only link l and the flow indexed by 0
traverses all the L links. Suppose all flows have the following utility function with the same 0:
( 1
xi
, 6= 1
Ui (xi ) = 1
log xi , = 1.
The rate at which each flow transmits is determined by the solution of the following utility maximization,
subject to capacity constraints:
L
X
Ui (xi ) s.t. Rx c
max
x0
i=0
where x = (x0 , . . . , xL ), matrix R is the routing matrix introduced in class. The expression x 0 means
xi 0 for i = 0, . . . , L.
PL
Calculate the aggregate throughput T () = i=0 xi (). Explain the dependence of T () on . Also
comment on the dependence of fairness (how fair the link capacity is divided by the flows) on .
6.8
Consider the network in Fig. 13, where R1R4 are routers, L1L3 are links, S1S3 are source hosts,
and T1T3 are the corresponding destination hosts.
Figure 13: Network topology for TCP steady state control, P6.8.
The link capacities of L1, L2 and L3 are 2500 packets/s. The one way propagation delay of each link
L1 L3 is 10ms and assume there is no propagation delay between a host and a router. There are three
20
flows: flow 1 from S1 to T1, flow 2 from S2 to T2, and flow 3 from S3 to T3. Flow 1 starts at t=0,
flow 2 starts at t=10sec and flow 3 starts at t=20sec. All flows use TCP Fast, i.e., the window update
min
is W (t + 1) = RTT
RTT W (t) + , with = 50.
(a) 5 points. Calculate the steady-state throughput of each flow and queue length of each link, during
0s10s, 10s20s and after 20s, assuming each flow knows its RTTmin (round-trip propagation delay)
accurately. Assume before flow 2 starts, all packets are buffered at L1.
(b) 5 points. Repeat (a) but with each flow measuring its RTTmin that includes queueing delay due
to other flows that started before it does. Assume before flow 2 starts, all packets are buffered at L1.
21
Fix an and let x( ) denote a solution of the utility maximization. For the linear network, the
optimality (KKT) condition is: there exists p( ) 0, such that x0 ( ) xl ( ) 1 with equality if
pl ( ) 0, l 1,..., L, and
xl ( ) pl ( ),
x0 ( ) pl ( )
l 1,..., L,
(1)
l 1
x0 ( ) xl ( )
1 x0 ( ) L1 x0 ( )
l 1
l 1
7.1 Asymptotic stability
1
L1 /
Hence
x0 ( ) 1 /
, xl ( ) 1 /
, l 1,..., L
4 points. Consider the dynamical
L 1 system
L 1
L
L 1 x sin(x2 + x2 )
x 1= x2
T ( )
xi ( ) L
. 1
1
2
and
1/
1
L
2
2
i 0
x 2 = x1 x2 sin(x1 + x2 ).
Thus,aswemaketheallocationmore
Clearly,theaggregatethroughputisadecreasingfunctionof
Prove that the origin is asymptotically stable.
andmorefair,thethroughputgetslowered.
x1
x2
c1 , p1
c2 , p2
x3
30
x1 (t) =
22
8
8.1
Queueing systems
B&G, P3.9
A communication line with link rate 50 Kbps is used to serve 10 flows, each generating Poisson traffic
at a rate 150 packets/min. Packet lengths are exponentially distributed with mean 1 Kbits.
(a) 6 points. Find the average number of packets in queue waiting, the average number of packets in
the system, and the average packet delay (time spent in the system), when:
(i) the link is divided into 10 independent equal-capacity channels. Each channel has an independent
buffer and serves one flow.
(ii) the link is shared as a single channel by the 10 flows via statistical multiplexing.
(b) 4 points. Repeat (a) if 5 of the flows generate packets at a rate of 250 packets/min, while the
other 5 flows generate packets at a rate of 50 packets/min.
8.2
B&G, P3.13
6 points. Persons arrive at a taxi stand with room for W = 5 taxis according to a Poisson process
with rate . A person boards a taxi upon arrival if one is available and otherwise waits in a line. Taxis
arrive at the stand according to a Poisson process with rate . An arriving taxi that finds the stand
full departs immediately; otherwise, it picks up a customer if at least one is waiting, or else joins the
queue of waiting taxis. Use an M/M/1 queue formulation to obtain the steady-state distribution of the
taxis queue when = 1 and = 2 per minute. Compute the average number of people waiting, and
the average number of taxis waiting in steady state.
8.3
Jackson network
6 points. Packets arrive at a processor/transmitter according to a Poisson process with rate pkts/sec.
Each packet takes an i.i.d. exponential time to process and transmit (with an average of 1/0 sec). It
is then sent onto one of two networks towards its destination, with probabilities p01 and p02 = 1 p01 .
A packet that is sent onto Network 1 will incur a processing/transmission time that is i.i.d. and
exponentially distributed (with an average of 1/1 sec), after which it either arrives at the destination
correctly (with probability 1 p10 ), or in error (with probability p10 ). In the latter case, the packet
must be retransmitted by the processor/transmitter. Similarly, a packet that is sent onto Network 2
will processing/transmission time that is i.i.d. and exponentially distributed (with an average of 1/2
sec), and then either arrives at the destination correctly (with probability 1 p20 ), or in error (with
probability p20 ). In the latter case, it must be retransmitted by the processor/transmitter.
Draw a queueing model of the system, and find the expected numbers of packets at the processor/
transmitter, in Networks 1 and 2, and the expected time it takes for a packet to reach the destination
correctly.
8.4
8 points. Consider sending packets from Caltech to MIT through an intermediate node, as shown in
Fig. 15.
Packets are generated by the sender at CIT according to a Poisson process with rate packets/sec.
The packet sizes are statistically independent and exponentially distributed with mean length 1 kbits.
All packets are destined for MIT. They are randomly routed through Chicago, with probability p, or
23
T N /
p01
p02
1
b0 b1 p01 b 2 p02
4.Optimalrouting[6points]
ConsidersendingpacketsfromCaltechtoMITthroughanintermediatenode,asshown:
Chicago
p
CIT
MIT
1p
Atlanta
of 2 kbps. Suppose the signal propagation and process delays are negligible so that the total delay
involves just queueing and transmission times at the intermediate nodes.
1
If 2 = 41 , prove that p = 2
minimizes the expected total delay, assuming that 21 < < 51 .
3
Argue carefully why this is the unique minimizing routing probability.
24