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 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.)
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
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT