Depth-first search is different from breadth-first search, Computer Engineering

Assignment Help:

Depth-first search is different 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 require to back up as far as possible to find a route originating from the previous vertices. So the stack is not an appropriate structure for finding a previous route because it keeps track of things in the order opposite of their occurrence-the latest route is on top. To keep track of things in the order in which they happened, we use a FIFO queue.

 


Related Discussions:- Depth-first search is different from breadth-first search

Differentiate between compiler and interpreter, (i) Compiler and Interpret...

(i) Compiler and Interpreter: These are two types of language translators. A compiler changes the source program (user-written program) into an object code (machine language b

View the site files, To see a high-level representation of the structure of...

To see a high-level representation of the structure of a local site, you use Dreamweaver's Site Map view. You can also use site map to add new files to the site, to add, remove and

What is critical section problem, What is critical section problem? A ...

What is critical section problem? A race condition at data item occurs when many processes simultaneously update its value data consistency, needs that only one process should

Does xml replace html, No XML does not replace HTML. Instead, it gives an a...

No XML does not replace HTML. Instead, it gives an alternative which permits you to explain your own set of markup elements. HTML is expected to stay in common use for some time to

What are the advantages of using uml, Benefits of using UML breaks the comp...

Benefits of using UML breaks the complex system into discrete pieces that can be understood simply. Handover the system to new team becomes simpler. Complex system can be un

Reading decision trees - artificial intelligence, Reading Decision Trees ...

Reading Decision Trees There is a link between decision tree representation and logical representations, which may be exploited to form it more easy  to understand and learned

Pros and cons of assembly language, Pros and Cons of Assembly Language ...

Pros and Cons of Assembly Language The following are a number of advantages / disadvantages of employing assembly language: Assembly Language offers more control over ha

Boolean algebra, Prove the following Boolean identities using the laws of B...

Prove the following Boolean identities using the laws of Boolean algebra (A + B)(A  + C) = A + BC Ans. (A+B)(A+C)=A+BC LHS AA+AC+AB+BC=A+AC+AB+BC OR  A((C+1)+A(B+1))+BC

What is a convertor?, Converter is an application that converts distance me...

Converter is an application that converts distance measurements among metric and U.S units.

What is machine.config, What is Machine.config?  Machine configuration ...

What is Machine.config?  Machine configuration file: The machine. config file contains settings that apply to the whole computer.  The machine.config, which can be found in 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