Results 1 to 2 of 2

Thread: Minimum spanning tree problem

  1. #1
    wossname
    Guest

    Minimum spanning tree problem

    Does anyone know of a quick efficient way of both keeping track of the number of arcs (connections) each node has (and preferably to which other nodes it is connected). And a way of detecting if a "circuit" has been formed within a group of nodes.

    I need to be able to do this in both VB and C.

    I'm having trouble storing both the numerous nodes and the seemingly limitless potential connections!

    Any ideas?

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    the first can be done with doublelinked network datastructures in c++, in vb you can use a collection object, this is of course, if you assume speeed is unimportant. Otherways you could do something similar even with UDT's. The second is done with a graph search algoritm
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width