Professional Documents
Culture Documents
Important Note:- Graph can be directed graph where the edges are
directed or in ordered pair or graph can be undirected where the order of
edges is immaterial.
1
Main facts about depth-first search (DFS)
and breadth-first search (BFS)
2
For example, a graph G with V vertices is a tree if
and
only if it satisfies any of the following five
conditions:
G has V1 edges and no cycles.
G has V1 edges and is connected.
G is connected, but removing any edge
disconnects it.
G is acyclic, but adding any edge creates a cycle.
Exactly one simple path connects each pair of
vertices in G.