Email : info@mdjakarianur.com

|

Contact : +88 01840-713661 (WhatsApp)

Basic Concepts of Graph

Basic Concepts of Graph

What is a graph?
• A data structure that consists of a set of nodes or vertices and a set of edges that relate the nodes to each other
• The set of edges describes relationships among the vertices

 

Undirected graphs
• When the edges in a graph have no direction, the graph is
called undirected

 

Directed Graph

When the edges in a graph have a direction, the graph is called directed graph.

 

Graph Representation
Vertices can be represent as one dimensional array.
Graph edges are commonly represented in two ways:

1. Adjacency Matrix
An adjacency matrix is 2D array of V x V vertices. Each row and column represent a vertex.
If the value of any element a[i][j] is 1, it represents that there is an edge connecting vertex i and vertex j.

 

2. Adjacency List
Adjacency list is a collection of unordered lists used to represent a finite graph.

 

Graph terminology
Complete graph: A graph in which every vertex is directly connected to every other vertex.

 

 

 

 

 

One response to “Basic Concepts of Graph”

  1. Stan Store alternatives Avatar

    I’m extremely inspired together with your writing abilities as well as
    with the format on your blog. Is this a paid topic or did you customize it
    your self? Anyway keep up the nice quality writing, it’s uncommon to peer a nice blog like this one today.

    Beehiiv!

Leave a Reply to Stan Store alternatives Cancel reply

Your email address will not be published. Required fields are marked *