Question

In: Computer Science

Prove the following MST algorithm is correct. You can use the cut property in your proof...

Prove the following MST algorithm is correct. You can use the cut property in your proof if you want, but it's not clear it's the best approach

sort the edges according to their weights
for each edge e ∈ E, in decreasing order of weight :
    if e is part of a cycle of G:
        G = G − e (that is, remove e from G)
return G

Solutions

Expert Solution

There are 2 parts in the proof:

1. No deleted edge belongs to any MST

2. The resulting tree is Spanning tree of G.

An edge is deleted in the algorithm if it part of a cycle and deleting it does not disconnects the graph:

to prove 1, proof by contradiction

Suppose that an edge e removed by algorithm is part of some MST, let M be that MST,

Since e lies on a cycle and has the largest weight, there exists some e' such that weight of e' is less than e and e' lies on the same cycle.

remove e and add e' to M, then the resulting tree has lesser weight than it started with,but we started with a MST, so it is not possible, a contradiction.

So no MST contains the edges removed by the Algorithm.

to prove 2.

proving 2 is easy, since G initially was connected , and an edge is removed iff G does not disconnects, the resulting tree is also connected, hence spanning.

so from 1 and 2 its is evident that the resulting tree by algo is MST.


Related Solutions

It is a proof-based question. Consider a woman-proposing version of the Deferred Acceptance algorithm. Prove that...
It is a proof-based question. Consider a woman-proposing version of the Deferred Acceptance algorithm. Prove that the woman-proposing version of the Deferred Acceptance algorithm is strategy proof for women. Hint: Repeat the same steps we made in class to prove that a man-proposing DA is strategy-proof for men.
Prove the following using the method suggested: (a) Prove the following either by direct proof or...
Prove the following using the method suggested: (a) Prove the following either by direct proof or by contraposition: Let a ∈ Z, if a ≡ 3 (mod 5) and b ≡ 2 (mod 5), then ab ≡ 1 (mod 5). (b) Prove the following by contradiction: Suppose a, b ∈ Z. If a² + b² is odd, then (2|a) ⊕ (2|b), where ⊕ is the exclusive disjuntion, i.e. p ⊕ q = (p ∨ q) ∧ ¬(p ∧ q). (d)...
Use the definition of absolute value and a proof by cases to prove that for all...
Use the definition of absolute value and a proof by cases to prove that for all real numbers x, | − x + 2| = |x − 2|. (Note: Forget any previous intuitions you may have about absolute value; only use the rigorous definition of absolute value to prove this statement.)
C. Prove the following claim, using proof by induction. Show your work. Let d be the...
C. Prove the following claim, using proof by induction. Show your work. Let d be the day you were born plus 7 (e.g., if you were born on March 24, d = 24 + 7). If a = 2d + 1 and b = d + 1, then an – b is divisible by d for all natural numbers n.
Prove the following equivalences without using truth tables, and specify at each step of your proof...
Prove the following equivalences without using truth tables, and specify at each step of your proof the equivalence law you are using. (a) ¬ (p ∨ (¬ p ∧ q)) ≡ ¬ p ∧ ¬ q (b) ( x → y) ∧ ( x → z) ≡ x → ( y ∧ z) (c) (q → (p → r)) ≡ (p → (q → r)) (d) ( Q → P) ∧ ( ¬Q → P) ≡ P
Write a formal proof to prove the following conjecture to be true or false. If the...
Write a formal proof to prove the following conjecture to be true or false. If the statement is true, write a formal proof of it. If the statement is false, provide a counterexample and a slightly modified statement that is true and write a formal proof of your new statement. Conjecture: Let w, x, y, and z be single-digit numbers. The 4-digit number wxyz* is divisible by 9 if and only if 9 divides the sum w + x +...
Use proof by contrapositive to prove the statement: For all real numbers, if m + n...
Use proof by contrapositive to prove the statement: For all real numbers, if m + n is irrational, then m or n is irrational.
Please be able to follow the COMMENT Use induction proof to prove that For all positive...
Please be able to follow the COMMENT Use induction proof to prove that For all positive integers n we have the inequality n<=2^n here is the step: base step: P(1)= 1<=2^1    inductive step: k+1<= 2^(k)+1 <= 2^(k)+k (since k>=1) <= 2^(k)+2^(k) = 2X2^(k) =2^(k+1) i don't understand why 1 can be replaced by k and i don't know why since k>=1
Suppose you read the following headline: “Taking an aspirin a day can cut your risk of...
Suppose you read the following headline: “Taking an aspirin a day can cut your risk of heart attack by almost half!” Suppose the news report goes on to tell you that the research is based on a very large well-designed randomized experiment with a p-value less than 0.0001. Assume this information is technically correct, given the results of the study. Which of the following statistics could actually represent the results of this study? The rates of heart attack were 9.4...
Create a mathematical proof to prove the following: Given an integer n, and a list of...
Create a mathematical proof to prove the following: Given an integer n, and a list of integers such that the numbers in the list sum up to n. Prove that the product of a list of numbers is maximized when all the numbers in that list are 3's, except for one of the numbers being either a 2 or 4, depending on the remainder of n when divided by 3.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT