Solution%20to%20HW1 - PowerPoint PPT Presentation

About This Presentation
Title:

Solution%20to%20HW1

Description:

Have a condition in the Dijkstra algo loop which terminates the process whenever ... Whenever some node v is inducted into S such that d(v) = , then we know the ... – PowerPoint PPT presentation

Number of Views:18
Avg rating:3.0/5.0
Slides: 20
Provided by: saswati5
Category:
Tags: 20hw1 | 20to | algo | solution

less

Transcript and Presenter's Notes

Title: Solution%20to%20HW1


1
Solution to HW1
2
Problem 1
Need to find shortest path from a single source s
to a single destination d.
Have a condition in the Dijkstra algo loop which
terminates the process whenever v is inducted
into the set S.
3
Problem 2
Whenever some node v is inducted into S such that
d(v) ?, then we know the graph is disconnected.
When a vertex v is inducted into S, d(v) is the
shortest distance from s to v. If this shortest
distance is infinity, then s is disconnected to v.
4
Problem 3
All answers were correct!
5
Problem 4
Given a graph, construct a new graph with same
nodes and edges, weight of an edge negative of
weight of the corresponding edge in the given
graph. Minimum spanning tree in this new graph
is maximum weight spanning tree in the old one.
6
Problem 5
MST s are identical if a?0, otherwise they may be
different (two MSTs have same number of edges).
Shortest paths are identical if a?0 and b0.
Yes, with reciprocal edge weights, minimum weight
spanning tree becomes maximum weight spanning
tree.
7
Now the light weight edge crossing a cut in one
is the heavy weight edge crossing the cut.
By choosing the heavy weight one we get maximum
weight spanning tree. By choosing the light
weight one we get minimum weight spanning tree.
The same sequence of choices in Kruskals leads to
minimum spanning tree in one and max. spanning
tree in another.
So, minimum spanning tree in one is identical to
the maximum spanning tree in another.
8
Problem 6
We know all the vertices in the Steiner tree
given the intermediate ones.
Need to find a minimum spanning tree in the
induces subgraph.
9
Problem 7
No.
All counter examples were valid!
10
Problem 8
The system can be represented with the queue
lengths of different sessions in different
buffers.
The state process is a markov chain.
Let the current state of the markov chain be
(..Bi1(t), Bi2(t),.. )
There is a positive probability of 0 arrival in
this state
If there is no arrival, then it moves to a state
where total number of packets in the system is
lesser, or equal but packets have moved closer to
the destination.
11
Given a particular state, there is a finite time
such that if there is no arrival in any slot in
that time interval, then the system moves to all
zero state.
Given any finite number of slots, there is a
positive probability that the number of arrivals
is 0 in each of these slots.
There is a positive probability path from each
state to the all zero state.
Every state communicates to the all zero state.
12
All zero state communicates to some states.
All states which have positive probability path
from the zero state, communicate with each other,
and does not communicate to any state which does
not have a positive probability path from the all
zero state.
All states which have positive probability path
from the zero state constitute a closed set
(along with the all zero state).
All other states communicate to the zero state,
and the zero state does not communicate to them.
So all other states are open.
13
Problem 9
Sort all the reward values.
R highest reward value.
(1)Remove all edges with reward value less than R
Find whether source is connected to the
destination.
If so, stop.
If not, reduce R to the next highest reward value
and go to step (1)
The final value of R is the highest reward and
the final path is the highest reward path.
14
Complexity is O(E2)
Can do a binary search on the reward values,
complexity will be O(ElogE)
15
Problem 10
Unirate Multicast
The feasible set looks like ri rj
.. rp ? Cl (constraint for link l)
. ..
For every link constraint, create a link in the
new unicast network, with all sessions appearing
in the constraint traversing the link. The
capacity of this link is the same as the capacity
of the link in the constraint.
16
Consider any session i.
Join all the links traversed by session i by
links of very high capacity.
Every session is unicast in this network.
The number of sessions is the same in both
networks. The number of links are N(L 1) in the
new network.
The feasibility constraints are identical in both
links.
Hence, the feasible sets are identical.
17
Multirate Multicast Network
The constraints are max(ri , rj , .. rp)
max(..) . ? Cl
Replace each constraint by linear constraints.
Consider an example max(r1 , r2 ) r3 ?
Cl
The equivalent linear constraints are r1 r3
? Cl , r2 r3 ? Cl
18
Consider an example max(r1 , r2 ) max(r3 ,
r4 ) ? Cl
The equivalent constraints are r1 r3 ?
Cl , r2 r3 ? Cl r1 r4
? Cl , r2 r4 ? Cl
If there are L links in the network, there can be
at most mN L linear constraints, where m is
the maximum number of receivers in the network,
and N is the number of sessions.
19
These constraints are of the form ri rj
.. rp ? Cl And involve r1 , r2 ,
.. rM
Proceeding in the same manner as for unirate
multicast, we can now get a unicast network of M
sessions, mN L(M 1) links.
A multirate, multicast can be reduced to unicast
network, but the unicast network has
exponentially larger size!
Write a Comment
User Comments (0)
About PowerShow.com