Algorithm GreedyIS(G=(V, E)) 1. n← |V| 2. Adj is an adjacency list structure for E; IS and deg are initialised to all-Os 3. for u 0 to n - 1 do 4. 5. 6. 7. 8. 9. 10. 11. for u 0 to n - 1 12. deg[u] = len (Adj[u]) while (some vertices remain in the graph) do u ← arg min{deg[v]; v € V, IS[v] == 0} IS[u] +1 for (w€ Nbd(u)) do 19 // (set the initial deg values for all nodes) IS[u] ← max{0, IS[u]} TO // (node with min residual degree // gets added to the IS) IS[w] -1 Update Adj, deg to reflect deletion of {u} U Nbd(u) // (mark u's neighbours as disallowed) // (tidy: delete marks of disallowed vertices)

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Algorithm GreedyIS (G=(V, E))
1. n← VI
2. Adj is an adjacency list structure for E; IS and deg are initialised to all-Os
3. for u
0 to n - 1 do
deg[u] = len (Adj[u])
while (some vertices remain in the graph) do
0}
4.
5.
6.
7.
8.
9.
10.
11. for u 0 to n - 1
12.
13. return IS
u ← arg min{deg[v]; v € V, IS[v] =
==
IS[u] ← 1
for (w
Nbd(u)) do
// (set the initial deg values for all nodes)
IS[u]max{0, IS[u]}
IS[w] -1
Update Adj, deg to reflect deletion of {u} U Nbd(u)
// (node with min residual degree
// gets added to the IS)
Algorithm
// (mark u's neighbours as disallowed)
// (tidy: delete marks of disallowed vertices)
A(iv) Assuming that the graph G = (V, E) is represented in Adjacency List format, justify in detail the
fact GreedylS can be implemented in O(n² + m) worst-case running time, where n = |V|, m = |E|.
=
note: this will require you to take real care in how the adjustment of Adj is done in line 10.
The key is to only update/delete what is really necessary for the Algorithm, rather than being
concerned with an accurate representation of the residual graph.
A(v) Consider an unweighted bipartite graph G = (LUR, E), with L = {u₁,..., u[n/3]}{W₁, W2, W3, W₁},
and R= {₁,..., Un}. The edge set E = E₁ UE2 consists of the following edges:
E₁ = {(ui, vi) i = 1,..., , [n/3]} U
{(ui, Vi+[n/31): i = 1,..., [n/3]} U
{(ui, Vi+2[n/3]): i = 1,..., [n/3]}
{(wi, vj) i = 1,..., 4, j = 1,...,n}
E2
Essentially, the E2 edges form a complete bipartite graph between the 4 special vertices {w₁, W2, W3, W₁}
and the set R, while the edge set E₁ is a subgraph where each of the vertices {u₁,...,un/3]} have
3 adjacent edges and all of the vertices in R have 1 adjacent edge.
Work out the independent set I which will be constructed by GreedyIS, justifying your answer with
respect to the degrees of the different vertices as the algorithm proceeds. Show that this set will be
approximately 1/3 of the size of the true maximum independent set for this graph?
note: You are welcome to assume n is a multiple of 3.
A(vi) How would you alter the graph construction of (v) to get progressively worse "approximation
factors" for the result returned by GreedyIS?
Transcribed Image Text:Algorithm GreedyIS (G=(V, E)) 1. n← VI 2. Adj is an adjacency list structure for E; IS and deg are initialised to all-Os 3. for u 0 to n - 1 do deg[u] = len (Adj[u]) while (some vertices remain in the graph) do 0} 4. 5. 6. 7. 8. 9. 10. 11. for u 0 to n - 1 12. 13. return IS u ← arg min{deg[v]; v € V, IS[v] = == IS[u] ← 1 for (w Nbd(u)) do // (set the initial deg values for all nodes) IS[u]max{0, IS[u]} IS[w] -1 Update Adj, deg to reflect deletion of {u} U Nbd(u) // (node with min residual degree // gets added to the IS) Algorithm // (mark u's neighbours as disallowed) // (tidy: delete marks of disallowed vertices) A(iv) Assuming that the graph G = (V, E) is represented in Adjacency List format, justify in detail the fact GreedylS can be implemented in O(n² + m) worst-case running time, where n = |V|, m = |E|. = note: this will require you to take real care in how the adjustment of Adj is done in line 10. The key is to only update/delete what is really necessary for the Algorithm, rather than being concerned with an accurate representation of the residual graph. A(v) Consider an unweighted bipartite graph G = (LUR, E), with L = {u₁,..., u[n/3]}{W₁, W2, W3, W₁}, and R= {₁,..., Un}. The edge set E = E₁ UE2 consists of the following edges: E₁ = {(ui, vi) i = 1,..., , [n/3]} U {(ui, Vi+[n/31): i = 1,..., [n/3]} U {(ui, Vi+2[n/3]): i = 1,..., [n/3]} {(wi, vj) i = 1,..., 4, j = 1,...,n} E2 Essentially, the E2 edges form a complete bipartite graph between the 4 special vertices {w₁, W2, W3, W₁} and the set R, while the edge set E₁ is a subgraph where each of the vertices {u₁,...,un/3]} have 3 adjacent edges and all of the vertices in R have 1 adjacent edge. Work out the independent set I which will be constructed by GreedyIS, justifying your answer with respect to the degrees of the different vertices as the algorithm proceeds. Show that this set will be approximately 1/3 of the size of the true maximum independent set for this graph? note: You are welcome to assume n is a multiple of 3. A(vi) How would you alter the graph construction of (v) to get progressively worse "approximation factors" for the result returned by GreedyIS?
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY