Because it is connected graph from an arbitrary point so that, by a certain depth-first traversal can pass through all the edges and points, can use this property to be easily determined by DFS whether a connectivity graph of FIG.
The following is a specific algorithm: