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

Use the well-ordering property to prove the division algorithm. Recall that the division algorithm states that...
Use the well-ordering property to prove the division algorithm. Recall that the division algorithm states that if a is an integer and d is a positive integer, then there are unique integers q and r with 0 ≤ r < d and a = dq + r.
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 that the following two statements are not logically equivalent. In your proof, completely justify your...
Prove that the following two statements are not logically equivalent. In your proof, completely justify your answer. (a) A real number is less than 1 only if its reciprocal is greater than 1. (b) Having a reciprocal greater than 1 is a sufficient condition for a real number to be less than 1. Proof: #2. Prove that the following is a valid argument:          All real numbers have nonnegative squares. The number i has a negative square. Therefore, the...
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)...
Consider the following sentences. Use BACKWARD CHAINING and draw the proof tree to prove that “Charlie...
Consider the following sentences. Use BACKWARD CHAINING and draw the proof tree to prove that “Charlie is a horse.” Horses, cows, and pigs are mammals. An offspring of a horse is a horse. Bluebeard is a horse. Bluebeard is Charlie's parent. Offspring and parent are inverse relations. Every mammal has a parent.
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.)
Give a direct proof of the following theorem, upon which case you can use it for...
Give a direct proof of the following theorem, upon which case you can use it for future proofs. (Hint: note that we’ve called it a corollary as in p.81, not just a theorem.) Corollary 4.12. Every integer is even or odd.
Give a direct proof of the following theorem, upon which case you can use it for...
Give a direct proof of the following theorem, upon which case you can use it for future proofs. (Hint: note that we’ve called it a corollary as in p.81, not just a theorem.) Corollary 4.12. Every integer is even or odd.
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
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT