Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Q. Explain various graph traversal schemes and write their advantages and disadvantages.
Ans.
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
Representation of Linked list in Memory:- Each node has an info part and a pointer to the next node also known as link. The number of pointers is two in case of doubly linked
Question 1 What is a data structure? Discuss briefly on types of data structures Question 2 Explain the insertion and deletion operation of linked list in detail Qu
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
Q. Which are the two standard ways of traversing a graph? Explain them with an example of each. Ans: T he two ways of traversing a graph are written below
A Stack has an ordered list of elements & an array is also utilized to store ordered list of elements. Therefore, it would be very simple to manage a stack by using an array. Thoug
Implementation of queue using a singly linked list: While implementing a queue as a single liked list, a queue q consists of a list and two pointers, q.front and q.rear.
I=PR/12 numbers of years : Interest Rate up to 1 years : 5.50 Up to 5 years : 6.50 More than 5 year : 6.75 please design an algorithm based on the above information
RGB Model The RGB model is based on the assumption that any desired shade of colour can be obtained by mixing the correct amounts of red, green, and blue light. The exact hues
Q. Can a Queue be represented by circular linked list with only one pointer pointing to the tail of the queue? Substantiate your answer using an example. A n s . Yes a
What do you mean by hash clash? Hashing is not perfect. Occasionally, a collision occurs when two different keys hash into the same hash value and are assigned to the same arra
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!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd