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 shortest path algorithms, The minimum cost spanning tree ha...

The minimum cost spanning tree has broad applications in distinct fields. It represents several complicated real world problems such as: 1. Minimum distance for travelling all o

Last in first out method, This method is the reverse of FIFO and assumes th...

This method is the reverse of FIFO and assumes that each issue of stock is made from latest items received in the enterprises .Thus if the last lot to be received is not sufficient

Construct a minimum spanning tree, Construct G for α, n, and W given as com...

Construct G for α, n, and W given as command line parameters. Throw away edges that have an asymmetric relation between nodes. That is, if A is connected to B, but B is not connect

Sorted list using binary search technique, Write an algorithm for searching...

Write an algorithm for searching a key from a sorted list using binary search technique 1.   if (low > high) 2.     return (-1) 3.    mid = (low +high)/2; 4    .if ( X

Function performs multiplication of two numbers, You need to write a functi...

You need to write a function that performs multiplication of two numbers in your data structure. Again, remember how you multiply numbers in base 10 and you should be fine. Multipl

Design a time algorithm, Q. An, array, A comprises of n unique integers fro...

Q. An, array, A comprises of n unique integers from the range x to y(x and y inclusive where n=y-x). Which means, there is only one member that is not in A. Design an O(n) time alg

Determine the greatest common divisor, Determine the greatest common diviso...

Determine the greatest common divisor (GCD) of two integers, m & n. The algorithm for GCD might be defined as follows: While m is greater than zero: If n is greater than m, s

Explain the memory function method, Explain the Memory Function method ...

Explain the Memory Function method The Memory Function method seeks to combine strengths of the top  down and bottom-up approaches  to  solving  problems  with  overlapping  su

Procedures, what is far and near procedures in system programming?

what is far and near procedures in system programming?

Explain the arrays in ruby, Explain the Arrays in Ruby Ruby arrays are ...

Explain the Arrays in Ruby Ruby arrays are dynamic arrays which expand automatically whenever a value is stored in a location beyond current end of the array. To the programmer

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