:

  1. Select a root node and all adjacent edges to a Priority Queue
  2. Initialise the set
  3. While queue is not empty:
    1. Dequeue shortest edge from
    2. If is acyclic:
      1. Update
      2. Add to any new edges adjacent to or
  4. Return tree