Question

In: Computer Science

Maximum-weight independent set. (a) Prove that the two greedy algorithms(i.e., Greedy and Greedy 2) are equivalent....

Maximum-weight independent set.

(a) Prove that the two greedy algorithms(i.e., Greedy and Greedy 2) are equivalent. That is, they return the same output for a given input.

(b) Prove that Greedy 2 returns an optimal solution to the maximum weight independent set problem by application of lemmata.

Solutions

Expert Solution

A sequence of steps need to be gone through for algorithms of optimization problem. For many optimization problems, using dynamic programming to determine the best choices is simpler, overskill, more efficient algorithms will do.

A choice made by greedy algorithm always looks best at the moment. A locally optimal choice is made by it in the hope that this choice will lead to a globally optimal solution.

(a) A problem exhibits optimal substructure if an optimal solution to the problem contains within it optimal solutions to subproblems. This property is a key ingredient of assessing the applicability of dynamic programming as well as greedy algorithms. As an example of optimal substructure, demonstrated that if an optimal solution A to the activity selection problem begins with activity 1, then the set of activities A' = A - {1} is an optimal solution to the activity-selection problem S' = {i € S : si >= â1}.

A unit-time task is a job, such as a program to be run on a computer, that requires exactly one unit of time to complete. Given a finite set S of unit-time tasks, a schedule for S is a permutation of S specifying the order in which these tasks are to be performed. The first task in the schedule begins at time 0 and finishes at time 1, the second task begins at time 1 and finishes at time 2, and so on. Thus, as the greedy algorithm is given the optimal solution and works with optimal substructure they return the same output for a given input.

(b) Many problems for which a greedy approach provides optimal solutions can be formulated in terms of finding a maximum-weight independent subset in a weighted matroid. That is, we are given a weighted matroid , and we wish to find an independent set, such that w(A) is maximized. We call such a subset that is independent and has maximum possible weight an optimal subset of the matroid. Because the weight w(x) of any element xS is positive, an optimal subset is always a maximal independent subset--it always helps to make A as large as possible.

By Lemma , any elements that are passed over initially because they are not extensions of can be forgotten about, since they can never be useful. Once the first element x is selected, Lemma implies that GREEDY does not err by adding x to A, since there exists an optimal subset containing x. Finally, Lemma implies that the remaining problem is one of finding an optimal subset in the matroid M' that is the contraction of M by x. After the procedure GREEDY sets A to{x}, all of its remaining steps can be interpreted as acting in the matroid , because B is independent in M' if and only if B {x} is independent in M, for all sets . Thus, the subsequent operation of GREEDY will find a maximum-weight independent subset for M', and the overall operation of GREEDY will find a maximum-weight independent subset for M.


Related Solutions

Maximum-weight independent set. (a) Prove that the two greedy algorithms, optimal substructure and activity selection are...
Maximum-weight independent set. (a) Prove that the two greedy algorithms, optimal substructure and activity selection are equivalent. That is, they return the same output for a given input. (b) Prove that Greedy 2 returns an optimal solution to the maximum weight independent set problem by application of lemmata.
Prove that isomorphism is an equivalent relation on the set of all groups.
Prove that isomorphism is an equivalent relation on the set of all groups.
Design a Maximum-Weight independent Set Tree with at least 13 nodes.  You may connect and label the...
Design a Maximum-Weight independent Set Tree with at least 13 nodes.  You may connect and label the nodes however you deem fit.  Once you have the tree draw, determine the largest independent set.
Prove that the SMSG axiomatic set is not independent. SMSG Axioms: Postulate 1. Given any two...
Prove that the SMSG axiomatic set is not independent. SMSG Axioms: Postulate 1. Given any two distinct points there is exactly one line that contains them. Postulate 2. Distance Postulate. To every pair of distinct points there corresponds a unique positive number. This number is called the distance between the two points. Postulate 3. Ruler Postulate. The points of a line can be placed in a correspondence with the real numbers such that: To every point of the line there...
(Lower bound for searching algorithms) Prove: any comparison-based searching algorithm on a set of n elements...
(Lower bound for searching algorithms) Prove: any comparison-based searching algorithm on a set of n elements takes time Ω(log n) in the worst case. (Hint: you may want to read Section 8.1 of the textbook for related terminologies and techniques.)
Prove that the axiomatic set for Fano's 7 point/line geometry is independent
Prove that the axiomatic set for Fano's 7 point/line geometry is independent
Prove the follwing statements Suppose that S is a linearly independent set of vectors in the...
Prove the follwing statements Suppose that S is a linearly independent set of vectors in the vector space V and let w be a vector of V that is not in S. Then the set obtained from S by adding w to S is linearly independent in V. If U is a subspace of a vector space V and dim(U)=dim(V), then U=V.
2. (a) Prove that U45 is generated by the set {14,28}. (b) Prove that the additive...
2. (a) Prove that U45 is generated by the set {14,28}. (b) Prove that the additive group Z×Z is generated by the set S={(3,1),(−2,−1),(4,3)}. Please be thorough step by step with details, please.
Problem 2. (a) Prove that, if two continuous random variable X and Y are independent P(X...
Problem 2. (a) Prove that, if two continuous random variable X and Y are independent P(X > x, Y > y) = P(X > x)P(Y > y) (b) Now prove that, under the same conditions, X,Y, independent continuous random variables, E(XY) = E(X)E(Y).
1. Prove that the Cantor set contains no intervals. 2. Prove: If x is an element...
1. Prove that the Cantor set contains no intervals. 2. Prove: If x is an element of the Cantor set, then there is a sequence Xn of elements from the Cantor set converging to x.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT