Graph is composed of:
a set of vertices, and a set of edges between the vertices.
Path: Sequence of vertices such that the consecutive vertices are adjacent.
Graph can be:
1. Connected
2. Non-connected: There exists two vertices between which there is not path.
Graph can have cycles.
Tree vs Graph:
Tree is a connected graph with no cycle. Thus tree has exactly n-1 edges.
Generally Tree is referred as rooted tree (the tree structure know earlier), but the tree as a graph do not have notion of Root (thus also called free tree).
Spanning Tree:
is a Sub-graph (of Graph G) which is tree and contains (spans) all the vertices of the graph G. Thus would have n-1 edges.
Graphs can be directed or undirected.