Graph traversal schemes, Data Structure & Algorithms

Q. Explain various graph traversal schemes and write their advantages and disadvantages.


Graph Traversal Scheme is explained below

In many troubles we wish to investigate the total vertices in a graph in some systematic order. In graph we frequently do not have any one vertex singled out as special and therefore the traversal may begin at an arbitrary vertex. The two famous methods or techniques for traversing are:-

a) Depth first traversal is explained below:
The breadth traversal of a graph is roughly analogous to pre-order traversal of an ordered tree. Assume that the traversal has just visited a vertex or, and let W0, W1,......Wk be the vertices near to V. Then we shall next visit W0 and keep W1.....Wk  waiting. After visiting W0  we traverse all the vertices to which it is near before returning to traverse W1, W2, ........Wk.

b) Breadth first traversal: of a graph is around analogous to level by level traversal of ordered tree. If the traversal has just visited a vertex V, then it next visits all the vertices adjoining to V. Putting the vertices adjoining to these is a waiting list to be traversed after all the vertices adjoining to V have been visited. The figure below shows the order of visiting the vertices of one graph under both DFS and BFS.


DFT = 1 2 3 4 5 6 7 8 9

BFT= 1 2 9 3 5 6 4 7 8

Posted Date: 7/13/2012 2:28:12 AM | Location : United States

Related Discussions:- Graph traversal schemes, Assignment Help, Ask Question on Graph traversal schemes, Get Answer, Expert's Help, Graph traversal schemes Discussions

Write discussion on Graph traversal schemes
Your posts are moderated
Related Questions

The data structure needed to evaluate a postfix expression is  Stack

implement multiple stack in single dimensionl array.write algorithms for various stack operation for them

A common person's faith is that a computer can do anything. It is far from truth. In realism computer can carry out only definite predefined instructions. The formal illustration o

A stack is a last in, first out (LIFO) abstract data type and sequential data structure. A stack may have any abstract data type as a component, but is characterized by two fundame

The pre-order and post order traversal of a Binary Tree generates the same output. The tree can have maximum One node

Circular Queues:- A more efficient queue representation is get by regarding the array Q(1:n) as circular. It becomes more convenient to declare the array as Q(O: n-1), when  re

Explain the Assertions in Ruby Ruby offers no support for assertions whatever. Moreover, because it's weakly typed, Ruby doesn't even enforce rudimentary type checking on opera

Determine the Disjoint of division method A polygon is disjoint from the viewport if the x- and y-extents of the polygon do not overlap the viewport anywhere. In this case; reg

Q. Write down any four applications or implementation of the stack.                                     Ans. (i)       The Conversion of infix to postfix form (ii)