Questions tagged [spanning-tree]

A spanning tree in an connected, undirected graph is a subgraph that includes all vertices, is a tree and is connected.

98 questions
1
vote
1 answer

Graphically display the shortest path between two vertices in a graph

I wrote a program that collects at least 500 Wikipedia pages and links from these pages to other Wikipedia pages. It collects word frequencies from each webpage in order to determine the cost between two vertices(webpages) in a graph. I am now…
James
  • 69
  • 1
  • 1
  • 7
1
vote
2 answers

Java Network/Tree simulations goes to infinite loop after certain amount of Nodes

I hope someone can help with the issue I am having. First of all, I tried to remove as much code as I can that wasn't causing the issue. My problem is this: When I run the program everything runs perfectly until I create a graph with about 130…
Kevin Zaki
  • 136
  • 1
  • 2
  • 9
1
vote
1 answer

Real world applications where spanning tree data structure is used

Does anyone of you know any real world applications where spanning tree data structure is used?
1
vote
2 answers

Is the Minimum Product Spanning Tree different from a Minimum Sum Spanning Tree?

Is the Minimum Product Spanning Tree different from a Minimum Sum Spanning Tree? plz explain (with examples ,if possible).I mean,edges that add to the minimum should(?) also have the minimum product.
piyukr
  • 581
  • 1
  • 10
  • 17
1
vote
1 answer

Find the upper bound of the minimum number of spanning trees needed to cover all links in the graph

My question: Let G(V,E) be a fully connected graph, where V is set of nodes and E is set of links. What is the upper bound (worst case) of the minimum number of spanning trees needed to cover all the links in the graph, if the spanning trees are…
0
votes
1 answer

Approximation algorithm for constrained maximum spanning sub-tree for directed-graph

Given a directed graph, where each vector has a non-negative cost and each vertex has a non-negative profit, how do you find the spanning sub-tree of the graph with maximum profit? I want to constrain the cost is smaller to a given budget. I'm…
0
votes
1 answer

How to make the result of a BFS spanning tree is shown in preorder

I'm trying to implement a BFS algorithm for homework, I find the spanning tree algorithm with BFS, the problem is that I require that the resulting spanning tree is shown in preorder. Here's my solution code: #include…
0
votes
1 answer

How to indicate preorder of a spanning tree using the algorithm BFS

I'm doing an implementation of the BFS algorithm in c++ to find a spanning tree, the output for a spanning tree should be shown in preorder, but I have a doubt in the implementation, how I can build a tree if not exactly know how many children have…
0
votes
1 answer

Co-spanning tree

Does anyone know that what is co spanning tree. If there are some good answers then it would be really good to have an example also.
Abdul Samad
  • 4,840
  • 12
  • 52
  • 66
0
votes
1 answer

How to find a spanning tree of a undirected graph(not necessary MST)?

I know the brute force approach for solving this problem which can be given as: Iterate over all edges Take a set(or list)(suppose s) if adding an edge to s doesn't make a cycle then add edge to s End if iteration is complete over all edges. But I…
0
votes
0 answers

Minimum spanning trees of sub-graphs?

Any hint please if I should prove or search for counterexample, at least to know which direction to go... Consider the following 2 graphs: G1 (V, E1) G2 (V, E2) and a weight function for the vertices w: (E1 \untion E2) -> R and 2 minimum spanning…
0
votes
0 answers

Counting spanning trees in a graph

I have a problem. I am trying to count all the spanning trees in a graph(it doesn't have multi edges). I know that there is Kirchhoff's theorem, which lets me count it in quite an easy way, but I prefer a solution which uses cycles in this graph. I…
manez
  • 1
0
votes
0 answers

Looking for a polynomial algorithm for spanning tree with maximum colored edges

I have a connected-undirected and unweighted graph that edges are colored with red and blue. Looking for an algorithm that find spanning tree wiht maximum blue edges in polynomial-time.
0
votes
0 answers

Algorithm to find the maximum strength spanning tree

Let G(V,E) to be an input graph. Let strength of the graph to be the minimum weight of any edges in it. Is finding the the maximum possible strength same as finding the maximum using either Kruskal’s/Prim's Algorithm to find the edge with maximum…
0
votes
0 answers

How Can I Build/Validate Dynamic JSF/PF UI - Trees/Graphs/Etc?

Precursor I'd like to apologize at the start of this for the length of this. I've been working 55+ hour weeks for 3+ months so I want to do my best to explain the entire problem to the best of my ability. Also please be aware that I am working with…
blau
  • 43
  • 4