Thread: Minimum Spanning Tree Shortest path

  1. #1
    Registered User
    Join Date
    Apr 2010
    Posts
    50

    Minimum Spanning Tree Shortest path

    Can someone please give me an example where the minimum spanning tree obtained is not the shortest path distance between two vertices.

    Please help.

  2. #2
    Registered User claudiu's Avatar
    Join Date
    Feb 2010
    Location
    London, United Kingdom
    Posts
    2,094
    Check out the diagram in this article.
    Minimum spanning tree - Wikipedia, the free encyclopedia
    1. Get rid of gets(). Never ever ever use it again. Replace it with fgets() and use that instead.
    2. Get rid of void main and replace it with int main(void) and return 0 at the end of the function.
    3. Get rid of conio.h and other antiquated DOS crap headers.
    4. Don't cast the return value of malloc, even if you always always always make sure that stdlib.h is included.

  3. #3
    Registered User
    Join Date
    Apr 2010
    Posts
    50
    Okay if all the edges are unique then will the minimum spanning tree obtained be be the same as the shortest path tree?

    I think it's the same

    Am i correct?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Updated a Minimum Spanning Tree in O(V) time?
    By scp89 in forum C Programming
    Replies: 3
    Last Post: 05-07-2009, 02:02 PM
  2. Interpreter.c
    By moussa in forum C Programming
    Replies: 4
    Last Post: 05-28-2008, 05:59 PM
  3. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  4. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM
  5. BST/Red and Black Tree
    By ghettoman in forum C++ Programming
    Replies: 0
    Last Post: 10-24-2001, 10:45 PM