Definitions of graph, Data Structure & Algorithms

Assignment Help:

A graph G might be defined as a finite set V of vertices & a set E of edges (pair of connected vertices). The notation utilized is as follows:

Graph G = (V, E)

Consider the graph of Figure

For the graph , the set of vertices is V = {1, 2, 3, 4, 5}.

For the graph ,the set of edges is E = {(1,2), (1,5), (1,3), (5,4), (4,3), (2,3) }.

The elements of E are always a pair of elements.

468_DEFINITIONS of graph.png

Figure: A graph

It might be noted that unlike nodes of a tree, graph contain a very restricted relationship among the nodes (vertices). There is no direct relationship among the vertices 1 & 4 although they are connected through 3.

Directed graph & Undirected graph: If in a graph every edge (a,b) is marked through a direction from a to b, then we call it a Directed graph (digraph). Conversely, if directions are not marked onto the edges, then the graph is called an Undirected graph.

In a Directed graph, the edges (1,5) & (5,1) represent two distinct edges while in an Undirected graph, (1,5) & (5,1) represent the similar edge. Graphs are utilized in several types of modeling. For instance, graphs can be utilized to represent connecting roads among cities.


Related Discussions:- Definitions of graph

Applications of avl trees, AVL trees are applied into the given situations:...

AVL trees are applied into the given situations: There are few insertion & deletion operations Short search time is required Input data is sorted or nearly sorted

Memory allocation strategies, Q. Explain the various memory allocation stra...

Q. Explain the various memory allocation strategies.                                                            Ans. M e m ory Allocation Strategies are given as follow

#title.state charts., explain two strategies to implement state charts with...

explain two strategies to implement state charts with the help of an example of each.

Linked list, How to creat ATM project by using double linked list?

How to creat ATM project by using double linked list?

Trees, Have you ever thought about the handling of our files in operating s...

Have you ever thought about the handling of our files in operating system? Why do we contain a hierarchical file system? How do files saved & deleted under hierarchical directories

Determine in brief the painter algorithm, Determine in brief the Painter A...

Determine in brief the Painter Algorithm a) The farthest polygon, namely the rectangle PQRS, is stored first. (b) The next farthest, the quadrilateral ABCD, is superpo

Example of back face detection method, Example of Back Face Detection Metho...

Example of Back Face Detection Method To illustrate the method, we shall start with the tetrahedron (pyramid) PQRS of     Figure with vertices P (1, 1, 2), Q (3, 2, 3), R (1,

Boar corloring, Board coloring , C/C++ Programming

Board coloring , C/C++ Programming

What is Oscillating Sort?, For the Oscillating sort to be applied, it is ne...

For the Oscillating sort to be applied, it is necessary for the tapes to be readable in both directions and able to be quickly reversed. The oscillating sort is superior to the po

Create a binary tree , Create a class "box" that will contain a random inte...

Create a class "box" that will contain a random integer value v such that O

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd