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

Explain analysis and synthesis phase of a compiler, Explain analysis and sy...

Explain analysis and synthesis phase of a compiler. The synthesis and analysis phases of a compiler are: Analysis Phase: In this breaks the source program in constituent

Two methods of copying a information document, There are basically two meth...

There are basically two methods of copying: Photocopying This is a modified development of photography. It is quite expensive and slow and is not often used for routine rep

Prepurchase and purchase consummation of consumer mercantile, Differentiate...

Differentiate between Prepurchase and Purchase Consummation of consumer mercantile model. The prepurchase interaction for consumers comprises three activities: Product/ser

Difference between shadow and override in programming, Overriding tell us o...

Overriding tell us only the methods, but shadowing tells us the entire element.

Database, er table for hospital management system

er table for hospital management system

Visual basic applications in general context, Describe some general uses fo...

Describe some general uses for Visual basic applications in general context? Ans) Visual basic can be used within almost all Microsoft products such as Map point, Visio, Auto ca

Planning too much up front a mistake in an oosad, You can't plan only for t...

You can't plan only for the present phase of the project as your future activities are still coarse granular. To have good planning you require to have fine granularity w.r.t the t

Solution of multi-layer ann with sigmoid units, Solution of multi-layer ann...

Solution of multi-layer ann with sigmoid units: Assume here that we input the values 10, 30, 20 with the three input units and from top to bottom. So after then the weighted s

Software Engineering, explanation of the difference between syntax and sema...

explanation of the difference between syntax and semantic errors

Fuzzy logic - artificial intelligence, Fuzzy Logic - artificial intelligenc...

Fuzzy Logic - artificial intelligence: In the above logic, we have been concerned with truth whether propositions and sentences are true. But, with some natural language statem

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