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

How the characters used in operand data type, Q. How the Characters used in...

Q. How the Characters used in operand data type? A common form of data is character or text strings. Characters are signified in numeric form mostly in ASCII (American Standard

Explain rational robots coding standards, The standards are for all testers...

The standards are for all testers using the IDE of Rational Robot to make their automated test scripts. The mission is to decrease maintenance costs when it comes to changes.

Determine the order in which optimized c-scan would service, Consider the s...

Consider the situation in which the disk read/write head is currently located at track 45 (of tracks 0-255) and moving in the positive direction. Assume that the following track re

Sql injection, SQL Injection includes entering SQL code into web forms, eg....

SQL Injection includes entering SQL code into web forms, eg. login fields, or into the browser address field, to access and manipulate the database across the site, application or

What is the working of domain expert, Q. What is the working of domain expe...

Q. What is the working of domain expert? ANSWER: The domain expert is the person who gives the domain expertise in the form of problem-solving strategies.

Draw and illustrate the block diagram of DMA controller, Draw and illustrat...

Draw and illustrate the block diagram of DMA controller. Also discuss the various modes in which DMAC works. Direct memory access (DMA) is a process in that an external device

Assessing heuristic searches-artificial intelligence, Assessing Heuristic S...

Assessing Heuristic Searches Given a specific problem you want to create an agent to solve, there can be more than one way of specifying it as a search problem, more than one o

Pebble merchant, There is a pebble merchant.He sells the pebbles,that are u...

There is a pebble merchant.He sells the pebbles,that are used for shining the floor.His main duty is to take length of the room''s sides. program 1 : package test.padovanstring

Computer science, Read in integers until a zero is read in. Keep a total o...

Read in integers until a zero is read in. Keep a total of both the quantity and the sum of the negative integers and the positive integers. Once a zero is read in (signifying the

Digital electronics, what is Asynchronous Finite State Machines?

what is Asynchronous Finite State Machines?

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