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

Dqueue, algorithm of output restricted queue.

algorithm of output restricted queue.

Which are the two standard ways of traversing a graph, Which are the two st...

Which are the two standard ways of traversing a graph? i. The depth-first traversal   ii. The breadth-first traversal

COBOL, write a COBOL program to find the biggest of two numbers

write a COBOL program to find the biggest of two numbers

Explain the sum of subset problem, a. Explain the sum of subset problem. Ap...

a. Explain the sum of subset problem. Apply backtracking to solve the following instance of sum of subset problem: w= (3, 4, 5, 6} and d = 13. Briefly define the method using a sta

#title., Ask quapplication of data structure estion #Minimum 100 words acce...

Ask quapplication of data structure estion #Minimum 100 words accepted#

C++, #What is the pointer

#What is the pointer

Write the algorithm to find input and output value, This algorithm inputs 5...

This algorithm inputs 5 values and outputs how many input numbers were positive and how many were negative. Data to be used: N = 1, -5, 2, -8, -7

Design a binary search tree, Binary Search Tree usage: Write a progra...

Binary Search Tree usage: Write a program to compare the time taken for a search in a skewed tree, a balanced tree, and a random tree. Speci cally, your program should do the

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