Tirgul 14 - PowerPoint PPT Presentation

About This Presentation
Title:

Tirgul 14

Description:

Prove that there is only one minimum spanning tree for G. ... Now suppose there are two MSTs to G, let e' be the lightest edge in T' - T, we ... – PowerPoint PPT presentation

Number of Views:15
Avg rating:3.0/5.0
Slides: 5
Provided by: IRIS
Category:
Tags: run | tirgul | up

less

Transcript and Presenter's Notes

Title: Tirgul 14


1
Tirgul 14
  • (and more)
  • sample questions

2
(reminder?) Kruskals MST Algorithm
3
  • Q. Suppose that all edges weights in a graph are
    integers in the range of 1 to V. How fast can
    you make Kruskals algorithm run?
  • A. Sorting E elements with values in the range
    of 1 to V takes O(VE) (counting sort),
    find-set using an efficient union-find takes
    log(E) (very fast) total complexity of O(E
    log(E)).
  • (another reminder)

4
  • Q. Let G be a connected undirected graph with the
    property that every edge has a different weight.
    Prove that there is only one minimum spanning
    tree for G.
  • A. We assume there are two such trees and show
    there is a contradiction
  • exchange lemma Let T and T be spanning trees
    in G(V,E). Given any there
    exists an edge such that
    is also a spanning tree
  • proof (outline) adding e to T results in a
    cycle. Removing an edge e along this cycle
    restores the spanning tree
  • Now suppose there are two MSTs to G, let e be
    the lightest edge in T - T, we will add e to T,
    but get a contradiction when trying to remove an
    edge from the resulting cycle.
Write a Comment
User Comments (0)
About PowerShow.com