For example, the edge between "Anuj" and "Deepak" is bi-directional and hence the relationship between them is two ways, which turns out to be that "Anuj" knows "Deepak" and "Deepak" also knows about "Anuj". edge) and that edge doesn't have any kind of direction associated with it. If we take a look at the pictorial representation that we had in the Real-world example above, we can clearly see that different nodes are connected by a link (i.e. Null GraphsĪ graph is said to be null if there are no edges in that graph.Ī pictorial representation of the null graph is given below: Let's cover various different types of graphs. The social network depicted above is nothing but a graph. It should also be noted that the relationship of knowing each other goes both ways like "Abhishek" knows "Mukul" and "Mukul" knows "Abhishek". The names here are equivalent to the nodes of a graph and the lines that define the relationship of "knowing each other" is simply the equivalent of an edge of a graph. ![]() If there's no line in between the names, then they simply don't know each other. Real-World ExampleĪ very good example of graphs is a network of socially connected people, connected by a simple connection which is whether they know each other or not.Ĭonsider the figure below, where a pictorial representation of a social network is shown, in which there are five people in total.Ī line in the above representation between two people mean that they know each other. ![]() In the above graph we have a set of nodes respectively. The nodes in any graph can be referred to as entities and the edges that connect different nodes define the relationships between these entities. In the figure below, we have a simple graph where there are five nodes in total and six edges. Each item in a graph is known as a node(or vertex) and these nodes are connected by edges. ![]() A graph is an advanced data structure that is used to organize items in an interconnected network.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |