Graph theory is a mathematicsâ€™s field which studies graphs. The graph itself is defined as a collection of nodes which are connected by edges. The edges can be directed or undirected. Social networksÂ can also be represented as a graph; for example a user as a node and its friends which links to the user is …