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

Draw the logic circuit of Decimal to BCDencoder, What is an encoder? Draw t...

What is an encoder? Draw the logic circuit of Decimal to BCD encoder and explain its working. Ans. Encoder: It is a combinational logic circuit which converts alphanumeric ch

Pruning - artificial intelligence, Pruning - Artificial intelligence Re...

Pruning - Artificial intelligence Remember that pruning a search space means deciding that particular branches should not be explored. If an agent  surly  knows that exploring

Build and fix model, Why Build and fix model is considered as ad-hoc softwa...

Why Build and fix model is considered as ad-hoc software development model?

Determine the types of software, Determine the types of software There ...

Determine the types of software There are two types of software today: Application and systems. Meaning of the two changes computer to computer. As we concentrate on large c

DISCRETE STRUCTURES, SET 2I OF ALL INTEGERS WITH ZERO IS AN ABELIAN GROUP

SET 2I OF ALL INTEGERS WITH ZERO IS AN ABELIAN GROUP

What is disadvantage of distributed systems, What is disadvantage of Dis...

What is disadvantage of Distributed systems? Ans. Reliability is disadvantage of Distributed system.

Deta sturcture, algorithm of travalling salesman problam

algorithm of travalling salesman problam

Distinguish between an agent system and an expert system, Problem : (a)...

Problem : (a) The concept of an agent is generally defined by listing the properties that agents exhibit. Identify and describe the properties that you would associate with th

Explain the storage class extern, Explain The Storage Class extern The...

Explain The Storage Class extern The Storage Class extern : One method of transmitting information across blocks and functions is to use external variables. When a variable is

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