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

Mechanisms for pick and place industrial robots - robotics, Each group is r...

Each group is required to complete a group assignment on the analysis, modelling and classification of one of the following classes of mechanisms encountered in robotics and indust

What is a virtual address, Q. What is a virtual address? Von Neumann ha...

Q. What is a virtual address? Von Neumann had suggested that execution of a program is possible only if program and data are residing in memory. In such a condition program len

Design a circuit which computes the square of a number, Design a circuit wh...

Design a circuit which computes the square of a number? This should not make use of any multiplier circuits. This should use Multiplexers and some other logic as: 1^2=0+1=1

What is the advantage of buffering, What is the advantage of buffering? Is ...

What is the advantage of buffering? Is buffering always effective? Justify your answer with help of an example. I/O buffer: One type of input-output requirement arises from d

the entire pcd division, Will executing  SAP R/3 across the entire PCD div...

Will executing  SAP R/3 across the entire PCD division give the division with a competitive benefit?  Clarify  your answer carefully.

What are parallel algorithms, What are Parallel Algorithms? The central...

What are Parallel Algorithms? The central assumption of the RAM model does not hold for some newer computers that can implement operations concurrently, i.e., in parallel algor

What are concentrators, What are concentrators? Explain how it helps in con...

What are concentrators? Explain how it helps in connecting number of subscribers. In rural areas, subscribers are usually dispersed. This is both unessential and expensive to g

Performance of computer system, Performance of computer system: Comput...

Performance of computer system: Computer performance is frequently described in terms of clock speed (usually in MHz or GHz). It refers to the cycles per second of the main cl

Data validation and data transfer, Data Validation condition: The following...

Data Validation condition: The following condition stated below must be met for a data to be valid as is shown in the figure 3a below. 1. The data on the SDA line must remain stabl

Distinguish between complex type and simple type elements, Problem: (a)...

Problem: (a) (i) Distinguish between Complex Type and Simple Type elements. (ii) List two benefits while using XSDs in XML data modeling. (b) Both XML schema and XSL u

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