0

I have this question for homework:

prove/disprove:

A. Given an unintentional bound graph G (V, E) and a minimum spanning tree for this graph, and 2 vertices u, v, the shortest path between u and v in graph G can be found by performing BFS on the tree T.

B. Given a directed graph G (V, E) with weights and vertex s. The number of arcs in the shortest distance tree of this graph from the origin of s is the | V | -1.

I think that's true but can't prove it.

Can someone help me?

1 Answer 1

2

A. Not true, the minimum spanning tree does not contain all the shortest paths. example: enter image description here

The MST is the black edges (weight=1) the red edge (weight=2) is the shortest path between its nodes.

B. True, suppose you have a shortest paths graph with |V| edges, than there is a node v with at least two path from s (let v be the closest node to s with that property), in that case you can remove one of the incoming edges of v without changing the weights of the paths to all the nodes

Sign up to request clarification or add additional context in comments.

1 Comment

The answer for B was false also.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.