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 transmission gate-based d-latch, The Transmission-Gate input is lin...

The Transmission-Gate input is linked to the D_LATCH data input (D), the control input to the Transmission-Gate is linked to the D_LATCH enable input (EN) and the Transmission-Gate

Explain the client-server interaction using messages, Explain the Client-Se...

Explain the Client-Server Interaction Using Messages As we have learned, client- server interaction may be managed in many ways. A message- based interaction is perhaps the bes

Cse 320, Explain the functionality of the quadrant approach in the Spiral M...

Explain the functionality of the quadrant approach in the Spiral Model ?

What is a work process, What is a work process? A work process is where ...

What is a work process? A work process is where individual dialog steps are in fact processed and the work is done.  Every work process ocuurs one type of request.

Why some languages are not decidable, Why some languages are not decidable ...

Why some languages are not decidable or even Turing - recognizable?  The  reason  that  there  are  uncountable  many  languages  yet  only  countably many  Turing  machines.

Show some characteristics of linux, Show some characteristics of Linux? ...

Show some characteristics of Linux? It's a Unix-like computer operating system one of the most major examples of free software and open source development: typically all underl

Which is most general phase structured grammar, Which is most general phase...

Which is most general phase structured grammar? Context – Sensitive is most common phase structured grammar.

Using library methods returns number of threads, Q. Using Library methods r...

Q. Using Library methods returns number of threads? #include void subdomain(float x[ ], int istart, int ipoints) { int i; for (i = 0; i x[istart+i] = 123.456;

RISC performance using optimizing compilers, Q. RISC Performance using opti...

Q. RISC Performance using optimizing compilers? Performance using optimizing compilers: As instructions are simple compilers can be developed for efficient code organization a

Multiple instruction and single data stream (misd), Multiple Instruction an...

Multiple Instruction and Single Data stream (MISD) In this association, multiple processing elements are structured under the control of multiple control units. Each control un

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