DefinitionA graph is essentially a collection of nodes and links and graph theory is the branch of mathematics that studies these in detail. Directed versus undirected and weighted versus unweighted graphs are also considered, and in general, they are used to encode the relationships and interactions within a variety of systems. Graph theory is a rich field of mathematics with applications to networking, routing, logic puzzles, and more. They manifest in many domains, from computer science (networking, algorithms), biology (gene networks), social sciences (social networks) to engineering (circuit design). Example: A graph G=(V,E) where V corresponds to the set of vertices and E corresponds to the set of edges that connect pairs of vertices.