Depth-first search is different from breadth-first search, Computer Engineering

Assignment Help:

Depth-first search is different 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 require to back up as far as possible to find a route originating from the previous vertices. So the stack is not an appropriate structure for finding a previous route because it keeps track of things in the order opposite of their occurrence-the latest route is on top. To keep track of things in the order in which they happened, we use a FIFO queue.

 


Related Discussions:- Depth-first search is different from breadth-first search

Area under curve, Write a program to find the area under the curve y = f(x)...

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve betw   #includ

what is feram?, Ferroelectric RAM is a random-access memory same in constr...

Ferroelectric RAM is a random-access memory same in construction to DRAM but uses a ferroelectric layer rather of a dielectric layer to achieve non-volatility. FeRAM is one of a gr

Simulate a real life product development , The goal is to simulate a real l...

The goal is to simulate a real life product development and familiarize learners with the design process of a system, component, or process to meet desired requires within realisti

What is the use of system.data.dlinq.dll, System.Data.DLinq.dll gives funct...

System.Data.DLinq.dll gives functionality to work with LINQ to SQL.

Electrochemistry and batteries, differentiate between concentration cells a...

differentiate between concentration cells and electrolytic cells with suitable examples?

Explain the difference between a subroutine and macro, Explain the differen...

Explain the difference between a subroutine & macro. It is inefficient to have to write code for standard routines.  For instance reading a character form the keyboard or savin

Explain extranet, Extranet : Extranet is Extension of an Intranet that ...

Extranet : Extranet is Extension of an Intranet that makes the latter accessible to outside companies or individuals with or without an intranet. It is also described as a coll

Register data type as sequential element, Reg data type as Sequential eleme...

Reg data type as Sequential element module reg_seq_example( clk, reset, d, q); input clk, reset, d; output q; reg q; wire clk, reset, d; always @ (posedge clk or

Explain active matrix or thin film transistor technology, Q. Explain Active...

Q. Explain Active Matrix or Thin Film Transistor technology? This is known as TFT (Thin Film Transistor) technology. In this there is a transistor at every pixel acting as a r

Multi tasking environment, Q. Explain about Multi tasking environment? ...

Q. Explain about Multi tasking environment? Multi tasking uses parallelism by: 1) Pipelining functional units are pipe line mutually 2) Simultaneously employing multiple

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