Friday, 8 February 2013

Graphs | Data Structures Tutorial pdf

Graphs

Graph is another type of non-linear data structure.Graph are used to represent many To many relationship.In trees,hierarchical relationship exist between vertices.but in graphs,a variety of relationship may exist.Thus ,graph is an important data structure.
Graph is non-linear data structure that contains two parts:
=> Nodes
=> Edges
It is denoted by G=(V,E) where V is collection of verticesand Ea is collection of edges.
IN OTHER WORDS
=> A set V of elements called node or vertices or points.
=> A set E of edges such that each joining one node to another.
=> In ordered graph,each edge is identified with pair(u,v) such that (u,v)!=(v,u).
=> In Unordered graph,each edge is identified with pair [u,v] such that [u,v]=[v,u].
=> In ordered graph,there is direction specified with each edge.
=> In unordered graph,there is no direction specification with the edges.

No comments: