Reputation: 147
I have a list of nodes from a graph, G:
43, 47, 48, 49, 51, 55, 65, 66
I want to check if they are connected as such that I can produce a connected subgraph from these nodes from the graph, G.
But exactly as such where I can start at a terminal node (such as 47, 43, 55 ) and without taking my pencil off the paper, trace until I get to a specified node of choice.
What is this called in graph theory? (So I can do some research on it)
What is the best way to implement this?
Thanks!
Upvotes: 0
Views: 166
Reputation: 2204
I think you can use Depth First Search to find if the nodes are connected.
Upvotes: 1