DEV Community

Cover image for Introduction to graph in data structure
Aya Bouchiha
Aya Bouchiha

Posted on • Updated on

Introduction to graph in data structure

Definition of Graph

  • Graph: is a non-linear data structure that consists of a finite set of nodes or vertices and a set of Edges which link a pair of vertices.

Notation & some definitions

  • Nodes: entities whose relationships are expressed using edges.

  • An edge is an incident on the two nodes it connects.

  • Any two nodes connected by an edge or any two edges connected by a node are said to be adjacent

  • Weight: is a piece of information or an associated value that edges have.

  • V: the set of nodes (vertices).

  • |V|: the total number of nodes.

  • E: the set of edges.

  • |E|: the total number of edges.

Applications and real-life examples of using Graph

  • Google map
  • Friend suggestion on Facebook
  • Recommendations in e-commerce website
  • studying molecules in chemistry and physics
  • Operating systems
  • VPN
  • Building networks
  • Trafic lights
  • Google search

References and useful resources

Have an amazing day!

Top comments (7)

Collapse
 
aatmaj profile image
Aatmaj • Edited

Hey Aya, why don't you make your data structure posts as series? Click on edit, then on the setting button create a new series...

Collapse
 
ayabouchiha profile image
Aya Bouchiha

I did not know that I could make my data structure posts as series, Thank you so much for the information🙏, I will make it now😁

Collapse
 
aatmaj profile image
Aatmaj

No worries. Just weave all your data structure blogs together, so that viewers can get too view of that in one place! They can also get the hyperlink to reference in their own posts.
You are doing a great job in here. Even I will recommend the series in my Learning Python course soon.😁

Thread Thread
 
ayabouchiha profile image
Aya Bouchiha

Do you recommend that I make multiple series like one for sorting algorithms, one for searching algorithms, one for trees, another one for graphs... Or do you recommend that I make one series that groups all my data structure and algorithms series? thanks a lot, I'm gonna do it too in my next posts 😊

Thread Thread
 
aatmaj profile image
Aatmaj

One series that groups all data structure and algorithms

Thread Thread
 
ayabouchiha profile image
Aya Bouchiha

I appreciate your feedback😊

Collapse
 
ayabouchiha profile image
Aya Bouchiha

Have a great day!