Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Algorithm 2 : AL . C: - B Input: An undirected graph G = ( V , E ) and a coest function { c

Algorithm 2: AL.C:-B
Input: An undirected graph G=(V,E) and a coest function {c(v)} with c(v)>0 for all vinV.
Output: A vertex cover of G with the minimum cost.
??+S is the vertex cover ve ais to output.
Initialization: S=;
while E0 do
Select a node v such that r(v):=cv|Ev| gets minimized among all vinV. Break ties
arbitrarily.
Update ElarrE-Ev,SlarrS{v},VlarrV-{v}.
end
Return S.
In the following, we aim to analyze the performance of ALC-B. Consider the instance below.
Figure 1: An instance of unuecighted vertex cover problem for Question 1.
For the graph shown in Figure 1: (1) We have a bipartite graph G=(UV,E) such that
i6 and V={v=j|1j14}. For simplicity, we use i and j to index uinU and vinV, respectively.
(2) The cost c(u)=c(v)=1 for all uinU and vinV. (3) The set of edges E is constructed as follows. For
the first group of six nodes on V,V1={v|v=1,2,3,dots,6}, conect each with a node u=v; for the scond
group of V,V2={v|v=7,8,9}, connect each with two nodes in U such that each vinV2 has a disjoint set
of neighbors; similarly, for the third group, V3={v|v=10,11}, each is conaected to a disjoint set of three
nodes in U. For V4,V6, and V6, each group consists of one single node v of V, which is connected to the first
4,5,6 nodes of U, respectively.
(1) What is the cost of the output vertex cover when applying ALC:-B to the instanox as described above?
What is the cost of an optimal vertex cower? Note that there may be ties to break when rumaing ALC-B,
and different breaking-tie choics may lead to different resalts. By default, we evaluate the performance of
ALC:-B based on the worst poesible breaking-tie choios of ALC:-B.(10 Points)
(2) Plewe analyze the performaner of ALC-B following the exact instructions given in Question 34 In the class, we have discussed a Greedy-Based algorithm for weighted Vertex Cover Problem
(VCP). Below is a formal statement.
2
Algorithm 2: ALG-B
Input: An undirected graph G =(V, E) and a cost function {c(v)} with c(v)>0 for all v in V .
Output: A vertex cover of G with the minimum cost.
/* S is the vertex cover we aim to output. */
1 Initialization: S =;
2 while E 6= do
3 Select a node v such that \tau (v) := c(v)/|Ev | gets minimized among all v in V . Break ties
arbitrarily.
4 Update E E Ev , S S \cup {v}, V V {v}.
5 end
6 Return S.
In the following, we aim to analyze the performance of ALG-B. Consider the instance below.
u =1 u =2 u =3 u =4 u =5 u =6
v =1234567891011121314
Figure 1: An instance of unweighted vertex cover problem for Question 4.
For the graph shown in Figure 1: (1) We have a bipartite graph G =(U \cup V, E) such that U ={u = i |1=
i =6} and V ={v = j |1= j =14}. For simplicity, we use i and j to index u in U and v in V , respectively.
(2) The cost c(u)= c(v)=1 for all u in U and v in V .(3) The set of edges E is constructed as follows. For
the first group of six nodes on V , V1={v | v =1,2,3,...,6}, connect each with a node u = v; for the second
group of V , V2={v | v =7,8,9}, connect each with two nodes in U such that each v in V2 has a disjoint set
of neighbors; similarly, for the third group, V3={v | v =10,11}, each is connected to a disjoint set of three
nodes in U . For V4, V5, and V6, each group consists of one single node v of V , which is connected to the first
4,5,6 nodes of U , respectively.
(1) What is the cost of the output vertex cover when applying ALG-B to the instance as described above?
What is the cost of an optimal vertex cover? Note that there may be ties to break when running ALG-B,
and different breaking-tie choices may lead to different results. By default, we evaluate the performance of
ALG-B based on the worst possible breaking-tie choices of ALG-B.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Server Query Performance Tuning

Authors: Sajal Dam, Grant Fritchey

4th Edition

1430267429, 9781430267423

More Books

Students also viewed these Databases questions

Question

Describe the menstrual cycle in a woman.

Answered: 1 week ago

Question

Explain methods of metal extraction with examples.

Answered: 1 week ago