Difference between depth first and breadth first traversing, Computer Engineering

Assignment Help:

Explain the difference between depth first and breadth first traversing techniques of a graph.  

Depth-first search is dissimilar from Breadth-first search in the following ways: A depth search traversal method goes to the deepest level of the tree first and then works up whereas a breadth-first search looks at all possible paths at the similar depth before it goes to a deeper level. When we come to a dead end in a depth-first search, we back up as little as possible. We try another route from a new vertex-the route on top of our stack. In a breadth-first search, we need to back up as far as possible to search a route originating from the previous vertices. So the stack is not an appropriate structure for searching an early route because it keeps track of things in the order opposite of their occurrence-the new route is on top. To keep track of things in the order in which they happened, we use a FIFO queue. The route at the front of the queue is a route from an previous vertex; the route at the back of the queue is from a later vertex.

 


Related Discussions:- Difference between depth first and breadth first traversing

What is circular shift, What is Circular shift The circular shift is al...

What is Circular shift The circular shift is also called as rotate operation. It circulates bits of the register around two ends and there is no loss of information. This is do

Cache simulater, Requirements You are required to program (in a high l...

Requirements You are required to program (in a high level language such as C, C++, Java) and implement a cache simulator which will have the following inputs and outputs:-

What is the working of domain expert, Q. What is the working of domain expe...

Q. What is the working of domain expert? ANSWER: The domain expert is the person who gives the domain expertise in the form of problem-solving strategies.

is risc always fast, It is fast because it has got separate program and da...

It is fast because it has got separate program and data memory(highly pipelined architecture)

Conversion of base 10 to base 22 numerical system?, Hypothesis ... since th...

Hypothesis ... since the Hebrew language is a Numerical language meaning that each letter in their alphabet has a numerical value. I believe, that the Hebrew-language based on a r

Convert the following from hexadecimal to binary, Q. Convert the following ...

Q. Convert the following from hexadecimal to binary, decimal, BCD and octal. a) 111 b) ABC.25 c) 2.C Q. Convert the following from BCD to binary, decimal, hexadecimal an

C program, a c program to implement multiple stack in a single array

a c program to implement multiple stack in a single array

What is precloud computing, What is precloud computing? Precloud comput...

What is precloud computing? Precloud computing is an email access was through a single computer, which also keeps all email messages. Example: Microsoft Outlook or Outlook Expr

C programming, There is a pebble merchant. He sells the pebbles, that are u...

There is a pebble merchant. He sells the pebbles, that are used for shining the floor. His main duty is to take the length of the room’s sides. But he sometimes mistakes doing that

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