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 relational database, What is relational database? Relational da...

What is relational database? Relational database has data that is perceived as tables. A relational DBMS manages tables of data and associated structures that enhances the func

Explain the logic symbols - flip flops, Explain the Logic symbols - Flip Fl...

Explain the Logic symbols - Flip Flops? These flip-flops are as well called Master-Slave flip-flops simply because their internal construction is divided into two sections. Th

Propositional logic, Propositional Logic: This is a fairly restrictive...

Propositional Logic: This is a fairly restrictive logic, that allows us to be write sentences about ¬propositions - statements about the world - that can either be true or

Microprocessor MIPS Full Adder and Divider with overflow, I need to write a...

I need to write a 32 bit adder in MIPS without using the Add command and a divider as well.

How to access the disk data, Q. How to Access the Disk Data? Disks oper...

Q. How to Access the Disk Data? Disks operate is semi-random mode of operation and generally referenced block wise. The data access time on a disk comprises two major component

Explain about hamming error correcting code, Q. Explain about Hamming error...

Q. Explain about Hamming error correcting code? Richard Hamming at Bell Laboratories worked out this code. We will only introduce this code with help of an illustration for 4 b

client will now send ten integers , Change this program so that every clie...

Change this program so that every client will now send ten integers and receives their sum from the server. In Java, for loops can be easily executed as follows: for (int i = 0 ; i

Artificial neural networks, Artificial Neural Networks: However imagin...

Artificial Neural Networks: However imagine now in this example as the inputs to our function were arrays of pixels and there actually taken from photographs of vehicles such

Explain microcode and VLSI technology, Q. Explain Microcode and VLSI Techno...

Q. Explain Microcode and VLSI Technology? It is considered that CU of a computer be assembled using two ways; create micro-program which execute micro-instructions or construct

#title.sequential circuit, design modulo 12 up synchronous counter using t ...

design modulo 12 up synchronous counter using t flip flop

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