Introduction:
Graph data structure is one of the significant topics in computer science and has been extensively researched in the BCA course for having a grasp on data structures & algorithms. It assists students with the understanding of how different nodes and connections among them help together in a holistic system like a social network, navigation systems, computer networks etc. This gives a better understanding of the graph which helps in solve problems & also programming which is useful for BCA students.
We can easily understand the graph data structure based on the following points: –
1. The graph is a non-primitive, non-linear data structure.
2. A graph is a group of vertices (nodes). One vertex is connected with another vertex and the connection between two vertex is called edge. Edge acts like a communication link between two nodes.
3.The graph is a group of (V, E) where V is a group of vertex and E is a group of edge.
Example:
Types of Graph Data Structure: –
Graph data structure has following types: –
1.Directed Graph:
A graph in which the edges have a direction is called a directed graph. And these types of edges are called directed edges. Directed edges are also called acres. The edges of the graph are represented by a line and if each line has an arrow mark, it is called a directed graph. Directed graph is also called diagraph.
2.Undirected Graph:
A graph that does not have the direction of the edges, that is, it does not have an arrow mark. It is called undirected graph.
3. Weighted Graph:
Sometimes graphs have edges, they carry weight. These weights are real numbers. Both directed and undirected graph can be weighted graph.
Applications of Graph Data Structure:
Graph data structure is used in many real life applications. Some of them are as:
- Shortest path problem
- Network analysis
- Travelling salesman problem
- Routing algorithms
- Google maps
Frequently Asked Questions (FAQs)
Q.1 What is graph ?
Ans: A graph is a data structure.
Q.2 Graph is a which type of data structure?
Ans: Graph is a nonlinear data structure.
Q.3 Graph consist which elements?
Ans: Graph is consisting two elements vertex and edge.
Q.4 What are the applications of graph?
Ans : Graph is used in network analysis, shortest path problem , routing problems etc.
Conclusion:
Graph data structure is a nonlinear data structure which is basically used in network analysis. The network is consisting of vertex (node or location) and edge (connectivity among vertices) . It is used in many real-life problem solutions.
Author
Mr. Rahul Agarwal
Associate Professor,Department of CS & IT
Biyani Group Of Colleges,Jaipur